中文字幕在线观看,亚洲а∨天堂久久精品9966,亚洲成a人片在线观看你懂的,亚洲av成人片无码网站,亚洲国产精品无码久久久五月天

Linux下快速的搭建一個(gè)web服務(wù)器

1970-01-01    來源:

容器云強(qiáng)勢上線!快速搭建集群,上萬Linux鏡像隨意使用

Linux下構(gòu)建apache web服務(wù)器
我們通過下面的步驟來快速的搭建一個(gè)web服務(wù)器。
1、?? 下載源碼文件httpd-2.2.0.tar.gz 到linux服務(wù)器的某個(gè)目錄。
2、?? 解壓文件 # tar zxvf httpd-2.2.0.tar.gz .
3、?? 配置 # ./configure ?refix=/usr/local/apache //指定安裝目錄,以后要?jiǎng)h除安裝就只需刪除這個(gè)目錄。
4、?? 編譯和安裝。 # make ; make install .
5、?? 編寫啟動腳本,把它放到目錄 /etc/rc.d/init.d/里,這里取名為httpd,其內(nèi)容如下:
#!/bin/bash
#description:http server
#chkconfig: 235 98 98
case "$1" in
start)
? echo "Starting Apache daemon..."
? /usr/local/apache2/bin/apachectl -k start
? ;;
stop)
? echo "Stopping Apache daemon..."
? /usr/local/apache2/bin/apachectl -k stop
? ;;
restart)
? echo "Restarting Apache daemon..."
? /usr/local/apache2/bin/apachectl -k restart
? ;;
status)
? statusproc /usr/local/apache2/bin/httpd
? ;;
?
*)
? echo "Usage: $0 {start|stop|restart|status}"
? exit 1
? ;;
Esac
注意:#description:http server 這一行必須加上,否則在執(zhí)行命令 # chkconfig ?add httpd 時(shí)會出現(xiàn)“service apache does not support chkconfig”的錯(cuò)誤報(bào)告。#chkconfig: 2345 98 98 表示在執(zhí)行命令 # chkconfig ?add httpd 時(shí)會在目錄 /etc/rc2.d/ 、/etc/rc3.d/ /etc/rc5.d 分別生成文件 S98httpd和 K98httpd。這個(gè)數(shù)字可以是別的。
6、?? 執(zhí)行命令 # chkconfig ?add httpd ,進(jìn)入目錄/etc/rc3.d/檢查是否生成文件 S98httpd及K98httpd.
7、?? 啟動服務(wù) # service httpd start .

標(biāo)簽: linux web服務(wù)器 服務(wù)器 腳本

版權(quán)申明:本站文章部分自網(wǎng)絡(luò),如有侵權(quán),請聯(lián)系:west999com@outlook.com
特別注意:本站所有轉(zhuǎn)載文章言論不代表本站觀點(diǎn)!
本站所提供的圖片等素材,版權(quán)歸原作者所有,如需使用,請與原作者聯(lián)系。

上一篇:linux如何配置安裝網(wǎng)卡

下一篇:http協(xié)議基本認(rèn)證模式