WDCP Environment Build shell script Analysis--lanmp.sh---lib/apache.sh

Source: Internet
Author: User
Tags phpinfo

#apache安装函数function  apache_ins {         #定义日志变量为局部变量      local in_log= $LOGPATH/${logpre}_apache_install.log    echo      #httpd_inf = "/tmp/httpd_ins.txt"     [ -f  $httpd _inf ]  && return     #开始编译apache     echo  "Installing  HTTPD "    cd  $IN _src    rm -fr httpd-$APA _ver     tar xf httpd-$APA _ver.tar.gz > $IN _log 2>&1         cd httpd-$APA _ver    make_clean     ./configure --prefix= $IN _dir/httpd-$APA _ver         -- Enable-rewrite --enable-deflate         --disable-userdir  --enable-so         --enable-expires --enable-headers          --with-included-apr --with-apr=/usr          --with-apr-util=/usr --enable-ssl          --with-ssl=/usr >> $IN _log 2>&1    [ $? != 0 ]  && err_exit  "Apache configure err"     make >> $IN _log 2>&1    [ $? != 0 ] && err_exit   "Apache make err"     make install >> $IN _log 2> &1    [ $? != 0 ] && err_exit  "apache  Make install err "    ln -sf  $IN _dir/httpd-$APA _ver  $IN _dir/apache     sed -i  ' s/user daemon/user www/g '   $IN _dir/apache/conf/httpd.conf     sed -i  ' s/group daemon/group www/g '   $IN _dir/apache/conf/httpd.conf     echo  "namevirtualhost *:80"  >>  $IN _dir/apache/conf/httpd.conf     echo  "include conf/httpd-wdl.conf"  >>  $IN _dir/apache/conf/ httpd.conf     #echo   "include conf/default.conf"  >>  $IN _dir/ apache/conf/httpd.conf     #echo   "include conf/wdcp.conf"  >>  $IN _ dir/apache/conf/httpd.conf    echo  "include conf/vhost/*.conf"  >>   $IN _dir/apache/conf/httpd.conf    mkdir -p  $IN _dir/apache/conf/{vhost, rewrite}    sed -i  '/#ServerName/aservername localhost '   $IN _dir/apache /conf/httpd.conf    mkdir -p /www/{web/default,web_logs}    file_cp phpinfo.php /www/web/ default/phpinfo.php    file_cp iprober2.php /www/web/default/iprober2.php     file_cp wdlinux_a.php /www/web/default/index.php    chown  -R www.www /www/web    file_cp httpd-wdl.conf  $IN _dir/apache/ conf/httpd-wdl.conf     #file_cp  wdcp_a.conf  $IN _dir/apache/conf/wdcp.conf     file_cpv defaulta.conf  $IN _dir/apache/conf/vhost/00000.default.conf     file_cp dz7_apache.conf  $IN _dir/apache/conf/rewrite/dz7_apache.conf     file_cp dzx15_apache.conf  $IN _dir/apache/conf/rewrite/dzx15_apache.conf     if [  $OS _rl == 2 ]; then         file_cp init.httpd-ubuntu $IN _dir/init.d/httpd    else        file_cp  init.httpd  $IN _dir/init.d/httpd    fi    chmod 755  $IN _ dir/init.d/httpd    ln -sf  $IN _dir/init.d/httpd /etc/init.d/httpd     if [  $OS _rl == 2 ]; then         update-rc.d -f httpd defaults >> $IN _log 2>&1     else        chkconfig --add httpd >>$ in_log 2>&1        chkconfig --level 35  Httpd on >> $IN _log 2>&1    fi    mkdir  -p  $IN _dir/apache/conf/vhost    [  $IN _dir_me == 1 ]  && sed -i&nbSP; " s#/www/wdlinux# $IN _dir#g " /etc/init.d/httpd    touch  $httpd _inf}


WDCP Environment Build shell script Analysis--lanmp.sh---lib/apache.sh

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.