Wednesday, May 13, 2009

Howto Inatall PHP and Mysql in Ubuntu 9.04 (Jaunty Jackalope)

Install PHP and Mysql in ubuntu linux is very easy

First You have to install Apache Webserver
After that you can Install PHP and Mysql

Open a Terminal using Applications--> Accessories --> Terminal

Then You will get $ prompt
Do the following

$ sudo apt-get install apache2 ( If you have already installed apache Omit this line)
$ sudo apt-get install php5
$ sudo apt-get install libapache2-mod-php5
$ sudo apt-get install mysql-server
$ sudo apt-get install php5-mysql
$ sudo /etc/init.d/apache2 restart

Now You can write your php scripts and put it into the folder /var/www

Now you can install PHPMYADMIN a very useful front end utility for managing Mysql

$ sudo apt-get install phpmyadmin

6 comments:

  1. on opening http://localhost/phpmyadmin in my browser gives the message --->>

    Not Found

    The requested URL /phpmyadmin was not found on this server.
    Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 with Suhosin-Patch Server at localhost Port 80





    but when i run http://localhost it runs and shows
    IT Works!

    ReplyDelete
  2. http://www.blog.highub.com/linux/install-and-configure-phpmyadmin-on-ubuntu-lamp/comment-page-1/#comment-1369

    ReplyDelete
  3. http://www.blog.highub.com/linux/install-and-configure-phpmyadmin-on-ubuntu-lamp/

    ReplyDelete
  4. Thank you for the directions to install mysql. Have one query. How can you specify the "sudo get-apt install" command to install the software in another media drive? I am booting my laptop using a USB drive (Ubuntu 9.04). Since the space in the USB drive is limited, i want to install the mysql on to the D:\ of the laptop (windows loaded on C:\). Request your help in this.

    Thank you.

    ReplyDelete
  5. use synaptic download manager to download phpmyadmin rather than using shell command like sudo apt-get install phpmyadmin. This command does not install all the packages required for phpmyadmin to run.

    ReplyDelete
  6. @ sandeep
    you can solce this problem using

    sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin

    ReplyDelete