momohumtolearnfree home Grab your ads here. Only $4.99 for one month

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 :

26 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.

Unknown 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.

Unknown 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.

Unknown 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.

Unknown 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?

negus said...
on 

thank, perfect all, maybe user for phpmyadmin no log

Develop Site said...
on 

Hi, I installed Ubuntu 9.10 phpmyadmin is active in Synaptic.
http://localhost/phpmyadmin dont work. What can I do?

Joe Engressia said...
on 

@Ernesto
make sure you have done this way:

# 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

Anonymous said...
on 

it's so easy to get a package of web server. Thx boy, nice info for me, absolutely help,

Joe Engressia said...
on 

okay,
don't mention it. happy linux LOL

Anonymous said...
on 

I don't remember excatly how , but do you need to edit the definitinos file inside your www folder to point to another folder you can acess , read , write, freely in my case i set up it to :
me-the-user/mydocumets/my_pub_folder_html

Its easy just a little google and you find the how to :)
good luck

Joe Engressia said...
on 

@my good friend
wow, it's nice. I think, have to try your way. thanks lol.

Anonymous said...
on 

This is excellent uncomplicated like ubuntu thanks so much

Unknown said...
on 

Optional step

sudo apt-get install phpmyadmin
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin

Anonymous said...
on 

phpmyadmin doesn't work for me.

I did the as it said:
sudo gedit /etc/apache2/apache2.conf

# Insert bellow code into apache2.conf at bottom page.

Include /etc/phpmyadmin/apache.conf

but it didn't work for me. Please help..

Anonymous said...
on 

To whom ever will provide answers

I tried everything on this page and all seems to work. However, I cannot do the last thing. How do you put your web site, or for that matter, any web site on /var/www?

redhy said...
on 

nice info ..this is my first time i visit your site..hope i can learn much on your site
regards

Yux said...
on 

Probably the easiest guide to follow on setting up and using a lamp server I've found

www.howtoforge.com/ubuntu_lamp_for_newbies

No suitable for production but works fine for a development server

Androide said...
on 

Nice tutorial. I check all and I've found a bad installation of mysql

Post a Comment

 

Tolearnfree Tags

Translator

Follow

The Directories of Tolearnfree