Linux+php+apache+oracle環(huán)境搭建之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)文章
分享十個便宜VPS主機-VPS服務(wù)器建站和搭建應(yīng)用服務(wù)體驗
這篇文章主要介紹了分享十個便宜VPS主機-VPS服務(wù)器建站和搭建應(yīng)用服務(wù)體驗,非常具有實用價值,需要的朋友可以參考下2017-07-07linux驅(qū)動開發(fā)中常用函數(shù)copy_from_user open read write詳解
本文解說了inux驅(qū)動開發(fā)函數(shù)copy_from_user ,open ,read write幾個常用函數(shù),現(xiàn)在一起來學習他們的使用過程吧2021-08-08Linux中/var/spool/postfix/maildrop占空間很大的原因解析
這篇文章主要給大家介紹了關(guān)于Linux中/var/spool/postfix/maildrop占空間很大的原因解析,文中介紹的非常詳細,需要的朋友可以參考借鑒,下面來一起看看吧。2017-04-04