Windows 2000 PHP Server Installation Introduction

Source: Internet
Author: User
Tags header install php iis ini mysql openssl php server install perl
window| Server | Introduction First, Preliminary preparation Apache2 (WIN32) fully modular installation Perl,php,ssl

1, a installed WIN2000 server, note: If you have IIS installed on the machine, all the Web sites in IIS are stopped or the port first changed to something else.

2, download software

APACHE 2.0.48
Perl 4.3.1
PHP 4.3.1
MYSQL 4.0.12
Zendoptimizer

There are a few small things, very important, the following installation will be used (not all use, some files are compiled, can be used directly)

Download Address 1:http://www.xdiy.net/soft/serv.rar

Download Address 1:http://www.techxy.com/xdiy/serv.zip

Inside the bag is: mod_perl 1.9/mod_ssl 2.0.43/openssl 0.9.6h/mod_jk/apachemodulegzip.dll
GD 2.0.9/gdpm/perldiver 1.1/Chinese Php.ini/editplus/php_gd_gif.dll etc

Second, the installation began

1, Apache Installation

1.1: Run Apache_2.0.44-win32-x86-no_ssl.msi,

Suppose the default path for my installation is x:, so that it is installed under the APACHE2 path under x disk and the default domain is domain.com.

1.2: (as a virtual host, this step can not do)

Edit x:apache2confhttpd.conf

Find #NameVirtualHost *

Modified to Namevirtualhost 192.168.0.1 #注意这个IP为你自己主机设的IP

Find ServerName domain.com modified to #ServerName domain.com

Find ServerAdmin * (* The email address you filled out when you installed Apache) and modify it to #ServerAdmin

Next add the following statement: # ... Is my comment, do not add, look at it can be

<virtualhost 192.168.0.1>
ServerAdmin webmaster@domain.com
#主机管理员 (Contact) 's e-mail address
ServerName domain.com
#主机名 (host header Names)
Serveralias domain.com www1.domain.com
#主机名 (same host header names that can be in effect)
Document.oot X:/virtualhost/domain.com/www.domain/wwwroot
#该虚拟主机的的www根目录.
ErrorLog X:/virtualhost/domain.com/www.domain/logs/www.domain-error_log
#错误日志文档, or it can be. /logs/www.domain-error_log
Customlog X:/virtualhost/domain.com/www.domain/logs/www.domain-access_log Common
Scriptalias/cgi-bin/cgi-bin
#指定perl脚本运行目录, of course, if not specified, the entire directory can be run
scriptalias/php4/"/php-bin"
#指定php脚本运行目录, of course, if not specified, the entire directory can be run
Errordocument.nbsp400/400.html
#自定义错误文件, note that the error file must be placed in the root directory,
#或者单另作一个虚拟主机, for example errors.domain.com, place the error file in its root directory.
#则此时错误文档应为 "errordocument.nbsp400 http://errors.domain.com/400.html"
</VirtualHost>

* * If you choose to set the virtual host, please set the browser Internet Options-connection-LAN settings, select "Use Proxy Server", Address: 192.168.0.16 (write your host IP, native debugging 127.0.0.1) port: 80. If you have only one computer on your LAN to boot, you should add 127.0.0.1 Same as native debugging

1.3: Change filename x:apache2htdocsindex.html.en to c:apachehtdocsindex.html

1.4: Visit http://localhost or http://domain.com. Can see the page is ok!

2, install MySQL

2.1: Decompression mysql-4.0.12-win.zip to the directory X:mysql

2.2: Enter D:mysql run SETUP.EXE all the way to return, the default installation to X:mysql

3. Install PHP

3.1: Decompression php-4.3.1-win32.zip to the directory x:php

3.2: Enter x:php, start configuring PHP

3.3: Change the filename php.ini-dist to php.ini (or use the php.ini file in the Serv.rar package above, you can use it without modification)

3.4: Open php.ini, find Extension=php_gd.dll, remove the semicolon in front, find the Extension=php_gd2.dll, remove the semicolon from the front.
Add Extension=php_gd_gif.dll to the same location, this file I provided above the serv.rar inside there.

3.5: Copy php.ini and Php4ts.dll to WIN2000 in the System32 and system directory under the installation directory

3.6: Open the Apache profile httpd.conf file, add the following statement (location casually):

LoadModule Php4_module X:/php/sapi/php4apache.dll

AddType application/x-httpd-php. PhP4

scriptalias/php4/"c:/php/"

Action application/x-httpd-php4 "/php4/php.exe"

To add an extension that is parsed by PHP:

AddType application/x-httpd-php4. php. php3 php4. PhP2

#mod_perl
LoadFile "C:/usr/bin/perl58.dll"
LoadModule Perl_module modules/mod_perl.so

#mod_ssl
LoadModule Ssl_module modules/mod_ssl.so

LoadModule Gzip_module Modules/apachemodulegzip.dll

Note: ApacheModuleGzip.dll (ie: mod_gzip), inside the bag. You can compress a static web page.

<< Remember to put the Mod_ssl.so,mod_perl.so,apachemodulegzip.dll in the Serv.rar inside the X:apache2modules directory >>


4. Installation Zendoptimizer

4.1: Install Zendoptimizer-2[1].1.0a-windows-i386.exe to the directory x:zend, the rest of the steps oh, I chose the right.

5. Install Perl

5.1: Install Activeperl-5.8.0.804-mswin32-x86.msi to directory C:USR, note that your Windows Installer service should have been patched to the Windows Service pack.

6. Other Settings

6.1: Find DirectoryIndex, add the following statement

DirectoryIndex index.html index.html.var index.htm index.php index.shtml
DirectoryIndex index.php3 index.php4 index.cgi index.pl index.html

If you want to increase SSI, you need to remove the # number in front of the two lines below.

AddType text/html. shtml
AddHandler server-parsed. shtml

6.2: Find all the "options FollowSymLinks", all changed to "options all", pay attention to the case. Don't add "".

Look for all the "allowoverride None", all to "allowoverride all", and note the case. Don't add "".

6.3: Find #scriptalias/cgi-bin/"x:/apache2/cgi-bin/" and remove the front # number

6.4: Find AddHandler cgi-script. CGI followed by the. PL, i.e.

AddHandler cgi-script. cgi. pl

6.5: Restart Apache HTTP Server

7: Testing

7.1: Write test file env.php (copy to directory can be executed PHP directory)

File contents: (actually on line)

? Phpinfo ();?>
  
Visit: http://localhost/info.php or http://domain.com/info.php

If you see the PHP Welcome Test page, the installation is successful!

Write test file env.cgi (copy to directory can execute CGI directory)

File contents:

#!/usr/bin/perl
print "content-type:text/html";
Print "K O";
Exit

Visit: http://localhost/cgi-bin/env.cgi or http://cgi-bin/env.cgi

If you see a CGI test page, the installation is successful!

So far, your system has been configured to complete! Look at the stuff I'm offering, and what's left of Serv.rar?
If anything, put it in the right place.

You've already configured Win2000+apache+php+mysql+mod_perl+perl+mod_ssl+zendoptimizer.

Then there is mod_ssl and OpenSSL in Serv.rar that package inside is already compiled, can be used directly, if you really want to use these two things, you should know some of the CA just line.

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.