Description
In the actual production environment, the CentOS 5.x series is still the preferred system for many server builders
As of the current CentOS 5.x latest version of CentOS 5.10, the following describes the CentOS 5.10 of the specific installation configuration process
Server-related settings are as follows:
Operating System: CentOS 5.10
Host Name: www
IP Address: 192.168.236.128
Gateway: 192.168.236.2
DNS: 8.8.8.8 8.8.4.4
Attached CentOS 5.10 system Mirror Download Address:
32-bit download address:
Http://mirrors.163.com/centos/5.10/isos/i386/CentOS-5.10-i386-bin-DVD-1of2.iso
64-bit Download address:
Http://mirrors.163.com/centos/5.10/isos/x86_64/CentOS-5.10-x86_64-bin-DVD-1of2.iso
Note:
1, the system mirrors has two files, installs the system to use only first, namely Centos-5.10-i386-bin-dvd-1of2.iso
The second mirror is the package that came with the system itself.
2, production server if it is large memory (more than 4G memory), it is recommended to install 64-bit version
I. Installation of CentOS 5.10
Successfully booting the system with CD, the following interface appears
Direct carriage to enter the graphical installation interface
Press the TAB key on the keyboard, position the cursor to skip, and then enter (skip optical image detection)
Click Next
Language Selection Interface: 中文版 (中文版), click Next
Note: Production server recommends installing English version
Keyboard mode: U.s.english
Click Next
If the disk is not partitioned before, the above interface appears, point Yes (Initialize disk and erase all data), and the following interface appears
Disk partitioning mode, select Create custom layout (establish a customized partition structure)
Next, the following interface appears
System Yun-wei Www.111cn.net warm reminder: qihang01 original content copyright, reproduced please indicate the source and the original link
Description: Before partitioning a disk, plan how to partition, how large each partition is set.
My zoning here is as follows
/boot 200MB #一般设置为200MB
SWAP1G (1024MB) #swap一般建议为物理内存的2倍大小
/ #剩余所有磁盘空间
Note: The formal production server can be divided into a separate/data partition, used to store data
Recommendation: All data are partitioned separately, the advantage of this is that if there is a problem with the system, will not affect the data, or need to reload the system, the data need not be transferred.
Dot new, the following interface will appear
Mount point (Mount points):/boot
File system Type (filesystem type): ext3
Size (MB) Size: 200
Additional size options (other size option)
Select: Fixed size (fixed-size)
After setting, click OK, the following interface appears
File system Type (filesystem type): Swap
Size (MB) Size: 1024
Additional size options (other size option)
Select: Fixed size (fixed-size)
After setting, click OK, the following interface appears
Mount point (Mount points):/
File system Type (filesystem type): ext3
Size (MB): Default do not modify
Additional size options (other size option)
Select: Fill to Maximum allowable size (use all available space)
After setting, click OK, the following interface appears
Partition complete, click Next, and the following interface appears
Default Next, the following interface appears
Set the host name, IP address and other information, here default next, and so on after system installation is complete
Default Next
Time zone selection, select Asia/shanghai (Asia/Shanghai)
Cancels the tick in front of system clock uses UTC (with UTC) and does not use UTC time
Next, the following interface appears
Set root password, enter 2 times password
Next, the following interface appears
Software selection interface, cancel the hook in front of Desktop–gnome
Note: The server system uses minimal installation and does not install any packages
Click Next, and the following interface appears
Setup complete, click Next to install
System Yun-wei Www.111cn.net warm reminder: qihang01 original content copyright, reproduced please indicate the source and the original link
In the process of being installed
The installation completes, the point reboot restarts the system, the system starts the process to appear the following interface (System Setup interface)
Press the TAB key on the keyboard to switch to exit to enter, skip settings, enter the system login interface
Second, set IP address, gateway DNS
Enter account root
Enter the password you set during Setup and log in to the system
Vi/etc/sysconfig/network-scripts/ifcfg-eth0 #编辑配置文件, add modify the following
Bootproto=static #启用静态IP地址
Onboot=yes #开启自动启用网络连接
ipaddr=192.168.236.128 #设置IP地址
netmask=255.255.255.0 #设置子网掩码
gateway=192.168.236.2 #设置网关
: wq! #保存退出
Vi/etc/resolv.conf #编辑配置文件, add modify the following
NameServer 8.8.8.8 #设置主DNS
NameServer 8.8.4.4 #设置备用DNS
: wq! #保存退出
Service Network restart #重启网络服务
Third, set the host name
Hostname www #设置主机名为www
Vi/etc/sysconfig/network #编辑配置文件
Hostname=www #修改localhost.localdomain for www
: wq! #保存退出
Vi/etc/hosts #编辑配置文件
127.0.0.1 www localhost #修改localhost.localdomain for www
: wq! #保存退出
Shutdown–r now #重启系统
Configuring local yum sources using system mirroring files
1, use WinSCP.exe tool upload system image file Centos-5.10-i386-bin-dvd-1of2.iso to/usr/local/src directory
2. Connect to CentOS server remotely using Putty.exe tool
3. Mount System image files
Mkdir/media/cdrom #新建镜像文件挂载目录
CD/USR/LOCAL/SRC #进入系统镜像文件存放目录
LS #列出目录文件, you can see the system image file just uploaded
Mount-t iso9660-o loop/usr/local/src/centos-5.10-i386-bin-dvd-1of2.iso/media/cdrom #挂载系统镜像
Cd/media/cdrom #进入挂载目录, use the LS command to see that a file exists
4, set up automatically mounted system image files
Vi/etc/fstab #添加以下代码. Enable automatic mount on boot
/usr/local/src/centos-5.10-i386-bin-dvd-1of2.iso/media/cdrom iso9660 defaults,ro,loop 0 0
: wq! #保存退出
Note: iso9660 use df-t to view devices
5, use the Yum command to install the software
Yum--disablerepo=*--enablerepo=c5-media Clean all #清除yum缓存
Yum--disablerepo=*--enablerepo=c5-media makecache #缓存本地yum源中的软件包信息
Yum--disablerepo=*--enablerepo=c5-media Install httpd #安装apache
Yum--disablerepo=*--enablerepo=c5-media--skip-broken groupinstall "GNOME Desktop Environment"
Yum--disablerepo=*--enablerepo=c5-media--skip-broken groupinstall "X Window System" #安装软件
Umount/media/cdrom #卸载系统镜像
So far, the CentOS 5.10 System installation Diagram Tutorial complete!