Install and Run Joomla on Ubuntu

This article teaches you how to install and run Joomla on Ubuntu.

1. Open a terminal and run the following command to install PHP and MySQL:

sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server

2. Set a mysql-root password (not the same as a root password, but a password for mysql)

mysql -u root

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
mysql> SET PASSWORD FOR 'root'@'yourhostname' = PASSWORD('yourpassword');

Where you should change ‘yourhostname’ in last line. Each successful mysql command will show:

Query OK, 0 rows affected (0.00 sec)

3. Quit the mysql prompt:

mysql> \q

4. Get the most recent version of Joomla!

SOURCEPKG=Joomla_1.5.7-Stable-Full_Package.zip
SOURCEWWW=http://joomlacode.org/gf/download/frsrelease/8376/30993/Joomla_1.5.7-Stable-Full_Package.zip

5. Download Joomla
mkdir joomla
cd joomla
wget $SOURCEWWW

6. Unpack Joomla!
tar xvjf $SOURCEPKG

7. Cleanup
rm -f $SOURCEPKG

8. Move Joomla!
cd ..
sudo mv joomla /var/www/

9. Set permission to writable, allow writting in whole joomla subtree

sudo chown -R www-data:www-data /var/www/joomla

10. Handle file and directory permissions:

cd /var/www/joomla
sudo find . -type f -exec chmod 644 {} \;
sudo find . -type d -exec chmod 755 {} \;

11. Create a database for Joomla!

mysqladmin -u root -p create joomla

12. creates a mysql user (other than the mysql root user) with some priviledges to use the joomla database

mysql -u root -p
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON joomla.* TO 'yourusername'@'localhost' IDENTIFIED BY 'yourpassword';

13. activate the new permissions

mysql> FLUSH PRIVILEGES;

14. Quit the mysql prompt

mysql> \q

15. Open history file for MySQL commands and delete the above SQL, since the password is in readable format!

gedit ~/.mysql_history

16. Restart Apache2

sudo /etc/init.d/apache2 restart

17. Point your browser to http://localhost/joomla/, and you will be guided through by the Joomla! installer.

Good Luck!

Be Sociable, Share!

About Shi Chuan

I am a web developer.
This entry was posted in Linux and tagged . Bookmark the permalink.

55 Responses to Install and Run Joomla on Ubuntu

  1. I blog often and I truly appreciate your content.
    Your article has truly peaked my interest. I’m going to
    take a note of your blog and keep checking for new details about once per week.
    I opted in for your RSS feed too.

    Feel free to visit my webpage: service de déménagement

  2. I savour, lead to I discovered just what
    I used to be looking for. You have ended my 4
    day lengthy hunt! God Bless you man. Have a nice day.

    Bye

    my webpage :: free online blogs

  3. Right now it looks like BlogEngine is the preferred blogging platform out there
    right now. (from what I’ve read) Is that what you’re using on your
    blog?

    my web-site :: get sponsorship

  4. great put up, very informative. I wonder why the other experts of this sector do not
    notice this. You should proceed your writing. I am sure, you have a huge readers’ base
    already!

    Check out my web site … comptoir en quartz ville de Quebec

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>