Hello, friends. WordPress dominates the CMS market worldwide but that does not imply that there are no other very interesting alternatives to consider. In this post, you will learn how to install GrandCMS on Ubuntu 20.04 quickly.
What is GrandCMS?
GrandCMS is an open source CMS that is based on the OpenCart core. The developer says that he has removed all the commercial stuff and focused on providing an attractive, robust and competent CMS.
In addition to this, GrandCMS stands out for being very fast and easy to use so in a matter of minutes we can have a new website up and running.
So it is a good idea to try it out and keep it in mind for personal and private projects.
Let’s get started.
Install necessary packages
Before we start, we have to install some necessary packages on the server. First update it.
sudo apt update sudo apt upgrade
And then install these packages.
sudo apt install wget unzip curl software-properties-common
After this, we have to install LAMP since GrandCMS recommends to use Apache as web server.
The idea of this post is not to explain all the details of a web server so let’s go a little bit faster. To install LAMP just run.
sudo apt install apache2 mariadb-server php libapache2-mod-php php-json php-common php-common php-gmp php-curl php-mysql php-mysqli php-opcache php-intl php-fpm php-xmlrpc php-bcmath php-zip php-imagick php-mbstring php-gd php-cli php-xml php-zip
There you will install Apache, MariaDB as well as PHP and its modules.
But there is a module missing that is not in the official repositories. So we have to add an extra repository.
sudo add-apt-repository ppa:ondrej/php
Now install the necessary package
sudo apt install php7.4-mcrypt
With this we have the dependencies covered.
Creating a new database and user for GrandCMS
As in most CMSs, we need a database driver and therefore a new database and user.
Enter the MariaDB shell:
sudo mysql -u root -p
Then, create the necessary database:
CREATE DATABASE grandcmsbd;
Then the user with the password. You can replace the values with whatever you want. Especially the password.
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
Now assign to this new user permissions on the database we have created:
GRANT ALL ON grandcmsbd.* TO 'user'@'localhost' WITH GRANT OPTION;
Apply the changes and exit the console.
FLUSH PRIVILEGES; exit;
Install GrandCMS on Ubuntu 20.04
Now with the help of the
wget command we can start the GrandCMS download.
Create a folder containing the application files.
sudo mkdir /var/www/html/grandcms
Unzip the file
sudo unzip grandcms_v0.2.0.1.1.zip
And move the whole folder to the Apache Document Root.
sudo mv upload/* /var/www/html/grandcms
After this, we have to enable the new CMS settings. To do this, just run:
sudo mv /var/www/html/grandcms/config-dist.php /var/www/html/grandcms/config.php sudo mv /var/www/html/grandcms/admin/config-dist.php /var/www/html/grandcms/admin/config.php
For the complete execution to be correct, change the permissions on the folder.
sudo chmod -R 755 /var/www/html/grandcms
Then, make Apache the owner of the folder.
sudo chown -R www-data:www-data /var/www/html/grandcms
Then create a new VirtualHost for GrandCMS.
sudo nano /etc/apache2/sites-available/grandcms.conf
And add the following
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/grandcms/ ServerName cms.unixcop.test <Directory /var/www/html/grandcms/> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/example.com-error_log CustomLog /var/log/apache2/example.com-access_log common </VirtualHost>
Remember that you have to change
ServerName to the domain name.
Save the changes and close the editor.
Then, enable the new site.
sudo a2ensite grandcms.conf
And the rewrite module
sudo a2enmod rewrite
Finally, apply the changes by restarting Apache.
sudo systemctl restart apache2
Completing the installation
Open your web browser and visit your domain to complete the installation.
You will see the license terms.
Then, the server requirements and if you meet them. In this case we have no problems.
Then you will have to configure the database with the parameters we have created above. Below you will have to create the CMS admin user.
Then, you will see this screen indicating that everything has been successful. From there you can visit the site or the dashboard.
If you choose the dashboard, you will first have to log in as the admin user and then you will see it.
You are done. Congratulations.
In this post, you learned and got to know about GrandCMS. Besides this you know how to install it properly on an Ubuntu 20.04 server.