免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3072 | 回复: 1

安装win64位apache以及64位php和64位mysql [复制链接]

论坛徽章:
0
发表于 2011-12-01 15:11 |显示全部楼层

安装win64位apache以及64位php和64位mysql











Currently no official 64bit versions of Apache and PHP exists for Microsoft Windows. Only MySQL supports officially 64bit Windows. If you have a 64bit version of Windows (2003/XP/Vista) and want to keep your system pure 64bit here is the solution! In this guide I will show you how to install and set up Apache 2.2 x 64 web servers, PHP 5.2 x64 and MySQL 5.0/5.1 x64 on Windows 2003/XP/ Vista 64bit using unofficial binaries. Although this setup has been tested successfully on Windows Vista 64bit Home Premium, I am not responsible for any damages may occur to your computer by this guide. Proceed at your own risk.

Download needed software

Download unofficial binaries for Apache x64 from blackdot.be:
http://www.blackdot.be/?inc=apache/binaries
Current version (November 200: httpd-2.2.10-win64.zip

Download PHP x64 from fusionxlan.com:
http://www.fusionxlan.com/PHPx64.php

如果需要fanqiang那就下载CSDN的资源,地址如下:

http://download.csdn.net/download/qiuyu8888/3574736
Current version (September 200: 5.2.5

Download latest official MySQL 64bit binaries for Windows:
http://dev.mysql.com/downloads/mysql/

Install Apache 64bit

Create a folder inside your C drive and named it something like apache64. Unzip the contents of the Apache zip package you previously downloaded to folder: C:/apache64.
Edit Apache configuration file C:/apache64/conf/httpd.conf and change paths to match your system.

ServerRoot "C:/apache64"
ServerName localhost:80
DocumentRoot "C:/apache64/htdocs"
<Directory "C:/apache64/htdocs">
DirectoryIndex index.html index.htm index.php
ScriptAlias /cgi-bin/ "C:/apache64/cgi-bin/"

If you want to set up virtual hosts uncomment (remove the "#" symbol) the line bellow and edit the hosts.conf file respectively. Setting up virtual hosts on Windows.
#Include conf/extra/httpd-vhosts.conf

Uncomment the following line to load extension mod_rewite needed by Elxis SEO PRO. Also uncomment any other lines you wish to load the corresponding Apache extensions.
LoadModule rewrite_module modules/mod_rewrite.so

Open the Windows command prompt (Start -> Run/Search -> cmd) and navigate to folder C:/apache64 (CD C:\apache64). Execute the following commands:

bin\httpd.exe -k install
bin\httpd.exe -k start

Your Apache should work. Open bin folder and double click the ApacheMonitor.exefile. An icon will be displayed in your Windows taskbar. From there you can start/stop/restart Apache easily. We set the Document root to C:/apache64/htdocs, so this is the folder where you should put your web files (Elxis CMS for example). Open your browser and go to http://localhost/ to ensure Apache runs.

Install PHP 64bit

Create a folder inside your C drive and named it "php". Unzip the contents of the PHP zip package you previously downloaded and copy the contents of the "php-5.2.5 (x64)" (or what ever version you downloaded) to folder: C:/php. We will install PHP as an Apache module. Open your Apache configuration file (C:/apache64/conf/httpd.conf) to tell apache to load the PHP module. Under the existing LoadModule directives add the following:
LoadModule php5_module "C:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php

Also add these lines to tell Apache where PHP is located:
# configure the path to php.ini
PHPIniDir "C:/php"

Copy the following files to your Widnows system folder (C:/Windows/system32):
C:/php/php5ts.dll
C:/php/php5isapi.dll
C:/php/php5apache2_2.dll

C:/php/libmysql.dll

C:/php/ext/php_mysql.dll

Copy php.ini-dist to the same folder and rename it as php.ini. Open this file to edit PHP configuration parameters.
extension_dir = "C:/php/ext/"
allow_url_fopen = Off
Load at least the following PHP extesnions by removing the "#" symbol in front of each line:
extension=php_gd2.dll
extension=php_mysql.dll
extension=php_oci8.dll (if you have Oracle database installed)
extension=php_pgsql.dll (if you have postgre database installed)
extension=php_zip.dll

Set sendmail from e-mail address:
sendmail_from = me@example.com

Some settings for MySQL:
mysql.default_port = 3306
mysql.default_host = localhost

Set the session save path to a writable (by anyone) folder in your computer. You can set this to any existing path you wish (For example C:/tmp).
session.save_path = "C:/tmp"

Restart Apache to test if your PHP is working properly.

Install MySQL 64bit

This is the easiest part of the overall procedure as we have downloaded an official 64bit msi package from MySQL. Just double click it to run the installer. Install MySQL as a service.

PHPMyAdmin

Nikos Timiopoulos reported us on February 14, 2009, that he had problems get connected to phpmyadmin. The solution for him was to copy libmysql.dll in C:/Windows/ directory. An alternative, and much more reccommended solution, is to use MySQL GUI tools (Query browser and Administrator).

Finish

Unless I forgotten something your system is ready. You have a pure 64bit WAMP system, congratulations! You can now copy Elxis at C:/apache64/htdocs and run the Elxis installation wizard. If you wish to set up virtual hosts follow this guide:Setting up virtual hosts on Windows.

论坛徽章:
0
发表于 2011-12-21 22:12 |显示全部楼层
谢谢分享  希望于楼主多多交流
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP