How to configure the initial settings for CentOS system servers
Source: Internet
Author: User
Server configurations mainly include system initialization (disabling unnecessary services), Software Compilation and installation environment (make, cmake, and connection tools), and application installation (PHP, MySQL, and so on. If the purchased server has been installed with the system, the RAID and LVM components do not need to be considered. The main work includes three parts: 1. initializing the operating system (InitOS) 2. configuring the server mainly includes system initialization (disabling unnecessary services) software Compilation and installation environment (make, cmake, and connection tools), and application installation (PHP, MySQL, etc.
If the purchased server has been installed with the system, the RAID and LVM components do not need to be considered. The main work includes three parts:
1. initialize the operating system (Init OS) 2. build a compilation environment 3. install the application
For the operating system of the server, it is best to keep it clean. do not install or uninstall some software packages at will to avoid unexpected situations.
1. initialize the operating system 1) Security
Firewall: MySQL servers are used by Web servers. external networks do not directly access MySQL servers. you can directly disable the firewall.
#/Etc/init. d/
IptablesStop
# Chkconfig iptables off
Selinux: currently, Selinux is usually disabled in server settings.
# Getenforce
# Setenforce 0
# Vim/etc/sysconfig/selinux
Set selinux to SELINUX = disabled.
2) system running level
Check whether the system running level is 3: # runlevel
If not, modify the content in the/etc/inittab File: id: 3: initdefault:
3) shut down some useless services in the system, mainly including
# Chkconfig autofs off
# Chkconfig cups off
# Chkconfig bluetooth off
# Chkconfig netfs off
# Chkconfig nfslock off
# Chkconfig
SendmailOff
# Chkconfig xinetd off
# Chkconfig ip6tables off
# Chkconfig portmap off
Check how many services in the system run at three levels, usually around 30
Chkconfig -- list | grep '3: on' | wc? L
Other services are configured as needed, such as power management and gpm.
4) synchronize system time
/Usr/sbin/ntpdateus.pool.ntp.org
Add time synchronization to task plans
Crontab-e
08 */08 ***/usr/sbin/ntpdate us.pool.ntp.org>/dev/nul
2. component compilation environment Mainly install tools such as gcc/g ++ compiler, make, cmake, automake, conf, and autoconf.
# Yum install gcc *-y
# Yum install autoconf *-y
# Yum install automake *-y
# Yum install make
# Yum install conf *-y
# Yum install cmake? After installing y, you 'd better restart the system:
# Init 6
3. install specific applications It mainly includes the PHP runtime environment, Nginx Server, MySQL database, Sphinx full-text search engine, and Zabbix monitoring tool.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service