1 picture used here is from the Internet got the most from:
2. I only use a small amount of pictures, a detailed picture of each step can be seen these two tutorials:
(A) Basic system installation
1 with the first CD (from CentOS-5.5-i386-bin-1of7.iso burn) to start the computer
2 input linux text, enter the text installation interface
3 Select the language, keyboard, etc. to display partition:
Select "Review and modify partitioning layout"
This will set into the partition, follow the prompts to delete the original partition hard drive, set each partition / boot, /, swap, / home and / var
4 cards using automatic configuration (Use dynamic IP configuration (DHCP))
5. Hostname is entered manually, here: server1.example.com
6 Set the root password, for example, abc1234
7 Select Install the software, here is important, huh, huh
First remove all the original selection (generally Desktop - Gnome played before the hook to remove the hook)
Point of "Customize now", the next step in all the listed packages (Package) to remove all select only Base System
Next, and then installation will start automatically, about 5-6 minutes to complete, CD eject on their own, come up with CD press Enter to restart the computer
8. First start, will enter the Setup Agent
Here choose "Firewall configuration", then "Run Tool" to make into the Firewall and SELinux configuration
Close Firewall and SELinux. (Why turn off? Oh, I do not know, but almost all of the tutorials say to turn off, it first closed, Firewall settings on the left to the future)
Exit, enter the reboot reboot system
(If the first start but after the Setup Agent log does not show the system, you can call up the Setup Agent enter setup to configure)
9 update yum update
Reboot log in as root and enter yum update
The system will download about 108MB update file, then update the system. Takes about 25-30 minutes to complete.
Enter the reboot reboot the system. Such a basic system installed.
(B) LAMP Installation
10 using putty configuration
CentOS complete the basic installation and first start, but thereafter, the configuration can be carried out in Win XP machine.
(1) to obtain CentOs machine's IP address because I was using DHCP automatic configuration, CentOs machine's IP router by the broadband distribution, we look at the Centos machine login, then enter: ifconfig
From the displayed information see the IP address of eth0, for example, 192.168.99.51
In Win XP start putty, enter the Centos machine's IP address, click Open, you can enter the user name root and password
11. LAMP installation
(1) the establishment of a batch installation file
# Nano / bin/lamp1.sh
Then enter the following lines:
Press Ctrl O, Enter, save the file press Ctrl X, exit
(2) to perform automatic installation
# / Bin / sh lamp1.sh
LAMP system software required to complete the installation.
(3) set boot auto-start Apache and MySQL
# Chkconfig - levels 235 mysqld on
# Chkconfig - levels 235 httpd on
(4) start Apache and MySQL
# / Etc / init.d / mysqld start
# / Etc / init.d / httpd start
Then, in Win XP machine open a browser, enter the Centos machine's IP address, such as 192.168.99.51 to open the page.
Default installation, the page is stored in / var / www / html / directory.
12 fixed IP address and network card set
Above the installation is done under dynamic IP environment, and now we have to start the server settings, you must use a fixed IP address, because many of the configuration with the IP address related to all, we want to CentOs machine card Gai static IP configuration.
(1) machine name
# Nano / etc / hosts
127.0.0.1 localhost.localdomain localhost 192.168.99.44 server1.example.com server1
The contents of the hosts file to the above, save (Ctrl O) and exit (Ctrl X).
(2) LAN IP address
# Nano / etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) DEVICE=eth0 BOOTPROTO=static BROADCAST=192.168.99.255 IPADDR=192.168.99.44 NETMASK=255.255.255.0 NETWORK=192.168.99.0 ONBOOT=yes
Configuration changes will etn0 card as above, here set a static IP address: 192.168.99.44
Save (Ctrl O) and exit (Ctrl X).
(3) Gateway Gateway address as Centos machine is connected to the Internet under a broadband router, so the gateway address is the Router's IP address, where my broadband router's IP address is 192.168.99.1.
# Nano / etc / sysconfig / network
Set the Gateway address above. Save (Ctrl O) and exit (Ctrl X).
(4) DNS resolution
# Nano / etc / resolv.conf
nameserver 220.127.116.11 nameserver 18.104.22.168
This nameserver should be set to your ISP (Internet company) DNS Server address.
How to get the correct DNS address? There are two general ways:
First, look at the ISP site, they will give a specific DNS address to set the second is the convenience of customers watching from the broadband router. My broadband router is a Linksys WRT160N, the router log on, point the Status page, it displays the current internet DNS1 and DNS2, these two addresses written down, and then enter into our Centos machine / etc / resolv.conf file, which available.
Save (Ctrl O) and exit (Ctrl X).
Setup is complete. Restart the machine reboot.
Startup is complete, the Centos machine's IP is 192.168.99.44, the hostname is server1.example.com (or server1), after further settings on the IP and machine name this subject.
(5) card virtual IP
Virtual host, the easiest is to set up multiple virtual hosts on the same IP, and then release a different virtual IP-based content.
To set up multiple network cards in the same IP, you can do:
(I) from the original network adapter configuration file to copy ifcfg-eth0 ifcfg-eth0: 0
# cd /etc/sysconfig/network-scripts # cp ifcfg-eth0 ifcfg-eth0:0
(Ii) modify the network card name and IP address
# Nano ifcfg-eth0: 0
This only needs to change more than 2 lines. Save (Ctrl O) and exit (Ctrl X). Restart the machine reboot.
In this way, this card will have two IP addresses.