The Elemental Linux Server (ELS) is a niche distribution and is not intended to run on every imaginable hardware configuration. Specifically, it is designed to run on standard x86 PC architecture using SATA or IDE hard drives and CD-ROMs.
ELS will not coexist with other operating systems. It expects to have full control over all hard drives it detects. You cannot configure ELS to dual-boot another OS using the included setup utility.
On the positive side, ELS has very low system requirements. It can easily run on older, discarded hardware, newer "value PCs" or minimally configured virtual machines. Minimum recommended requirements are Pentium II with 128M RAM and a 2G hard disk. Anything exceeding these specs should make a very capable system indeed.
The most straightforward way to install ELS is from a bootable CD-ROM. Visit the ELS home page, download the latest .iso image and burn it to CD. The instructions in the following sections are centered around CD-ROM based installation.
The default action for the CD-ROM is to boot the operating system on the hard drive after a 30 second delay. You must manually select "Install Elemental Linux Server" from the CD's bootloader menu to access the installer.
Upon booting from the ELS CD-ROM you will find yourself at a login prompt. To begin installation, log in as root and type setup to launch the installer script.
When the installation script is finished you will be returned to a shell prompt with a message instructing you to reboot using CTRL-ALT-DELETE. After restart, the system will boot into single-user mode. At this point you can log onto the server console as root and begin configuration.
ELS does not have any specialized system administration tool. Everything is done by issuing standard commands at the shell prompt or editing files in the /etc directory. Methods for performing common tasks are detailed below.
The system is not very useful after the initial installation. If you want to do anything interesting, you'll need to configure the system further. A checklist for getting started is provided below.
One of the first steps you should take to secure the system is to set the root password and get in the habit of logging in as a non-privileged user.
To set the root password simply issue the passwd command while logged in as root.
Any non-privileged users can be created by using the following procedure:
The following example show the commands you could use to set the root password and then create a non-privileged user named "Joe Smith".
passwd groupadd -g 500 users useradd -c "Joe Smith" -g 500 -m -s /usr/bin/bash joe passwd joe
There are two steps in setting the system time. First, you must set the CMOS clock to Coordinated Universal Time (UTC). Next, you need to set the time zone for your location.
To set the clock, you can use either the hwclock command or your PC's BIOS setup utility. If you choose to use hwclock, it is a two step process.
Here are the steps to set the time zone:
The following example shows how you might set the system time and the time zone if you lived in Chicago, USA.
hwclock --set --utc --date="4/22/2008 21:39:00" hwclock --utc --hctosys ls /usr/share/zoneinfo rm -f /etc/localtime cp /usr/share/zoneinfo/America/Chicago /etc/localtime
Occasionally countries make changes to Daylight Saving Time rules. If this happens to you, you'll need to download an updated time zone file from http://www.iana.org/time-zones, extract it to the /usr/share/tzdata directory and recompile the zonefiles with the zic command.
If you have a small amount of RAM in your system, you will probably want to create a swap file to avoid running out of memory. Just how big that swap file needs to be depends on a number of factors including how much RAM you have, how much load you intend to put on the system and how much hard drive space is available. Fortunately, file-based swapping is flexible so you don't have to get it exactly right the first time.
Start by configuring a 64M swap file in the /var directory. Here's how to set it up:
The following example shows the commands used to set up the initial 64M swap file described above.
cd /var dd if=/dev/zero of=swap bs=1M count=64 mkswap swap echo "/var/swap swap swap defaults 0 0" >> /etc/fstab swapon -a
You can check your swap usage with the free command. If you find your system's swap needs changing over time, you can always add or remove swap files as needed. Just be sure that if you create one, it's on a filesystem with plenty of available space.
The base installation of ELS does not set aside any space for additional programs or user data. You will need to carve out more space for these things depending on how you want to use your server. Here is how to do it.
Depending on the available hard drive space you'll want to create a filesystem for /opt that is about 600M or more. All ELS add-on software is configured to install in /opt and 600M should give just enough room if you install everything on the CD-ROM. Any remaining space on the hard drive can be given to other filesystems like /usr/local or /home.
The following examples shows how to create a filesystem for /opt on the system. Two examples are shown. The first is for a system that uses only a single disk, the second is for a system with two disks in a mirrored configuration. Choose the one that is most appropriate for your configuration.
fdisk /dev/sda mke2fs -t ext4 /dev/sda5 echo "/dev/sda5 /opt ext4 defaults 1 2" >> /etc/fstab mount /opt
fdisk /dev/sda fdisk /dev/sdb mdadm --create --metadata=0.90 /dev/md5 -l mirror -n 2 /dev/sda5 /dev/sdb5 mke2fs -t ext4 -L ELS_OPT /dev/md5 echo "/dev/md5 /opt ext4 defaults 1 2" >> /etc/fstab mount /opt
After using creating partitions, you may see a message telling you that the device or resource is busy and that the kernel still uses the old table. If you see this message, you should finish partitioning and reboot the system before continuing with mirroring or creating filesystems.
The ELS system comes with kernel modules for a large number of 10/100 and gigabit network cards. Before configuring networking, you must determine the kernel module that supports your hardware. Most modules have a name similar to that of the card or card's chipset.
Steps to enabling IP networking include the following:
Each of the network configuration files mentioned above has a man page associated with it to help you with configuration.
The following is an example of editing the configuration files for a typical small network setup using an Intel Pro 1000 network card.
vi /etc/modprobe.d/eth.conf alias netdev-eth0 e1000 vi /etc/hostname els.mynetwork.lan vi /etc/interfaces eth0 192.168.1.100 netmask 255.255.255.0 vi /etc/hosts 192.168.1.100 els.mynetwork.lan 192.168.1.101 laptop.mynetwork.lan 192.168.1.1 router.mynetwork.lan vi /etc/routes default gw 192.168.1.1 vi /etc/resolv.conf domain mynetwork.lan nameserver 10.10.10.53 nameserver 10.10.11.53 vi /etc/firewall -A INPUT -i eth0 -s 192.168.1.0/24 -j ACCEPT
When ELS is first installed, it is configured to boot into runlevel 1 (single-user mode.) Single-user mode is generally only entered when doing system maintenance and is not used for everyday tasks. After you have finished configuring the system, you will want to change the default runlevel, particularly if you plan to have the system attached to a network. To do this, edit the initdefault entry of /etc/inittab. Choose runlevel 2 for a non-networked machine or runlevel 3 for a machine with a network connection.
The following entry shows the system configured to start in networked mode:
Congratulations, the basic system configuration is finished. Your changes will take effect on the next reboot.
This section provides a reference for things that you may need to do after the basic system configuration is finished.
Add-on packages for ELS are found on the ELS-EXTRA CD-ROM. They are packaged as simple .tar.gz files and are designed to reside in the /opt directory.
The procedure for installing add-on software is outlined below.
The following simple example shows how you might install the Midnight Commander file manger on your ELS system.
mount /media/cdrom tar -ztvf /media/cdrom/extra/mc-22.214.171.124.i586.tar.gz df /opt cd / tar -zxf /media/cdrom/extra/mc-126.96.36.199.i586.tar.gz mkdir /opt/bin cd /opt/bin ln -s ../mc-188.8.131.52/bin/* .
More complex examples of installing add-on software may be seen by viewing the documents in the howto directory.
Info pages are different than man pages in that they have a top-level directory that serves as a master table of contents. This file, /usr/share/info/dir needs to be maintained or the info page collection will appear incomplete. If new packages with info pages are installed they will not appear in the table of contents until the directory is updated. Also, if the dir file is missing, typing info at the shell prompt will result in an error.
The command used to add info pages to the dir file is install-info. To create a table of contents that includes all info pages, first delete the existing dir file and then use the command ( cd /usr/src/info ; for INFOFILE in *.info.gz; do install-info $INFOFILE; done )
Basic network services like telnet, tftp, pop3 and imap are controlled from /etc/inetd.conf and generally do not require any additional configuration. Other network daemons like Apache, Samba and ProFTPd are controlled using scripts in /etc/init.d. These daemons also have configuration files within the /etc/opt directory. See the documentation included with these daemons for more information on how to configure them.
Be sure to configure firewall rules to grant or restrict access to the desired network services.
The runlevels in ELS are defined as follows:
The scripts used during system startup and shutdown are located in the /etc/init.d directory. Each script is named after the service it controls (e.g. exim starts/stops the Exim mail server.) Determining which scripts will run during startup/shutdown is as simple as answering the following questions:
Most scripts are pre-configured to run in the appropriate runlevels, however there may be times when you will need to link scripts manually. Creating a link name that begins with the letter 'S' will cause the script to be given a start argument. Conversely, any link name that begins with the letter 'K' will cause the script to be given a stop (kill) argument. Linked scripts are executed in alpha-numerical order. For example, K97local_fs will execute before K99poweroff and K scripts always execute before the S scripts.
Below is an example of how you might set up links to start a fictitious "foo server" in runlevel 3 and stop it in runlevels 0, 1, 2 and 6.
cd /etc/rc3.d ln -s ../init.d/foo S45foo cd /etc/rc0.d ln -s ../init.d/foo K55foo cd /etc/rc1.d ln -s ../init.d/foo K55foo cd /etc/rc2.d ln -s ../init.d/foo K55foo cd /etc/rc6.d ln -s ../init.d/foo K55foo
The scripts in the /etc/init.d directory may also be run manually from a shell prompt. Each of the scripts takes a start or stop argument to respectively start or stop a daemon or process. For example, /etc/init.d/crond stop will manually stop the cron daemon. Some scripts also take a status argument to show the current state of the daemon and a restart argument to stop and start with a single command.
Chances are good that you'll want to do something interesting with your ELS system. Maybe you'll want to use it as a home file server or run an intranet web site on it. Several "howto" documents are provided for these sorts of tasks. More information can be found in the howto directory.