The Perfect Setup - White Box Linux / Red Hat Enterprise Linux 3.0 - Page 3

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Mon, 2004-03-22 18:19. ::

2 Installing and Configuring the Rest of the System

Configure additional IP Addresses

I will now assume that the network card to which you want to add additional IP addresses is eth0. In the directory /etc/sysconfig/network-scripts/ you will find the file ifcfg-eth0. It looks like this:

DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=00:04:AC:D9:0A:1F
IPADDR=192.168.0.100
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
TYPE=Ethernet

In order to assign additional IP addresses to eth0 you have to create "virtual network cards". The second IP address on eth0 is assigned to eth0:0, the third one to eth0:1, etc. If you want to assign the IP address 192.168.0.101 to eth0 you have to create the file /etc/sysconfig/network-scripts/ifcfg-eth0:0 with the following contents:

MTU=""
NETMASK=255.255.255.0
BOOTPROTO=none
ONPARENT=yes
BROADCAST=192.168.0.255
IPADDR=192.168.0.101
NETWORK=192.168.0.0
ONBOOT=yes
DEVICE=eth0:0

Then restart your network:

/etc/init.d/network restart

Quota

Edit /etc/fstab to look like this (I added ,usrquota,grpquota to partition LABEL=/home):

LABEL=/                 /                       ext3    defaults        1 1
none /dev/pts devpts gid=5,mode=620 0 0
LABEL=/home /home ext3 defaults,usrquota,grpquota 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0

Then run:

touch /home/aquota.user /home/aquota.group
chmod 600 /home/aquota.*
mount -o remount /home
quotacheck -avugm
quotaon -avug

Start Services

All software we need is already installed on the system. Now we have to configure the system to start these services at boot time:

chkconfig httpd on
chkconfig vsftpd on
chkconfig mysqld on
chkconfig named on
chkconfig saslauthd on
chkconfig ipop3 on
chkconfig imap on
chkconfig cups off
chkconfig isdn off
chkconfig kudzu off
chkconfig pcmcia off
chkconfig sendmail off
chkconfig postfix on

Now we start the services we need:

/etc/init.d/sendmail stop
/etc/init.d/postfix start
/etc/init.d/httpd start
/etc/init.d/mysqld start
/etc/init.d/vsftpd start
/etc/init.d/named start
/etc/init.d/saslauthd start

Make sure /etc/hosts looks like this:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 server1.example.com server1 localhost.localdomain localhost

MySQL

You should set a password for your MySQL database (the password for the MySQL user root; the default one is an empty password):

mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword

If you already have a non-empty password, and you want to change it, use this command:

mysqladmin -u root -pyourrootsqlpassword password yournewrootsqlpassword
mysqladmin -h server1.example.com -u root -pyourrootsqlpassword password yournewrootsqlpassword

(Please note: There is no blank between -p and yourrootsqlpassword!)


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.