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

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

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

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

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



Installing MySQL on CentOS involves the following steps: Adding the appropriate MySQL yum source. Execute the yum install mysql-server command to install the MySQL server. Use the mysql_secure_installation command to make security settings, such as setting the root user password. Customize the MySQL configuration file as needed. Tune MySQL parameters and optimize databases for performance.

The key to installing MySQL elegantly is to add the official MySQL repository. The specific steps are as follows: Download the MySQL official GPG key to prevent phishing attacks. Add MySQL repository file: rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm Update yum repository cache: yum update installation MySQL: yum install mysql-server startup MySQL service: systemctl start mysqld set up booting

Deploying Hadoop Distributed File System (HDFS) on a CentOS system requires several steps, and the following guide briefly describes the configuration process in stand-alone mode. Full cluster deployment is more complex. 1. Java environment configuration First, make sure that the system has Java installed. Install OpenJDK with the following command: yumininstall-yjava-1.8.0-openjdk-devel Configure Java environment variables: echo "exportJAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk">>/etc/profileecho"ex

ZooKeeper troubleshooting guide for CentOS Systems This article provides a step-by-step guide to help you effectively troubleshoot ZooKeeper faults on CentOS systems. 1. Verify the status of ZooKeeper service: First, use the following command to check the status of ZooKeeper service: sudosystemctlstatuszookeeper If the service is not running, use the following command to start: sudosystemctlstartzookeeper To enable it to start by starting: sudosystemctlenablezookeeper2. Analyze the ZooKeeper log to check Z

When installing and configuring GitLab on a CentOS system, the choice of database is crucial. GitLab is compatible with multiple databases, but PostgreSQL and MySQL (or MariaDB) are most commonly used. This article analyzes database selection factors and provides detailed installation and configuration steps. Database Selection Guide When choosing a database, you need to consider the following factors: PostgreSQL: GitLab's default database is powerful, has high scalability, supports complex queries and transaction processing, and is suitable for large application scenarios. MySQL/MariaDB: a popular relational database widely used in Web applications, with stable and reliable performance. MongoDB:NoSQL database, specializes in

NGINX and Apache have their own advantages and disadvantages and are suitable for different scenarios. 1.NGINX is suitable for high concurrency and low resource consumption scenarios. 2. Apache is suitable for scenarios where complex configurations and rich modules are required. By comparing their core features, performance differences, and best practices, you can help you choose the server software that best suits your needs.

MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

The process of starting MySQL in Docker consists of the following steps: Pull the MySQL image to create and start the container, set the root user password, and map the port verification connection Create the database and the user grants all permissions to the database
