CUPS dies after up2date

I decide to run up2date, you know, the "Windows Update"ish thing that appears in the Fedora Core gui. And what happens? CUPS stops printing, that's what. Great. I cannot get CUPS to open up from any othe IP address other than 127.0.0.1

The culprit? Well, it appears that the /etc/cups/cupsd.conf file got overwritten, with a panicky "Block everything!" version. Fortunately, there was a cupsd.conf~ file that appears to be the original one before it got lobotomized. I replaced the busted cupsd.conf with the old one, and everything was back to normal.

"up2date" indeed. And everybody dogs Microsoft! Bah.

file sharing with NFS

Being one of those folks who makes their living using Microsoft products, I've found it both a rewarding experience and also a frustrating challenge to do many simple tasks in Linux. One of those thasks which have escaped my grasp for a time is that of file sharing. Those of you familiar with Windows file sharing know it's pretty brain dead easy to share a folder. Turns out it isn't too tricky in Linux, either; once you know what to do.

As with most thing I've learned in Linux, doing a Google search turned up the answer. This time the answer is: Sharing, the NFS way. No point in my redescribing it all, so just follow the link and get educated like I did. Of course, you probably had more common sense than I and you googled alread. Or maybe your googling lead you here. Whatever.

Apache and file permissions

Apache, Samba, whatever. I know this much; I go to save something on the server, and it's "Permission Denied". I go to debug a CFMX template and get "Permission Denied."

Enough already. I don't like how users and groups work on Linux. Compared to Windows, Linux is postively stone-age. Windows, you can have multiple groups set up to have access to a given folder. Linux? Ha! Unless I'm wrong, which could be very likely, you get one owner and one group per resource. chmod lets you assign permission to owner/group/world, but that's it for flexibility.

Well, enough whining. I determined my problems with Apache and Samba were indeed due to ownership issues, all my stuff was owned by user "root", group "root".

I created a new "web" group, added myself, root, and others to that group, and I assigned that group to my stuff. Wah-lah, it worked. Ask me what specific command I used, and I forgot. I know I used chgrp and chmod, but other than that, I forget. Not to make too shameless of a plug, but if you pick up Linux for Windows Administrators, it will help a load. It sure did for me.

But I must say, file permissions are pretty rudimentary on Linux. But you know what? If my heart isn't right with Jesus, it doesn't matter about chgrp or chmod.

Lighting Up MySQL

Now that BlueDragon is lit, I need to get MySQL going. Back when I did my other Linux server, I picked up the excellent book MySQL Bible (with CDROM!), by Steve Suehring. As an aside, I do not find the suffix "...Bible" offensive on books. Why? Becaue the Bible is not called "Bible", it is called "Holy Bible", or better stated, Book of Holiness. So, I have the MySQL Bible for things MySQL, and the Holy Bible for things Holy. Clearly, though, the Holy Bible is far more important.

Right now, though, I'm sure you are interested in the MySQL stuff, though. I don't want to take too much away from the book, so if you click the links and buy yourself a copy, you'll get what is IMHO a fantastic book on MySQL, and SQL in general.

Well anyway, here is the short version. I ain't gonna spell it out for you this time cuz' I'm really gunning for you to buy the book and dump a few cents into my Amazon account as a result. Here is the short version:
Use the mysqladmin command to provide a password for the root MySQL account
Use the mysql command to log in with the root account
Create a new user account, and grant that user 'do anything' permissions so you can avoid using the root account for regular maintenance
Create a database
Grant the new account permission to the database
Get out of mysql and go back in, logging in with the new user account you made.
See if you can get into the database you made. Mind you, I presume you know enough SQL to do stuff like SELECT statements an' all. If not, you can get SQL help by googling around.

At this stage, I got MySQL lit up, so I'm happy.
(2 minutes later)
Not happy.
I go to the BlueDragon admin page, go to add the datasource, and get this:
The driver org.gjt.mm.mysql.Driver could not be found or was invalid
So now what to do? I'll google around.
Looks like I need something called MySQL Connector/J, which is the JDBC connector for MySQL. Makes sense.
I download it.
And how do I install this stupid thing? I ain't no Linux guru, not yet, at least.
I dig into the BlueDragon docs, and read that due to licensing restrictions, they can no longer bundle the MySQL JDBC driver, but I can get info on installing it here.
Fine.
I follow the instructions on the site, and they are rather simple. After that, I rebooted the server (I had the time), and after it came back to life, I went into the BlueDragon admin page. I added in a MySQL datasource, and it connected fine. I verified the datasource, and it.. failed! "Access for user ...@(servername) denied." When I created the MySQL user account, I named it ...@localhost. My mistake. I made a new account named with the @(servername) suffix, and wah-lah, BlueDragon verified the DSN.

Now to see about getting Apache tied in...

BlueDragon 6.1

I've been using CFMX for development for some time. Macromedia allows folks to install a fully functional copy of ColdFusion MX for free, but it will work with only a single IP address unless you restart the service.

I have decided to give BlueDragon 6.1 a try. I'm doing the install right now on my server.
Get the download BlueDragon_Server_61-Linux.sh
I launched a Terminal session window (i.e., a command-line window)
chmod a+x BlueDragon_Server_61-Linux.sh
./BlueDragon_Server_61-Linux.sh
and the GUI installer launches, just like it would in Windows.
I went with all the defaults.
It didn't detect my Apache install, but then, I'm not so sure Apache is running. The installers says I can add in webservers afterwards anyway, so it's no big deal.
And by the time I flip back to this page, ba-boom, the installer is done! Nice.
Well, that's nice, but connecting is another thing.
I'm trying to hit http://localhost:8080/bluedragon and am getting "connection refused." Ugh.
Hm. I didn't have Apache started. I start Apache. No dice. I restart BlueDragon. no dice.
I restart the server. Apache and BlueDragon are running. Still no dice.
Fine. I uninstall Blue Dragon (go into the uninstall dir, chmod a+x the bluedragonblahblah.. whatever the name is file, and run it)
And, with that done, I re-install BlueDragon.
The installer still does not detect Apache. Whatever.
This time, however, things work. I visit http://127.0.0.1/bluedragon and after a moment, there is the admin login screen. Nice.

Kernel Compile for EPIA M10000

DISCLAIMER: I am a Linux novice! The instructions here worked for me, but if you follow them, you accept the role of the blind leading the blind!

Okay, I need to roll Appletalk support into my kernel, and I was going to do a custom kernel anyway, so here goes. First off, the stuff. I cruise over to epiawiki.org and pick up patch-2.6.8.1-epia1.bz2.

Okay, at this point, I am working right out of Linux for Windows Administrators, page 169. And I'm logged in as root, I'm using the GUI (that is, telinit 5).

I am going to follow along with the EpiaPatchHowto sheet. I am downloading the latest kernel, and will proceed in the morning. Too tired right now.

Okay, its a couple days later and I have the new kernel running. Here is the lowdown.

Yes, I followed the steps in the EpiaPatchHowto documentation, but with a twist: I downloaded the latest stable kernel, 2.6.8.1. I made the necessary changes to the steps outlined to use the 2.6.8.1 kernel instead.

During step 5 (on that page), the extract would not work at all. Here is how I got around it.
I moved the linux-2.6.8.1.tar.bz2 file to /usr/src and then did bunzip2 linux-2.6.8.1.tar.bz2. I then did tar -xvf linux-2.6.8.1.tar and after all that ran, I now have a /usr/src/linux-2.6.8.1 directory. I then deleted the linux-2.6.8.1.tar file, since I have uncompressed it, and didn't want to keep it lying around there. Also, yes, I know that I could have bunzipped and un-tarred in one step, but it didn't work earlier, and I didn't know what would work. I did it in multiple steps, and it worked. So there!

Okay, now when continuing with the steps in the EpiaPatchHowTo, make the necessary changes to the instructions so that you use the new /usr/src/linux-2.6.8.1 directory.

After finishing the nine steps on that page, you still have to do some more work.

After finishing the steps on that page, get to a command prompt and cd /usr/src/linux-2.6.8.1 to get to the new kernel source directory.

I am using the GUI, and am working in a terminal command window.

Clean out the kernel configs for the new kernel. This is a new kernel, but I want to play it safe.
make mrproper

Fire up the kernel configurator.
make xconfig

There are about a thousand options here, and I cannot possibly list them all. I did, however make the following general changes: Whenever multiple processors were listed, I disabled everything except the VIA stuff. Under networking, I turned off all the cards except the VIA stuff. Also, since I am building this box to run as a server, I turned off just about all the audio stuff, the video stuff, a load of stuff! If I saw any feature that was a for a different computer (i.e. "Dell Laptop"), I turned all that garb off.

By the time I was done, probably half the availble options were disabled.

I saved my choices, and exited the program. This returned me to the terminal command window.

Check that all the dependencies are met
make clean

I was blessed and had no alerts I had to deal with. You may or may not be so blessed.

Mind you, at this stage, I am reading from Page 172 of Linux for Windows Administrators. I cannot recommend this book enough. It is out of date, but still is the best resource book I have.

Edit the Makefile. The book shows using vi, but vi is nasty. Be lazy and use gedit.
gedit Makefile
The fourth line will say something like "EXTRAVERSION =". I changed mine to read "EXTRAVERSION = -epia". Save the file and close gedit. You will be back at the command window.

Time to make the kernel image! This took about 10 minutes.
make bzImage

Make all the modules the kernel will need. This part took hours. This is one of those 'overnight' things.
make modules

Copy the modules to where they need to go. This takes a couple minutes.
make modules_install

Make the RAM disk image.
mkinitrd /boot/initrd-2.6.8-epia.img 2.6.8-epia
Note that along the way I must have messed up somewhere, cuz the name is now '2.6.8-epia'. whatever. This works, so I'm listing it.

Okay, now you put in
make install

Reboot the system.
reboot

And at this point, you should be good to go. When the system reboots, you will see your new kernel as one of the choices, but it will not be the default. Pick your new kernel and try it out.

LaserWriter IIg and CUPS

Now that I got CUPS working with Gimp-Print, I want to get my Apple LaserWriter IIg printer connnected to the CUPS server. The LaserWriter IIg is the first printer Apple had which came with on-board Ethernet, and the IIg was one of thsoe products which defined the end of one era and the start of another. The IIg represents the peak of the LaserWriter II series. My IIg is not really a IIg by birth; it started out as a a II, into which somebody stuffed a IIf motherboard. I bought a IIg board on Ebay and it's rockin. Oh yeah, Apple also had the first laserprinter with a brain -dead easy motherboard that could be swapped out in a minute.

Anyhow, I need to get a service called netatalk running on my server. I found tons of info on this right here. This nice guy has pre-compiled versions of netatalk available, and I'm okay with using one of 'em. I pick the one without shadow support, and untar it.

Well, heh, this guy says I need to have Appletalk compiled into the kernel. Fine, I was going to work on doing up an Epia-specific kernel anyway. Time to lay this project aside and work on the kernel upgrade.

Okay, it is a few days later and the kernel has been recompiled, with Appletalk recognition built in.

Time to get to work. I am watching TV upstairs, and using my laptop to talk to the server via putty.

(some time later) This ain't working. You know what? It was easier to recompile the kernel than to get AppleTalk working! I did this before back on my RedHat 9 server, and it was easy. This time, it is awful. Oh well, I'll keep at it.

(some more time later) This really is starting to be lame. I downloaded the 2.x version of netatalk from sourceforge. I install it, and it does not work. There is some blab about "Berkley DB" I go to www.sleepycat.com and get Berkley DB. And you know what? There ain't no installation instructions! At least not something that is intelligible. Not to me, at least. There are what appear to be install instructions, in Chapter 27 of their docs. And the instructions might as well be in Cantonese. They are meaningless to me. The docs for netatalk say this Berkley DB thing is a necessity. The Berkley DB is basically incomprehensible as far as I care.

It was much easier setting up SAMBA, CUPS, and GIMP+PRINT. Much easier.


Setting up CUPS

I have installed a basic SAMBA setup, and am now looking at getting CUPS up and running. Happily, when I browse to port 631 on my server, the web-based CUPS admin screen comes up. Good.

The trick is this: Unlike most other folks, I have a quirky printer I like, an old HP LaserJet II. I have set up CUPS to work with the LaserJet II before, but it was a horrible nightmare. It literally took months of evenings to get going. Recompiling, adding in GIMP, all this stuff.

Fortunately, I can refer to my functioning server to see if the configs match.

On my new server, from the intro CUPS page, I....

  • click "Manage Printers"
  • "Add Printer"
  • Name: HPLJ2
  • Location: Downstairs
  • Description: LaserJet 2
  • click "Continue"
  • Device: Parallel Port #1
  • Make: HP
  • Model: Where is the "HP LaserJet II series, CUPS+GIMP-printv4.2.4(en)" ??? Great.

I guess I'll pick "HP LaserJet Series CUPS v1.1(en)". This probably means I'm sentenced to the recompiling gulag.

Print test page. Wait 2 min. Page ejects out looking like a spectral view of an audio file. I'm had. It's time to review how to recompile CUPS with GIMP support. Ugh. I remember Foomatic factored in here somehow, too. Bogus.

(one day later) I was working on more CUPS stuff when I ran into trouble with this blog. I swapped out the text editor component with a new one (HTMLArea), and it works fine now.

I'll get back to CUPS later on.

Fedora Core 2 Server Installation

I have a RH9 server running at a leisurly 450mhz. I also have a nice mini-ITX cube with a 1ghz Nehemiah M10000 proc. The old box has a huge power supply, and the box itself is an old recycled Gateway full-tower. The nice new cube has a tiny power supply, and that Nehemiah proc is known for drawing about 4 watts on average. I can live with that.

My current server provides the following services:

  • ColdFusion MX
  • Apache
  • CUPS, complete with Gimp driver, for my HP Laserjet 2
  • SAMBA
I want the new box to do that, plus rip CDs to MP3, using GRIP and the NOTLAME encoder.

I started the process by visiting www.redhat.com, visiting the "Fedora" site, and installing BitTorrent onto another Linux box I have at home. I let the torrent run, and in an evening, I have the ISOs.

I burn the ISOs to CD.

BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.