一般情况下,现在新安装directadmin, 都建议不要用那个缺省的CLI模式而选择CGI模式,尤其当你遇到CPU负载飙高的时候,CGI模式可以看到是哪个账户的占用,这点比CLI模式更方 便。其实,我一直也是CGI模式的安装,不过今天有遇到朋友希望CLI转换为CGI,百度找到那些教程千篇一律的复制粘贴,我就有了动手试试的冲动。

首先,我们编辑custombuild选项中的PHP模式,将CLI设定no,CGI设定yes

cd /usr/local/directadmin/custombuild ./build update ./build clean nano options.conf

注意图中的着重框起来的部分,就是修改后的部分。

php

如果nano运行报错没有安装的话,请安装,也可以用VI命令编辑都可以的。接着,我们重编译PHP。

./build php n

记住用screen,这一步可能比较久。

下面就是遇到的问题了,最容易出现的,就是旧的账户可能报500错误,这是权限问题导致,多半是之前CLI的时候设定了777,遵循文件夹755,文件644的原则去修改下文件权限就可以了。如果遇到squirrelmail或者phpmyadmin报错,也请尝试重build。我是新装了一个DA用的CLI然后放一个WP之后转换再试的,目前就是遇到一个权限问题修改了就OK,我在慢慢摸索可能遇到的更多的问题,网上流传的那个2010年出来的转换方式很可能根本就不成功,大家要留意。

首页

No Comments Now!

Be the first to comment on this entry.

留下评论

姓名(必填)
Mail (必填),(will not be published)
站点(recommended)

Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URLs must be fully qualified (eg: http://www.directadmin.cc/blog),and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.