![]() |
|
#1
|
||||
|
||||
Making a home linux serverFor the curious, I thought I'd mention the "fun" I had over Turkey Day weekend making a linux server.
I've had the spare computer for about two years now and it's been in the closet since I moved to Hawaii. I've wanted to make it a server for a while but never seemed to have the time (nor could I convince the wife). But now that I have a web design business I convinced her that it's a "good thing" to have a testing web server available. Plus I want to learn more about networking and server setup. I have several Linux distro CD's that I've been holding onto for several years but felt I wanted the "latest and greatest", so I tossed them and downloaded Debian. However, that didn't work too well (probably because Hawaii doesn't have any mirror servers nearby; how can Hawaii Pacific Univerisity not have any mirrors?). So I thought I'd try out Ubuntu, since it is the current rising star on the Linux scene. During the install of Ubuntu, I discovered that it doesn't let you create a root and user, only the user; the user is supposed to do everything admin-wise via sudo. I guess it's supposed to be safer but it sucks when you have many admin things to do, especially during setup. Also, it doesn't have a method to pick packages during setup; you get a base system and have to download everything else later. Yes, it probably does give you a good base install but I like to at least see what it's putting on my system. So I nuked Ubuntu from my drive and went to FreeBSD. Again, my location was the downfall; during the net install the system would just freeze. I could watch the speed drop as the install would get near 50% and soon it would drop to 0. I tried installing about 4 times but finally gave up. I put my old Libranet 2.8.1 distro on the system but took it off again. I wanted a newer kernel (it only gives you 2.4) and other features but didn't want to manually do it. Libranet 3.0 is off the market since the founder died and his son doesn't want to continue the work, so even though it's been my favorite distro, I won't be using it again. I finally decided that I'd try Gentoo. I've read about it for several years but have been hesitant to try it because it's not a true distro but a "metadistro". When you install Gentoo, you install only the files that allow you to download the rest of the system. All programs and files are created from source and compiled for your system specs. This intrigued me because you can optimize everything for your system and preferences but I was nervous about dealing w/ config files and other "low level" Linux work. But then I realized it's the same thing I did when I started out self-teaching myself DOS and Windows, so I might as well get some new experience. I installed Gentoo but again had problems w/ the mirror servers. Actually I had a problem connecting to the "rsync" server which is what Gentoo uses to make sure your computer files are up to date. Eventually I was able to connect to the rsync server out of Thailand, but then that connection died. Finally I got a link out of Kuwait and was flying through the install. I won't go through the whole Gentoo install since all I did was follow the most excellent documetation on the Gentoo site. If you decide to try Gentoo, I'd also recommend looking at the review from Distrowatch; it has a few recommendations that will make disk formatting and other setup easier. Suffice it to say, the install was time-consuming but relatively easy. I've learned quite a bit about config files and Linux setup and configuration. I'm not so nervous about dropping to command-line and pounding commands; AAMOF, I'm using the command line on OS X a lot more now to accomplish things that you either can't do via GUI or are just faster via CLI. Using Portage, which is Gentoo's version of apt-get, YaST, or other package installation program, all programs you want to install are pulled from the 'net as source files and compiled on your system. This way your always guaranteed to have the latest version when you install it, and using the command "emerge --sync", your entire system is brought up-to-date. All dependencies are also downloaded (just like apt-get) so you shouldn't have any problems w/ "dependency hell". I've learned how to install apache, FTP, and ssh so I could get rid of the dedicated monitor and just login remotely from my Mac. I found out that I had to force my router to give the server and Mac static IP's so I could login; every time I reboot one of the systems, the router would increment the IP since it defaults to dynamic IP's. Then I had to edit the /etc/hosts file so I could use the computer's name rather than typing in the IP address everytime I want to acces it. Right now I'm having problems getting NFS to work so I haven't been able to mount a directory on the server onto my Mac and I can't seem to get sudo working so I have to change to root everytime I want to make a change. I know I said I don't like sudo, but it's good for when you only need to use a single command. Other than that, I'm pretty proud that I set up a server from scratch and that I know more about Linux than I did before. I may not be an administrator but I'm more than just an operator. __________________
Start Programming with Python-A beginner's guide to programming and the Python language. ------------- Common Sense v2.0-Striving to make the world a little bit smarter. |
||||
|
#2
|
||||
|
||||
Re: Making a home linux serverWell, thought I'd post about a few problems that I've resolved, in case anyone has these problems when making a server.
Can't get sudo to work: Even though I made myself a member of the wheel group (which is the group that can make admin changes), I still didn't seem to have permission to run sudo as a normal user. For all admin changes I had to change to root and that not only isn't safe, but a pain in the butt when you only needed to make one change. I found out that I needed to run visudo to change the sudo permissions but I kept getting an error: "visudo: specified editor (/usr/bin/emacs) doesn't exist!". I installed the GNU-Emacs editor but it still didn't work, so I installed vim, which also didn't work. The only editor that I could get the system to work w/ easily is nano, since the config files referenced it. I finally found out that I could use nano to make the changes even though visudo appeared to want Emacs. The command is Code:
Can't get apache to work: I installed apache to create a web server but I couldn't access the index.html page. I kept getting the dreaded "404 Not Found - The request URL / was not found on this server" error. After trying several things I found on the 'net and Gentoo forums, I discovered that the path to the .html files has to be made executable, hence the following (the .html files are stored in localhost by default: Code:
__________________
Start Programming with Python-A beginner's guide to programming and the Python language. ------------- Common Sense v2.0-Striving to make the world a little bit smarter. |
|
#3
|
||||
|
||||
Re: Making a home linux serverI only have experience with Red Hat and that, was sometime ago.
By the time I got my hands on the Virtual Private Server for my sites, I was comfortable with Fedora Core I, since it's related to Red Hat. Now, on the new server, I have to work with CentOS 4. I've been working with it since December 2nd, 2005 and I can't say I have encountered any problems worth mentioning. When I was searching for a dedicated server last month, I found many providers offering CentOS as the (choice) OS for their (Linux) servers. I took that to mean that it must the "best" distro available right now. "best" here can mean many things to other people but I like it for being uncomplicated -- for example, I have no issues "substituting users" i.e. su, like you do. Quote:
I know the feeling... |
|
#4
|
||||
|
||||
Re: Making a home linux serverHonestly, I haven't heard of CentOS before. Well, actually I've seen the name in passing but it never stuck in my head long enough to remember.
I just looked at www.distrowatch.com to see what it had to say about it. It looks like a pretty powerful (meaning enterprise-level) Red Hat clone. That could be why it's so popular w/ web hosts. On a different note, I just got ProFTPd working, so I can actually upload web pages to Apache and see them. Not really sure how I got it to work, so I'm not going to attempt to document it. I changed the directory permissions and the ProFTPd config files too much to know what actually made it work. But hey, it works! Now if I can only get NFS to work... __________________
Start Programming with Python-A beginner's guide to programming and the Python language. ------------- Common Sense v2.0-Striving to make the world a little bit smarter. |
|
#5
|
||||
|
||||
Re: Making a home linux serverHi Cody.
What issues are you having with NFS? It can be kind of tricky to set up (and use to be honest). Make sure that you have your kernel compiled to include the necessary server/client NFS modules (version 3 or version 4). Also, you need to put in your /etc/exports file a list of the valid exports. There are several other things that I can't remember right now, but if you have done these things and are still having problems, let me know and I can look at my work servers for the other issues. __________________
The best damn Sports Blog period. |
|
#6
|
||||
|
||||
Re: Making a home linux serverCentOS has become quite popular recently because almost all CPanel servers use it. But this thread reminds me, I should do something with the Pentium Pro machine that's sitting in around the corner from me. It would make a nice Linux server.
|
|
#7
|
||||
|
||||
Re: Making a home linux serverQuote:
Now, if I could just get it running so I can have the knowledge, that'd be great. Now that the new Mactels are coming out, I'll probably just buy a Mac Mini this year and not have to monkey w/ networking. __________________
Start Programming with Python-A beginner's guide to programming and the Python language. ------------- Common Sense v2.0-Striving to make the world a little bit smarter. |
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help with me with my site in apache linux server | sadiqbaig | Apache Web Server Forum | 0 | 08-Jun-2005 03:31 |
| Microsoft SQL Server :: SQL Server message 241, state 1, severity 16 | lyuboe | MySQL / PHP Forum | 0 | 11-May-2005 05:31 |
| making home dvds | Hood | Computer Hardware Forum | 3 | 24-Nov-2004 11:54 |
| · Windows 2003 Server Reseller Special: Unlimited Domains/2 GB Space/for $19.99 | contactsonia | Web Hosting Advertisements & Offers | 0 | 09-Jan-2004 06:46 |
| Help making Apache to WAP server ! | Lazmo | Apache Web Server Forum | 1 | 02-Jan-2004 13:27 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The