Centos6 - VestaCP面板以及suphp模块安装

vesta面板基于LANMP环境,简洁开源非常不错,

以下代码仅限Centos6有效,已在https://www.kvmla.com/cheap.html的VPS上进行测试安装并使用。
安装vesta

yum remove httpd* bind* -y
rm -rf /etc/httpd
wget http://vestacp.com/pub/vst-install.sh
bash vst-install.sh -f -n -e youmail@yourmail.com #换成你的邮箱

安装设置suphp

wget http://down.kvm.la/vesta/cn.txt -O /usr/local/vesta/web/inc/i18n/cn.php
wget http://down.kvm.la/vesta/conf_templates/apache_suphp.tpl -O /usr/local/vesta/data/templates/web/httpd/suphp.tpl
wget http://down.kvm.la/vesta/conf_templates/apache_suphp.stpl -O /usr/local/vesta/data/templates/web/httpd/suphp.stpl
wget http://down.kvm.la/vesta/conf_templates/nginx_suphp.tpl -O /usr/local/vesta/data/templates/web/nginx/suphp.tpl
wget http://down.kvm.la/vesta/conf_templates/nginx_suphp.stpl -O /usr/local/vesta/data/templates/web/nginxsuphp.stpl
wget http://down.kvm.la/vesta/packages/suphp.pkg -O /usr/local/vesta/data/packages/suphp.pkg
chattr -i /home/admin/conf
mv /home/admin/conf /usr/local/vesta/data/users/admin/
sed -i 's#AddDefaultCharset UTF-8#AddDefaultCharset OFF#g' /etc/httpd/conf/httpd.conf
sed -i 's#\$HOMEDIR/\$user/conf/web/ssl.#\$USER_DATA/\$user/ssl/#g' /usr/local/vesta/func/*
sed -i 's#\$HOMEDIR/\$user/conf/#\$VESTA/data/users/\$user/conf/#g' /usr/local/vesta/bin/*
sed -i 's#/home#/usr/local/vesta/data/users#g' /etc/httpd/conf.d/vesta.conf /usr/local/vesta/data/users/*/conf/web/*.conf
sed -i 's#%home%#/usr/local/vesta/data/users#g' /usr/local/vesta/data/templates/web/httpd/* /usr/local/vesta/data/templates/web/nginx/*
sed -i 's#%/\$HOMEDIR/$user/conf/web/ssl\.#\$USER_DATA/ssl/#g' /usr/local/vesta/*
sed -i 's#en#cn#g' /usr/local/vesta/data/users/*/user.conf /usr/local/vesta/conf/vesta.conf
sed -i "s/PACKAGE='default'/PACKAGE='suphp'/g" /usr/local/vesta/data/users/*/user.conf
sed -i "s/WEB_TEMPLATE='default'/WEB_TEMPLATE='suphp'/g" /usr/local/vesta/data/users/*/user.conf
sed -i "s#mkdir \$HOMEDIR/\$user/conf#\#mkdir \$HOMEDIR/\$user/conf#g" /usr/local/vesta/bin/v-add-user
sed -i "s#chmod a+x \$HOMEDIR/\$user#\#chmod a+x \$HOMEDIR/\$user#g" /usr/local/vesta/bin/v-add-user
sed -i "s#chattr +i \$HOMEDIR/\$user/conf#\#chattr +i \$HOMEDIR/\$user/conf#g" /usr/local/vesta/bin/v-add-user
sed -i "s#chattr -i \$HOMEDIR/\$user/conf#\#chattr -i \$HOMEDIR/\$user/conf#g" /usr/local/vesta/bin/v-delete-user
yum -y --skip-broken install gcc gcc-c++ libtool-libs libtool autoconf subversion zip unzip wget crontabs iptables file bison patch mlocate flex diffutils automake imake make cmake kernel-devel cpp vim-minimal
yum -y --skip-broken install httpd-devel
cd /tmp
wget -c http://www.suphp.org/download/suphp-0.7.1.tar.gz
tar -xzf suphp-0.7.1.tar.gz
cd suphp-0.7.1
./configure --quiet --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=paranoid --with-php=/usr/bin/php-cgi --with-logfile=/var/log/httpd/suphp_log --enable-SUPHP_USE_USERGROUP=yes
make -j12 && make install
wget http://down.kvm.la/conf/suphp.conf -O /etc/suphp.conf
sed -i 's#;x-httpd-php54="php:/opt/php54/bin/php-cgi"#x-httpd-php54="php:/usr/bin/php-cgi"#g' /etc/suphp.conf
if [ `uname -m` == "x86_64" ]; then archlib="lib64"; else archlib="lib"; fi
cat>/etc/httpd/conf.d/php.conf<
#AddHandler x-httpd-php52 .inc .php .php3 .php4 .php5 .phtml
#AddHandler x-httpd-php53 .inc .php .php3 .php4 .php5 .phtml
AddHandler x-httpd-php54 .inc .php .php3 .php4 .php5 .phtml
#AddHandler x-httpd-php55 .inc .php .php3 .php4 .php5 .phtml
AddType text/html .php
DirectoryIndex index.php
suPHP_Engine on
suPHP_ConfigPath /etc/
suPHP_AddHandler x-httpd-php52
suPHP_AddHandler x-httpd-php53
suPHP_AddHandler x-httpd-php54
suPHP_AddHandler x-httpd-php54
EOF

点赞
  1. 久爱说道:
    Internet Explorer Windows 7

    通过N个链接来到此站,贵站的主题看者很舒服,能告诉下主题名字吗?尤诹

  2. 六间房说道:
    Internet Explorer Windows 7

    Linux 操作系统没用过,一直用win2003的。

  3. 最微配说道:
    Google Chrome Windows 7

    最微配(科技,为你所配)zuiweipei.com希望能和贵站成为友链 ,我会经常更新的, :smile:

  4. ak198说道:
    Google Chrome Windows XP

    suphp这个工具对于php的网站来说,非常实用。

  5. 最微配说道:
    Google Chrome Windows 7

    我的网站是最微配,www.zuiweipei.com, 描述是 科技,为你所配 ,我的网站天天更新,能不能和你网站形成友链啊

  6. 纽小二说道:
    Google Chrome Windows 7

    现在已经不习惯在vps等服务器上装面板啦。。。自用的无所谓~

  7. Google Chrome Windows XP

    文章很不错哦,会继续关注的

  8. 李振杰说道:
    Firefox Windows XP

    如果一个产品只是对自己技术的一种罗列,而没有相应的客户,那么我们管这种产品叫做自恋品。甚至于不能叫做产品,因为产品目的上就带有商业性质,所以与其叫做产品还不如叫做作品,或者技术产物更为贴切。在每个人都醉心于盈利世界时还能有人能够坚持存技术自恋品的制作不为金钱所惑那才是真正搞技术的人!

  9. 恋字坊说道:
    Google Chrome Windows 7

    贵站做的真心不错,恋字坊http://www.lianzifang.com/诚换友链,望通过。 :smile:

  10. 泡妞说道:
    Google Chrome Windows 8

    讲的很专业,有点儿看不懂 :grin:

  11. 玩味生活说道:
    Google Chrome Windows 7

    不错 帮助很大

  12. 品牌购物说道:
    Sogou Explorer Windows XP

    面板基于LANMP环境,简洁开源非常不错

发表评论

电子邮件地址不会被公开。必填项已用 * 标注