CentOS5 optimization solution

Source: Internet
Author: User
CentOS5 optimization solution-Linux Enterprise Application-Linux server application information. For details, refer to the following section. CentOS 5 optimization solution

[Root @ CentOS5] # fuqin liquor cooking


System Environment deployment and adjustment
Check whether the system is normal
# More/var/log/messages (check for system kernel-level error messages)
# Dmesg (check whether the hardware device has an error message)
# Ifconfig (check whether Nic settings are correct)
# Ping www.163.com (check whether the network is normal)

[1] stopping the printing service

If you do not want to provide the printing service, stop the printing service that is set to auto start by default.

Root @ sample ~] #/Etc/rc. d/init. d/cups stop slave stop printing service
Stopping cups: [OK] The slave instance stops the service successfully. "OK" appears"

[Root @ sample ~] # Chkconfig cups off schedule disable auto start of the Print Service

[Root @ sample ~] # Chkconfig -- list cups slave confirm the status of the auto-start setting of the service
Cups0: off 1: off 2: off 3: off 4: off 5: off 6: off running 0-6 is OK (the current printing service is started automatically.

Forbidden)


[2] stopping ipv6

In the default CentOS status, ipv6 is enabled. Because we do not use ipv6, stop ipv6 to limit the maximum.

To ensure security and speed.

First, check whether the ipv6 feature is enabled.

Root @ sample ~] # Ifconfig-a Networks: list all network interfaces

Eth0 Link encap: Ethernet HWaddr 00: 0C: 29: B6: 16: A3
Inet addr: 192.168.0.13 Bcast: 192.168.0.255 Mask: 255.255.255.0
Inet6 addr: fe80: 20c: 29ff: feb6: 16a3/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 84 errors: 0 dropped: 0 overruns: 0 frame.: 0
TX packets: 93 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 10288 (10.0 KiB) TX bytes: 9337 (9.1 KiB)
Interrupt: 185 Base address: 0x1400

Lo Link encap: Local Loopback
Inet addr: 127.0.0.1 Mask: 255.0.0.0
Inet6 addr: 1/128 Scope: Host
Up loopback running mtu: 16436 Metric: 1
RX packets: 12 errors: 0 dropped: 0 overruns: 0 frame.: 0
TX packets: 12 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX bytes: 952 (952.0 B) TX bytes: 952 (952.0 B)

Sit0 Link encap: The IPv6-in-IPv4 consumer confirms that ipv6 is in the started status
Noarp mtu: 1480 Metric: 1
RX packets: 0 errors: 0 dropped: 0 overruns: 0 frame.: 0
TX packets: 0 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
Modify the configuration file to stop ipv6.

[Root @ sample ~] # Vi/etc/modprobe. conf modify the corresponding configuration file and add the following line to the end of the text:

Alias net-pf-10 off
Alias ipv6 off

[Root @ sample ~] # Shutdown-r now restart the system to make the settings take effect

[3] The Source in Centos5 is quite good. Once installed, I installed yum install-y rdesktop. We recommend that you keep it, and add system-config-packages to install the program, if you want to change the yum source, refer to another post on the blog: Centos5 replacing the yum source.

[4] use the yum program to install the required development kit (The following is the standard RPM package name)
Gcc-c + + gcc-g77 flex bison autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel

[5] modifying command history records
# Vi/etc/profile
Change HISTSIZE = 1000 to HISTSIZE = 200

[6] adjust TCP/IP network parameters to enhance anti-SYN Flood capability
# Echo 'Net. ipv4.tcp _ syncookies = 1'>/etc/sysctl. conf
# Sysctl-p

[7] disable unnecessary services
# Ntsysv
Only services to be started are listed below, and all services not listed are closed:
Crond
Irqbalance (enabled only when the server CPU is in the S. M.P architecture or supports dual-core, HT technology; otherwise, it is disabled .)
Microcode_ctl
Network
Random
Sendmail
Sshd
Syslog

# When I install CentOS5 in English, I feel that the language has the least chance of problems. If I am not familiar with the service in Step 7, I can choose to turn off services that we are familiar with, such as ip6tables or sendmail. after I optimized my M memory, the CentOS5 runs smoothly. When I run RHEL5, It is very slow. With the advantages of free generation convenience, I gave up RHEL5 and switched to CentOS5 instead.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.