Jump to content

Install CentOS 5.3


shadowmac
 Share

Recommended Posts

Here are some instructions on how to build your very own Webhost Server. I am recording this here more as a reference when I do this again but it may be helpful to you as well.



This is a basic installation tutorial for the CentOS operating system for dedicated server duties ! According to the attached picture, this would be the bare bones, core server.


CentOS_WebServer.jpg


CentOS is a free whitelabel distro of RedHat Enterprise with all the bells and whistles, and is the OS of choice for many web hosting companies



Assumptions:


  • 250GB Harddrive
  • 512MB RAM



Installing the OS using ‘Text Mode’ :



  1. Insert the first Linux installation CD-ROM (disc 1) in the CD-ROM drive of your server and restart the server.
  2. At the boot: prompt, type linux text and press the Enter key. This starts the installation process.
  3. On the Language Selection screen, select English as the language that you want to run the installation program in, then click OK.
  4. On the Keyboard Selection screen, select the keyboard attached to your server, then click OK.
  5. On the Mouse Selection screen, select the mouse attached to your server, then click OK.
  6. On the Welcome screen, review the installation information, then click OK.
  7. On the Partitioning Type screen, select Create Custom, then click OK.
  8. On the Disk Partitioning Setup screen, select Disk Druid. Quote: - If your disk has existing partitions, select each partition and click Delete.
  9. Create the following disk partitions:


(The following partitions are recommended prior to installing cPanel)


  • 15 GB /
  • 500 MB /boot (No seperate /boot for FreeBSD)
  • 2 GB /tmp
  • 40 GB /usr
  • 40 GB /var
  • 1 GB swap (swap should be 2x RAM)
  • Remaining space to /home



To create the / partition ‘root’:


* On the Partitioning screen (see step 8 ) , click New.


* In the Mount Point field, type / .


* For the Filesystem type select ext3.


* In the Size (MB) field, type 15360, then click OK.



To create the /boot partition:


* On the Partitioning screen (see step 8 ) , click New.


* In the Mount Point field, type /boot.


* For the Filesystem type select ext3.


* In the Size (MB) field, type 500, then click OK.



To create the /tmp partition


* On the Partitioning screen (see step 8 ) , click New.


* In the Mount Point field, type /tmp .


* For the Filesystem type select ext3.


* In the Size (MB) field, type 2048, then click OK.



To create the /usr partition


* On the Partitioning screen (see step 8 ) , click New.


* In the Mount Point field, type /usr .


* For the Filesystem type select ext3.


* In the Size (MB) field, type 40960, then click OK.



To create the /var partition


* On the Partitioning screen (see step 8 ) , click New.


* In the Mount Point field, type /var .


* For the Filesystem type select ext3.


* In the Size (MB) field, type 40960, then click OK.



To create the swap partition


* On the Partitioning screen (see step , click New.


* For the Filesystem type field, select swap.


* In the Size (MB) field, enter a number that is twice the current RAM (1024 If you are using 512MB Ram), then click OK.



To create the /home partition


* On the Partitioning screen (see step , click New.


* In the Mount Point field, type /home.


* For the Filesystem type select ext3.


* In the Size (MB) field, select Fill all available space, then click OK.



10 – When finished, Click OK.


11 – On the Boot Loader Configuration screen, select LILO Boot Loader, then click OK.


12 – On each of the following three screens, click OK.


13 – On the Network Configuration screen, clear Use bootp/dhcp, enter your server network configuration, then click OK.


14 – On the Hostname Configuration screen, enter the fully qualified host name of your server, then click OK.


15 – On the Firewall Configuration screen, select No firewall, then click OK.


16 – On the Language Support screen, select English (USA), then click OK.


17 – On the Time Zone Selection screen, select the location, then click OK.


18 – On the Root Password screen, enter in the root password for your server, re-enter the password to confirm it, then click OK.


19 – If you want to create an account that you can use to remotely log on to your server using SSH or FTP, click Add.


*** Provide the login name and password, then click OK.


20 – Review the information on the User Account Setup screen, then click OK.


21 – Review the information on the Authentication Configuration screen, then click OK.


22 – On the Package Group Selection screen, verify that only the following packages are selected. Clear all other check boxes.


. OPTION1


. Network Support


. Messaging and Web Tools


. DNS Name Server


. Network Managed Workstation


. Software Development


OPTION2:


. Base Package


. Development Libraries


. DNS Name Server


. Editors


. FTP Server


PREFERRED OPTION FOR CORE WITH VPS's:


. nothing selected


23 – Click OK.


24 – Review the Installation to begin screen, then click OK.


25 – Insert the second/third installation CD-ROM when notified to, then click OK.


26 – To create a boot disk, click Yes. Otherwise, click No.


27 – When done, the installation complete screen displays.


28 – Click OK, then press Enter to restart.


Checking the host name and network settings :


After your first boot, you must check your system’s host name and network configuration to ensure that they are correct. To check your system’s host name and network configuration:


- Log on to the system as the root user.


- Type vi /etc/hosts to open the host file and modify the contents.


- Verify that the file is in the following format:



- Verify that the loopback entry (127.0.0.1) appears in the file. A correctly configured file should look like this: Note : The IP addresses used here are for illustration purposes only; they are not valid values.


# Do not remove the following line, or various programs


# that require network functionality will fail.


127.0.0.1 localhost.localdomain localhost


10.0.1.100 server1.example.com server1


::1 localhost6.localdomain6 localhost6


- Type :wq to close the file.


- Type vi /etc/sysconfig/network to open the network sysconfig file and modify the contents.


- Verify the host name. A correctly configured file should look like this: Note : The IP addresses used here are for illustration purposes only; they are not valid values.


NETWORKING=yes


HOSTNAME=myserver.mydomain.com


GATEWAY=10.100.0.1 – Modify the file as needed.


- Type :wq to close the file.


- Type vi /etc/sysconfig/network-scripts/ifcfg-eth0 to open the network scripts file and modify the contents.


- Verify that network information. A correctly configured file should look like this: Note : The IP addresses used here are for illustration purposes only; they are not valid values.


DEVICE=eth0


BOOTPROTO=static


BROADCAST=10.1.1.1


IPADDR=10.1.1.1


NETMASK=255.255.0.0


NETWORK=10.1.0.0


ONBOOT=yes – Modify the file as needed.



Some finishing touches. Type the following


[root@localhost]#yum install irqbalance

[root@localhost]#yum install readahead

[root@localhost]#yum install nano

[root@localhost]#yum update





Also run

[root@localhost]#system-config-securitylevel



Set both Security Level and SELinux to Disabled and hit OK:

Note: This isn't working for me right now so I am missing a pre-req (will figure it out)



Make these changes active, restart the system by typing:

shutdown -r now 





If you happen to be running CentOS in a VMware session, now is the time to install vmware-tools

Click Install VMware Tools

[root@localhost]#mount /dev/hdc /media

[root@localhost]#ls /media

[root@localhost]#tar -C /tmp -zxvf /media/VMwareTools-7.9.6-173382.tar.gz

[root@localhost]#umount /media

[root@localhost]#yum install perl

[root@localhost]#yum -y install libX11-devel libXtst

[root@localhost]#yum -y install gcc

[root@localhost]#yum -y install kernel-headers kernel-devel

[root@localhost]#/tmp/vmware-tools-distrib/vmware-install.pl

[root@localhost]#/usr/bin/vmware-toolbox

[root@localhost]#shutdown -r now

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...