Best-Tweaks

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, 1 January 2007

How to Install Apache , PHP , MySQL , Perl on Windows

Posted on 02:33 by Unknown
How to set up a server with Apache , PHP , MySQL , Perl , phpMyAdmin
by Aolex from Projectw.org
edited by Heiko from x92.org

=====

Let's start by installing apache (http server) . you can download the
apache installer on www.apache.org . download the verion you like ,
even thought , in win systems i recomand verion 2 (this tutorials is
for apache 2) . here is a link for it :

http://apache.mirror.nedlinux.nl/dist/http...-x86-no_ssl.msi


After downloading the file (.msi installer) , run it . The installation wizard
is a next , next , finish 'work' ... The installer will ask you some details like
your server name , your server adress and the admin's mail adress . if
you have a domain name or a hostname , enter the info's like this :


Code:
Server Name : your_domain.org

Server Adress : www.your-domain.org

Admin Email : admin@yourdomain.org

if you don't have one , you should get one free at :


http://www.no-ip.org/


Check the 'Run as a service for all users on port 8080' option and click
next , finish to fiinish the instllation . Advice : Install it in c: (he creates
a folder for it , don't worry) to make sure you configure it easyer .
If you are finished , open up a browser and write in the adress bar :


http://localhost/


If you will see a 'Test Page for Apache Installation' , everything works .

=====

Let's install PHP . download the archives from www.php.net . Here is a
direct link for verion 4.3.9 :

http://nl.php.net/get/php-4.3.9-Win3...om/this/mirror


Make sure you download the archive and not the installer . Ok! after
downloading it , extract the archive in c:/php (this is to simplify paths) .
Now , open up c:/apache/conf/httpd.conf and search for this line :

Code:
#LoadModule ssl_module modules/mod_ssl.so

under that line , add this :
Code:
LoadModule rewrite_module modules/mod_rewrite.so

LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
Now search for this line :

Code:
Directory "C:/Apache2/htdocs"

Change :
Code:
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
into :

Code:
Options Indexes Includes FollowSymLinks MultiViews ExecCGI

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
This will allow .htaccess support on your server and make sure you can
see the content of a folder without getting a 403 forbidden error .

Now search for :

Code:
DirectoryIndex index.html index.var.html
and change it into :

Code:
DirectoryIndex index.html index.php
Save the file and restart apache . (you can restart it by pressing the
Restart apache server shortcut in the start menu or by writing :

Code:
net apache restart
in a command prompt window . Ok!

you have php working for your server icon_wink.gif . Now let's configure php and
make sure it really works ! Open up c:/php/php.ini (php.ini-dist renamed)
and search for this paragraph :

Code:
max_execution_time = 60 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 5M ; Maximum amount of memory a script may consume (8MB)
you should change this to whatever you want . here is an option i use :

Code:
max_execution_time = 300 ; Maximum execution time of each script, in seconds
max_input_time = 300 ; Maximum amount of time each script may spend parsing request data
memory_limit = 5M ; Maximum amount of memory a script may consume (8MB)
Now search for :

Code:
register_globals = Off
and change it into :
Code:
register_globals = On
Search for :

Code:
extension_dir = ".\"
and change it into :

Code:
extension_dir = "c:/php/extensions"
assuming you have installed php in c: ...

Search for :

Code:
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
and uncomment (delete the ; in the front) the following modules :

Code:
extension=php_bz2.dll
extension=php_db.dll
extension=php_gd2.dll
extension=php_java.dll
extension=php_msql.dll
extension=php_pdf.dll
extension=php_pgsql.dll
extension=php_sockets.dll
Ok! now let's change the smtp settings (this is good icon_smile.gif for you mail()
function . you need this !!!) Search for :

Code:
[mail function]
; For Win32 only.
SMTP =
smtp_port = 25

; For Win32 only.
;sendmail_from =
and change to :

Code:
[mail function]
; For Win32 only.
SMTP = mail.isp.org
smtp_port = 25

; For Win32 only.
sendmail_from = mail@your_domain.org
if you don't have a mail server or :

Code:
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = mail@your_domain.org
if you have a mail server ...

Save the files . Now let's finalize the php installation . copy all the dll's
from c:/php/dlls into c:/windows/system32 . copy c:/php/php4ts.dll into
c:/windows/system32/ and copy php.ini from your folder php into
windows and system32 folder . restart apache . open up notepad and
add this into the file :


Code:
< ? php   phpinfo () ; ? >
save this file in your htdocs folder (c:/apache/htdocs) as info.php and
open up a browser . in the adress bar write :


http://localhost/info.php


you should see php's configuration in a table . a looong file icon_smile.gif
you can optionaly install zend optimizer . i am using it ... it doesn't
needs a tutorial . to install the PEAR modules for php , just run the
go-pear batch from the php folder and 2click the reg file to finish the
instllation .

=====

let's install mysql . download mysql from http://www.mysql.com/ .
this tutorial applyes to verion 4.0.* ... i don't recomand using mysql
4.1 . here is a direct link :

http://dev.mysql.com/get/Downloads/MySQL-4...ql.proserve.nl/


after downloading , extract the arhive somewhere and run the setup.exe .
install mysql in c:/mysql and complete the installation . open up command
prompt and write this :

Code:
cd mysql
cd bin
mysqld-max-nt --install
this will install mysql as a service . recomended . now you would probably
consider downloading mysql control center . a gui tool to administrate the
server in a graphical mode . here is a link :

Code:
http://dev.mysql.com/get/Downloads/MySQLCC...ql.proserve.nl/
install it like any other program and run the shortcut in the desktop . a
window will pop-up . it will ask you to add a new connection . here are the
info's you need to fill in :

Code:
name : localhost or main or whatever :)
host : localhost
user : root
pass :
click add , expand the databases menu and delete databse text . now
expand the users menu and delete all users except root@localhost . right
click it and select edit user . change it's password to whatever you want icon_smile.gif
now right click the server and select edit . change the password to the
pass you chosed for user root . as easy as that . mysql is installed !

=====

phpMyAdmin . you can download it from http://www.phpmyadmin.net/ .
i recommend using verion 2.5.1 pl1 . the last verion is still bugy icon_smile.gif
download , unzip the contecnt into a folder in htdocs (phpMyAdmin) and
open up config.inc.php with a text editor .

search for :

Code:
$cfg['PmaAbsoluteUri'] = '';
change it to your phpmyadmin url . eg. :
Code:
$cfg['PmaAbsoluteUri'] = http://www.your_domain.org/phpMyAdmin/';
now search for :

Code:
$cfg['blowfish_secret'] = '';
and change it to your mysql root password like this :

Code:
$cfg['blowfish_secret'] = 'password';
now search for :

Code:
$cfg['Servers'][$i]['auth_type'] = 'config';
and change it to :

Code:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
save and exit . that's it ! phpMyAdmin works

=====

Perl . Optioanl for your server , very usefull . i recomend you to install
it . you can download it from http://www.activestate.com/ . here is a
direct link :

http://downloads.activestate.com/ActivePer...MSWin32-x86.msi


download , install and you are ready . put your perl scripts in the /cgi-bin/
folder (c:/apache/cgi-bin) .[code]
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in Other-Tweaks | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • How to Change Name and Company Info after installing windows
    Step 1: Start > Run > Regedit Step 2: Find following Registry Key- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion St...
  • How to access blocked sites at school
    1. Start>Run and type in cmd, if you don't have run on your start menu, read another school hacking tutorial to tell you how to acces...
  • Stop IE7 Prompt To Save Passwords
    Windows Registry Editor Version 5.00 ;Stop IE7 Prompt To Save Password ; ;From the Tools menu, select Internet Options. ;Click the Content t...
  • Insert your name in Taskbar
    Hey its a very cool trick u can amaze u r friends and relatives by inserting your name on the bottom right task-bar. Follow the instructions...
  • How Long Has Your System Been Running?
    How Long Has Your System Been Running? Here's how you verify system uptime: Click Start | Run and type cmd to open a command prompt....
  • What Are Proxy Sites and How it is Used in the Internet?
    The word “proxy sites” or “proxy server” sounds quite unfamiliar right? Do you have any idea about it? Well, you heard it but you do n...
  • Lock/Hide Your Folder in Windows XP without Any Software
    Sometimes you have some data you want to save from your friends, you dont want to use any Folder lock software. Then in that case what will ...
  • Changing your Mouse Pointer
    This is sort of a stupid, frivolous, useless little tip, but hey, who ...
  • Lock your machine on Mouse Click
    Feel hard to press CTRL+ALT+DEL to lock your machine ?????? Try this and create the icon to lock the machine. 1. Right click an empty spot o...
  • Increase Harddisk Speed In Xp2003!
    How can I increase my hard disk speed in Windows XP/2003? First Common method is Defragment.. dat is too common ..so v talk sumthng new..her...

Categories

  • Browser-Tweaks
  • Computer-Tweaks
  • Designing-Tweaks
  • Email Account Tricks
  • Games-Tweaks
  • Google-Tweaks
  • Internet-Tweaks
  • Mobile-Tweaks
  • Other-Tweaks
  • Security-Tweaks
  • Torrent Tweaks
  • WebMaster Tweaks
  • Windows Tweaks
  • Yahoo-Tweaks

Blog Archive

  • ►  2010 (1)
    • ►  June (1)
  • ►  2009 (12)
    • ►  September (5)
    • ►  August (1)
    • ►  July (2)
    • ►  May (1)
    • ►  March (1)
    • ►  February (1)
    • ►  January (1)
  • ▼  2007 (43)
    • ►  November (2)
    • ►  October (2)
    • ►  September (1)
    • ►  May (3)
    • ►  April (1)
    • ►  March (2)
    • ►  February (4)
    • ▼  January (28)
      • Messy Trick
      • Cool Browser Trick
      • Put Muscle in Your Device Manager!
      • How to Bypass BIOS Passwords
      • Speed DSL
      • Internet Explorer 7 Useful Settings
      • Show your MSN Status in your Signature on Forums, ...
      • Lock a folder without any software
      • How To Trace The Spam Mail
      • Ten steps to a more secure computer
      • How to get/import movies subtitles
      • Poweroff at Shutdown
      • Disable The Send Error Report
      • Freecell Tricks
      • Disable Picture And Fax Viewer
      • Rename your digital photos automatically in Window...
      • Solitaire Trick (Quick Win)
      • Install Xp From Dos
      • Windows XP shortcuts on your keyboard
      • What a mobile phone can actually do
      • Configure XP for Auto-Logon
      • Hiding Drives
      • Hide your clock
      • Recycle Bin Edits
      • Easy way to increase your Cable/DSL speed!!!
      • How to Overclock Your Video Card
      • Give each hd its own icon.
      • How to Install Apache , PHP , MySQL , Perl on Windows
  • ►  2006 (55)
    • ►  December (55)
Powered by Blogger.

About Me

Unknown
View my complete profile