Up to now, the latest version of CentOS 6.x is CentOS 6.6. The following describes the specific installation and configuration process of CentOS 6.6
The server related settings are as follows:
Operating System: CentOS 6.6 64-bit
IP address: 192.168.21.129
Gateway: 192.168.21.2
DNS:8.8.8.8 8.8.4.4
Remark:
CentOS 6.6 system images are available in 32-bit and 64-bit versions, and there are also minimal versions optimized for servers
If the production server has a large memory (more than 4G memory), it is recommended to install the CentOS-6.5-x86_64-minimal.iso version
Attachment: CentOS 6.6 download address
32-bit minimal version:
http://mirror.bit.edu.cn/centos/6.6/isos/i386/CentOS-6.6-i386-minimal.iso
64-bit minimal. Version:
http://mirror.bit.edu.cn/centos/6.6/isos/x86_64/CentOS-6.6-x86_64-minimal.iso
1. The computer memory on which the CentOS 6.6 system is installed must be equal to or greater than 628M (minimum memory 628M) to enable the graphics installation mode;
2. The system installation mode of CentOS 6.6 is divided into: graphical installation mode and text installation mode;
3. CentOS 6.6 text installation mode does not support custom partitions, it is recommended to use the graphical installation mode to install;
5. The operating mode of CentOS 6.6 system is divided into: graphical mode with graphical interface, which can be operated with the mouse, and text mode without graphical interface, which is directly operated by command line (CentOS minimal version runs in text mode by default, and is installed in the system. There are no customization options for how the system operates in the process);
1. Install CentOS 6.6
After successfully booting the system with the CD, the following interface will appear
Interface description:
Install or upgrade an existing system
install system with basic video driver install system with basic video driver
Rescue installed system Enter system repair mode
Boot from local drive Exit the installation and boot from the hard disk
Memory test memory test
Select the first item here, install or upgrade the existing system, and press Enter.
There is a question about whether to test the CD media, here select "Skip" to skip the test.
The following interface appears
Next
Select the language as: English (English) #The production server recommends installing the English version
Next
Keyboard selection is: USEnglish
Next
Select the first item, Basic Storage Device
Next
Select the first item: Yes, ignore all data
Next
Set the host name, the default here is enough, and then modify it after the installation is complete
Next
Time zone selection: Asia/Shanghai
"System clock user UTC" #Cancel the previous check, do not use UTC time
set root password
Next
Note: If the password you use is too simple, the system will automatically prompt: Your password is not secure enough, too simplistic/systematic
Select "Use Anyway" here
The production environment must have strong and complex passwords
Next
Select the last item, Create Custom Layout to create a custom partition
Next
You can see the capacity of the hard disk, I am showing 20G here, and now I customize the partition.
Note: Before partitioning, you have to plan first, how to partition
My partitions here are as follows:
Total hard disk 20G
swap #2048M, generally set to 2 times the memory
/ # All remaining space
Special Note:
For servers used in formal production, remember that the data disk must be partitioned separately to prevent system problems and ensure data integrity. For example, it can be divided into another
/data is dedicated to storing data.
Select the free partition Free, click Create
Select Standard Partition and click Create
File system type: swap
Size: 2048
Other options are default
OK
Continue to select the free partition Free, click Create
Select Standard Partition and click Create
mount point: /
File system type: ext4
Check "Use all available space"
Other options are default
OK
After creating the partition, as shown above, then click Next
Click "Format" to format
Select "Write changes to disk" to write changes to disk
default
Next
start installation
The installation is complete
Click "Reboot" to reboot, the system will automatically restart
After restarting, the following login interface appears
Enter the account root and password to successfully log in to the system, as shown in the following figure:
System installation is complete
Second, set the IP address, gateway, DNS
Convention:
The first network card is the external network
The second network card is the internal network (machines without external network should also configure the internal network on the second network card)
Note: After CentOS 6.6 is installed by default, the network connection is not automatically turned on!
Enter account root
Then enter the password set during installation and log in to the system
vi /etc/sysconfig/network-scripts/ifcfg-eth0 #Edit the configuration file, add and modify the following
BOOTPROTO=static #Enable static IP address
ONBOOT=yes #Turn on automatically enable network connection
IPADDR=192.168.21.129 #Set IP address
NETMASK=255.255.255.0 #Set the subnet mask
GATEWAY=192.168.21.2 #Set the gateway
DNS1=8.8.8.8 #Set the primary DNS
DNS2=8.8.4.4 #Set backup DNS
IPV6INIT=no #Disable IPV6
:wq! #Save and exit
service ip6tables stop #stop IPV6 service
chkconfig ip6tables off #Disable IPV6 startup
service yum-updatesd stop #Turn off automatic system updates
chkconfig yum-updatesd off #Disable startup
service network restart #Restart the network connection
ifconfig #View IP address
3. Set the hostname
Convention:
Host name naming convention: business.computer room.active/standby.domain name
The host name is set here: bbs.hz.m.osyunwei.com
1、hostname “bbs.hz.m.osyunwei.com”
#Set the host name to bbs.hz.m.osyunwei.com
2. vi /etc/sysconfig/network #Edit configuration file
HOSTNAME= bbs.hz.m.osyunwei.com
#Modify localhost.localdomain to bbs.hz.m.osyunwei.com
:wq! #Save and exit
3, vi /etc/hosts #Edit configuration file
127.0.0.1 bbs.hz.m.osyunwei.com localhost
#Modify localhost.localdomain to bbs.hz.m.osyunwei.com
:wq! #Save and exit
shutdown -r now #restart the system
So far, CentOS 6.6 system installation and configuration is complete