frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

[For Ubuntu/Debian] How To Install Joomla

LawrenceLawrence Member
edited May 2017 in Web Applications

Introduction


Joomla is a free and open source content management that uses a PHP and a backend database, such as MySQL. It offers a wide variety of features that make it an incredibly flexible content management system right out of the box. It was created in 2005 and is currently the 2nd most popular content management site online.

Requirements

Before working with Joomla, you need to have LAMP installed on your virtual server. If you don't have it you can find the tutorial for setting it up here.

Once you have the user and required software, you can start installing Joomla!

Update Server

First things first. Like always, you should update your server before installing anything on  your server:
apt-get update

1. Download Joomla

To start, create a directory where you will keep your Joomla files temporarily:
mkdir temp
Switch into the directory:
cd temp
Then you can go ahead and download the most recent version of Joomla straight from their website. You can find newest version on:

https://www.joomla.org/download.html

Currently, the latest version is 3.5.1.
wget https://github.com/joomla/joomla-cms/releases/download/3.5.1/Joomla_3.5.1-Stable-Full_Package.zip
This command will download the zipped Joomla package straight to your user's home directory on the virtual server. You can untar it with the following command, moving it straight into the default apache directory, /var/www :
unzip Joomla_3.5.1-Stable-Full_Package.zip  -d /var/www/html
Do not forget to remove downloaded file:
rm Joomla_3.5.1-Stable-Full_Package.zip
We will need to change some folders permissions:
chown -R www-data.www-data /var/www/html
chmod -R 755 /var/www/html
Restart apache:
service apache2 restart

2. Create the Joomla Database and User

Now we need to switch gears for a moment and create a new MySQL directory for Joomla.

Go ahead and log into the MySQL Shell:
mysql -u root -p
Login using your MySQL root password. We then need to create the Joomla database, a user in that database, and give that user a new password. Keep in mind that all MySQL commands must end with semi-colon.

First, let's make the database. Feel free to give it whatever name you choose:
CREATE DATABASE joomla;
Then we need to create the new user. You can replace the database, name, and password, with whatever you prefer:
CREATE USER juser@localhost;
Set the password for your new user:
SET PASSWORD FOR juser@localhost= PASSWORD("password");
Finish up by granting all privileges to the new user. Without this command, the Joomla installer will be able to harness the new MySql user to create the required tables:
GRANT ALL PRIVILEGES ON joomla.* TO juser@localhost IDENTIFIED BY 'password';
Then refresh MySQL:
FLUSH PRIVILEGES;
Exit out of the MySQL shell:
exit
Restart apache:
service apache2 restart

3. Configuring Apache

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘joomla.conf’ on your virtual server:
sudo a2enmod rewrite
touch /etc/apache2/sites-available/joomla.conf
ln -s /etc/apache2/sites-available/joomla.conf /etc/apache2/sites-enabled/joomla.conf
nano /etc/apache2/sites-available/joomla.conf
Note: If nano is not installed on your server you can simple do it with command:
apt-get install nano
Add the following lines:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>
Note: Do not forgot to change server's admin email address, domain and so on.

Restart apache:
service apache2 restart

4. Access the Joomla Installer


Once you have placed the Joomla files in the correct location on your VPS, assigned the proper permissions, and set up the MySQL database and username, you can complete the remaining steps in your browser.

Access the Joomla installer going to your domain name or IP address:

http://IP_of_your_server
Tagged:
Sign In or Register to comment.

Time4VPS

Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!
© 2013 - 2024 Time4VPS. All rights reserved.

Get In Touch