国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 托克托县| 三都| 商洛市| 安丘市| 甘孜| 绥棱县| 巴塘县| 定州市| 江源县| 舞钢市| 丹棱县| 延庆县| 谢通门县| 五原县| 积石山| 南乐县| 厦门市| 宣化县| 册亨县| 呼伦贝尔市| 苍南县| 耒阳市| 胶南市| 莱西市| 新蔡县| 罗平县| 治多县| 阿瓦提县| 荣成市| 三都| 鹤庆县| 祁阳县| 唐海县| 阿坝县| 荣昌县| 建阳市| 石首市| 平江县| 石首市| 平顺县| 和田市|