centos 5.5系统如何安装cherokee php mysql

2011-11-15 22:33:24  来源:centos.bz 

WebjxCom友情提示:CentOS安装最快Web服务器cherokee MySQL PHP.

安装PHP

安装必要软件包

yum -y install libxml2-devel openssl-devel curl-devel libjpeg-devel libpng-devel autoconf pcre-devel libtool-libs freetype-devel gd libmcrypt-devel zlib-devel zip unzip gettext

开始安装php

cd /tmp

groupadd www

useradd -s /sbin/nologin -g www www

wget -c http://cn2.php.net/get/php-5.3.8.tar.gz/from/this/mirror

tar xzvf php-5.3.8.tar.gz

cd php-5.3.8

./configure --prefix=/usr/local/php --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-libxml-dir --with-openssl --with-zlib --with-curl --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --with-gettext --enable-mbstring --with-mcrypt --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --without-pear

make && make install

cp php.ini-production /etc/php.ini

cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

cp sapi/fpm/php-fpm.conf /usr/local/php/etc/php-fpm.conf

编辑php-fpm.conf,找到如下字段,删除前面的”;”号

pid = run/php-fpm.pid

pm.start_servers = 20

pm.min_spare_servers = 5

pm.max_spare_servers = 35

找到:

listen = 127.0.0.1:9000

改为:

listen = /tmp/php-cgi.sock

chmod 755 /etc/init.d/php-fpm

chkconfig --add php-fpm

chkconfig --level 345 php-fpm on

/etc/init.d/php-fpm start

安装cherokee

yum -y install rrdtool

groupadd www

useradd -s /sbin/nologin -g www www

wget http://www.cherokee-project.com/cherokee-latest-tarball -O -| tar zxvf -

cd cherokee-1.2.101

./configure --prefix=/usr/local/cherokee --with-wwwroot=/home/www --with-wwwuser=www --with-wwwgroup=www

make && make install

wget http://www.centos.bz/wp-content/uploads/2011/11/cherokee -O /etc/init.d/cherokee

chmod +x /etc/init.d/cherokee

chkconfig --add cherokee

chkconfig --level 345 cherokee on

ln -s /usr/local/cherokee/sbin/cherokee-admin /usr/sbin/

service cherokee start

现在你已经可以访问默认的chreokee页面,执行cherokee-admin -b命令得到后台密码,并通过localhost:9090进入后台。

共2页: 上一页 [1] 2 下一页
更多

推荐文章