配置Linux(基于CentOS的LNMP)服务器Ⅰ

系统环境初始化

1. 检查系统是否正常
# more /var/log/messages(检查有无系统级错误信息)
# dmesg (检查硬件设备是否有错误信息)
# cat /proc/cpuinfo (检查CPU频率是否正常)
# top (按1检测CPU核数是否正常,内存大小是否正常)
# ifconfig(检查网卡设置是否正确)

2.使用 yum 程序安装开发包(以下为标准的 RPM 包名称)
# yum -y install ntp make openssl openssl-devel pcre pcre-devel libpng libpng-devel libjpeg-6b libjpeg-devel-6b freetype freetype-devel gd gd-devel zlib zlib-devel gcc gcc-c++ libXpm libXpm-devel ncurses ncurses-devel libmcrypt libmcrypt-devel libxml2 libxml2-devel imake autoconf automake screen sysstat compat-libstdc++-33 curl curl-devel

3.定时校正服务器时钟,定时与中国国家授时中心授时服务器同步
# crontab -e
加入一行:
*/30 * * * * ntpdate 210.72.145.44 > /dev/null 2>&1

4.下载程序包
请到各程序官方网站下载最新的稳定版本存放到/usr/local/src/目录
Nginx
http://wiki.nginx.org/NginxChs

PHP
http://cn.php.net/releases/

PHP FPM补丁
http://php-fpm.org/downloads/

Mysql
http://dev.mysql.coml/

Zend
http://www.zend.com/

Memcache
http://pecl.php.net/package/memcache/

Memcached
http://memcached.googlecode.com

Libiconv
http://www.gnu.org/software/libiconv/

libevent
http://www.monkey.org/~provos/libevent/

文中的配置文件和脚本限于篇幅,请到以下地址下载
Nginx控制脚本
http://c.sihost.net/jb/nginx

PHP FPM配置文件
http://c.sihost.net/jb/php-fpm.conf

Nginx 配置文件
http://c.sihost.net/jb/nginx.conf

FCGI配置文件
http://c.sihost.net/jb/fcgi.conf
以上列出的程序最新稳定版下载列表

http://c.sihost.net/lnmp_tools.list
在 /usr/local/src目录下执行
wget http://c.sihost.net/lnmp_tools.list
wget -i lnmp_tools.list

《配置Linux(基于CentOS的LNMP)服务器Ⅰ》上有6条评论

  1. Have you ever considered about including a little bit more than just
    your articles? I mean, what you say is fundamental and all.

    But just imagine if you added some great graphics or video clips
    to give your posts more, “pop”! Your content is excellent but with pics and videos, this blog could definitely be one of the greatest in its field. Wonderful blog!

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

Captcha Code