系统:FreeBSD7.0
软件:mysql-5.0.51a,nginx-0.6.30,lighttpd-1.4.19,php-5.2.6
所有软件都安装到/usr/local/vhost,如果需要请自行修改
声明,本文主要涉及内容不是用ports安装,请大家不要骂我。另:本人水平有限,如有错误之处,敬请指教
一、下载源代 ***
[Copy to clipboard] [ - ]CODE:cd /usr/ports/databases/mysql50-server/
make fetch
cd /usr/ports/www/nginx-devel/
make fetch
cd /usr/ports/lang/php5
make fetch
cd /usr/ports/www/lighttpd
make fetch
二、编译安装
MySQL
[Copy to clipboard] [ - ]CODE:cd /usr/ports/distfiles/
tar -jxf mysql-5.0.51a.tar.gz
cd mysql-5.0.51a
./configure --prefix=/usr/local/vhost/mysql --with-charset=utf8 --with-extra-charsets=all --with-big-tables --with-pthread
make &&make install
Nginx
[Copy to clipboard] [ - ]CODE:cd /usr/ports/devel/pcre
make install clean
cd /usr/ports/distfiles/
tar -jxf nginx-0.6.30.tar.gz
cd nginx-0.6.30
./configure --prefix=/usr/local/vhost/nginx --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_sub_module
make &&make install
Lighttpd
(安装lighttpd是为了得到启动fastcgi进程)
[Copy to clipboard] [ - ]CODE:cd /usr/ports/distfiles/
tar -jxf lighttpd-1.4.19.tar.bz2
cd lighttpd-1.4.19
./configure --prefix=/usr/local/vhost/lighttpd
Php
[Copy to clipboard] [ - ]CODE:cd /usr/ports/textproc/libxml2
make install clean
cd /usr/ports/ftp/curl
make install clean
cd /usr/ports/graphics/jpeg
make install clean
cd /usr/ports/graphics/png
make install clean
cd /usr/ports/devel/gettext
make install clean
cd /usr/ports/distfiles/
tar -jxf php-5.2.6.tar.bz2
cd php-5.2.6
./configure --prefix=/usr/local/vhost/php --with-mysql=/usr/local/vhost/mysql -enable-fastcgi --enable-sockets --enable-ftp --enable-zip --enable-mbstring --enable-mbregex --enable-calendar --with-curl=/usr/local/clude --with-curlwrappers --disable-debug --enable-inline-optimization --with-zlib --with-gd --with-kerberos --with-gettext --enable-force-cgi-redirect --with-jpeg-dir=/usr/inlocal/clude --with-png-dir=/usr/local/include --with-bz2 --enable-pcntl --with-iconv
make && make install
cp php.ini-dist /usr/local/vhost/php/lib/php.ini
三、配置
MySQL
[Copy to clipboard] [ - ]CODE:cd /usr/local/vhost/mysql
pw adduser mysql -d /dev/null -s /sbin/nologin
bin/mysql_install_db
cp share/mysql/mysql.server ./
chmod +x mysql.server
chown -R mysql ./
启动
QUOTE:/usr/local/vhost/mysql/mysql.server start
配置nginx
[Copy to clipboard] [ - ]CODE:cd /usr/local/vhost/nginx/
会员注册
会员登录
个人空间