FreeBSD 6.2 下 DirectAdmin 安装过程(二)

时间:2007-11-17 11:29:14   来源:  作者:  点击:次  出处:技术无忧
关键字:FreeBSD DirectAdmin apache zend php

二、安装DirectAdmin

注意:安装directadmin必须以root直接登陆。不能登陆到其它用户再su到root。具体方法很简单,设置一下ssh就可以了。我就不多介绍了。

# wget http://www.directadmin.com/setup.sh


Hint: Use “fetch” instead of “wget” on FreeBSD systems.

Change permissions on the setup.sh file


# chmod 755 setup.sh

Run the setup script!

# ./setup.sh

You will be prompted for a client ID number, license ID number, and hostname.

安装完成后,即可用http://IP:2222 来访问你的directadmin管理后台了。

输入你在安装过程中定义的admin的密码登陆即可。

由于directadmin默认给安装的是apache1.3、php4和mysql5.0.

mysql5.0倒是很正常。不过apache和php版本是低了点。可能大部分朋友都不喜欢用这个版本。那么如何升级呢?遵循官方给的文档,按以下方法升级apache和php5:

To update to php5, the build script will still work. All that you need to do is swap out the version, compile normally and make a few modifications to your /etc/httpd/conf/httpd.conf file.

1) download the php-5.2.2.tar.gz from php.net into your customapache directory:

cd /usr/local/directadmin/customapache
wget http://files.directadmin.com/services/customapache/php-5.2.2.tar.gz
2) change your build script for the new version:

#ee build

change: PHP_VER=4.4.4
to: PHP_VER=5.2.2

3) build php normally:

#./build clean
#./build php n


If you’re using apache 2.x, use 如果你想使用apache 2.x版本,那么执行下面的
当然,直接输入
#./build
可以查看当前所能执行的命令,如升级一下当前的软件包 ./build update

#./build clean
#./build php_ap2 n

instead.

4) edit /etc/httpd/conf/httpd.conf
Remove any referce of:

LoadModule php4_module modules/libphp4.so

and make sure they’re replaced with:

LoadModule php5_module modules/libphp5.so

Remove any reference of:

AddModule mod_php4.c

and replace with:

AddModule mod_php5.c

5) find this piece of code:

<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi
</IfModule>
replace with:

<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php5 index.php3 index.phtml index.cgi
</IfModule>
Find this:

<IfModule mod_php4.c>
AddType application/x-httpd-php .inc .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
</IfModule>

(it might have AddHandler instead of AddType)
replace with:

<IfModule mod_php5.c>
AddHandler application/x-httpd-php .inc .php .php5 .php4 .php3 .phtml
AddHandler application/x-httpd-php-source .phps
</IfModule>

Then restart apache.

If you get the following error while compiling php:

checking whether to enable LIBXML support… yes
checking libxml2 install dir… no
checking for xml2-config path…
configure: error: xml2-config not found. Please check your libxml2
installation.

*** There was an error while trying to configure php. Check the configure.php file

Then edit the configure.php file (or configure.php_ap2 if you’re using apache 2), and change:

--with-xml \

to:

--disable-libxml \
--disable-dom \
--disable-xml \
--disable-simplexml \
--disable-xmlreader \
--disable-xmlwriter \

or else install the missing rpms/packages for xml. (libxml2-dev and libxml2-utils on debian). Redhats:

yum -y install libxml2-devel libxslt-devel

最后这个更改xml的可以不必更改。似乎没什么用。反正我没改它。因为装完apache2.x后,默认即可。

最后。zend可通过ports来安装。只需要改一下php的配置文件即可。


相关文章

文章评论

共有 0 位网友发表了评论 此处只显示部分留言 点击查看完整评论页面