Apache+PHP+Mysql 配置說明自己收藏都是解壓包安裝解決辦法
Jun 13, 2016 am 10:08 AM
Apache+PHP+Mysql 配置說明自己收藏都是解壓包安裝
在當(dāng)前的網(wǎng)絡(luò)應(yīng)用中,Apache+PHP+Mysql,是應(yīng)用得非常廣泛的一種WEB服務(wù)器架構(gòu),特別在開源免費(fèi)應(yīng)用中.
要安裝這種架構(gòu),有二種選擇,
1.利用集成工具,網(wǎng)上有很多這方面的工具,推薦XAMPP,網(wǎng)址:http://www.apachefriends.org/zh_cn/xampp-windows.html
這種方式,使用戶無需了解出上三種軟件的具體設(shè)定和調(diào)整方式,雖然安裝方便,但在多種類別的應(yīng)用架設(shè)中,仍不斷會(huì)有麻煩出現(xiàn).
2.自行架設(shè).需要用戶自己調(diào)整各軟件的設(shè)定,麻煩一些,一旦掌握后,則有助於管理網(wǎng)絡(luò)應(yīng)用平臺(tái),也便於視需要對(duì)服務(wù)器端軟件進(jìn)行升級(jí)更新,或?qū)W(wǎng)絡(luò)應(yīng)用平臺(tái)進(jìn)行升級(jí).如果是真心想學(xué)習(xí)Apache+php+MYsql的應(yīng)用,推薦此種方式.其實(shí)依據(jù)網(wǎng)上很多老手給出的指引,要掌握安裝並不復(fù)雜.
下面給出一篇由Freddy編寫的教程,簡明扼要,方便易用.
根據(jù)應(yīng)用過程,加了部分的補(bǔ)充(其實(shí)沒太多好補(bǔ)充的).供有興趣的同事學(xué)習(xí)參考.
≡ Windows 2000/XP/2003 + Apache 2.2.4 + PHP 5.2.0 + MySQL 5.0.27 + Zend Optimizer 3.2.0環(huán)境配置說明 ≡
Powered by Freddy
本文檔的適合人群:需要本地測試環(huán)境的、程序、模板風(fēng)格開發(fā)者、模板風(fēng)格、插件MOD測試者、各類學(xué)習(xí)愛好者。
本文檔就對(duì)Windows各系統(tǒng)下如何安裝配置PHP、Mysql、Apache進(jìn)行說明。(同樣適用於Windows 2000和Windows 2003 server)
以下爲(wèi)本說明所要用到的軟件。
· Apache 2.2.4 -- www.apache.org?
· PHP 5.2.0 -- www.php.net?
· MySQL 5.0.27 -- www.mysql.com?
· Zend Optimizer 3.2.0 -- www.zend.com?
· phpMyAdmin 2.9.2 -- www.phpmyadmin.net?
· 嚴(yán)重注意:在進(jìn)行下列操作前,Windows XP應(yīng)無安裝IIS、PHP、APACHE、MYSQL、ZEND。?
我比較喜歡的安裝目錄選擇:
? 未命名2.JPG (22.75 KB)
2008-1-29 10:10
≡ Apache 2.2.4 的安裝 ≡
1. 打開我的電腦,進(jìn)入D盤,在其下新建一個(gè)文件夾,名爲(wèi) local 。?
2. 到其官方站點(diǎn)下載 apache_2.2.4-win32-x86-no_ssl.msi 幷?qǐng)?zhí)行。?
3. 按3次Next按鈕,安裝程序要求輸入你的Network Domain(網(wǎng)絡(luò)域名)、ServerDomain(服務(wù)器域名)和網(wǎng)站管理員的E-mail,有的話就如實(shí)填寫,本說明介紹的是本地自建測試環(huán)境,所以隨便一下,前兩個(gè)填localhost ,郵件寫自己的即可。?
4. 進(jìn)入Next後,默認(rèn)的安裝路徑是"C: /program FilesApache Software FoundationApache2.2",修改路徑,改爲(wèi)前面所述的"D:localApache2"。?
5. 然後一路下去,直到安裝結(jié)束;此時(shí),打開D盤下的local文件夾,可以看到有一個(gè)名爲(wèi)Apache2的文件夾。?
6. 打開IE,然後在地址欄輸入:"http://localhost" 或者 "http://127.0.0.1" 可以看到Apache安裝完成的成功頁面;以後網(wǎng)頁的存在位置就在 "D:/local/Apache2/htdocs" 目錄。?
7.通常情況下,均依web 端口為80進(jìn)行設(shè)定,如需調(diào)整,可在安裝完成后,手工調(diào)整httpd.conf文件,注意一共需調(diào)整二處.
8.增加一點(diǎn):檢查XP防火牆的設(shè)定,將WEB服務(wù)佔(zhàn)用的端口開放(一般我們SKYPE時(shí),會(huì)佔(zhàn)用80端口,如果WEB佔(zhàn)用的是8080端口,則需要在XP防火牆內(nèi)進(jìn)行相應(yīng)的設(shè)定)
≡ PHP 5.2.0 的安裝 ≡
1. 到其官方站點(diǎn)下載 php-5.2.0-Win32.zip 幷解壓(在此不要下載及使用它的Installer,這種方式雖然很自動(dòng)化、很智能,但也存在很多方面的限制,因爲(wèi)不推薦。)?
2. 將PHP文件解壓到一個(gè)目錄下,目錄地址爲(wèi) "D:localphp"。?
3. 將PHP目錄(D:localphp)下的php.ini-dist複製到windows(有的系統(tǒng)是winnt目錄)目錄下,幷改名爲(wèi)php.ini。?
4. 複製D:localphp目錄下的所有dll文件到windows的系統(tǒng)文件夾裏,即:C:\ windows\system32。 (注意在Windows 2003 server下有一個(gè)文件會(huì)重復(fù),且Windows自帶的較新,不覆蓋亦可使用)
≡ MySQL 5.0.27 的安裝 ≡
1. 打開我的電腦,進(jìn)入D:local,在其下新建一個(gè)文件夾,名爲(wèi) mysql 。?
2. 到其官方站點(diǎn)下載 Mysql 5.0.27 Installer 幷?qǐng)?zhí)行。?
3. 按Next,然後選擇Custom安裝方式。?
4. 點(diǎn)擊Change,改變安裝路徑;原路徑是"C:\program Files\MySQL\MySQL Server 5.0",這裏改爲(wèi):"D:localmysql"。?
5. 等安裝進(jìn)度條load完時(shí),會(huì)出現(xiàn)一個(gè)Sign Up向?qū)?,這裏不用理,選擇最下面的那個(gè)Skip Sign-Up,然後Next,上面有個(gè) "Configure the MySQL Server now" 是打勾的,不要去掉,直接點(diǎn)Finish。?
6. 現(xiàn)在開始安裝最後的配置,點(diǎn)Next,選擇Detailed Configuration,然後選擇第二個(gè)Server Machine。?
7. 再Next,選擇Non-Transactional Database Only。?
8. 再Next,選擇Manual Setting,連接數(shù)選擇200到300,在此因爲(wèi)是本機(jī)測試,所以此項(xiàng)幷不重要。?
9. 再Next,是設(shè)置其的端口,默認(rèn)是3306,不要?jiǎng)铀?
10. 再Next,選擇Manual Selected Default Character Set / Collation,在下面的 Character Set選擇gbk。 (在此注意根據(jù)之后的應(yīng)用平臺(tái)情況選擇正確的內(nèi)碼,安裝完畢后在MySQL.ini內(nèi)可出更改,但麻煩很多)(注意.因我們經(jīng)常需要應(yīng)對(duì)簡繁體互用的情況,故建議全部平臺(tái)的內(nèi)碼都選用UTF8,在此將MYSQL的預(yù)設(shè)內(nèi)碼也改為UTF8會(huì)方便之後的使用)
11. 再Next,在Include Bin Directory in Windows PATH前打勾。?
12. 再Next,在Modify Security Settings前的勾取消,因爲(wèi)是本地環(huán)境,非服務(wù)器和虛擬主機(jī)。?
13. 最後一個(gè)Next再加Execute,可以看到上面的步驟全部完成。?
14. MySQL的帳號(hào)是:root,密碼爲(wèi)空。 (建議養(yǎng)成好習(xí)慣,盡量加上密碼)
15. 檢測MySQL,鍵盤的Win + R,彈出運(yùn)行對(duì)話框,輸入cmd後回車,進(jìn)入命令提示符,然後輸入:"mysql -uroot -p",回車後要求輸入密碼,因爲(wèi)密碼爲(wèi)空,所以直接再按回車即可?,F(xiàn)在可以看到如下成功的提示:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1 to server version: 5.0.27-community-nt?
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.?
表示全部安裝成功。?
16. 操作符變成了"mysql>",鍵入exit退出即可。?
≡ Zend Optimizer 3.2.0 的安裝 ≡

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

When you encounter the "DefaultGatewayisNotAvailable" prompt, it means that the computer cannot connect to the router or does not obtain the network address correctly. 1. First, restart the router and computer, wait for the router to fully start before trying to connect; 2. Check whether the IP address is set to automatically obtain, enter the network attribute to ensure that "Automatically obtain IP address" and "Automatically obtain DNS server address" are selected; 3. Run ipconfig/release and ipconfig/renew through the command prompt to release and re-acquire the IP address, and execute the netsh command to reset the network components if necessary; 4. Check the wireless network card driver, update or reinstall the driver to ensure that it works normally.

If the second monitor is not recognized by Windows, first check whether the cable and interface are normal, try to replace the HDMI, DP or VGA cable, confirm the plug-in video output port, and test different interfaces to eliminate compatibility issues; then verify the monitor power and input source settings, and connect the monitor separately to test whether it can be recognized; then enter the Windows display settings and click the "Detection" button, or use Win P to switch the display mode, and update the graphics card driver at the same time; finally check the graphics card specifications to confirm whether it supports multi-screen output to avoid exceeding its maximum output capability.

MySQL supports transaction processing, and uses the InnoDB storage engine to ensure data consistency and integrity. 1. Transactions are a set of SQL operations, either all succeed or all fail to roll back; 2. ACID attributes include atomicity, consistency, isolation and persistence; 3. The statements that manually control transactions are STARTTRANSACTION, COMMIT and ROLLBACK; 4. The four isolation levels include read not committed, read submitted, repeatable read and serialization; 5. Use transactions correctly to avoid long-term operation, turn off automatic commits, and reasonably handle locks and exceptions. Through these mechanisms, MySQL can achieve high reliability and concurrent control.

Character set and sorting rules issues are common when cross-platform migration or multi-person development, resulting in garbled code or inconsistent query. There are three core solutions: First, check and unify the character set of database, table, and fields to utf8mb4, view through SHOWCREATEDATABASE/TABLE, and modify it with ALTER statement; second, specify the utf8mb4 character set when the client connects, and set it in connection parameters or execute SETNAMES; third, select the sorting rules reasonably, and recommend using utf8mb4_unicode_ci to ensure the accuracy of comparison and sorting, and specify or modify it through ALTER when building the library and table.

When encountering the "SYSTEM_SERVICE_EXCEPTION" blue screen error, you do not need to reinstall the system or replace the hardware immediately. You can follow the following steps to check: 1. Update or roll back hardware drivers such as graphics cards, especially recently updated drivers; 2. Uninstall third-party antivirus software or system tools, and use WindowsDefender or well-known brand products to replace them; 3. Run sfc/scannow and DISM commands as administrator to repair system files; 4. Check memory problems, restore the default frequency and re-plug and unplug the memory stick, and use Windows memory diagnostic tools to detect. In most cases, the driver and software problems can be solved first.

When Windows cannot detect a second monitor, first check whether the physical connection is normal, including power supply, cable plug-in and interface compatibility, and try to replace the cable or adapter; secondly, update or reinstall the graphics card driver through the Device Manager, and roll back the driver version if necessary; then manually click "Detection" in the display settings to identify the monitor to confirm whether it is correctly identified by the system; finally check whether the monitor input source is switched to the corresponding interface, and confirm whether the graphics card output port connected to the cable is correct. Following the above steps to check in turn, most dual-screen recognition problems can usually be solved.

This article provides the download and installation steps of Ouyi computer version client. 1. Visit the official website; 2. Find the download portal; 3. Select the corresponding version; 4. Download and install; 5. Log in to use to ensure that users can quickly complete transaction operations on the PC side.

When encountering the problem of "You need permission to perform this operation", it is usually because the Windows permission management mechanism restricts the operation. The solutions include: 1. Run the program as an administrator, right-click to select "Run as an administrator" and confirm the UAC prompt; 2. Obtain file/folder ownership, change the owner to the current user in "Properties → Security → Advanced" and replace the subcontainer; 3. Adjust the permission settings, and give yourself "full control" permissions through "Properties → Security → Edit"; 4. Check whether the file is occupied, close the relevant programs or use Unlocker and LockHunter to unoccupi. Try it one by one to solve the problem.
