Home > FreeBSD > FreeBSD 6.2 下 DirectAdmin 安装过程(二)

FreeBSD 6.2 下 DirectAdmin 安装过程(二)

June 22nd, 2007

二、安装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的配置文件即可。

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Live
  • Google Bookmarks
  • MySpace
  • email

FreeBSD , , ,

  1. tandywei
    May 30th, 2008 at 13:22 | #1

    directadmin好像是商业软件吧,要授权序号的吧。。要不国内怎么会有代理商呢。一套要450呢。。还有能不能把笔记做成很详细的教程出来呢。。谢谢~~

    [Reply]

  2. admin
    June 2nd, 2008 at 14:10 | #2

    directadmin是商业软件。一套450是国内代理商的价,单独购买更高。
    另外这个安装过程很简单的。我这个包括了以后更改软件版本的方法。
    安装过程就是安装完系统后,mget下来directadmin的安装文件。然后设置一下权限777,./setup.sh 就开始安装了。在安装的过程中,会要求你输入用户序列号,最后会让你输入directadmin的密码(自己设定),然后顶多重启(甚至可以不重启,建议重启一下)就可以通过ip:2222来访问了。用你刚才设置的密码进去吧。

    [Reply]

  3. tandywei
    June 3rd, 2008 at 00:22 | #3

    你好,请问你也是自己购买的吗,我也想购一套,可是担心以下几个问题:
    1、一套是否可以安装在多台机器上?
    2、如果我现在用的系统是FREEBSD,那么我要换系统成LINUX是否可以用同一套软件?
    ~~~~~~感谢并期待您的回答~~~~~

    [Reply]

  4. admin
    June 3rd, 2008 at 09:40 | #4

    我是从梦飞那里买的。www.onlinecq.com
    1.一套不可以安装在多台机器上。需要绑定外网IP。在你安装之前,就要将IP,系统等资料提交购买。
    如果你现在用的是BSD,要换成Linux,需要提前向direcctadmin申请。发个邮件,相关格式可以问下梦飞的人。我只换过IP。没换过系统。不过都差不多,比较简单。一定要记住你注册的邮件地址和那几个授权号客户号什么的。基本上老外那边上班的情况下,很快就可以换完授权类型。接到邮件后你就可以重新装linux了。在此之前也不影响你现在系统的使用。

    [Reply]

  5. tandywei
    August 31st, 2008 at 17:14 | #5

    你的机器是FREEBSD系统,装direcctadmin后有没有编译过核心啊

    [Reply]

  6. snow
    September 1st, 2008 at 12:11 | #6

    我是装directadmin之前编译的内核。
    装bsd,升级源码树,升级prots,然后编译内核。再装directadmin

    [Reply]

  7. tandywei
    September 4th, 2008 at 20:40 | #7

    为什么是在装之前编译啊,理论上应该是装好了再编译不是更好么?

    [Reply]

  8. snow
    September 5th, 2008 at 10:08 | #8

    因为编译的是内核,而不是应用软件。
    我个人感觉,就相当于,你装windows,要先装好了,打好补丁(重新编译)然后再装应用软件一样。

    [Reply]

  9. tandywei
    September 6th, 2008 at 22:19 | #9

    你机器的带宽怎么解决啊?

    [Reply]

  10. snow
    September 8th, 2008 at 13:43 | #10

    没去管。只是限了个apache流量。da自带的功能。

    [Reply]

  1. No trackbacks yet.