Linux.com

Feature: Linux

Getting started with the CentOS 4.4 Single Server CD

By Gary Sims on March 21, 2007 (7:00:00 AM)

Share    Print    Comments   

Recently I needed to set up a server with all the usual server components -- Web, mail, and file sharing. It needed to be rock-solid and reliable. I didn't want to download 4GB of software from the Net, so I turned to CentOS' Single Server CD.

CentOS, which stands for Community ENTerprise Operating System, is an enterprise-focused Linux distribution built from the freely available sources (under the GPL and similar licenses) from Red Hat. CentOS 4 is based on Red Hat Enterprise Linux 4 and supports the x86 (i586 and i686), x86_64 (AMD64 and Intel EMT64), IA64, Alpha, and S390 and S390x architectures.

The Single Server CD contains most of the items required for a basic server set up, but without a GUI. It's great for those who want a functional install quickly. Also, since there is no memory-hungry GUI, you can run a basic server with just 128MB of RAM, though of course you will need more if you need to deploy large databases.

Installation

Installing Single Server CD is straightforward, especially if you have installed other Linux distributions. You need to download the Single Server CD from a local mirror, burn it to a disc, and boot your server from that CD.

Even though the Single Server CD doesn't contain a GUI, the installation process uses a graphical interface, which means it's easy to install. Follow the on-screen instructions and the install should be effortless. Tip: If your server doesn't contain any other data and you are happy to have all the disks reformatted, use the "automatically partition" option when it comes to the Disk Partitioning Setup, as this will save you lots of time.

I suggest disabling SELinux and turning off the firewall, especially if your server is secure inside your local LAN. You can change the firewall settings later if you like with the system-config-securitylevel command.

You can safely choose to install the default software packages. This will give you a basic CentOS system with Web, mail, and FTP servers, DNS, and Windows file sharing via Samba. On a modern machine you should be able to have the server installed in less than 20 minutes.

Not all the packages on the CD are installed. For instance, if you require PostgreSQL, you'll have to install it later from the disc. To install PostgreSQL, mount the CD-ROM (mount /media/cdrom) and use yum to install the client libraries and the server:

yum localinstall /media/cdrom/CentOS/RPMS/postgresql-7*
yum localinstall /media/cdrom/CentOS/RPMS/postgresql-server-7*

PHP 5 and MySQL 5

The strength of CentOS is its reliability and stability. It is built around proven packages and doesn't rely on bleeding-edge software. However, there is a disadvantage to this, namely that some of the newest software isn't installed. The most critical omissions, in my opinion, are PHP 5 and MySQL 5, but these packages are available through the CentOS Plus Repository.

By default CentOS 4.4 comes with PHP 4.3.9. To upgrade to PHP 5, make sure your server is connected to the Internet and run the command:

yum --enablerepo=centosplus upgrade php*

The same goes for MySQL. The default in CentOS 4.4 is MySQL 4.1.20. To upgrade to 5, use the following commands:

yum --enablerepo=centosplus upgrade mysql*
yum --enablerepo=centosplus install mysql-server-5*

Simple administration

Since CentOS 4.4 Single Server CD doesn't come with a GUI, you need to do all your configuration via the command line. Here are few keys commands and files to help you configure your server.

To start and stop a service use:

service XYZ start
service XYZ stop

Where XYZ is the service name, e.g. postgresql.

To configure the networking run:

netconfig

To configure a printer run:

system-config-printer

By default there are several system services that are not started at boot time, including the Web server and the MySQL server. To ensure that the essential services are started at boot time, run the following commands:

chkconfig --levels 235 httpd on
chkconfig --levels 235 mysql on
chkconfig --levels 235 smb on
chkconfig --levels 235 vsftpd on

If you need POP3 and IMAP services, you need to configure the dovecot daemon. By default, the dovecot daemon provides only IMAP services. If you also want POP3 you must edit /etc/dovecot.conf and put in the line:

protocols = imap imaps pop3 pop3s

Dovecot isn't started by default either (but is installed as one of the standard packages). To make sure it is started at boot time, type:

chkconfig --levels 235 dovecot on

Once you have everything configured correctly, reboot, not because Linux needs it, but just to be sure that everything comes up and runs as expected.

Conclusion

CentOS is a reliable and robust Linux distribution, and the Single Server CD version is close to perfect for anyone looking for a simple but yet functional server distribution without having to download four or five CDs from the net.

Gary Sims has a degree in Business Information Systems from a British university. He worked for 10 years as a software engineer and is now a freelance Linux writer and consultant.

- Write for us - and get paid! -

Gary Sims has a degree in Business Information Systems from a British university. He worked for 10 years as a software engineer and is now a freelance Linux consultant and writer.

Share    Print    Comments   

Comments

on Getting started with the CentOS 4.4 Single Server CD

Note: Comments are owned by the poster. We are not responsible for their content.

turing off security features?

Posted by: Anonymous Coward on March 21, 2007 05:29 PM
> I suggest disabling SELinux and turning off the firewall

I would be very careful about this, especially about turning off the firewall. On a secure LAN this might be appropriate in some cases, but I can't think of any other scenarios where you should do that.

It's not that hard to set up a basic firewall, so I'd suggest you keep it.

#

i586

Posted by: Anonymous Coward on March 21, 2007 10:32 PM
NB: the ServerCD does NOT have the boot option for i586 kernel. if you want to install on a 586 you need the i386-bin-1of6 CD which does have it. (and then customize, select minimal install etc.)

have been burned by this on 4.2, 4.3, 4.4, and 4.92. maybe I should file a bug heh.

#

CentOS is a fine server--and desktop--OS

Posted by: Anonymous Coward on March 25, 2007 02:02 AM
I use CentOS on my K12LTSP server. It is solid and just plain works. No, I don't have the very latest apps, true. But the thing just works. The CentOS Plus repository is certainly a good thing, though, if you need newer apps.

I run Nagios on RHEL and NMIS on CentOS at work. Both are solid as rocks. One of my laptops runs CentOS 4, and it has yet to fail me, even once.

Johnny Hughes and the rest of the CentOS team certainly have done a good for our community. And it's proof that a company like Red Hat can make plenty of money (they're doing quite well) selling Free Software in accordance with the GPL. It appears that Stallman was right, after all.

Spammers can email me here:
mailto:lker@cmosnetworks.com

#

Minor typo at end of article

Posted by: Anonymous Coward on March 28, 2007 02:11 AM
Hello,
Just wanted to alert others that there is a minor typo in the last section of the article, regarding configuration of mysqld daemon to automatically start up - it should read:

chkconfig --levels 235 mysqld on

Note, the article has it listed as "mysql", not "mysqld".

Other than that, a great article - just finished instaling CentOS 4.4 Single Server CD on an old server using the above...

Ken

#

Why disable SELinux?

Posted by: Administrator on March 21, 2007 10:13 PM
Even if you are on a trusted network, SELinux's security contexts can still help protect against worms, trojans, and other malware. Insecure programming may leave attack vectors open in the services themselves (Apache, MySQL, CGI), and few, if any, firewalls will protect against bad programming. SELinux defines which files are accessible by which tasks, on the system itself, independently of the network and firewall.

At least, that's my understanding. I'm sure someone will correct me if I'm wrong.

#

Re:Why disable SELinux?

Posted by: Administrator on March 22, 2007 03:11 AM
This article comes to mind, for killing selinux

<url:http://blog.craz8.com/articles/2007/03/07/re<nobr>d<wbr></nobr> hat-clever-security-system-where-clever-is-stupid<nobr>/<wbr></nobr> >

#

An alternative

Posted by: Administrator on March 22, 2007 10:17 PM
You can also just download the regular CD 1 of the full-blown CentOS and do a minimal install. That only uses CD 1... so you don't have to download the other CDs. Then you can use yum to install just the server apps you want.

The Server CD is great too... but for those who already have the full CD set who want to do a light-weight install like you mentioned, just plop in CD 1 and do minimal.

You can also easily add a desktop environment by using package group names with yum... so it isn't such a bad deal for someone wanting to download only CD 1 and then bootstrap up a GUI system with YUM only downloading the packages that are going to be installed. Some people act like Ubuntu or Debian are the only distros you can get going easily with a single CD but that certainly isn't the case.

#

Getting started with the CentOS 4.4 Single Server CD

Posted by: Anonymous [ip: 86.60.91.117] on August 20, 2007 10:51 PM
i like do work with linux centos

#

Getting started with the CentOS 4.4 Single Server CD

Posted by: Anonymous [ip: 200.87.232.66] on January 19, 2008 03:09 PM
solicito el instalador de CentOS 4.4 Single Server CD, para un servidor de aplicaciones

#

This story has been archived. Comments can no longer be posted.


 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya