溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

源碼包Apache的shell安裝腳本

發(fā)布時(shí)間:2020-07-10 07:25:47 來(lái)源:網(wǎng)絡(luò) 閱讀:563 作者:zw773860471 欄目:建站服務(wù)器

#!/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

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI