Install Apache php phpmyadmin MySql
If you want to host a website on your computer, LAMP (Linux Apache MySql Php) or WAMP (Windows Apache MySql Php) is the way to go. In addition you would need to install phpmyadmin as well to manage the database. Going for linux based web server is recommended if you are comfortable with it.
Lets first consider the installation on Windows. Installing each component individually and making them talk is quite a challenge. So instead you can install all of it in one go using XAMPP. Download and install XAMPP. If you select the default options then it would create a folder called htdocs inside folder C:xampp. This folder would be your root directory for the webserver. You can access its content by typing http://localhost in the web browser. XAMPP has everything you need, even a ftp server and an smtp (mail) server.
Installation all these softwares on linux can be achieved through the corresponding package manager of your distro, e.g. on Ubuntu 9.10 or Debian 5.0 Lenny.
You start by installing mysql
$ sudo apt-get install mysql-client mysql-server
Specify new password for the MySQl “root” user. Repeat it for a second time. Next, install Apache2:
$ sudo apt-get install apache2
Now point your browser to http://localhost, and you should see the Apache2 placeholder page (It works!). To install php do the usual
$ sudo apt-get install php5 libapache2-mod-php5
To enable php you need to restart apache by
$ /etc/init.d/apache2 restart
To test whether php support is enabled create a php file called info.php, using a text editor of your choice, with the following content:
<?php phpinfo(); ?>
Save it in your web-directory and point your browser to it. You should see something like this
To bring in the support for MySql you can install the following packages, if you need for anything more you can search for them by doing sudo apt-get search php5
$ sudo apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
Now restart apache again, in case you alreadt forgot /etc/init.d/apache2 restart
Reloading the php.info should show you the mysql related information.
Now finally install phpmyadmin
$ sudo apt-get install phpmyadmin
When asked for “Web server to reconfigure automatically:” select apache2, and you are all set with apache2, php, mysql and phpmyadmin all installed and configured to run your own website, blog, photo gallery and what not.
Possibly related posts (generated automatically):
- Install Apache MySQL PHP phpmyadmin (LAMP) on Ubuntu 10.04 or Mint Linux 9
- Install Apache MySQL PHP phpmyadmin (LAMP) on Ubuntu 11.04
- Install Apache MySQL PHP phpmyadmin (LAMP) on Linux Mint 11 Katya
- Install Apache MySQL PHP phpmyadmin (LAMP) on Ubuntu 10.10
- Install apache php mysql phpmyadmin on Fedora 13
- Install Apache MySQL PHP phpmyadmin (LAMP) on Open SUSE 11.3
- LAMP Server Fedora 14 (Install apache php mysql phpmyadmin)
- Simple Streaming Music Server Using Apache musicindex