PHP環境配置-從Apache官網下載windows版apache伺服器,phpapache
由於個人有強迫傾向,下載軟體都喜歡從官網下載,摸索了好久終於摸清楚怎麼從Apache官網下載windows安裝版的Apache伺服器了,現在分享給大家。
進入apache伺服器官網http://httpd.apache.org/,這裡我們以下載穩定版的
httpd 2.2.29為例,點擊download。
由於官方網頁改版,以前的方式可能五法進行下載,為了不浪費大家的時間,特此修正2015-01-24\
第一步依舊是點擊download
點選連結Files for 3 Microsoft Windows
The Apache HTTP Server Project itself does not provide binary releases of softwar
e, only source code. Individual committers may provide binary packages as a con
venience, but it is not a release deliverable.
If you cannot compile the Apache HTTP Server yourself, you can obtain a binary p
ackage from numerous binary distributions available on the Internet.
Popular options for deploying Apache httpd, and, optionally, PHP and MySQL, on
Microsoft Windows, include:
ApacheHaus
Apache Lounge
BitNami WAMP Stack
WampServer
XAMPP
大致意思是說apache本身不提供已編譯的安裝包,只提供源碼,如果你自己無法編
譯,可以選擇下面這些官方推薦的第三方提供編譯的網站。
其中後兩個是有名的wamp以及xamppIntegration Environment,如果只想下載apache可以選擇前三個
網站,這裡我們第一個ApacheHaus為例。
開啟ApacheHaus之後你會發現這個網站上有各種windows版本,可以盡情選擇你要下
載的版本。
點擊紅框中的表徵圖即可開始下載,x86是32位的,x64是64位的,根據自己的作業系統選
擇下載
解壓後 是一個壓縮包,把他移動到你想放置的地方。
命令列下進入到apache下面的bin目錄,輸入
httpd -k install
把apache安裝成windows後台服務。
利用ApacheMonitor來啟動你的apache
The Apache Monitor is a desktop tray application that allows you to monitor the
existence of a running Apache service and easily start, stop and restart Apache. T
o use it just double click on the ApacheMonitor.exe in the \Apache24\bin folder. I
f you want it to start automatically for you when you log into the computer, just
drag a copy into the Startup folder in Window's Start Menu.
更多操作請參考附帶的說明10 文檔readme_first.html。
針對大家遇到的一些問題做下簡單總結
1、由於apache預設是監聽80連接埠,如果你的電腦iis是啟動狀態,並且也使用了80端
口,apache將無法正常啟動,需要先停止iis,另外迅雷也可能會使用80連接埠,所以也要
關閉迅雷。查看80連接埠是否被佔用,命令列下輸入:
netstat -aon|findstr "80"
如果看到的結果,說明80連接埠已被使用,需要先關閉相關軟體,或者修改apache默
認的監聽連接埠
開啟apache目錄下的conf/httpd.conf 搜尋 "Listen 80"
修改為Listen 8088
儲存之後再重新啟動apache
2、httpd -k install 輸入該命令後查看服務是否安裝成功
開始-->運行-->services.msc-->確定
開啟後如果在服務列表能夠看到apache字樣,說明,服務安裝成功,可以直接點擊左邊
的啟動按鈕來啟動服務
3、服務無法正常安裝,首先確定軟體32位和64位是否和自己的系統匹配
其次,看電腦有沒有安裝軟體相應的運行包,比如你下載的是VC9版本,那麼你需要先安
裝Microsoft Visual C++ 2008 Redistributable ,同理VC11版本你需要安裝Microsoft
Visual C++ 2012 Update 4 Redistributable Package (X86 & x64)
在ApacheHaus網站的最底部提供了相應的Visual Studio Redistributable Packages下
載連結
http://www.bkjia.com/PHPjc/1048728.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1048728.htmlTechArticlePHP環境配置-從Apache官網下載windows版apache伺服器,phpapache 由於個人有強迫傾向,下載軟體都喜歡從官網下載,摸索了好久終於摸清楚怎麼從...