「陕西咸阳谷歌seo团队」:centos7源码编译安装httpd、加入systemctl并设置开机自启动 vg2rt3bn
標簽:編譯裝置 apach ash sys .gz oca pac evel mirrors
所需軟件:
apr-1.6.3.tar.gz
(111地點:://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.3.tar.gz)
apr-util-1.6.1.tar.gz
(111地點:://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz)
d-2.4.29.tar.gz
(111地點:://mirrors.shu.edu.cn/apache//d/d-2.4.29.tar.gz)
裝置編譯情況:
yum -y install gcc pcre pcre-devel libtool
裝置apr:
tar -xzf apr-1.6.3.tar.gz
cd apr-1.6.3/
./configure && make && make install
裝置apr-util:
tar -xzf apr-util-1.6.1.tar.gz
cd apr-util-1.6.1/
./configure --with-apr=/usr/local/apr/
make && make install
裝置d:
tar d-2.4.29.tar.gz
cd d-2.4.29/
./configure && make && make install
編寫啟動劇本:vim myd
#!/bin/bash
# chkconfig: 12345 80 90
function start_()
{
/usr/local/apache2/bin/apachectl start
}
function stop_()
{
/usr/local/apache2/bin/apachectl stop
}
case "$1" in
start)
start_
;;
stop)
stop_
;;
restart)
stop_
start_
;;
*)
echo "Usage : start | stop | restart"
;;
esac
參加體系效勞:
chmod a+x myd
cp -arf myd /etc/init.d/
啟動本人編寫的效勞:
systemctl start myd
設置開機自啟動:
chkconfig --add myd
centos7源碼編譯裝置d、參加systemctl並設置開機自啟動
標簽:編譯裝置 apach ash sys .gz oca pac evel mirrors