Академический Документы
Профессиональный Документы
Культура Документы
By
CHETAN SONI
www.facebook.com/er.chetansoni
Page 1
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
www.facebook.com/er.chetansoni
Page 2
WAMP Server
Requirements/Software Needed :1.
2.
3.
4.
Apache v2
PHP v5
MySql v4.1
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 wont 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.
www.facebook.com/er.chetansoni
Page 3
Save your changes. Using the Apache Service Monitor, Restart the service. Open a browser and
go to http://localhost.
www.facebook.com/er.chetansoni
Page 4
www.facebook.com/er.chetansoni
Page 5
www.facebook.com/er.chetansoni
Page 6
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
www.facebook.com/er.chetansoni
Page 7
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...
www.facebook.com/er.chetansoni
Page 8
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
www.facebook.com/er.chetansoni
Page 9
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.
www.facebook.com/er.chetansoni
Page 10
www.facebook.com/er.chetansoni
Page 11
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
www.facebook.com/er.chetansoni
Page 12
www.facebook.com/er.chetansoni
Page 13