FreeBSD 安装 apache php

Posted by bower on November 25, 2010
FreeBSD

分享给你的朋友->bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

1 安装apache2.2

# cd /usr/ports/www/apache22
# make install

会一步步安装

然后打开/etc/rc.conf

#vim /etc/rc.conf (没有vim的可以用ee,或看我前一篇)

加入

apache22_enable=”YES”

安装位置在:/usr/local/etc/apache22/

/usr/local/etc/apache22/httpd.conf为配置文件,在此不多说

FreeBSD 必须要加载accf_http 否则会报错

#kldload accf_http

如果没有任何回显代表此命令成功,

将基加入启动文件,自动加载

#vim /boot/loader.conf

加入一行

accf_http_load=”YES”

以下为各项起动命令集合

# apachectl start
# apachectl restart
# apachectl graceful
# apachectl stop

2安装PHP5

# cd /usr/ports/lang/php5

这个目录会安装最新的php5.3

# cd /usr/ports/lang/php52

这个目录会安装php5.2,笔者选了这个目录
# make config

确保你选了apache
# make install

然后就是等。

分享到:人人网开心网腾讯微博新浪微博豆瓣分享腾讯空间百度搜藏腾讯书签

分享给你的朋友->bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word