Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Install Joomla 3.1.1 on Ubuntu Linux?

In this article, we provide a step-by-step guide for installing and running 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_3.1.1-Stable-Full_Package.zip
SOURCEWWW=http://joomlacode.org/gf/download/frsrelease/18323/80368/Joomla_3.1.1-StableFull_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

You might also like