PHP is a well known server side scripting language and one of the best languages out there for web development. There are many websites developed using PHP including facebook.
LAMP stack has always been a competitive to Java middleware stack. LAMP is an acronym driven from the collaboration of four open source components. Linux Operating system, Apache WebServer, MySQL RDBMS, PHP. LAMP is most preferred stack in the dynamic web site development and web applications.
Objective of this post is to cover the basic installation and configuration steps of PHP and Joomla on Linux Mint/ Ubuntu Operating System. Joomla is a content management system and an open source platform on which WebSites and web applications can be created.(like WordPress) Joomla connects you to Mysql or Postegre SQL in order to make proper content management.
This is our LAMP stack product information
L => Linux MintA => Apache 2.4M => MySQL 5.6.30P => PHP 7.0.10
Start with the updating the apt-get repository
Install the PHP latest version using "apt-get" command.
once the packages installed, we will be able to verify it by typing the command "php -v" it should return the version of php
We should also make sure that we have the "lib module so " files generated for apache2
Go to the apache2 modules directory and make sure that we have libphp7.0.so file
Now this is the time for doing apache configuration changes.
goto the apache configuration root directory /etc/apache2/sites-enabled
Edit your httpd.conf (or) virtualhost configuration file. Here I am using the default virtualhost configuration file named "000-default.conf"
With in the <VirtualHost></VirtualHost> tags. Append the below lines and save.
In the same virtual host file, find the DocumentRoot directive element. It will be something like this
In the Document Root directory, create a new PHP file named info.php and copy these two lines
Now you can restart your apache2 web server using your normal procedure. I am using service restart method
Well!. Now we have a php enabled apache web server and here's how we should test it.
Access your default website/virtual host with the uri "/info.php" . It should serve the PHP page which we have just created.
Download joomla from https://www.joomla.org/download.html
Extract the downloaded zip file into any directory which is going to act as your joomla home. In my case its /opt/joomla
As we have extracted the joomla, we will now be having the below list files
We have to change the ownership of /opt/joomla to apache_run_user to make sure Joomla is able to read/write. In my case the user name is www-data
Now It's a time to go back to the apache configuration directory (/etc/apache2/sites-enabled) and to make some configuration changes which is essential for Joomla.
Edit the same virtual host file (000-default.conf) and append this single line
Restart your web server and access the site using the URI "/service" in my case it is http://mwi-virtual-machine/service
If we have done everything perfect, we should be able to see the Joomla installer page.
Before we move forward and configure Joomla.
There are two must do things we should accomplish
Task1) We must have created a database in mysql db . I named it as joomladb. ( This post does not cover the mysql installation in detail as we primarily cover joomla)
Task2:) We can have FTP server installed(optional), I have usedvsftpd daemon.
Here I have given the quick installation steps of vsftpd.
Make sure the server listens on port 21
By default, All server accounts would be able to use the ftp with their account credentials
Now, We should enter the details such as SiteName and User account details , DB details, FTP Details.
I am naming my site as AKSarav's Blog
Once you have done entering all these details on the welcome page, click Next Button to configure the Database Details.
we have to enter the DB name we have just created.
As we complete entering the Database details we can proceed to FTP layer details and then to Summary/Overview page.
Configuring FTP is completely optional
If we have proper configuration and permission, we will be able to remove the installation folder by clicking the Remove Installation Folder button. Or you can remove the directory located at /opt/joomla/installation manually.
Once we have removed the installation directory, we can access the site at http://<sitename>/service . In my case its http://mwi-virtual-machine/service
Joomla Administration page has lot of widgets and plugins to make your website development a piece of
We can access the admin page at http://sitename/service/administration. In my case its http://mwi-virtual-machine/service/administrator/
This page is protected with Form based authentication and we should use the credentials, we have mentioned in the installation home page to login.
As we log in, we can use the Control panel to manage our site. (Design/Development/Add/Remove post and much more.)
Hope it helps.
If you like this, please share with your friends
Feed back/Queries ? Please comment.