Advance Search

Custom Search

How to Install Apache2, Php5, MySQL and Phpmyadmin | Ubuntu 9.10 Karmic

My special thanks to Blogger and Visitors. If You like this, please help us to share:
Digg Technorati del.icio.us Stumbleupon
Bookmark and Share

When I have installed Ubuntu Karmic on my laptop, I lost Lampp the application of web server and has included Apache2, Php5, MySQL and Phpmyadmin on Lampp. I need the application to finish my work making a web site. So, I decide to install another application except Lampp. I install Apache2, Php5, MySQL and Phpmyadmin on Ubuntu 9.10 Karmic. This article will explain how to install Apache2, Php5, MySQL and Phpmyadmin on Ubuntu Karmic. Let's do it on Ubuntu Karmic.


    Make sure your pc has connected on local or internet repository. We will need the ubuntu repository to install apache2, php5 and mysql on Ubuntu 9.10 Karmic.
  1. Install apache2.
    We will use the synaptic manager to install apache, cos Synaptic can help us to install apache2.
    • Go to System >> Administration >> Synaptic Package Manager, press Ctrl + F then type apache2.
      Select apache2 >> run.

    • Edit fqdn file to access your site. We usually use localhost to be connected on our site.

      $ sudo pico /etc/apache2/conf.d/fqdn

      Copy bellow code then paste into fqdn

      ServerName localhost


    • Check connection, Open your browser and go to http://localhost, If your browser displays as below, You has been successfully to installed apache2.

      itworksapache2.png

  2. Install Php5.

    • Use Synaptic Package Manager
      We will do the same way like install apache2. Press Ctrl + F on Synaptic Package Manager then type php5. Select php5 >> run.

    • Activation of php5 via terminal

      $ sudo a2enmod php5

    • Increase limit_memory
      Edit the /etc/php5/apache2/php.ini file and increase the memory_limit value. The default is 16M, I was changing 256M on memory_limit.

      $ sudo gedit /etc/php5/apache2/php.ini

      press Ctrl+F then type memory_limit on gedit

  3. Install MySQL on Ubuntu 9.10 Karmic

    • We will use terminal to install MySQL, please close your Synaptic Package Manager.

      $ sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

      Follow the instruction of MySQL until finish.

    • Install phpmyadmin through Synaptic Package Manger , so We can use MySQL via browser.

      • Search phpmyadmin on Synaptic Package Manager then select phpmyadmin.
        Configuration apache2.conf to use phpmyadmin via browser.

        $ sudo gedit /etc/apache2/apache2.conf

      • Insert bellow code into apache2.conf at bottom page.
        Include /etc/phpmyadmin/apache.conf

Ok LOL, We have apache2, php5, mysql and phpmyadmin on Ubuntu Karmic. Please put your website on /var/www. E.q. my website is momohum that is putted on /var/www/. When I want to visit my website, I will type http://localhost/momohum on web browser.

I have tried to change Document Root, but I failed, so I decide to use the default of Apache2. My website will be save on /var/www the Document Root of Website. If you succeed to change your own Document Root, please help me. LOL.

References : Help Ubuntu

Comments :

12 comments to “How to Install Apache2, Php5, MySQL and Phpmyadmin | Ubuntu 9.10 Karmic”
Rueben said...
on 

a little bit easier to install everything in one commmand...

sudo apt-get install lamp-server^

Joe Engressia said...
on 

@Rueben
hahahhaa, yap LOL.
thanks for suggestion.

dhemz said...
on 

am here too jo!

Jojo said...
on 

yap dhemz. I will visit yours soon.
Please wait in a second.

Димитър said...
on 

u will find a true in this dir on this file.

/etc/apache2/sites-enabled sites-enabled

Joe Engressia said...
on 

@Димитър
Ya, /etc/apache2/sites-enabled is a directory where is your web that is active placed.

Luca said...
on 

Hi I have a question...
On 9.04 Server I had to download and install apache from the official web site as the version provided in ubuntu repo was not suitable for my .war application (I found some posts saying that the ubuntu version of apache has some bug or missing libs). I'm wondering whether the version for Karmic has fixed those problems.

Joe Engressia said...
on 

@Luca
yap, I ever heard on another site that said Apache2 has a bug.
So, I can't change document root directory on apache2.
I have tried many ways from another web sites to change document root, I also failed.

so, I decide to use default of apache2.

Luca said...
on 

Sorry, I put the wrong question... the problem was related to Tomcat6. See here

http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/

For sure it applies to 9.04 server as I had to follow the tutorial above to make it work...

Joe Engressia said...
on 

@Luca
hohoho, sory LOL.
I haven't used Tomcat yet.
so, I can't give solutions about tomcat.
probably you can find out articles about tomcat on ubuntugeek.com.

Luca said...
on 

Well I tried with tomcat6 package from ubuntu and my mysql based jsp app does not work (neither starts-up).
I removed tomcat6 package and installed tomcat form the tomcat web site by following the tutorial mentioned in my post above, and my app works flawless. So I would recommend people who want to use tomcat and mysql not to use ubutu's tomcat6 package.

Joe Engressia said...
on 

ok, thanks for your recommendation.
I want to know, what are the benefits of Tomcat6??
would u like to share to me?

Post a Comment

 

Translator

Tolearnfree Tags

Please Buzz Me

Follow

The Directories of Tolearnfree