日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
CentOS6.5上編譯安裝Apache

Linux系統(tǒng):centos 6.5 mini版,如果是VMware虛擬機(jī),網(wǎng)卡要求“橋接

讓客戶滿意是我們工作的目標(biāo),不斷超越客戶的期望值來(lái)自于我們對(duì)這個(gè)行業(yè)的熱愛。我們立志把好的技術(shù)通過(guò)有效、簡(jiǎn)單的方式提供給客戶,將通過(guò)不懈努力成為客戶在信息化領(lǐng)域值得信任、有價(jià)值的長(zhǎng)期合作伙伴,公司提供的服務(wù)項(xiàng)目有:域名申請(qǐng)網(wǎng)站空間、營(yíng)銷軟件、網(wǎng)站建設(shè)、宜昌網(wǎng)站維護(hù)、網(wǎng)站推廣。

1、編譯安裝前首先yum 安裝“開發(fā)環(huán)境”“兼容庫(kù)”“中文支持”即執(zhí)行如下命令

#yum groupinstall "Development tools" "Compatibility libraries" "Chinese Support [zh]" -y

安裝man, vim, wget 工具

#yum install man vim wget -y

2、因?yàn)檫@次要編譯安裝httpd2.4.25,此版本需要更高版本的apr和apr-util。

因此要首先編譯安裝apr和apr-util。

wget http://mirrors.hust.edu.cn/apache/apr/apr-1.5.2.tar.bz2

wget http://mirrors.hust.edu.cn/apache/apr/apr-util-1.5.4.tar.bz2

2.1編譯安裝apr

tar xf apr-1.5.2.tar.bz2

cd apr-1.5.2

./configure --prefix=/usr/local/apr

echo $?  ###如果執(zhí)行結(jié)果是0,則繼續(xù)執(zhí)行make && make install

2.2編譯安裝apr-util

tar xf apr-util-1.5.4.tar.bz2

cd apr-util-1.5.4

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

echo $?  ###如果執(zhí)行結(jié)果是0,則繼續(xù)執(zhí)行make && make install

3、重量級(jí)選手出廠了,正式開始編譯httpd-2.4.25

wget http://mirrors.hust.edu.cn/apache/httpd/httpd-2.4.25.tar.bz2

多次編譯經(jīng)驗(yàn)得知,缺少pcre相關(guān)文件,openssl is too old

執(zhí)行如下命令:

yum install pcre-devel openssl openssl-devel -y

tar xf httpd-2.4.25

cd httpd-2.4.25

./configure  --prefix=/usr/local/apache --sysconfdir=/etc/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/

有如上提示則繼續(xù)執(zhí)行:make && make install

再執(zhí)行echo$?如果結(jié)果是0,則說(shuō)明httpd2.4.25到此編譯成功,然后進(jìn)行簡(jiǎn)單的配置,就可以使用了

4、配置httpd

關(guān)閉linux防火墻

service httpd stop

關(guān)閉SELinux

setenforce 0

復(fù)制啟動(dòng)文件

cp /usr/local/apache/bin/apachectl /etc/init.d/httpd

把httpd的環(huán)境變量添加到“環(huán)境變量”

echo 'export PATH=$PATH:/usr/local/apache/bin' > /etc/profile.d/httpd.sh

chmod +x /etc/profile.d/httpd.sh

source /etc/profile.d/httpd.sh

編輯httpd的配置文件:

vim /etc/httpd/httpd.conf

在ServerRoot下一行,添加 ServerName localhost

如果想把Apache服務(wù)加入到開機(jī)啟動(dòng),可以修改服務(wù)啟動(dòng)腳本:

vim /etc/init.d/httpd

在第二行下添加:# chkconfig:235 85 15

                # description: This is apache server

保存退出

執(zhí)行命令service httpd start #提示lynx找不到???那就yum install lynx -y

執(zhí)行命令netstat -ntlp #查看httpd是否啟動(dòng),是否有80端口

最后在你的瀏覽器輸入虛擬機(jī)IP地址

It works!

則Apache,安裝成功

1、編譯安裝--默認(rèn)的index.html首頁(yè)在/usr/local/apache/htdocs

2、配置文件:/etc/httpd/httpd.conf

3、啟動(dòng)腳本:/etc/init.d/httpd

4、cgi-bin文件目錄:/etc/local/apache/cgi-bin


網(wǎng)頁(yè)標(biāo)題:CentOS6.5上編譯安裝Apache
瀏覽地址:http://www.5511xx.com/article/djsshco.html