FreeBSD8.2安装Nginx +Mysql+PHP+ Discuz_X2
所需软件包及其版本:
nginx-1.0.1.tar.gz
pcre-8.12.tar.bz2
mysql-5.0.41.tar.gz
php-5.2.17-fpm-0.5.14.diff.gz
php-5.2.17.tar.gz
Discuz_X2_SC_UTF8.zip
# mkdir –p /var/www (存放web程序)
1.安装pcre包来支持正则表达式:
# tar jxf pcre-8.12.tar.bz2
# cd pcre-8.12
# ls
# ./configure
# make
# make install
2.安装nginx:
# tar zxf nginx-1.0.1.tar.gz
# cd nginx-1.0.1
# ./configure --prefix=/usr/local/nginx
# make
# make install
测试:
# /usr/local/nginx/sbin/nginx
//执行nginx
访问:http://IP看到Welcome to nginx! 表示已安装成功!
3.安装Mysql
# pw groupadd mysql
# pw groupshow mysql
mysql:*:1002:
# adduser
Username: mysql
Full name: mysql
Uid (Leave empty for default): 1002
Login group [mysql]: mysql
Login group is mysql. Invite mysql into other groups? []:
Login class [default]:
Shell (sh csh tcsh bash rbash nologin) [sh]: bash
Home directory [/home/mysql]:
Home directory permissions (Leave empty for default):