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.

41 Responses to Install and Run Joomla on Ubuntu

  1. nepomucenobr says:

    it works like a charm! thanks for the tutorial!

  2. Usuário do windows says:

    Não consegui, impressionante como é difícil fazer alguma coisa funcionar no Ubuntu. A sensação que se tem é que se puder complicar pra que facilitar? Enquanto as coisas forem anti-usuários do windows, o Linux nunca vai se popularizar massivamente. O que eu lamento! Então a única opção que resta é voltar pro espetacular visual studio e IIS da egoísta MS.

  3. Denial says:

    O meu continua não funcionando. Dá sempre sem suporte mysql na configuração do joomla. não sei o que acontece. Isso é um saco, caras. A gente fica frustrado quando as coisas não dão certo e nem encontramos soluções pois, a grande massa dos usuários linux não trabalham com erros. simplesmente colocam as partes onde tudo saiu bem, mas no caso de erros e tal, não deixam nem uma dica mais especifica. Isso acaba com qualquer possibilidade de migração de usuários não tão bons.

  4. Jerry says:

    After following your instruction I put http://localhost/joomla/ in the FireFox address line to install Joomla and got these errors:

    Warning: require_once(/var/www/joomla/includes/defines.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/joomla/index.php on line 21

    Fatal error: require_once() [function.require]: Failed opening required ‘/var/www/joomla/includes/defines.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/www/joomla/index.php on line 21

    What did I do wrong? How do I correct it?

  5. Beginner says:

    Valeu! Funcionou como num script!!!

  6. khanoe says:

    thanks for that tutorial….. it really2 WORK…!! alhamdulilah

  7. The instructions were concise, easy to follow and made installing joomla easy. A job well done!

  8. Evan says:

    thanks a mill mate the stuff runs perfectly , fyi to anyone who gets caught on the this , you have to make sure you know where your root folder is

  9. Jake says:

    ok, I did everything and it worked but what now?

    I don’t see how to make web pages or anything i just see a joomla website… on my localhost folder…

    is there anything else I should do to create my very own website?

  10. Jaime Rendon says:

    Thanks. Works great.

  11. When trying to unpack SOURCEPKG I got an error:

    bzip2: (stdin) is not a bzip2 file.
    tar: Child returned status 2
    tar: Error exit delayed from previous errors

    I think we should download tar.bz2 packages (not zip ones):
    SOURCEPKG=Joomla_1.5.14-Stable-Full_Package.tar.bz2

    SOURCEWWW=http://joomlacode.org/gf/download/frsrelease/10785/42653/Joomla_1.5.14-Stable-Full_Package.tar.bz2

  12. stevie says:

    Jake :
    ok, I did everything and it worked but what now?
    I don’t see how to make web pages or anything i just see a joomla website… on my localhost folder…
    is there anything else I should do to create my very own website?

    I have the same problem

  13. Lauren says:

    You saved me hours! Many thanks. Apart from my own bonehead mistakes it worked perfectly.

  14. remoter says:

    thanks it realy work!

  15. Thanks for nice article i was doing everything till now on windows now moving on to ubuntu

  16. nhacker42 says:

    Hi! Nice Tutorial it works just fine for me….I skipped the #4 step and just downloaded the joomla package…it worked perfectly….thank u!!!……can u pls post a tutorial on how to get xampp(lampp) on ubuntu 10.04 coz i just cant get it to work thanks in advance….

  17. ocd4technology says:

    Thank you very much for this instruction.

    I couldn’t help but think that maybe I’m getting a little bit beyond my means when it comes to developing software etc. It seems that it’s always a struggle.

    …then, when I read a ‘how-to’ like this one, I wonder just how any of us can keep up with it all.

    I suppose that’s where sharing comes in :D

    Once again – thanks heaps.

  18. solarishd says:

    Thanks man!!! Works great!

  19. UbuntuNoob says:

    I was following the tutorial when suddenly i got stumped at this part.

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

    This is what i input:
    SET PASSWORD FOR ‘root’@'ubuntunoob.dyndns.org’ = PASSWORD(‘ubuntunoob’);

    This is the error i get:
    ERROR 1133 (42000): Can’t find any matching row in the user table

    Please help! Thank you so much!

  20. julio says:

    Excellent!!!

  21. sankarga says:

    I followed the instructions to a “T” and when I go to “http://localhost/joomla” i receive the following error:
    jtablesession::Store Failed
    DB function failed with error number 1146
    Table ‘joomla.jos_session’ doesn’t exist SQL=INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( ‘bvk2956bdkols41ubvf00nf4q2′,’1289350990′,”,’0′,’1′,’0′ )

    Any assistance you can provide will be greatly appreciated!

    Thanks,

    Greg

  22. NHNA says:

    hello….
    I tried to install joomla … until the 14 step all right there… I couldn’t understand what i had to delete in the 15step …. what says to me on my text is:
    “_HiStOrY_V2_
    GRANT40SELECT,40INSERT,40UPDATE,40DELETE,40CREATE,40DROP,40INDEX,40ALTER,40CREATE40TEMPORARY40TABLES,40LOCK40TABLES40ON40joomla.*40TO40′yourusername’@'localhost’40IDENTIFIED40BY40ermhs;
    GRANT40SELECT,40INSERT,40UPDATE,40DELETE,40CREATE,40DROP,40INDEX,40ALTER,40CREATE40TEMPORARY40TABLES,40LOCK40TABLES40ON40joomla.*40TO40root@nina40IDENTIFIED40BY40ermhs;
    GRANT40SELECT,40INSERT,40UPDATE,40DELETE,40CREATE,40DROP,40INDEX,40ALTER,40CREATE40TEMPORARY40TABLES,40LOCK40TABLES40ON40joomla.*40TO40′root’@'nina’40IDENTIFIED40BY40′ermhs’;
    FLUSH40PRIVILEGES;
    \134q”
    when i ignored It it show me the following error in the page:
    “Unable to connect to the database:Could not connect to MySQL”
    Please help me…Thank…

  23. Edward Tagg says:

    after step 2 – what does this mean…

    ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

    Bless – Edward James Tagg – I’ve tried installing joomla about 6 times and it’s a total nightmare – it never does what is should – see above and only at stage 2

  24. naim says:

    My site does`t show up ice menu & ice accordion on Ubuntu 10.10???

  25. Pingback: Assignment 1 – Joomla Install « diarmuidmccarthy

  26. Pingback: Refrences « emmabarryitm2

  27. Hamid Rahman Mohmand says:

    That was a wonderful tutorial… simple and yet efficient… GOOD JOB …

  28. Paul says:

    Thanx, am done with half the process… will be back in case of any issues.

  29. Ton says:

    thx a lot for nice tutorial :)

  30. Dazza says:

    Thanks so much for easy tute. Onwards to learning Joomla! =)

  31. Thanks for some other fantastic article. The place else may anyone get that kind of info in such a perfect manner of writing? I have a presentation subsequent week, and I am at the look for such information.

  32. Qelesh says:

    Thanks for the tutorial it works, but I have an problem, it says remove installation folder:PLEASE REMEMBER TO COMPLETELY
    REMOVE THE INSTALLATION DIRECTORY.
    You will not be able to proceed beyond this point until the installation directory has been removed. This is a security feature of Joomla!.
    But I can not delete that folder on:var/www/joomla/installation
    any suggestion please?

    thanks again

  33. Polly says:

    Hi, i believe that i saw you visited my weblog so i came to go back the want?.I am attempting to in finding issues to enhance my web site!I suppose its good enough to make use of a few of your concepts!!

  34. Its like you learn my mind! You seem to grasp a lot about this, such as you wrote the book in it or something. I think that you can do with some p.c. to drive the message house a bit, but instead of that, that is great blog. An excellent read. I’ll certainly be back.

  35. dakotadubai says:

    Hi mate or hi to all I.T. expert,

    I believed that you are a master in Joomla installation. I am a beginner user for ubuntu 10.10 and want to install joomla . I’ve follow all your post, but I have a problem I cannot continue the installation I’ve got this error (Cannot write to `Joomla_1.5.7-Stable-Full_Package.zip’ (Permission denied). I know this easy for you guys, if there is someone can fix this error. that would be grateful.

    cheers guys!

  36. Mohamed Jafer Ali says:

    I have installed the Joomla in my computer now i need to uninstall it from my computer any suggestions to uninstall from my ubuntu 10.04

  37. Pingback: How to install Joomla on Ubuntu

  38. Pingback: Perl script installation service

  39. Sanchez says:

    Thanks a lot!!!!!!

  40. Kees Hoogenboezem says:

    Simple and clear, worked perfect!
    Thanx

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>