Manual:Simple Windows Apache Installation
![]() |
The content of this page has not been verified. Instructions written in this page have not been verified to be correct. If there are any inaccuracies, please drop a note at the support desk. |
Installation guides |
---|
on FreeBSD |
on GNU/Linux |
- ALT Linux |
- Arch Linux |
- Damnsmalllinux |
- Debian |
- Fedora |
- Gentoo |
- Mandriva |
- Red Hat Enterprise Linux |
- Slackware |
- Ubuntu |
on Mac OS X |
on NetWare |
on Solaris |
- on Solaris 11 / opensolaris |
- on Solaris 10 |
on Windows |
- Windows Server 2008 |
- Windows Server 2003 |
- Streamlined Guide |
- Simple Windows/Apache Guide |
- on a stick |
- on MoWeS Portable |
- on Uniform Server |
- on XAMPP |
- on Sourceforge.net |
This page was moved from MetaWiki.
It probably requires cleanup – please feel free to help out. In addition, some links on the page may be red; respective pages might be found at Meta. Remove this template once cleanup is complete.
Note: this page seems obsolete and should be wiped. If looking for installation instructions of Apache, MySQL, and MediaWiki, please refer to Manual:Streamlined_Windows_Install_Guide.
This rough but complete installation guide is based on Windows XP SP2.
Contents |
Download the required software:[edit]
The first thing you should do is to download the software the server will require. For ease of use, this page will assume you downloaded the binary releases, but if you want to customize your installation, you should download the source code of each program and compile it yourself.
Software | Version | Download link |
---|---|---|
Apache | 1.3+ / 2.0+ / 2.2+ | http://httpd.apache.org/download.cgi |
PHP | 5.1+[1] | http://www.php.net/downloads.php |
MySQL | 4.0+ | http://dev.mysql.com/downloads/ |
MediaWiki | 1.21.1[1] | download |
An easier alternative to downloading and installing individually the required packages is to use WAMP [1]. If you do so, you can skip to the Install MediaWiki step. There is one caveat: instead of unzipping MediaWiki into the Apache directory (the default option), unpack MediaWiki into the C:\WAMP\WWW folder (or the default www folder in your WAMP installation).
Install PHP[edit]
Make sure you download the version compatible with Apache. Run the PHP binary installer to C:\php. Ensure that the php.ini-dist file is in the C:\php directory. Copy C:\php\php.ini-dist to C:\php\php.ini. Use Windows Explorer to copy all files in the 'dlls' and 'sapi' subdirectories to C:\php.
Install Apache[edit]
- Run the apache installer (it has a .msi extension) and use the default options. This will set Apache2 up as a Windows Service.
- Locate C:\Program Files\Apache Group\Apache2\conf\httpd.conf and edit it using Wordpad (Notepad introduces a Byte-order mark character, so avoid using it if possible).
- Insert the following three lines after the line '### Section 1: Global Environment'
- LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php/"
- LoadModule php5_module "c:/php/php5apache2.dll"
- Now launch Control Panel/Administrative Tools/Services and restart the Apache2 service.
- Create a new file called phptest.php in C:\Program Files\Apache Group\Apache2\htdocs. In it, type the following line:
- <?php phpinfo();
- Open your browser and navigate to http://localhost/phptest.php. You should see some php configuration settings.
Install MySQL[edit]
Run the .msi installer program, using defaults during setup. Enter a password for root and remember it.
Create a Wiki User with old-style password[edit]
(For more info on this issue see [2])
Launch Start Menu\MySQL\MySQL <version number>\Command Line Client. Enter the password you created earlier. Enter the following commands:
Enter password: ******** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.33-community MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE DATABASE wikidb; Query OK, 1 row affected (0.01 sec)
mysql> GRANT ALL ON wikidb.* to wikiuser@localhost IDENTIFIED BY 'password'; Query OK, 1 row affected (0.01 sec)
mysql> SET PASSWORD FOR wikiuser@localhost = OLD_PASSWORD('password'); Query OK, 1 row affected (0.01 sec)
mysql> quit;
Install MediaWiki 1.21.1[edit]
Unzip mediawiki-1.21.1.tar.gz
to C:\Program Files\Apache Group\Apache2\htdocs\w
. (Ensure that index.php
is directly underneath the mediawiki directory.
Now navigate your browser to: http://localhost/w/config/index.php
You should see the MediaWiki installer.
Enter a name for your wiki site, a password for the WikiSysop user and the password you entered in MySQL for wikiuser. You should not need to enter the root password.
Press the "InstallMediaWiki!" button. Hopefully you will see the Installation successful! message.
NOTE if you see an error message regarding "there is no database driver!". you will need to edit your php.ini.
- Install the mysql extension.
- Make sure "
;
" (semicolon) in front ofextension=php_mysql.dll
has been removed. - Above that add
extension_dir="C:\php\ext"
.
This must be added above the "extension=php_mysql.dll
".
This will set the php to look in the correct directory for the extensions. - Restart PC. (or restart the apache service)
Finally follow the instructions and copy C:\Program Files\Apache Group\Apache2\htdocs\w\config\LocalSettings.php
to C:\Program Files\Apache Group\Apache2\htdocs\w\LocalSettings.php
.
Now click the link http://localhost/w/index.php/Main_Page and you should see the magic words Wiki software successfully installed..
You may want to configure your wiki further, for example to use pretty URLs.
Language: | English • 日本語 |
---|