pcre-7.8.tar.gz 正则表达式下载地址:ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
nginx-0.7.26.tar下载地址:http://www.nginx.net/
php-5.2.6.tar.bz2下载地址:http://www.php.net/releases/
php-5.2.6-fpm-0.5.9.diff.gz
php-fpm是为PHP打的一个FastCGI管理补丁,可以平滑变更php.ini配置而无需重启php-cgi下载地址:http://php-fpm.anight.org/
注:PHP的版本要和fpm的版本一致mysql-5.0.67.tar.gz
Discuz!_6.0.0_SC_UTF8.zip
1、安装pcre
复制代码 代码如下:
# tar -zxvf pcre-7.8.tar.gz
# cd pcre-7.8
# ./configure
# make && make install
2、安装Nginx
复制代码 代码如下:
# tar -zxvf nginx-0.7.26.tar.gz
# cd nginx-0.7.26
# ./configure --prefix=/usr/local/nginx
# make && make install
启动nginx# /usr/local/nginx/sbin/nginx
停止nginx# kill -QUIT `cat /usr/local/nginx/logs/nginx.pid`
重启nginxkill -HUP `cat /usr/local/nginx/logs/nginx.pid`
添加到自启动# echo "/usr/local/nginx/sbin/nginx">>/etc/rc.local
3、安装mysql
复制代码 代码如下:
# tar -zxvf mysql-5.0.67.tar.gz
# cd mysql-5.0.67
# groupadd mysql
# useradd -g mysql -s /sbin/nologin -M mysql
# ./configure --prefix=/usr/local/mysql --with-charset=gbk --with-extra-charset=all --enable-hread-safe-client
--enable-local-infile --with-low-memory
# make && make install
# cp support-files/my-medium.cnf /etc/my.cnf
# chown -R mysql.mysql /usr/local/mysql/
# /usr/local/mysql/bin/mysql_install_db --user=mysql
# chown -R root.root /usr/local/mysql/
# chown -R mysql.mysql /usr/local/mysql/var/
启动数据库服务,并添加到自启动:
# /usr/local/mysql/bin/mysqld_safe --user=mysql &
#cp support-files/mysql.server /etc/rc.d/init.d/mysqld
#chmod 755 /etc/rc.d/init.d/mysqld
加入自动启动服务队列:
#chkconfig --add mysqld
#chkconfig --level 345 mysqld on添加root密码
# /usr/local/mysql/bin/mysqladmin -u root password "123456"
测试一下:# /usr/local/mysql/bin/mysql -u root -p输入密码:123456,看能不能进入到数据库
配置库文件搜索路径:
# echo "/usr/local/mysql/lib/mysql">>/etc/ld.so.conf
# ldconfig
# ldconfig -v
添加/usr/local/mysql/bin到环境变量PATH中
#echo "export PATH=$PATH:/usr/local/mysql/bin">>/etc/profile
#source /etc/profile
4、安装PHP
这里产生的是可执行文件,和apache的不一样,和apache结合的时候产生的是动态库
复制代码 代码如下:
# tar -jxvf php-5.2.6.tar.bz2
# gzip -cd php-5.2.6-fpm-0.5.9.diff.gz |patch -d php-5.2.6 -p1
新闻热点
疑难解答