Installing Joomla 1.7 on Ubuntu 10.04 server

Posted on Monday, January 16, 2012



These are my quick notes on installing Joomla on an Ubuntu 10.04 Server.  This assumes you already have the Ubuntu server up and running and know how to use a command line.


Install/Setup MySQL


Install mysql on this server


       > sudo apt-get install mysql-server



For the root password set it to “mysqlpassword”



Log into mysql


       >  mysql -u root -p -h localhost



Set up Joomla MySQL user


       >  CREATE USER 'joomla'@'localhost' IDENTIFIED BY 'joomladbpassword';
       >  CREATE USER 'joomla'@'%' IDENTIFIED BY 'joomladbpassword';
       >  grant all on joomla.* to 'joomla'@'%' identified by 'joomladbpassword' with grant option;
       >  grant all on example.* to 'joomla'@'%' identified by 'joomladbpassword' with grant option;
       >  exit




Remove localhost restriction edit /etc/mysql/my.cnf


       >  sudo pico /etc/mysql/my.cnf


Comment out
bind-address            = 127.0.0.1

Change it to
#bind-address            = 127.0.0.1

Restart mysql


       >  sudo /etc/init.d/mysql restart

Test the connection from another server


       >  mysql -u joomla -p -h localhost



Install Apache 2/PHP


Install tools needed by joomla
(some notes for this were taken from https://help.ubuntu.com/community/Joomla )


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

       >  sudo apt-get install imagemagick
       >  sudo apt-get install php5-imagick
       >  sudo a2enmod rewrite


This is all that needs to be installed for joomla to work.   Joomla will have to be installed per web site.

And check out web page

She works!


Now set up the same thing for a temp websites
www.example.com

Make a joomla folder


       >  sudo mkdir /joomla


Make new directory


       >  sudo mkdir -p /joomla/var/www/example
       >  sudo mkdir –p /joomla/var/log




Set up virtual hosts edit  /etc/apache2/sites-available/default


       >  sudo pico /etc/apache2/sites-available/default



Change it to the following


<VirtualHost *:80>
    DocumentRoot /var/www
</VirtualHost>
<VirtualHost *:80>
    ServerName www.example.com
    DocumentRoot /joomla/var/www/example
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    CustomLog /joomla/var/log/apache_log combined
    LogLevel warn
    ErrorLog /joomla/var/log/apache_error_log
</VirtualHost>



Restart apache


       >  sudo /etc/init.d/apache2 restart





Now you should be able to open up

http://www.example.com/   (whatever your web site is really named … this assumes you have the DNS settings done correctly)


Then I made a simple web page


       >  sudo pico /joomla/var/www/example/index.html


Here is what I made the simple web site


<html>
<body>
Example!
</body>
</html>








Download joomla 1.7 and unpack it (for each website, just one in this case)


       >    cd /joomla/var/www/example/
       >  sudo wget http://joomlacode.org/gf/download/frsrelease/16024/69673/Joomla_1.7.3-Stable-Full_Package.tar.gz
       >    sudo tar -xvf Joomla_1.7.3-Stable-Full_Package.tar.gz
       >    sudo rm index.html


Update permissions of files


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



Restart apache


       >  sudo /etc/init.d/apache2 restart


Now you should be able to open up

http://www.example.com/   (whatever your web site is really named … this assumes you have the DNS settings done correctly)



Open up the web browser and go to


The following is a rough example of what was done.



Select English and click Next







Next screen lists pre-install checks… Everything looks fine





Click next

License




Click Next




Configure the database


Database Type:    MySQL
Host name:           localhost
Username:            joomla
databaseName:    example
Password:             joomladbpassword
Table prefix:         jos_


Click Next





FTP  select no click next







 Configure the settings


Site Name:     Test
Admin e-mail :  yourname@example.com
Admin username:   admin
Admin password:  joomlapassword


Do not Click Install sample data then click next.




Finish! 

Remove the installation directory ( I moved it for now)



Click Site.



Go to



And log in

Now you can administer this site.

- Patrick Bailey

References
 [1]  Ubuntu Joomla Documentation 
       Visited 01/2012



No comments:

Post a Comment