How to Install Apache2, Php5, MySQL and Phpmyadmin | Ubuntu 9.10 Karmic
Joe Engressia, Saturday, November 7, 2009When 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.
- 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 typeapache2
.
Selectapache2
>> 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.
- Go to System >> Administration >> Synaptic Package Manager, press
- Install Php5.
- Use Synaptic Package Manager
We will do the same way like install apache2. PressCtrl + F
on Synaptic Package Manager then typephp5
. Selectphp5
>>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
pressCtrl+F
then typememory_limit
on gedit
- Use Synaptic Package Manager
- 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
- Search phpmyadmin on Synaptic Package Manager then select phpmyadmin.
- We will use terminal to install MySQL, please close your Synaptic Package Manager.
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.
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
References : Help Ubuntu
Subscribe to:
Post Comments (Atom)
a little bit easier to install everything in one commmand...
sudo apt-get install lamp-server^
@Rueben
hahahhaa, yap LOL.
thanks for suggestion.
am here too jo!
yap dhemz. I will visit yours soon.
Please wait in a second.
u will find a true in this dir on this file.
/etc/apache2/sites-enabled sites-enabled
@Димитър
Ya, /etc/apache2/sites-enabled is a directory where is your web that is active placed.
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.
@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.
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...
@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.
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.
ok, thanks for your recommendation.
I want to know, what are the benefits of Tomcat6??
would u like to share to me?
thank, perfect all, maybe user for phpmyadmin no log
Hi, I installed Ubuntu 9.10 phpmyadmin is active in Synaptic.
http://localhost/phpmyadmin dont work. What can I do?
@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
it's so easy to get a package of web server. Thx boy, nice info for me, absolutely help,
okay,
don't mention it. happy linux LOL
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
@my good friend
wow, it's nice. I think, have to try your way. thanks lol.
This is excellent uncomplicated like ubuntu thanks so much
Optional step
sudo apt-get install phpmyadmin
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin
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..
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?
nice info ..this is my first time i visit your site..hope i can learn much on your site
regards
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
Nice tutorial. I check all and I've found a bad installation of mysql