欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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

 更新時間:2014年08月20日 10:56:31   投稿:hebedich  
Linux環(huán)境是在VMware虛擬機中搭建的,重在學習,安裝的系統(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... no
configure: 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默認站點目錄

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


改成


執(zhí)行命令
# apachectl restart

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

相關(guān)文章

最新評論