Installing Joomla On A Lamp Server

Installing Joomla On A Lamp Server

So you want a web site. You want it to be easy to use. You want to be able to update, edit, and manage content on the fly. You'd prefer not to pay an arm and a leg, but you also want to have a number of features in the system like commenting, maybe even a forum.

Your list could go on indefinitely, but let me stop you right here. There is an Open Source Content Management System [CMS] known as Joomla! which can help you. Actually there are any number of systems, free or otherwise, you could use.

I may cover some of those other options later. For now let's simply assume you'd like a system which could be running in a matter of minutes, has a massive base of add-ons, and a thriving community behind its development and security, the Joomla! Is one of the most thought-free systems around.

We will assume for the sake of this article that you have SSH access to your server, and that you have both a mySQL database and a phpMyAdmin interface. (if you don't, I'll be writing walkthroughs shortly.)

Our first step is to create a folder on our web server to hold the install, and eventfully serve our pages. We do this like so:

1. Log in to the server via SSH.

2. Switch to the the top level where you'd like the install to go: cd/var/www/

3. Now we need to make the folders for the site. First the main, then the three sub-folders required for our web server to funtion properly.

  • mkdir demo.testlive.us
  • mkdir demo.testlive.us/cgi-bin
  • mkdir demo.testlive.us/html
  • mkdir demo.testlive.us/logs

4. Now that the folders are created lets add the site to our Domain Name Server.

Open the file containing the configuration for the testlive.us site.

  • nano /var/cache/bind/testlive.us.zone
  • Add the proper line to the file; in our case it will be:
  • demo IN CNAME mail
  • Restart the name server.

Finally, ping the new sub-domain to ensure everything works as it should; if you use an external name server such as GoDaddy, you'll need to put the name there as well if the outside world is to view the server.

With our folders created, and the internal Name Server resolving we need to create the configuration for Apache to serve the site. Because there are many ways to do this I'll let you find the best means. For myself it woud like so:

  • nano /etc/apache2/sites-available/demo.testlive.us
  • virtual host for demo.testlive.us
  • DocumentRoot /var/www/demo.testlive.us/html/
  • ScriptAlias /cgi-bin/ "/var/www/demo.testlive.us/cgi-bin/"
  • ServerAdmin webmaster@wwc-llc.com
  • ServerName demo.testlive.us
  • CustomLog /var/www/demo.testlive.us/logs/access.log combined
  • ErrorLog /var/www/demo.testlive.us/logs/error.log

5. Now we need to link it in the enabled sites folder: ln -s /etc/apache2/sites-available/demo.testlive.us.conf demo.testlive.us

6. Let's restart the server and see if things are good

Assuming everything went well, let's get the latest stable version of Joomla! And download it to the html folder we just tested: http://www.joomla.org/download.html

1. Now we extract the files. As with apache there are many ways to do this and I'll let you choose the one best for you.

2. Once extracted we need to set the permissions on the folders.

3. First we give the web server ownership of the HTML folder and everything in it:

  • cd /var/www/demo.testlive.us/
  • chown www-data:www-data -R html
  • Change to the html folder:
  • cd html

4. Now set the permission on the files and folders: find

  • find . -type f -exec chmod 644 {};
  • find . -type d -exec chmod 755 {};

5. Almost done! Lets make the database the site will use.

  • Log in to your phpMyAdmin
  • Create a blank database
  • Create a user and a secure password

6. Give your new user all privileges on the database you just created; only that user, and only that database. This will help to isolate access controlling security. Especially if you run multiple e databases on the server.

7. Now, our name server, web server, and database server are good to go. Let's install the thing. In your browser open the URL for the site you configured in "d".

8. Choose your site's primary language and click Next.

9. Assuming the Pre-installation Check passes click Next.

If it does not you'll need to address the pieces marked with a red no.

Review the license.

10. On the database configuration tab fill in the data you created "h".

11. There is no need to deal with the advanced configurations here, or the ftp data you see on the next screen because we are using SSH.

12. Fill in the site name, your email address, and the password you want to use for the site.

13. You can have the system put in sample data if you want, but I prefer to keep the DB clean and not do this. Your call.

14. In your SSH shell use this command:

  • rm -R installation/

15. Final step is to chmod 444 configuration.php

You now have a functioning Joomla! Site you can use for all sorts of things. Next time I'll tell you how to put data in it.

Please like, share & comment!

0 0

Post Your Comment

8 + 6 =

Comments

Get In Touch