Full Install Web Server on Windows Server 2008 R2 with PHP, MySQL, PHPMyAdmin

thanhdc

Super Moderator
Tổng quan:

IIS 7.5 + CGI (Windows Server 2008 R2)
PHP 5.5.17-nts-Win32-VC11-x64 (enable extension: gd2, mbstring, mysql, mysqli, ldap)
MySQL 5.5.28 Win64x
phpMyAdmin-4.2.9-english



I. Install IIS 7.5











II. Configuring PHP


Nên sử dụng bản PHP non thread safe
Để chạy được PHP cần cài Visual C++ Redistributable for Visual Studio 2012 x86 or x64






copy php.ini-production → php.ini


;fastcgi.impersonate = 1 ==> fastcgi.impersonate = 1
;cgi.force_redirect = 1 ==> cgi.force_redirect = 0
;extension_dir = "ext" ==> extension_dir = "C:\PHP\ext"
;date.timezone = ==> date.timezone = "Asia/Ho_Chi_Minh"
http://www.date-default-timezone-set.com/



Config Environment Variables











PHPMyAdmin cần enable những mod sau:
MySQL | extension=php_mysql
extension=php_mysqli

GD | extension=php_gd2.dll
MBSTRING | extension=php_mbstring.dll




Config Default Document
Add: index.php

 
Last edited:

thanhdc

Super Moderator
III. Install MySQL


















































Config Tự động khởi động lại service MySQL khi bị lỗi…

Run Services.msc MySQL




 
Last edited:

thanhdc

Super Moderator
IV. Install PhpMyAdmin
















;session.save_path = "N;/path" ==> session.save_path = "C:\temp\phpsessions"







Config tới đây là có thể sử dụng PHPMyAdmin,
để OK hơn thì config thêm 1 chút nữa...





C:\SVUIT> mysql -u root –p
Enter password: ******


mysql> CREATE USER 'pma'@'localhost' IDENTIFIED BY 'pmapass';


mysql> GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';


mysql> GRANT SELECT ON mysql.db TO 'pma'@'localhost';
mysql> GRANT SELECT ON mysql.host TO 'pma'@'localhost';
mysql> GRANT SELECT ON mysql.tables_priv TO 'pma'@'localhost';
mysql> GRANT SELECT ON mysql.user TO 'pma'@'localhost';


mysql> source C:\inetpub\wwwroot\phpMyAdmin\examples\create_tables.sql
(hoặc mysql> \. C:\inetpub\wwwroot\phpMyAdmin\examples\create_tables.sql
hoặc C:\SVUIT>mysql -u root -p < C:\inetpub\wwwroot\phpMyAdmin\examples\create_tables.sql
Enter password: ****** ko xuất info, dùng khi import file dữ liệu lớn)
mysql> GRANT SELECT, INSERT, DELETE, UPDATE ON `phpmyadmin`.* TO 'pma'@'localhost';




 
Last edited:
Top