国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > Apache > 正文

CentOS源碼編譯:安裝Apache

2024-08-27 18:30:24
字體:
供稿:網(wǎng)友
Aspku.com友情提示:CentOS源碼編譯安裝Apache.

 

找到最新版下載鏈接

http://httpd.apache.org/download.cgi找到最新版下載鏈接,現(xiàn)在最版穩(wěn)定版鏈接是:

http://labs.renren.com/apache-mirror//httpd/httpd-2.2.19.tar.gz

開始安裝Apache

    cd /usr/local/src
  1. wget http://labs.renren.com/apache-mirror//httpd/httpd-2.2.19.tar.gz
  2. tar -zxvf httpd-2.2.19.tar.gz
  3. cd httpd-2.2.19
  4. ./configure --prefix=/usr/local/apache --enable-vhost-alias --enable-rewrite --enable-info
  5. make
  6. make install

更多的configure選項可參考http://httpd.apache.org/docs/2.2/programs/configure.html

復(fù)制初始化文件和設(shè)置Apache開機(jī)啟動

    cp build/rpm/httpd.init /etc/init.d/httpd
  1. chmod 755 /etc/init.d/httpd
  2. chkconfig --add httpd
  3. chkconfig --level 35 httpd on

創(chuàng)建符號鏈接

    cd /etc
  1. mv httpd httpd_old
  2. ln -s /usr/local/apache/ httpd
  3. cd /usr/sbin/
  4. ln -fs /usr/local/apache/bin/httpd
  5. ln -fs /usr/local/apache/bin/apachectl
  6. cd /var/log
  7. rm -rf httpd/
  8. ln -s /usr/local/apache/logs httpd
  9. /etc/init.d/httpd start

啟動/停止服務(wù)

    service httpd restart
  1. service httpd start
  2. /usr/local/apache/bin/apachectl start
  3. /usr/local/apache/bin/apachectl stop
  4. /usr/local/apache/bin/apachectl status
  5. /etc/init.d/httpd start
  6. /etc/init.d/httpd stop
  7. /etc/init.d/httpd restart

使用pgrep查找啟動的進(jìn)程。

    pgrep httpd

Apache配置文件

    vi /usr/local/apache/conf/httpd.conf

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 通辽市| 英吉沙县| 北宁市| 吉林省| 玛纳斯县| 新建县| 曲阜市| 易门县| 阿图什市| 方正县| 南郑县| 治县。| 建阳市| 乌拉特前旗| 油尖旺区| 资溪县| 梁河县| 昔阳县| 章丘市| 利辛县| 凤凰县| 汾西县| 乌苏市| 阳江市| 柳江县| 南部县| 合川市| 永胜县| 小金县| 卫辉市| 全椒县| 津南区| 枝江市| 长白| 新田县| 长丰县| 石首市| 南陵县| 长岭县| 淮南市| 固阳县|