十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
#!/bin/bash
#安装apache
rpm -e httpd --nodeps
yum -y install apr apr-devel cyrus-sasl-devel expat-devel libdb-devel openldap-devel apr-util-devel apr-util pcre-devel pcre
tar zxf /httpd- -C /usr/src
#必须将httpd- 放在/下
cd /usr/src/httpd-
./configure --prefix=/usr/local/httpd --enable-so --enable-rewrite --enable-charset-lite --enable-cgi
make && make install
ln -s /usr/local/httpd/bin/ /usr/local/bin
echo "[Unit]" > /lib/systemd/system/httpd.service
echo "Description=The Apache HTTP Server" >> /lib/systemd/system/httpd.service
echo "After=network.target" >> /lib/systemd/system/httpd.service
echo "[Service]" >> /lib/systemd/system/httpd.service
echo "Type=forking" >> /lib/systemd/system/httpd.service
echo "PIDFile=/usr/local/httpd/logs/httpd.pid" >> /lib/systemd/system/httpd.service
echo "ExecStart=/usr/local/bin/apachectl $OPTIONS" >> /lib/systemd/system/httpd.service
echo "ExecReload=/bin/kill -HUP $MAINPID" >> /lib/systemd/system/httpd.service
echo "KillMode=process" >> /lib/systemd/system/httpd.service
echo "Restart=on-failure" >> /lib/systemd/system/httpd.service
echo "RestartSec=42s" >> /lib/systemd/system/httpd.service
echo "[Install]" >> /lib/systemd/system/httpd.service
echo "WantedBy=graphical.target" >> /lib/systemd/system/httpd.service
systemctl enable httpd.service
sed -i '200c ServerName www.aaa.com:80' /usr/local/httpd/conf/httpd.conf
systemctl restart httpd.service
创新互联公司,为您提供成都网站建设、成都网站制作公司、网站营销推广、网站开发设计,对服务石雕等多个行业拥有丰富的网站建设及推广经验。创新互联公司网站建设公司成立于2013年,提供专业网站制作报价服务,我们深知市场的竞争激烈,认真对待每位客户,为客户提供赏心悦目的作品。 与客户共同发展进步,是我们永远的责任!