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

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

Linux+php+apache+oracle環(huán)境搭建之CentOS下安裝Apache

2024-08-27 18:23:47
字體:
供稿:網(wǎng)友
Linux環(huán)境是在VMware虛擬機中搭建的,重在學(xué)習(xí),安裝的系統(tǒng)是CentOS6.5-64bit。本文主要講訴在CentOS中如何安裝APACHE。

CentOS系統(tǒng)安裝的是Basic Server。安裝apache之前所必須的缺少的組件比較多,下面羅列下本次需要安裝的組件

apache - aprapache - apr-utilperl - pcreapache

官網(wǎng)下載Apache,下載地址:http://httpd.apache.org/download.cgi

下載穩(wěn)定版本httpd-2.4.9.tar.gz,上傳到服務(wù)器/usr/packages目錄下。

安裝Apache:

# tar -xvzf httpd-2.4.9.tar.gz# cd httpd-2.4.9# ./configure --prefix=/usr/local/apache --enable-module=so --enable-module=rewrite

檢查編譯環(huán)境報錯:

checking for APR... noconfigure: error: APR not found . Please read the documentation.

原因缺少APR(Apache Portable Runtime),需要下載apr與apr-util。

下載地址:http://apr.apache.org/download.cgi

下載apr-1.5.1.tar.gz、apr-util-1.5.3.tar.gz

安裝apr:

# tar -xvzf apr-1.5.1.tar.gz# cd apr-1.5.1# .configure# make# make install

安裝apr-util:

# tar -xvzf apr-util-1.5.3.tar.gz# cd apr-util-1.5.3# .configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr# make# make install

再次檢查編譯環(huán)境報錯:

configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

缺少pcre,下載地址:http://sourceforge.net/projects/pcre/

安裝pcre:

# unzip -o pcre-8.35# cd pcre-8.35# ./configure --prefix=/usr/local/pcre# make# make install

再次檢查編譯環(huán)境時加上參數(shù):

--with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre

沒有報錯:

# make# make install

安裝完畢。

這是我第一次安裝,缺少關(guān)聯(lián)關(guān)系的組件,下次安裝直接先安裝組件,最后安裝apache,這樣會順暢些吧。

啟動Apache

# cp /usr/local/apache/bin/apachectl /sbin/# apachectl start

配置隨系統(tǒng)啟動時啟動Apache服務(wù)

# vi /etc/rc.d/rc.local

在最后一行加上: /sbin/apachectl start

修改Apache默認(rèn)站點目錄

修改/usr/local/apache/conf/httpd.conf文件


改成


執(zhí)行命令
# apachectl restart

Apache的配置文件再續(xù)~~

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 平遥县| 通海县| 葵青区| 桐乡市| 横峰县| 砚山县| 林甸县| 攀枝花市| 田林县| 祁东县| 安徽省| 黄大仙区| 额济纳旗| 昌黎县| 名山县| 赤壁市| 潞城市| 乡城县| 阜平县| 鄂尔多斯市| 杭州市| 简阳市| 龙川县| 海口市| 县级市| 班戈县| 宁明县| 武宁县| 古田县| 龙江县| 手游| 兴义市| 隆尧县| 镇原县| 当雄县| 黎城县| 荥经县| 共和县| 义马市| 萨嘎县| 根河市|