色尼玛亚洲综合影院,亚洲3atv精品一区二区三区,麻豆freexxxx性91精品,欧美在线91

win7 64位系統(tǒng) 配置php最新版開發(fā)環(huán)境(php+Apache+mysql)

一 :準(zhǔn)備階段

1:php

php-5.5.13下載鏈接:http://windows.php.NET/downloads/releases/php-5.5.13-Win32-VC11-x64.zip

推薦 Thread Safe(線程安全) V11 x64,也就是64bit的。

現(xiàn)在php官網(wǎng)上下載php安裝包都有VC11或VC9的字樣,這是什么含義,我們應(yīng)該下載哪種安裝包更好呢?

其實php官網(wǎng)給出了答案:

VC9 and VC11
More recent versions of php are built with VC9 or VC11 (Visual Studio 2008 and 2012 compiler respectively) and include improvements in performance and stability.

The VC9 builds require you to have the Visual C++ Redistributable for Visual Studio 2008 SP1 x86 or x64 installed.

The VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012 x86 or x64 installed.

VC9意思就是該版本php是用VisualStudio2008編譯的,而VC11則是用VisualStudio2012編譯的。這意味著

如果你下載的是VC9版本的,就需要先安裝VisualC++RedistributableforVisualStudio2008SP1,

如果你下載的是VC11版本的,就需要先安裝VisualC++RedistributableforVisualStudio2012.

V11是微軟的一個組件,如果不安裝的話會提示 msvcr110.dll丟失。

下載鏈接:http://www.microsoft.com/zh-CN/download/details.ASPx?id=30679

請下載64bit的,安裝完成后,請重啟計算機(jī)

 2:apache2.4.9,下載鏈接:http://www.apachelounge.com/download/

同樣是推薦 V11,64位的。

3:mysql 5.6.19,下載鏈接:http://dev.mysql.com/downloads/mysql/

同樣是推薦 mysql-5.6.19-winx64.zip

二:方法/步驟

 1:安裝配置Apache2.4.9(httpd-2.4.9-win64-VC11.zip )

  解壓下載的安裝包:httpd-2.4.9-win64-VC11.zip 將其放到自己的安裝目錄(我的目錄E:/Apache24)

  然后對http.conf(E:/Apache24/conf/http.conf)配置文件進(jìn)行修改-使用記事本打開就行

    (1)修改ServerRoot Apache的根路徑:

          (37行)ServerRoot"c:/Apache24"改成=>ServerRoot "E:/Apache24"

      (2)修改ServerName你的主機(jī)名稱:

          (217行)ServerNamewww.example.com:80將前面的#去掉,該屬性在從命令行啟動Apache時需要用到。

      (3)修改DocumentRoot Apache訪問的主文件夾目錄,就是php、html代碼文件的位置。Apache默認(rèn)的路徑是在htdocs(E:/Apache24/htdocs)下面,里面會有個簡單的入口文件index.html。這個路徑可以自己進(jìn)行修改,我這里將其配置在我自己新建的文件夾www(E:/php/www)下。

    (247行) DocumentRoot "c:/Apache24/htdocs"

         <Directory"c:/Apache24/htdocs">

    改為=>

        DocumentRoot "E:/php/www"

        <Directory "E:/php/www">

      (4)修改入口文件配置:DirectoryIndex一般情況下我們都是以index.php、index.html、index.htm作為web項目的入口。Apache默認(rèn)的入口只有index.html需要添加其他兩個的支持,當(dāng)然這個入口文件的設(shè)置可以根據(jù)自己的需要增減,如果要求比較嚴(yán)格的話可以只寫一個index.php,這樣在項目里面的入口就只能是index.php

  (274行)<IfModuledir_module>

        DirectoryIndexindex.html

       </IfModule>

  改為=>

       <IfModuledir_module>

        DirectoryIndex  index.php index.htm index.html

        </IfModule>

     (5)設(shè)定serverscript的目錄:

        (358行)ScriptAlias/cgi-bin/ "c:/Apache24/cgi-bin/"改為=> ScriptAlias/cgi-bin/ "e:/Apache24/cgi-bin"

    (6)(374行)

        <Directory"c:/Apache24/cgi-bin">

          AllowOverride None

          Options None

          Require all granted

        </Directory>

改為=>

        <Directory"e:/Apache24/cgi-bin">

          AllowOverride None

          Options None

          Require all granted

        </Directory>

  接下來就可以啟動Apache了

  開始---運(yùn)行,輸入cmd,打開命令提示符。接著進(jìn)入e:/Apache24/bin目錄下回車httpd回車,

  沒有報錯的話就可以測試了(保持該命令窗口為打開的狀態(tài))。

  把Apache24/htdocs目錄下的index.html放到e:/php/www目錄下,用瀏覽器訪問會出現(xiàn)“It works”那么就說明apache已經(jīng)正確安裝并啟動了。也可以自己寫一個簡單的index.html文件也可以打開。

  說明:Apache 默認(rèn)使用80端口,如果80端口被占用,Apache將無法啟動,此時可以更改Apache端口,解決此問題。

  更改端口:找到Apache安裝目錄下conf目錄下的httpd.conf文件(即e:/Apache24/conf/httpd.conf)。打開它。找到“Listen80”,緊接著Listen的數(shù)字就是端口號,我們改為“Listen 8080”。  修改為其它未使用的端口號也行。. 重新啟動Apache,使新的配置生效。可以使用右下角狀態(tài)欄的“Apache Serive Monitor”啟動apache。 也可以點擊“開始”>"運(yùn)行>輸入cmd>回車>定位到apache安裝目錄下到bin目錄,然后輸入“httpd

主站蜘蛛池模板: 彝良县| 临猗县| 龙游县| 石河子市| 桃园市| 博兴县| 兴义市| 洛阳市| 凤阳县| 隆子县| 邻水| 天祝| 周口市| 伊金霍洛旗| 彩票| 静海县| 姜堰市| 巴南区| 迁安市| 疏勒县| 辉县市| 革吉县| 易门县| 和平县| 富阳市| 疏勒县| 自治县| 田阳县| 虹口区| 金川县| 星子县| 灯塔市| 扶绥县| 特克斯县| 乌鲁木齐县| 定南县| 鹤壁市| 湘潭市| 鲁山县| 宿州市| 平陆县|