Introduction to installation
The server can work with any Linux distribution, but we have chosen to use the distribution Mandrake, which has the advantage of being simple to install, and includes a multitude of pre-installed applications.
You can find this distribution:
- On the site www.linux-mandrake.com (if your connection allows it)
- In stores for about US$100/₤50
- On a CD from a magazine (about US$8/₤4, check your local bookstore)
Before installing, it may be useful to make a list of devices found in your machine and to note their reference numbers and characteristics (the hard drives, the graphics card, the sound card, etc.)
Partitioning the hard drive
To start installation, you will need to partition your hard drive (see the article on Fdisk) in order to separate the data which corresponds to applications, temporary files, or virtual memory (swap).
Let's say that the hard drive is 10GB and that it includes:
- a /home partition
- a /tmp partition
- a /var partition
Here are the characteristics of the partitions:
|Type of partition ||Size ||Mount point |
Installing Mandrake is entirely graphical, so all you need to do is follow the steps and enter the right options:
- Installation level: expert
- Use of machine: server
- Disk optimization: no
- Security level: medium
- file system: create a new partition in a free area, and indicate the mount point and the type (ext2/swap)
- Choosing packages: You only need to install the required packages:
The packages which were not installed may be used later as needed.
- News Tools
- System configuration
- Web server
- Network management workstation
- Configuring the network: This is for the local area network properties. Click on local area network and let the system detect the physical settings of your card(s). Then enter the following elements:
- IP address: 192.168.1.1
- subnet mask: 255.255.255.0
- machine name: tuxserver
- DNS server: 192.168.1.1
- Do not check boot/dhcp
- Cryptography: Agree to all default options
- Printing configuration: Fill in the fields if you are ever going to have a local or network printer
- Adding users: The users will be created manually later
- Boot disk: It is strongly recommended to create one in order to be able to restart the server if a problem arises
When you restart the machine, you will be able to see each of the services boot up (you can go back to the screen with the key combination <CTRL>+<PageUp>
Then, log in as root (superuser) with the password that you provided at the time of installation.
Be default, the superuser, for security reasons, cannot log in to the server by telnet or FTP. For practical reasons, and for as long the entire intranet is not connected to the Internet, we will temporarily give these rights to the user root.
To authorize the superuser to log in by telnet, you have to edit the file /etc/pam.d/login and add the following line:
#auth required /lib/security/pam_securetty.so
To authorize the superuser to log in by FTP, you have to edit the file /etc/ftpusers and add the following line:
In order to give the server a certain measure of security, you will need to create users and groups which can be granted only the permissions they need.
First, you have to create a group called users which will include all users on the intranet. This lets you define permissions for every user belonging to this group, all in one go. To create this group (it might already exist), use the following syntax:
Then, create a directory called /etc/skel_intranet. This will contain the structure (called the skeleton) for each user's work directory.
Here are all the commands that can be used to create it:
cp -r /etc/skel /etc/skel_intranet
chmod -R 755 public_html
These commands can be used to create a directory called public_html
within the directory skel_intranet, which can contain the user's personal page, as well as the directory Maildir
(and its subdirectories new
) for the user's email. You can, of course, add additional directories to the skeleton if need be.
Then, create each of your users with the following command:
useradd smith -G users -m -u 500
-c "Smith John, Accounting Dept., Workstation: 89654"
- -G: specifies the group the user belongs to
- -m: creating the home directory if it doesn't exist
- -u: positions the userID if desired
- -k: specifies the skeleton to copy into the account (by default /etc/skel)
- -c: for adding comments
The desired rights must be added to the user's account with the command:
chmod 755 /home/smith
|| You can delete a user at any moment with the command:
userdel -r toto
Latest update on October 16, 2008 at 09:43 AM by Jeff.