Nginx PHP-fpm Mmecached Mysql on Centos 5/6

修改主机名

vi /etc/sysconfig/network
vi /etc/hosts

添加nginx源

vi /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1

安装软件:

vi /etc/sysctl.conf
vi /etc/security/limits.conf
vi /etc/security/limits.d/90-nproc.conf
sysctl -p
yum -y install nginx memcached php php-fpm php-gd php-mbstring php-mysql php-pdo php-pecl-apc php-pecl-memcache php-xml mysql-server rsync
yum -y update && yum clean all

chkconfig httpd off
chkconfig nginx on
chkconfig php-fpm on
chkconfig memcached on
chkconfig mysqld on

reboot

yum安装mcrypt 扩展

1. 安装第三方yum源(默认yum源里面没有这几个库文件,不能使用yum安装)
wget http://www.atomicorp.com/installers/atomic #下载
chmod 755 atomic #增加可执行权限
./atomic #安装

2. yum install php-mcrypt libmcrypt libmcrypt-devel

3. reboot

评论关闭。