Build a lamp environment in Windows

Source: Internet
Author: User
Tags phpinfo dedicated server root access

++ ++
Build a lamp environment in Windows
++ ++
Operating System: [Windows XP Professional SP3]
Server: [Apache-2.2.8]
PHP: [php-5.2.17]
Database: [mysql-5.1.49]
Database Management Tools: [phpmyadmin-3.3]
++ ++
Prepare to install software (download)
1> [apache_2.2.8-win32-x86-openssl-0.9.8g]
Http://archive.apache.org/dist/httpd/binaries/win32/apache_2.2.8-win32-x86-openssl-0.9.8g.msi
2> php-5.2.17-Win32-VC6-x86
Http://windows.php.net/downloads/releases/php-5.2.17-Win32-VC6-x86.zip
3> mysql-5.1.49
Http://www.mysql.com/downloads/mirror.php? Id = 398365 (Registration required)
4> phpMyAdmin-3.3.9-all-languages
Http://sourceforge.net/projects/phpmyadmin/files%2FphpMyAdmin%2F3.3.9%2FphpMyAdmin-3.3.9-all-languages.zip/download! MD5! 3d5ec3d2023946bbca9c4dd182722c8b
++ ++
Start installation (create a directory [D:/Lamp] before installation)
D:/Lamp
-- Apache2.2
-- PHP
-- MySQL
-- Sites
----------------------------------------------------------------------------
1> [Apache]
----------------------------------------------------------------------------
1.1> welcome to the installation wizard for Apache HTTP Server 2.2.8
# Click [next>]
1.2> License Agreement
# Select (I accept the terms in the license agreement)-> click [next>]
1.3> read this first
# Click [next>]
1.4> Server Information
Network domain (e.g.somenet.com): [helloworld.com]
Server Name (e.g.www.somenet.com): [www.helloworld.com]
Administrator's email address ( E.g.webmaster@somenet.com ): [Helloworld@helloworld.com]
# Select (for all users, on port 80, as a service -- recommended.) and click [next>]
1.5> setup type
# Select (custom) and click [next>]
1.5> Custom setup
Click [change...],
1.5.1> change current destination folder
Folder name: [D:/lamp/apache2.2/], click [OK],
# Click [next>]
1.6> ready to install the program
# Click [install]
1.7> installaction wizard completed
# Click [finish]
----------------------------------------------------------------------------
2> [PHP]
2.1> decompress php-5.2.17-win32-vc6-x86.zip to [D:/lamp/PHP]
----------------------------------------------------------------------------
3> [MySQL]
3.1> welcome o the Setup Wizard for MySQL Server 5.1
# Click [next>]
3.2> setup type
# Select Custom and click [next>]
3.3> Custom setup
3.3.1> click [change...],
3.3.2> change current destination folder
Folder name: [D:/lamp/MySQL/]
Click [OK]
# Click [next>]
3.4> ready to install the program
# Click [install]
3.5> A MySQL Enterprise submodules is the most...
# Click [next>]
3.6> the MySQL Enterprise Monitor Service
# Click [next>]
3.7> wizard completed
# Check [configure the MySQL server now]
# Click [finish]
3.8> welcome to the MySQL service instance Configuration Wizard 1.0..pdf
# Click [next>]
3.9> MySQL server instance configuration [MySQL server instance configuration]
Detailed configuration-detailed configuration
Standard configuration-standard configuration
# Select the default [detailed configuration]
# Click [next>]
3.9.1> server type [Please select a server type. This will influence memory, disk and CPU usage.]
[Developer machine]-development server, which occupies less memory
[Server machine]-multiple servers are shared and occupy medium memory
[Dedicated MySQL server machine]-dedicated server, occupying a large amount of memory
# Select the default [developer machine]
# Click [next>]
3.9.2> database usage [Please select the database usage]
[Multifunctional database]-multi-function database, optimized InnoDB and MyISAM
[Transactional database only]-transaction database, InnoDB optimized, and MyISAM available
[Non-transactional database only]-non-transactional database, suitable for simple network monitoring or record applications with a MyISAM engine for analyzing only non-transactional data
# Select the default [multifunctional database]
# Click [next>]
3.9.3> storage location of InnoDB data files [Please select the driver for the InnoDB datafile, if you do not want to use the default settings] S
# Select default
# Click [next>]
3.9.4> set the approximate number of concurrent connections to the server [Please set the approximate number of concurrent connections to the server]
[Demo-support (DSS)/OLAP]-concurrency: 20
[Online transaction processing (OLTP)]-concurrency 500
[Manual setting]-custom concurrency
# Select [manual setting], concurrent connections [100]
# Click [next>]
3.9.5> [network options] Please set the networking options
[Enable TCP/IP networking]-enable TCP/IP network
[Portnumber: [1, 3306]-Port
[Add firewall exception for this port]-add to firewall exceptions
[Enable strict mode]-enable strict Mode
# Select the default [next>]
3.9.6> [select character set] Please select the default character set.
[Standard character set]-Latine applies to English or other Western European languages by default
[Best support for multilingualism]-supports multiple languages
[Manual selected default Character Set/collation]-custom
# Select [best support for multilinguatilsm]
# Click [next>]
3.9.7> set windows options [Please set the Windows options]
[Install as Windows Service [install as a Windows Service]
[Launch the MySQL server automatically [self-starting]
[Include bin directory in Windows path [add environment variables]
# Select default
# Click [next>]
3.9.8> set security options [Please set the security options]
[Current Root Password]-old password, left blank
[New Root Password]-New password,
[Confirm]-confirm the new password
[Enable root access from remote machines]-enable remote access from the root account
[Create an anonymous account]-create an anonymous account
# Enter the password and confirm the password.
# Click [next>]
3.9.9> prepare to execute [ready to execute...]
# Click [execute]
3.9.10> processing configureation...
# Click [finish]
----------------------------------------------------------------------------
4> [phpMyAdmin]
4.1> decompress phpmyadmin-3.3.9-all-languages.zip to [D:/lamp/sites/PHPmyAdmin/]
----------------------------------------------------------------------------

++ ++
Apache configuration
5.1> httpd. conf (D:/lamp/apache2.2/conf)
5.1.1> # function: load the PHP module
# Description: Search loadmodule, add
loadmodule php5_module "D:/lamp/PHP/php5apache2_2.dll"
5.1.2> # function: Set the working directory
# description: search for DocumentRoot and change it to
DocumentRoot "D:/lamp/sites"
5.1.3> # function: Set directory options
# description: search for and change it to

5.1.4> # function: Set the default document
# Note: Search <directory/> and add
Directoryindex index. php index.html

5.1.5> # function: adds the PHP type.
# Note: Add at the end of the file
Addtype application/X-httpd-PHP. html. php

# Function: directory of PHP. ini
# Note: Add at the end of the file
Phpinidir "D:/lamp/PHP"

Function: the directory cannot be accessed.
: Search options indexes followsymlinks and comment out
# Options indexes followsymlinks

5.2> Note: After the configuration file is modified, restart Apache to take effect.

5.3> on D: /lamp/sites/create a file
# phpinfo. php
input:
phpinfo ();
?>
access: http: // localhost/phpinfo. php
[PHP configuration]
6.1> PHP. INI
6.1.1> D:/lamp/PHP. INI, copy PHP. ini-recommended and rename it to PhP. INI
6.1.2> # function: Specify the directory where the extension library is located
extension_dir = "D: /lamp/PHP/EXT/"

# function: enable extension
# description: enable the corresponding extension module as needed, remove the semicolon
extension = php_gd2.dll
extension = php_mbstring.dll
extension = plugin
extension = php_mysql.dll
extension = php_mysqli.dll / span>

# Function: set the time zone
# Note: PRC indicates China
Date. timezone = PRC

# Function: Display error messages
Display_errors = on
6.2> copy libmysql. dll, libmcrypt. dll (D:/lamp/PHP) to C:/Windows/system32/
6.3> restart Apache and accessHttp: // localhost/phpinfo. phpTo check whether the corresponding extension is successfully loaded.
++ ++

 

Original article: http://blog.csdn.net/ihelloworld/article/details/6127525

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.