早年使用AppServ架的網站遭入侵,一直查不出原因,Want to update Apache、PHP、MySQL version but is limited to the compatibility of Joomla kits can not be,之後又要遇到需要另外新增一個網站的需求,本打算改使用XAMPP,但在閱讀XAMPP官方文件時,赫然看到官方並不建議將此軟體用於正式環境,若非得使用,官方雖有建議調整部份設定值,以提高安全性,但又提醒你,這只能稍微增加一點點安全性而已(好直白的官方啊~哈),So it hands to install Apache independent study、MariaDB、PHP and phpMyAdmin。
Each kit installation process is as follows:
【MariaDB】
- 下載msi(x64),直接安裝
- 設root密碼
- 取消勾選Enable access from remote machines for ‘root’ user,To reduce the risk
- 勾Use UTF8 as default server’s character set
【Apache】
- Download the zip file to Apache Haus(x64)
- unzip,Look at readme_first.html Description
- Copy the directory to the desired location Apache24
- Open httpd.conf,Define SRVROOT set path,Such as D:\WebApache24
- Options Indexes FollowSymLinks found in the Apache httpd.conf,Deleted Indexes,Browse the catalog avoid being
- Execution httpd.exe,To browser to localhost,To see whether the correct
- CMD input”httpd.exe -k install”,The Apache set to services(-K uninstall to remove)
【PHP】
- Download the zip file(x64 Thread Safe, There is a saying Non Thread Safe to use IIS)
- unzip,Copy the directory to the desired location,The change php.ini-production php.ini
- Open the Apache httpd.conf,Add the following content
- In Apache's httpd.conf,Find DirectoryIndex,Behind the increase in index.php
- Add a index.php file,Put D:\WebApache24htdocs,Follows:
#指定php.ini存放的資料夾位置
PHPIniDir "D:\Web\php-7.1.5"
#載入php的模組
LoadModule php7_module "D:\Web\php-7.1.5\php7apache2_4.dll"
#指定附檔名是 .php .php3 .phtml .inc 的程式都為 php 程式
AddType application/x-httpd-php .php .php3 .phtml .inc
#指定附檔名是 .phps 時,把內容視為 hightlight 的原始碼輸出到網頁
AddType application/x-httpd-php-source .phps .phpsource
- Browser to open index.php,Confirm information can be seen php
【phpMyAdmin】
- Download the zip file,unzip,Copy to Apache24 htdocs
- Open PHP's php.ini
- Remove the #extension_dir = “ext”The notes #,”ext”Changed”D:\Webphp-7.1.5ext”
- Remove the # extension = php_mbstring.dll the # comment
- 拿掉#extension=php_mysqli.dll的#註解
–2019/01/05 Update
- The config.sample.inc.php changed its name to config.inc.php
- Open config.inc.php,To find $cfg[‘blowfish_secret’],Fill in single quotation marks later 32 Digit password,Direct to find a password generator to generate enough。
- Add the line $cfg[‘PmaNoRelation_DisableWarning’] = ‘true’;,Avoid the error message out of phpMyAdmin,Calls for the establishment table。
[Links]
- Windows 7 安裝 Apache + MySQL + PHP ~ JxL Blog 技術札記
- Manually install Apache、MySQL、PHP and related settings – OA’s blog
- In Windows manually install Apache、PHP、MySQL、phpMyAdmin | Beyond The Time
- XYZ的筆記本: windows7 64 bit installer Apache、PHP、MySQL
- Blue Ocean Studios – View topic – Setting phpMyAdmin
- phpMyAdmin 設定 blowfish secret