centos5.8 YUM安装php+nginx+php-fpm

On 2012年04月5日, in linux, tips, by netoearth

cd /opt/
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
yum install mysql*
chkconfig –levels 235 mysqld on
/etc/init.d/mysqld start
/usr/bin/mysqladmin -u root password ‘password’
mysql -uroot -ppassword
yum install php
yum install lighttpd-fastcgi php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy
rpm -Uvh http://mirrors.sohu.com/fedora-epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -Uvh http://centos.alt.ru/repository/centos/5/x86_64/centalt-release-5-3.noarch.rpm
yum install nginx
chkconfig –levels 235 nginx on
/etc/init.d/nginx start
yum install php-devel php-fpm php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy
service php-fpm start
chkconfig –levels 235 php-fpm on
vi /data/www/info.php
pecl install memcache
#yum install php-pecl-memcache
vi /etc/php.ini
vi /etc/nginx/nginx.conf
service nginx restart
service php-fpm restart

 

Comments are closed.