赞助连接

赞助连接

阅 读 文 章

FreeBSD7.0编译安装nginx+php+mysql.

[来源:网上转载 (http://bbs.chinaunix.net) | 作者:网友(网络转载) | 时间:2008-05-09 | 浏览:人次 ]

环境
系统: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/
TAG标签 : 安装 编译 make cd Copy clipboard to install CODE:cd

最新评论 共有0位网友发表了评论

发表评论

评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名:(注册)
密码:
验证码:
匿名发表
网站地图友情连接交流论坛网站投稿广告服务联系我们留言本站长统计
Some rights reserved: www.chmhome.com, 鄂ICP备07010232号 E-mail:chinakafei@live.com,QQ:552766
中国咖啡技术网(Chmhome):国外编程技术书籍,中文编程手册,经典编程文章,交流技术,技术软件下载,计算机论文,毕业论文.