欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

CentOS7Apache2.4.23+php-5.6.30安裝配置-創(chuàng)新互聯(lián)

下載Apache安裝包  httpd-2.4.23.tar.gz

創(chuàng)新互聯(lián)公司是一家集網(wǎng)站建設,興山企業(yè)網(wǎng)站建設,興山品牌網(wǎng)站建設,網(wǎng)站定制,興山網(wǎng)站建設報價,網(wǎng)絡營銷,網(wǎng)絡優(yōu)化,興山網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強企業(yè)競爭力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時我們時刻保持專業(yè)、時尚、前沿,時刻以成就客戶成長自我,堅持不斷學習、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實用型網(wǎng)站。

下載地址:http://apache.fayea.com/httpd/

Apache 安裝要求

必須安裝APR、APR-Util、PCRE,gcc、gcc-c++等包

安裝gcc和gcc-c++我采用yum安裝的方式

yum -y install gcc gcc-c++

編譯命令:(除了指定Apache的安裝目錄外,還要安裝apr、apr-util、pcre,并指定參數(shù))

[root@bogon software]# wget http://archive.apache.org/dist/httpd/httpd-2.4.23.tar.gz [root@bogon software]# tar -zxvf httpd-2.4.23.tar.gz [root@bogon software]# cd httpd-2.4.23 [root@bogon httpd-2.4.23]# ./configure --prefix=/usr/local/apache2 \ --with-apr=/usr/local/apr \ --with-apr-util=/usr/local/apr-util/ \ --with-pcre=/usr/local/pcre checking for chosen layout... Apache checking for working mkdir -p... yes checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu configure:  configure: Configuring Apache Portable Runtime library... configure:  checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file. [root@bogon httpd-2.4.23]#

 在編譯Apache時出現(xiàn)了上面問題,因為我還沒有安裝apr、apr-util、pcre,接下來依次安裝依賴

http://apr.apache.org/download.cgi  下載apr-1.5.2.tar.gz、apr-util-1.5.4.tar.gz

http://www.pcre.org/ 官網(wǎng)

https://sourceforge.net/projects/pcre/files/pcre/  選擇pcre下載,不用pcre2

下載最新版本pcre-8.39.tar.gz

解決apr問題

[root@bogon software]# wget http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz [root@bogon software]# tar -zxvf  apr-1.5.2.tar.gz [root@bogon software]# cd apr-1.5.2/ [root@bogon apr-1.5.2]# ./configure --prefix=/usr/local/apr [root@bogon apr-1.5.2]# make && make install

解決APR-util問題

[root@bogon software]# wget http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz [root@bogon software]# tar -zxvf apr-util-1.5.4.tar.gz [root@bogon software]# cd apr-util-1.5.4/ [root@bogon apr-util-1.5.4]# ./configure --prefix=/usr/local/apr-util \ -with-apr=/usr/local/apr/bin/apr-1-config [root@bogon apr-util-1.5.4]# make && make install

make過程如果遇到下面這個錯誤,可能缺expat的開發(fā)庫,安裝expat庫試試。yum install expat-devel

[root@jdu4e00u53f7 apr-util-1.6.0]# make  make[1]: Entering directory `/liuzhen/source/apr-util-1.6.0' /bin/sh /liuzhen/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread   -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I/liuzhen/source/apr-util-1.6.0/include -I/liuzhen/source/apr-util-1.6.0/include/private  -I/liuzhen/apr/include/apr-1    -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory  #include <expat.h>                    ^ compilation terminated. make[1]: *** [xml/apr_xml.lo] Error 1 make[1]: Leaving directory `/liuzhen/source/apr-util-1.6.0' make: *** [all-recursive] Error 1

解決pcre-config問題

[root@bogon software]# wget https://sourceforge.net/projects/pcre/files/pcre/8.39/pcre-8.39.tar.gz [root@bogon software]# tar -zxvf pcre-8.39.tar.gz [root@bogon software]# cd pcre-8.39 [root@bogon pcre-8.39]# ./configure --prefix=/usr/local/pcre [root@bogon pcre-8.39]# make && make install

 再次編譯httpd-2.4.23:

[root@bogon software]# cd httpd-2.4.23 [root@bogon httpd-2.4.23]# ./configure --prefix=/usr/local/apache2 \ --with-apr=/usr/local/apr \ --with-apr-util=/usr/local/apr-util/ \ --with-pcre=/usr/local/pcre [root@bogon httpd-2.4.23]# make && make install

編輯 httpd.conf 文件

[root@localhost liuzhen]# vi /usr/local/apache2/conf/httpd.conf

找到:

#ServerName www.example.com:80

修改為:

ServerName 127.0.0.1:80或者ServerName localhost:80

記得要去掉前面的“#”

啟動Apache

[root@localhost liuzhen]# /usr/local/apache2/bin/apachectl start

停止Apache

[root@localhost liuzhen]# /usr/local/apache2/bin/apachectl stop

重啟Apache

[root@localhost liuzhen]# /usr/local/apache2/bin/apachectl restart

在瀏覽器中通過http://localhost:80,如果看到頁面中顯示“It works!”字樣,則代表Apache驗證通過。

接下來是PHP相關配置

編輯 httpd.conf 文件

[root@localhost liuzhen]# vi /usr/local/apache2/conf/httpd.conf

找到:

<IfModule dir_module>

DirectoryIndex index.html

</IfModule>

添加:

<IfModule dir_module>

DirectoryIndex index.php index.html

</IfModule>

 找到:

AddType  application/x-compress .Z

AddType application/x-gzip .gz .tgz

在后面添加(使Apcche支持PHP):

AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .php5

修改默認的Web站點目錄

   默認的目錄為  "/usr/local/apache2/htdocs",修改apache的配置文件httpd.conf,比如在新建一個 /home/gyw/WebSite的目錄作為apache的站點目錄

  找到DocumentRoot這一行修改為:DocumentRoot "/home/gyw/WebSite"

  找到 <Directory> 這一行修改為:<Directory "/home/gyw/WebSite">

測試:修改到文件夾出現(xiàn)錯誤:

“You don't have permission to access /index.html on this server.”

解決方法:

更改文件權限;chmod 755 index.html

打開apache配置文件httpd.conf,找到這么一段:

<Directory />

   Options FollowSymLinks

   AllowOverride None

   Order deny,allow

   deny from all

   Satisfy all

</Directory>

安裝PHP

我在php開發(fā)過程中需要使用gd2,所以順便把安裝gd2安裝上

[root@localhost liuzhen]# yum -y install libpng libpng-devel php-gd

PHP下載地址:http://www.php.net/downloads.php

[root@localhost liuzhen]# wget -O ./php-5.6.30.tar.gz http://hk1.php.net/get/php-5.6.30.tar.gz/from/this/mirror [root@localhost liuzhen]# tar -zxvf php-5.6.30.tar.gz [root@localhost liuzhen]# cd php-5.6.30 [root@localhost php-5.6.30]# ./configure --prefix=/usr/local/php \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-mysql=mysqlnd \ --with-gd

出現(xiàn)下面錯誤

Sorry, I cannot run apxs.  Possible reasons follow: 1. Perl is not installed 2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs 3. Apache was not built using --enable-so (the apxs usage page is displayed) The output of /liuzhen/apache2/bin/apxs follows: ./configure: /liuzhen/apache2/bin/apxs: /replace/with/path/to/perl/interpreter: bad interpreter: No such file or directory configure: error: Aborting

解決步驟:

1、根據(jù)不能run apxs 。cd 到apache的bin目錄下運行./apxs 運行結(jié)果

----------------------------------------------------

bash: ./apxs: /replace/with/path/to/perl/interpreter: bad interpreter: No such file or directory

---------------------------------------------------------

2、vim apxs文件 找“/replace/with/path/to/perl/interpreter”關鍵字

在第一個行 :#!/replace/with/path/to/perl/interpreter -w

根據(jù)perl的安裝目錄 /usr/bin/perl

修改為:#! /usr/bin/perl -w

重新執(zhí)行php configure

[root@localhost php-5.6.30]# ./configure --prefix=/usr/local/php \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-mysql=mysqlnd \ --with-gd

出現(xiàn)錯誤:configure: error: xml2-config not found. Please check your libxml2 installation.

 安裝libxml2和libxml2-devel

[root@localhost php-5.6.30]# yum -y install libxml2 libxml2-devel

再次執(zhí)行./configure命令有可能還會出現(xiàn)下面這個錯誤

PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled. clicommand.inc directorytreeiterator.inc invertedregexiterator.inc directorygraphiterator.inc pharcommand.inc phar.inc Build complete. Don't forget to run 'make test'. -bash: $'\343\200\200make': command not found

php 的編譯時需要依賴pear package ,目前的問題錯誤"PEAR package PHP_Archive not installed",已經(jīng)明顯報出這個問題。
因此編譯使用參數(shù) --without-pear  將pear 屏蔽掉編譯安裝后,再進行安裝;同時因為phar 屬于pear的一個庫 ,所以不將phar關閉掉,同時還會報這個錯誤,
同時需要使用 --disable-phar  編譯參數(shù).

./configure --without-pear  --disable-phar make make install

成功編譯安裝完成后,再安裝pear

wget  http://pear.php.net/go-pear.phar  /usr/local/bin/php go-pear.phar

重新運行上面的./configure命令

[root@localhost php-5.6.30]# ./configure --prefix=/usr/local/php \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-mysql=mysqlnd \ --with-gd [root@localhost php-5.6.30]# make && make install

--with-mysql=mysqlnd 加上此參數(shù)支持mysql

--with-gd 支持gd

  注意這里有一個-with-apxs2=/usr/local/apache2/bin/apxs選項,其中apxs是在安裝Apache時產(chǎn)生的,apxs是一個為Apache HTTP服務器編譯和安裝擴展模塊的工具,使之可以用由mod_so提供的LoadModule指令在運行時加載到Apache服務器中。我的理解是通過這個工具把PHP模塊動態(tài)加載到Apache中

把原來位于源代碼里面的php.ini-development拷貝到/usr/local/php/lib/php.ini下,并且重命名為php.ini

[root@localhost liuzhen]# cp /liuzhen/php-5.3.29/php.ini-development /usr/local/php/lib/php.ini

編輯/usr/local/php/lib/php.ini文件,找到;extension=php_gd2.dll將前面分號去掉

先停止apache后重啟apache

[root@localhost liuzhen]# /usr/local/apache2/bin/apachectl stop [root@localhost liuzhen]# /usr/local/apache2/bin/apachectl restart

測試

  在apache的htdocs下建立一個php文件test.php,里面的內(nèi)容如下:

  <?php

  phpinfo();

  ?>

  然后在瀏覽器里輸入http://127.0.0.1/test.php

  如果出現(xiàn)php的相關配置,成功,如果什么都沒有輸入,說明失敗,重新以上步驟或者查找原因

如果決定在安裝后改變配置選項,只需重復最后的三步configure, make, 以及 make install,然后需要重新啟動 Apache 使新模塊生效。Apache不需要重新編譯。

下面是我留的筆記就不用看了CentOS7 Apache 2.4.23 +  php-5.6.30 安裝 配置

==========================

安裝gd2,安裝gd2的時候順帶安裝了jpeg,png,zlib

1、安裝zlib

http://www.zlib.net/

http://www.zlib.net/zlib-1.2.11.tar.gz

tar xf zlib-1.2.7.tar.gz

cd zlib-1.2.7

./configure

make

make install

2、安裝 jpeg

https://jpeg.org/

http://www.ijg.org/

http://www.ijg.org/files/jpegsrc.v9b.tar.gz

tar xf jpegsrc.v9a.tar.gz

cd jpeg-9a

./configure --prefix=/usr/local/jpeg --enable-shared --enable-static

make

make install

3、安裝 libpng

http://www.libpng.org/pub/png/libpng.html

http://download.sourceforge.net/libpng/libpng-1.6.28.tar.gz

http://blog.csdn.net/wang02011/article/details/7066361

tar xf libpng-1.6.12.tar.gz

cd libpng-1.6.12

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

make

make install

4、安裝freetype

https://www.freetype.org/download.html

http://download.savannah.gnu.org/releases/freetype/

http://download.savannah.gnu.org/releases/freetype/freetype-2.7.1.tar.gz

tar xf freetype-2.5.3.tar.gz

cd freetype-2.5.3

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

make

make install

5、安裝gd2

yum install php-gd

https://libgd.github.io/

https://github.com/libgd/libgd/archive/gd-2.2.4.tar.gz

tar xf libgd-2.1.0.gz

cd libgd-2.1.0

./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg/ --with-png=/usr/local/png/ --with-zlib=/usr/local/zlib/ --with-freetype=/usr/local/freetype/

make

make install

(注,版本這里必須>=2.1.0,否則用php-5.6.0會報錯,可能老版本的php不會報錯)

安裝php是參數(shù)調(diào)整

[root@localhost php-5.6.30]# ./configure --prefix=/usr/local/php \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-php-config=/usr/local/php/bin/php-config \ --with-jpeg-dir=/usr/local/jpeg \ --with-png-dir=/usr/local/libpng \ --with-freetype-dir=/usr/local/freetype \ --with-mysql=mysqlnd \ --with-gd [root@localhost php-5.6.30]# make && make install

安裝curl

官網(wǎng)地址:https://curl.haxx.se/

下載地址:https://curl.haxx.se/download/curl-7.53.1.tar.gz

[root@bogon liuzhen]# wget https://curl.haxx.se/download/curl-7.53.1.tar.gz [root@bogon liuzhen]# tar -zxvf curl-7.53.1.tar.gz [root@bogon liuzhen]# cd curl-7.53.1 [root@bogon curl-7.53.1]# ./configure --prefix=/usr/local/curl [root@bogon curl-7.53.1]# make && make install

#vim /usr/local/php/lib/php.ini

添加如下一行:

extension=curl.so

安裝php 只要打開開關 --with-curl=/usr/local/curl 就可以了。

-------------------------------------------------------------------------------------

CentOS7 Apache 2.4.23 +  php-5.6.30 安裝 配置

另外有需要云服務器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。

網(wǎng)頁名稱:CentOS7Apache2.4.23+php-5.6.30安裝配置-創(chuàng)新互聯(lián)
文章出自:http://chinadenli.net/article44/dcpdhe.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站導航、品牌網(wǎng)站建設、商城網(wǎng)站、標簽優(yōu)化、電子商務、定制開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設公司
一区二区日韩欧美精品| 欧美日韩校园春色激情偷拍| 日韩精品中文在线观看| 经典欧美熟女激情综合网| 国产丝袜美女诱惑一区二区| 国产精品刮毛视频不卡| 91免费一区二区三区| 亚洲做性视频在线播放| 精品女同在线一区二区| 嫩草国产福利视频一区二区| 亚洲高清中文字幕一区二三区 | 国产精品白丝久久av| 日韩精品一区二区一牛| 亚洲精品美女三级完整版视频| 韩国日本欧美国产三级| 成人综合网视频在线观看| 我想看亚洲一级黄色录像| 久久少妇诱惑免费视频| 日韩欧美中文字幕人妻| 中文字幕中文字幕在线十八区 | 亚洲欧美日产综合在线网| 黄色片一区二区在线观看| 国产激情一区二区三区不卡| 国产白丝粉嫩av在线免费观看| 欧美激情区一区二区三区| 亚洲综合色婷婷七月丁香| 亚洲男人的天堂就去爱| 国产亚洲欧美日韩精品一区| 日韩精品在线观看一区| 精品人妻一区二区三区在线看 | 人妻人妻人人妻人人澡| 99久久精品国产日本| 亚洲a码一区二区三区| 欧美日韩国产精品第五页| 午夜视频成人在线免费| 亚洲男人天堂成人在线视频| 夫妻性生活真人动作视频| 午夜精品在线观看视频午夜| 国产午夜福利在线免费观看| 久久精品中文扫妇内射| 国产欧美精品对白性色|