SlideShare a Scribd company logo
1 of 13
Download to read offline
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 1
WAMP & LAMP
Installation and Configuration
By
CHETAN SONI
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 2
About Me
I am a social-techno-learner who believes in its own efficiency first and then
implements with the suggestions of my strong and enthusiastic Team which helps me
takes everything into its perfection level.
At Present, I am the Founder & Admin of blog Just Do Hackers(JDH), a security based
blog and the overall resource person of a Online Digital Library named as Seculabs
which is a product of Secugenius Security Solutions.
I conducted more than 100 workshops on topics like “Botnets, Metasploit Framework,
Vulnerability Assessment, Penetration Testing, Cyber Crime Investigation & Forensics,
Ethical Hacking ” at various institutions/Colleges/Companies all across the world.
Chetan Soni
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 3
WAMP Server
Requirements/Software Needed :-
1. Apache v2
2. PHP v5
3. MySql v4.1
4. phpMyAdmin
Personally, I do my webdev on Linux, but needed to figure this out for a Windows XP
Home user. I found it very easy to setup, but only because I have a lot of experience with these
products. For this, I can imagine this process would be very confusing. So as, these are good
instructions to follow step-by-step to get this working. In this Project, I do not attempt to tell you
HOW to use Apache, MySql, PHP, or phpMyAdmin. Instead, I explain only enough to get it all
downloaded, installed, configured, and tested.
As fast as things change, these instructions may not be accurate in 30 days, but here
goes...PLEASE follow these directions in the order listed.
---------------------------------------------------------------
Apache - The Web Server
---------------------------------------------------------------
File Name: - apache_2.0.54-win32-x86-no_ssl.msi.
Run the installer and follow the installation wizard using all the default options.
When asked to provide a domain name, if you are just installing for personal local development
and learning, you can enter anything you want.
Try mydomain.net for example. This same screen will prompt for a server name and
an email address. The server name must include the domain name. So you could enter
www.mydomain.net.
(In this case, the name of your computer is "www" and the full name is "www.mydomain.net". It
does not have to match the actual computer name of your machine.)
You can just enter your real email address--it won’t matter.
If everything worked, you should now have Apache installed and configured as a
Windows Service which means it will automatically start when you start Windows. You should
have a new icon in your System Tray that is a little red Apache feather. The icon shows the status
of your web server--green for running and red for stopped.
You can click it to open the Apache Service Monitor. You use this to Stop, Start, and
Restart the service. You will need to restart the service anytime you make a configuration
change.
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 4
Confirm that the service is running. If not, start it.
If it fails, then your problems are beyond this tutorial. Sorry.
You have a web server! Open a browser and go to http://localhost.
You should see the Apache default page telling you your server is working. These pages are
being served from the Document Root, which by default a folder is named htdocs within the
location you installed Apache.
Default is C:Program FilesApache GroupApache2htdocs.
I like to leave this folder alone, and create my own Document Root to build my website in. To do
this, create a folder named www on your C: drive. Navigate to your C:www folder, and create a
new file using Notepad or your favorite text editor. (I recommend PSPad.)
Name it index.html.
Copy and paste the following into c:wwwindex.html.
[HTML]
<html>
<head>
<title>My Own Local Web Server</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
[/HTML]
Now we need to edit the Apache configuration to point it to our c:www folder as the Document
Root. To do this, again in your favorite text editor, open the Apache conf file.
By default this is C:Program FilesApache GroupApache2confhttpd.conf
Find the line that looks like this:
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
Save your changes. Using the Apache Service Monitor, Restart the service. Open a browser and
go to http://localhost.
You should see your new home page which is c:wwwindex.html.
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 5
Whew! Step 1 complete.
---------------------------------------------------------------
PHP - The Scripting Language
---------------------------------------------------------------
File Name:- php-5.0.4-Win32.zip.
Create a folder named php on your C: drive. Unzip the file into c:php.
Make a copy of c:phpphp.ini-recommended and name it c:phpphp.ini
Right-click My Computer and choose Properties. Choose the Advanced tab. Click the
Environment Variables button at the bottom.
In the System Variables section, click Path, then the Edit button.
At the end of the path value, add ;C:php;C:phpext
Click OK and keep clicking OK until you exit out of the Properties.
Reboot your computer.
Now we have to modify the Apache conf so it knows to use the PHP module. To do this,
again in your favorite text editor, open the Apache conf file.
Find the LoadModule section that begins with a comment line that looks like this:
# Dynamic Shared Object (DSO)
At the end of the list of LoadModule lines, add these 4 lines:
# PHP5
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "c:/php/"
DirectoryIndex index.html index.html.var
And change it to this:
DirectoryIndex index.html index.html.var index.php
Now save your changes, and restart Apache.
Create a new file named c:wwwindex.php.
Copy these lines into it:
Rename c:wwwindex.html to c:wwwold_index.html
Open http://localhost in your browser. You should see the phpinfo page that displays your PHP
version at top and a lot of system and user information tables.
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 6
---------------------------------------------------------------
MySql - The Database
---------------------------------------------------------------
File Name:-mysql-essential-4.1.12a-win32.msi.
Run the installer and use all the default values. When prompted for a root password,
choose one you can remember. Normally, security is an issue here, but if this is just for you to
learn and play, it does not matter much.
Once the installation is complete, MySql should be configured as a Windows Service
which means it will auto start when you start Windows.
You should have a new MySql folder in your Start/All Programs menu. One of the items in the
menu is MySQL Command Line Client.
You can use this to do all your database administration from creating databases and tables to
inserting data, etc.
For now, though, use the MySQL Command Line Client to test your installation. Open the
command line client to see a password prompt.
Enter your root password.
Welcome to the MySQL monitor.
Your MySQL connection id is 60 to server version: 4.1.12a-nt
Now you need to configure PHP to work with MySql. Open c:phpphp.ini in your
favorite text editor. There are 2 lines you need to uncomment.
Save your changes. Restart the Apache service. (That's right--since we are using php as
an Apache module, anytime you change either the Apache conf file or the PHP ini file, you must
restart Apache to see your changes.)
To test that you have PHP configured to work with MySql, create a file named
c:wwwdbtest.php.
You now have a WAMP system to administrate your database.
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 7
LAMP Server
LAMP means Linux, Apache, MySql and PHP. Depending on who you talk to, the P
also stands for Perl or Python, but in general, it is assumed to be PHP.
Initial Steps
PLEASE BE AWARE THAT A SOURCE-BASED INSTALLATION LIKE THIS ONE IS
NOT NEEDED FOR A BASIC LAMP SERVER!
You should only be doing a source-based installation if you need to alter settings in one
or more components of the LAMP stack (e.g., you need a feature in PHP that isn't in the default
RPM). If you are just getting started with LAMP, use the binaries provided by your distribution -
it is much simpler, and a lot easier to upgrade later.
Most out-of-the-box Red Hat Linux installations will have one or more of the LAMP
components installed via RPM files. I personally believe in installing things like this from
source, so I get the most control over what's compiled in, what's left out, etc. But source code
installs can wreak havoc if overlaid on top of RPM installs, as the two most likely won't share
the same directories, etc.
If you have not yet installed your Linux OS, or just for future reference, do not choose
to install Apache, PHP, or MySQL during the system installation. Then you can immediately
proceed with the source-based install listed here.
su – root
yum install gcc gcc-c++
Log in as root
If you do not have direct access (via keyboard) to the server, PLEASE use
Secure Shell (SSH) to access the server and not telnet!! Whenever you use telnet (or plain
FTP for that matter), you are transmitting your username, password, and all session information
in "plain text". This means that anyone who can access a machine someplace between your PC
and your server can snoop your session and get your info. Use encryption wherever possible!
su - root
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 8
At the time of updating this, the current versions of all the components we'll use are:
MySQL - 4.1.22
Apache - 1.3.37
PHP - 4.4.6
Installing Apache2 With PHP5 And MySQL
1. Preliminary Step
In this use the hostname server1.example.com with the IP address 192.168.0.100.
These settings might differ for you, so you have to replace them where appropriate.
2. Installing MySQL 5.0
To install MySQL,
yum install mysql mysql-server
Then we create the system startup links for MySQL
(so that MySQL starts automatically whenever the system boots) and start the MySQL server:
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
Run
mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword
to set a password for the user root (otherwise anybody can access your MySQL database!).
3. Installing Apache2
Apache2 is available as a Redhat 6.0 package, therefore we can install it like this:
yum install httpd
Now configure your system to start Apache at boot time...
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 9
chkconfig --levels 235 httpd on
... and start Apache:
/etc/init.d/httpd start
Now direct your browser to http://192.168.0.100, and you should see the Apache2 placeholder
page:
Apache’s default document root is /var/www/html on Redhat System, and the
configuration file is /etc/httpd/httpd.conf .
Additional Configurations are stored in /etc/httpd/conf.d/ Directory.
4. Installing PHP5
We can install PHP5 and the Apache PHP5 module as:
Yum install php
We must Restart Apache Afterwards
/etc/init.d/httpd restart
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 10
5. Testing PHP5 / Getting Details About Your PHP5 Installation
The document root of the default web site is /var/www/html. We will now create a small
PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful
details about our PHP installation, such as the installed PHP version.
vi /var/www/html/info.php
<?php
phpinfo();
?>
Now we call that file in a browser (e.g. http://192.168.0.100/info.php):
As you see, PHP5 is working, and it's working through the Apache 2.0 Handler, as
shown in the Server API line. If you scroll further down, you will see all modules that are
already enabled in PHP5. MySQL is not listed there which means we don't have MySQL support
in PHP5 yet.
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 11
6. Getting MySQL Support In PHP5
To get MySQL support in PHP, we can install the php-mysql package. It's a good idea to install
some other PHP5 modules as well as you might need them for your applications. You can search
for available PHP5 modules like this:
yum search php
Pick the ones you need and install them like this:
yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
Now restart Apache2:
/etc/init.d/httpd restart
Now reload http://192.168.0.100/info.php in your browser and scroll down to the modules
section again. You should now find lots of new modules there, including the MySQL module:
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 12
7. phpMyAdmin
phpMyAdmin is a web interface through which you can manage your MySQL databases.
First we enable the RPMforge repository on our Redhat system as phpMyAdmin is not available
in the official Redhat repositories:
On i386 systems:
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
phpMyAdmin can now be installed as follows:
yum install phpmyadmin
Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin
allows connections not just from localhost
(by commenting out the <Directory "/usr/share/phpmyadmin"> stanza):
vi /etc/httpd/conf.d/phpMyAdmin.conf
#
# Web application to manage MySQL
#
#<Directory "/usr/share/phpmyadmin">
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#</Directory>
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
Next we change the authentication in phpMyAdmin from cookie to http:
vi /usr/share/phpMyAdmin/config.nic.php
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]
Chetan Soni – Security Specialist
www.facebook.com/er.chetansoni Page 13
Restart Apache by this command:
/etc/init.d/httpd restart
Afterwards, you can Access phpMyAdmin under http://192.168.0.10/phpmyadmin/:

More Related Content

What's hot

Hardening WordPress. Few steps to more secure installation.
Hardening WordPress. Few steps to more secure installation.Hardening WordPress. Few steps to more secure installation.
Hardening WordPress. Few steps to more secure installation.Marcin Chwedziak
 
Seo pressor unlimited-license-v4.0
Seo pressor unlimited-license-v4.0Seo pressor unlimited-license-v4.0
Seo pressor unlimited-license-v4.0Sarit Cohen
 
The moment my site got hacked - WordCamp Sofia
The moment my site got hacked - WordCamp SofiaThe moment my site got hacked - WordCamp Sofia
The moment my site got hacked - WordCamp SofiaMarko Heijnen
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesOtto Kekäläinen
 
Crud tutorial en
Crud tutorial enCrud tutorial en
Crud tutorial enforkgrown
 
Making Sense of APEX Security by Christoph Ruepprich
Making Sense of APEX Security by Christoph RuepprichMaking Sense of APEX Security by Christoph Ruepprich
Making Sense of APEX Security by Christoph RuepprichEnkitec
 
Installation of Drupal on Windows XP with XAMPP
Installation of Drupal on Windows XP with XAMPPInstallation of Drupal on Windows XP with XAMPP
Installation of Drupal on Windows XP with XAMPPRupesh Kumar
 
Antivirus Bypass Techniques - 2016
Antivirus Bypass Techniques - 2016Antivirus Bypass Techniques - 2016
Antivirus Bypass Techniques - 2016Raghav Bisht
 
Create dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQLCreate dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQLkangaro10a
 
Serving Moodle Presentation
Serving Moodle PresentationServing Moodle Presentation
Serving Moodle Presentationwebhostingguy
 
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008Helgi Þormar Þorbjörnsson
 
Virtualización de Escriorios VMWare View 5
Virtualización de Escriorios VMWare View 5Virtualización de Escriorios VMWare View 5
Virtualización de Escriorios VMWare View 5RaGaZoMe
 
Prabu apache installations
Prabu apache installationsPrabu apache installations
Prabu apache installationsPrabu Cse
 
Drupal and Security: What You Need to Know
Drupal and Security: What You Need to KnowDrupal and Security: What You Need to Know
Drupal and Security: What You Need to KnowAcquia
 
Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLIDiana Thompson
 

What's hot (20)

Hardening WordPress. Few steps to more secure installation.
Hardening WordPress. Few steps to more secure installation.Hardening WordPress. Few steps to more secure installation.
Hardening WordPress. Few steps to more secure installation.
 
Seo pressor unlimited-license-v4.0
Seo pressor unlimited-license-v4.0Seo pressor unlimited-license-v4.0
Seo pressor unlimited-license-v4.0
 
Presentation (PPT)
Presentation (PPT)Presentation (PPT)
Presentation (PPT)
 
The moment my site got hacked - WordCamp Sofia
The moment my site got hacked - WordCamp SofiaThe moment my site got hacked - WordCamp Sofia
The moment my site got hacked - WordCamp Sofia
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
 
Crud tutorial en
Crud tutorial enCrud tutorial en
Crud tutorial en
 
Making Sense of APEX Security by Christoph Ruepprich
Making Sense of APEX Security by Christoph RuepprichMaking Sense of APEX Security by Christoph Ruepprich
Making Sense of APEX Security by Christoph Ruepprich
 
Installation of Drupal on Windows XP with XAMPP
Installation of Drupal on Windows XP with XAMPPInstallation of Drupal on Windows XP with XAMPP
Installation of Drupal on Windows XP with XAMPP
 
Antivirus Bypass Techniques - 2016
Antivirus Bypass Techniques - 2016Antivirus Bypass Techniques - 2016
Antivirus Bypass Techniques - 2016
 
Create dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQLCreate dynamic sites with PHP & MySQL
Create dynamic sites with PHP & MySQL
 
Serving Moodle Presentation
Serving Moodle PresentationServing Moodle Presentation
Serving Moodle Presentation
 
Jones_Lamp_Tutorial
Jones_Lamp_TutorialJones_Lamp_Tutorial
Jones_Lamp_Tutorial
 
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
 
Google Hacking Basics
Google Hacking BasicsGoogle Hacking Basics
Google Hacking Basics
 
Virtualización de Escriorios VMWare View 5
Virtualización de Escriorios VMWare View 5Virtualización de Escriorios VMWare View 5
Virtualización de Escriorios VMWare View 5
 
Prabu apache installations
Prabu apache installationsPrabu apache installations
Prabu apache installations
 
Apache
ApacheApache
Apache
 
Apache
ApacheApache
Apache
 
Drupal and Security: What You Need to Know
Drupal and Security: What You Need to KnowDrupal and Security: What You Need to Know
Drupal and Security: What You Need to Know
 
Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLI
 

Viewers also liked

Luke Spinner Tidball - Resume
Luke Spinner Tidball - ResumeLuke Spinner Tidball - Resume
Luke Spinner Tidball - ResumeLuke Tidball
 
Tina's resume (1)
Tina's resume (1)Tina's resume (1)
Tina's resume (1)Tina Asbill
 
ADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPER
ADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPERADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPER
ADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPERvravi123
 
Marc Rostkowski_MAY_13.MDR.2015
Marc Rostkowski_MAY_13.MDR.2015Marc Rostkowski_MAY_13.MDR.2015
Marc Rostkowski_MAY_13.MDR.2015Marc Rostkowski
 
Tombleson Hilary 2016 Resume
Tombleson Hilary 2016 ResumeTombleson Hilary 2016 Resume
Tombleson Hilary 2016 ResumeHilary Tombleson
 
#abw.CV$ -1(Autosaved)
#abw.CV$ -1(Autosaved)#abw.CV$ -1(Autosaved)
#abw.CV$ -1(Autosaved)aim dubs
 
MARWAN_FARRAG_ARCHITECT_SITE ENGINEER_CV_KSA
MARWAN_FARRAG_ARCHITECT_SITE ENGINEER_CV_KSAMARWAN_FARRAG_ARCHITECT_SITE ENGINEER_CV_KSA
MARWAN_FARRAG_ARCHITECT_SITE ENGINEER_CV_KSAMarwan Fawzy Ahmed
 
John Thoman resume V4
John Thoman resume V4John Thoman resume V4
John Thoman resume V4John Thoman
 
CV - Nader Nehme
CV - Nader NehmeCV - Nader Nehme
CV - Nader NehmeNader Nehme
 
Jeri L. Keck -New 100515
Jeri L. Keck -New 100515Jeri L. Keck -New 100515
Jeri L. Keck -New 100515Jeri Keck
 
Cisco web ex-cs-0511-final
Cisco web ex-cs-0511-finalCisco web ex-cs-0511-final
Cisco web ex-cs-0511-finalEl Taller Web
 

Viewers also liked (20)

Luke Spinner Tidball - Resume
Luke Spinner Tidball - ResumeLuke Spinner Tidball - Resume
Luke Spinner Tidball - Resume
 
Etica kantiana
Etica kantianaEtica kantiana
Etica kantiana
 
Tina's resume (1)
Tina's resume (1)Tina's resume (1)
Tina's resume (1)
 
ADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPER
ADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPERADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPER
ADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPER
 
Marc Rostkowski_MAY_13.MDR.2015
Marc Rostkowski_MAY_13.MDR.2015Marc Rostkowski_MAY_13.MDR.2015
Marc Rostkowski_MAY_13.MDR.2015
 
Resume
ResumeResume
Resume
 
Tombleson Hilary 2016 Resume
Tombleson Hilary 2016 ResumeTombleson Hilary 2016 Resume
Tombleson Hilary 2016 Resume
 
#abw.CV$ -1(Autosaved)
#abw.CV$ -1(Autosaved)#abw.CV$ -1(Autosaved)
#abw.CV$ -1(Autosaved)
 
MARWAN_FARRAG_ARCHITECT_SITE ENGINEER_CV_KSA
MARWAN_FARRAG_ARCHITECT_SITE ENGINEER_CV_KSAMARWAN_FARRAG_ARCHITECT_SITE ENGINEER_CV_KSA
MARWAN_FARRAG_ARCHITECT_SITE ENGINEER_CV_KSA
 
John Thoman resume V4
John Thoman resume V4John Thoman resume V4
John Thoman resume V4
 
Resume
ResumeResume
Resume
 
CV - Nader Nehme
CV - Nader NehmeCV - Nader Nehme
CV - Nader Nehme
 
Noemi resume 1-2016
Noemi resume 1-2016Noemi resume 1-2016
Noemi resume 1-2016
 
Jeri L. Keck -New 100515
Jeri L. Keck -New 100515Jeri L. Keck -New 100515
Jeri L. Keck -New 100515
 
cv-portfolio 10-10-2015
cv-portfolio 10-10-2015cv-portfolio 10-10-2015
cv-portfolio 10-10-2015
 
Metrics used in testing
Metrics used in testingMetrics used in testing
Metrics used in testing
 
Mark C Clayton
Mark C ClaytonMark C Clayton
Mark C Clayton
 
County of San Diego
County of San DiegoCounty of San Diego
County of San Diego
 
Norm Penner
Norm PennerNorm Penner
Norm Penner
 
Cisco web ex-cs-0511-final
Cisco web ex-cs-0511-finalCisco web ex-cs-0511-final
Cisco web ex-cs-0511-final
 

Similar to Wamp & LAMP - Installation and Configuration

Diva23
Diva23Diva23
Diva23diva23
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Boxguest34a3a419
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows BoxJayanta Dash
 
Apache windows
Apache windowsApache windows
Apache windowsmexxixxo
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011Alfred Ayache
 
Installing php and my sql locally using xampp
Installing php and my sql locally using xamppInstalling php and my sql locally using xampp
Installing php and my sql locally using xampppeyman Ghader Kurehpaz
 
Apache web server tutorial for linux
Apache web server tutorial for linuxApache web server tutorial for linux
Apache web server tutorial for linuxSahad Sali
 
Installation instruction of Testlink
Installation instruction of TestlinkInstallation instruction of Testlink
Installation instruction of Testlinkusha kannappan
 
PHP tutorials , php tutorials for beginners , tutorials for php
PHP tutorials , php tutorials for beginners , tutorials for phpPHP tutorials , php tutorials for beginners , tutorials for php
PHP tutorials , php tutorials for beginners , tutorials for phpaimaq9a
 
Installing Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu InstanceInstalling Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu Instancekamarul kawnayeen
 

Similar to Wamp & LAMP - Installation and Configuration (20)

Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Diva23
Diva23Diva23
Diva23
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Box
 
Mantis Installation for Windows Box
Mantis Installation for Windows BoxMantis Installation for Windows Box
Mantis Installation for Windows Box
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Apache - Quick reference guide
Apache - Quick reference guideApache - Quick reference guide
Apache - Quick reference guide
 
Apache windows
Apache windowsApache windows
Apache windows
 
Appache.ppt
Appache.pptAppache.ppt
Appache.ppt
 
Appache.ppt
Appache.pptAppache.ppt
Appache.ppt
 
WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011WP Sandbox Presentation WordCamp Toronto 2011
WP Sandbox Presentation WordCamp Toronto 2011
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
instaling
instalinginstaling
instaling
 
zLAMP
zLAMPzLAMP
zLAMP
 
Installing php and my sql locally using xampp
Installing php and my sql locally using xamppInstalling php and my sql locally using xampp
Installing php and my sql locally using xampp
 
Apache web server tutorial for linux
Apache web server tutorial for linuxApache web server tutorial for linux
Apache web server tutorial for linux
 
Installation instruction of Testlink
Installation instruction of TestlinkInstallation instruction of Testlink
Installation instruction of Testlink
 
PHP tutorials , php tutorials for beginners , tutorials for php
PHP tutorials , php tutorials for beginners , tutorials for phpPHP tutorials , php tutorials for beginners , tutorials for php
PHP tutorials , php tutorials for beginners , tutorials for php
 
Installing Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu InstanceInstalling Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu Instance
 

Recently uploaded

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 

Recently uploaded (20)

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 

Wamp & LAMP - Installation and Configuration

  • 1. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 1 WAMP & LAMP Installation and Configuration By CHETAN SONI
  • 2. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 2 About Me I am a social-techno-learner who believes in its own efficiency first and then implements with the suggestions of my strong and enthusiastic Team which helps me takes everything into its perfection level. At Present, I am the Founder & Admin of blog Just Do Hackers(JDH), a security based blog and the overall resource person of a Online Digital Library named as Seculabs which is a product of Secugenius Security Solutions. I conducted more than 100 workshops on topics like “Botnets, Metasploit Framework, Vulnerability Assessment, Penetration Testing, Cyber Crime Investigation & Forensics, Ethical Hacking ” at various institutions/Colleges/Companies all across the world. Chetan Soni
  • 3. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 3 WAMP Server Requirements/Software Needed :- 1. Apache v2 2. PHP v5 3. MySql v4.1 4. phpMyAdmin Personally, I do my webdev on Linux, but needed to figure this out for a Windows XP Home user. I found it very easy to setup, but only because I have a lot of experience with these products. For this, I can imagine this process would be very confusing. So as, these are good instructions to follow step-by-step to get this working. In this Project, I do not attempt to tell you HOW to use Apache, MySql, PHP, or phpMyAdmin. Instead, I explain only enough to get it all downloaded, installed, configured, and tested. As fast as things change, these instructions may not be accurate in 30 days, but here goes...PLEASE follow these directions in the order listed. --------------------------------------------------------------- Apache - The Web Server --------------------------------------------------------------- File Name: - apache_2.0.54-win32-x86-no_ssl.msi. Run the installer and follow the installation wizard using all the default options. When asked to provide a domain name, if you are just installing for personal local development and learning, you can enter anything you want. Try mydomain.net for example. This same screen will prompt for a server name and an email address. The server name must include the domain name. So you could enter www.mydomain.net. (In this case, the name of your computer is "www" and the full name is "www.mydomain.net". It does not have to match the actual computer name of your machine.) You can just enter your real email address--it won’t matter. If everything worked, you should now have Apache installed and configured as a Windows Service which means it will automatically start when you start Windows. You should have a new icon in your System Tray that is a little red Apache feather. The icon shows the status of your web server--green for running and red for stopped. You can click it to open the Apache Service Monitor. You use this to Stop, Start, and Restart the service. You will need to restart the service anytime you make a configuration change.
  • 4. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 4 Confirm that the service is running. If not, start it. If it fails, then your problems are beyond this tutorial. Sorry. You have a web server! Open a browser and go to http://localhost. You should see the Apache default page telling you your server is working. These pages are being served from the Document Root, which by default a folder is named htdocs within the location you installed Apache. Default is C:Program FilesApache GroupApache2htdocs. I like to leave this folder alone, and create my own Document Root to build my website in. To do this, create a folder named www on your C: drive. Navigate to your C:www folder, and create a new file using Notepad or your favorite text editor. (I recommend PSPad.) Name it index.html. Copy and paste the following into c:wwwindex.html. [HTML] <html> <head> <title>My Own Local Web Server</title> </head> <body> <h1>Hello, World!</h1> </body> </html> [/HTML] Now we need to edit the Apache configuration to point it to our c:www folder as the Document Root. To do this, again in your favorite text editor, open the Apache conf file. By default this is C:Program FilesApache GroupApache2confhttpd.conf Find the line that looks like this: DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs" Save your changes. Using the Apache Service Monitor, Restart the service. Open a browser and go to http://localhost. You should see your new home page which is c:wwwindex.html.
  • 5. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 5 Whew! Step 1 complete. --------------------------------------------------------------- PHP - The Scripting Language --------------------------------------------------------------- File Name:- php-5.0.4-Win32.zip. Create a folder named php on your C: drive. Unzip the file into c:php. Make a copy of c:phpphp.ini-recommended and name it c:phpphp.ini Right-click My Computer and choose Properties. Choose the Advanced tab. Click the Environment Variables button at the bottom. In the System Variables section, click Path, then the Edit button. At the end of the path value, add ;C:php;C:phpext Click OK and keep clicking OK until you exit out of the Properties. Reboot your computer. Now we have to modify the Apache conf so it knows to use the PHP module. To do this, again in your favorite text editor, open the Apache conf file. Find the LoadModule section that begins with a comment line that looks like this: # Dynamic Shared Object (DSO) At the end of the list of LoadModule lines, add these 4 lines: # PHP5 LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php PHPIniDir "c:/php/" DirectoryIndex index.html index.html.var And change it to this: DirectoryIndex index.html index.html.var index.php Now save your changes, and restart Apache. Create a new file named c:wwwindex.php. Copy these lines into it: Rename c:wwwindex.html to c:wwwold_index.html Open http://localhost in your browser. You should see the phpinfo page that displays your PHP version at top and a lot of system and user information tables.
  • 6. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 6 --------------------------------------------------------------- MySql - The Database --------------------------------------------------------------- File Name:-mysql-essential-4.1.12a-win32.msi. Run the installer and use all the default values. When prompted for a root password, choose one you can remember. Normally, security is an issue here, but if this is just for you to learn and play, it does not matter much. Once the installation is complete, MySql should be configured as a Windows Service which means it will auto start when you start Windows. You should have a new MySql folder in your Start/All Programs menu. One of the items in the menu is MySQL Command Line Client. You can use this to do all your database administration from creating databases and tables to inserting data, etc. For now, though, use the MySQL Command Line Client to test your installation. Open the command line client to see a password prompt. Enter your root password. Welcome to the MySQL monitor. Your MySQL connection id is 60 to server version: 4.1.12a-nt Now you need to configure PHP to work with MySql. Open c:phpphp.ini in your favorite text editor. There are 2 lines you need to uncomment. Save your changes. Restart the Apache service. (That's right--since we are using php as an Apache module, anytime you change either the Apache conf file or the PHP ini file, you must restart Apache to see your changes.) To test that you have PHP configured to work with MySql, create a file named c:wwwdbtest.php. You now have a WAMP system to administrate your database.
  • 7. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 7 LAMP Server LAMP means Linux, Apache, MySql and PHP. Depending on who you talk to, the P also stands for Perl or Python, but in general, it is assumed to be PHP. Initial Steps PLEASE BE AWARE THAT A SOURCE-BASED INSTALLATION LIKE THIS ONE IS NOT NEEDED FOR A BASIC LAMP SERVER! You should only be doing a source-based installation if you need to alter settings in one or more components of the LAMP stack (e.g., you need a feature in PHP that isn't in the default RPM). If you are just getting started with LAMP, use the binaries provided by your distribution - it is much simpler, and a lot easier to upgrade later. Most out-of-the-box Red Hat Linux installations will have one or more of the LAMP components installed via RPM files. I personally believe in installing things like this from source, so I get the most control over what's compiled in, what's left out, etc. But source code installs can wreak havoc if overlaid on top of RPM installs, as the two most likely won't share the same directories, etc. If you have not yet installed your Linux OS, or just for future reference, do not choose to install Apache, PHP, or MySQL during the system installation. Then you can immediately proceed with the source-based install listed here. su – root yum install gcc gcc-c++ Log in as root If you do not have direct access (via keyboard) to the server, PLEASE use Secure Shell (SSH) to access the server and not telnet!! Whenever you use telnet (or plain FTP for that matter), you are transmitting your username, password, and all session information in "plain text". This means that anyone who can access a machine someplace between your PC and your server can snoop your session and get your info. Use encryption wherever possible! su - root
  • 8. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 8 At the time of updating this, the current versions of all the components we'll use are: MySQL - 4.1.22 Apache - 1.3.37 PHP - 4.4.6 Installing Apache2 With PHP5 And MySQL 1. Preliminary Step In this use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate. 2. Installing MySQL 5.0 To install MySQL, yum install mysql mysql-server Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server: chkconfig --levels 235 mysqld on /etc/init.d/mysqld start Run mysqladmin -u root password yourrootsqlpassword mysqladmin -h server1.example.com -u root password yourrootsqlpassword to set a password for the user root (otherwise anybody can access your MySQL database!). 3. Installing Apache2 Apache2 is available as a Redhat 6.0 package, therefore we can install it like this: yum install httpd Now configure your system to start Apache at boot time...
  • 9. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 9 chkconfig --levels 235 httpd on ... and start Apache: /etc/init.d/httpd start Now direct your browser to http://192.168.0.100, and you should see the Apache2 placeholder page: Apache’s default document root is /var/www/html on Redhat System, and the configuration file is /etc/httpd/httpd.conf . Additional Configurations are stored in /etc/httpd/conf.d/ Directory. 4. Installing PHP5 We can install PHP5 and the Apache PHP5 module as: Yum install php We must Restart Apache Afterwards /etc/init.d/httpd restart
  • 10. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 10 5. Testing PHP5 / Getting Details About Your PHP5 Installation The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version. vi /var/www/html/info.php <?php phpinfo(); ?> Now we call that file in a browser (e.g. http://192.168.0.100/info.php): As you see, PHP5 is working, and it's working through the Apache 2.0 Handler, as shown in the Server API line. If you scroll further down, you will see all modules that are already enabled in PHP5. MySQL is not listed there which means we don't have MySQL support in PHP5 yet.
  • 11. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 11 6. Getting MySQL Support In PHP5 To get MySQL support in PHP, we can install the php-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this: yum search php Pick the ones you need and install them like this: yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc Now restart Apache2: /etc/init.d/httpd restart Now reload http://192.168.0.100/info.php in your browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module:
  • 12. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 12 7. phpMyAdmin phpMyAdmin is a web interface through which you can manage your MySQL databases. First we enable the RPMforge repository on our Redhat system as phpMyAdmin is not available in the official Redhat repositories: On i386 systems: wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm phpMyAdmin can now be installed as follows: yum install phpmyadmin Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the <Directory "/usr/share/phpmyadmin"> stanza): vi /etc/httpd/conf.d/phpMyAdmin.conf # # Web application to manage MySQL # #<Directory "/usr/share/phpmyadmin"> # Order Deny,Allow # Deny from all # Allow from 127.0.0.1 #</Directory> Alias /phpmyadmin /usr/share/phpmyadmin Alias /phpMyAdmin /usr/share/phpmyadmin Alias /mysqladmin /usr/share/phpmyadmin Next we change the authentication in phpMyAdmin from cookie to http: vi /usr/share/phpMyAdmin/config.nic.php [...] /* Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'http'; [...]
  • 13. Chetan Soni – Security Specialist www.facebook.com/er.chetansoni Page 13 Restart Apache by this command: /etc/init.d/httpd restart Afterwards, you can Access phpMyAdmin under http://192.168.0.10/phpmyadmin/: