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)境報(bào)錯(cuò):
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)境報(bào)錯(cuò):
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í)加上參數(shù):
--with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre
沒(méi)有報(bào)錯(cuò):
# make # make install
安裝完畢。
這是我第一次安裝,缺少關(guān)聯(lián)關(guān)系的組件,下次安裝直接先安裝組件,最后安裝apache,這樣會(huì)順暢些吧。
啟動(dòng)Apache
# cp /usr/local/apache/bin/apachectl /sbin/ # apachectl start
配置隨系統(tǒng)啟動(dòng)時(shí)啟動(dòng)Apache服務(wù)
# vi /etc/rc.d/rc.local
在最后一行加上: /sbin/apachectl start
修改Apache默認(rèn)站點(diǎn)目錄
修改/usr/local/apache/conf/httpd.conf文件

改成

執(zhí)行命令
# apachectl restart
Apache的配置文件再續(xù)~~
相關(guān)文章
Linux expect實(shí)現(xiàn)自動(dòng)登錄腳本實(shí)例代碼
expect是一個(gè)基于Tcl的用于自動(dòng)交互操作的工具語(yǔ)言,它適合用來(lái)編寫(xiě)需要交互的自動(dòng)化腳本,比如上面提到的SSH輸入用戶(hù)名密碼,自動(dòng)FTP等等場(chǎng)景。下面這篇文章主要給大家介紹了關(guān)于Linux expect實(shí)現(xiàn)自動(dòng)登錄腳本的相關(guān)資料,需要的朋友可以參考下。2018-03-03
VMware虛擬機(jī)中Ubuntu18.04無(wú)法連接網(wǎng)絡(luò)的解決辦法
這篇文章主要為大家詳細(xì)介紹了VMware虛擬機(jī)中Ubuntu18.04無(wú)法連接網(wǎng)絡(luò)的解決辦法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2019-03-03
Linux多路轉(zhuǎn)接之select函數(shù)使用方式
這篇文章主要介紹了Linux多路轉(zhuǎn)接之select函數(shù)使用方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2024-08-08
新手學(xué)習(xí)Linux系統(tǒng)的11點(diǎn)建議
這篇文章主要為大家詳細(xì)介紹了新手學(xué)習(xí)Linux系統(tǒng)的11點(diǎn)建議,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2016-09-09
ubuntu 16.04 LTS 安裝mongodb 3.2.8教程
本篇文章主要介紹了ubuntu 16.04 LTS 安裝mongodb 3.2.8教程,具有一定的參考價(jià)值,有需要的可以了解一下。2017-04-04
詳解Linux系統(tǒng)中虛擬設(shè)備文件的各種實(shí)用用法
這篇文章主要介紹了Linux系統(tǒng)中虛擬設(shè)備文件的各種實(shí)用用法,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-07-07

