Install GrandCMS on Ubuntu

Install GrandCMS on Ubuntu

We’ll show you, how to install GrandCMS on Ubuntu. GrandCMS is free and open-source standalone software for website owners. Using GrandCMS you can easily create and maintenance your own site. In order to run Grand CMS, you have to install the following requirements on your sever:

  • Web Server (Apache is recommended)
  • PHP version 5.3 or newer
  • Database server (MySQL is recommended)

So, in this tutorial we will show you how to install GrandCMS on an Ubuntu VPS with Apache, MySQL and PHP.

1. Log in to your Ubuntu virtual server via SSH as user root

ssh root@IP_Adress

2. Start a screen session by executing the following command in the terminal:

screen -U -S grandcms

3. Install some packages that are needed for the GrandCMS installation

apt-get install wget unzip

4. Update all packages installed on your Ubuntu server.

apt-get update && apt-get upgrade

5. Install Apache web server

apt-get install apache2

6. Configure Apache web server

Once it is installed, start the web server and enable it to automatically start on server reboot

systemctl start apache2
systemctl enable apache2

7. Install MySQL and create new database

GrandCMS stores its information in a database, so we will install MySQL database server and create a new user and database for GrandCMS

apt-get install mysql-server

8. Configure MySQL

You will be prompted to set a password for the MySQL ‘root’ user. Use a strong password – it’s best to use a combination of letters and numbers and minimum 10 characters long. This MySQL user will have full access to all databases.

After the installation, start the MySQL database server and enable it to start at boot time

systemctl start mysql
systemctl enable mysql

Once the MySQL database server is started, login as user root and create a new MySQL user and database for GrandCMS

mysql -u root -p

CREATE DATABASE grandcms;
CREATE USER 'grandcmsuser'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON `grandcms`.* TO 'grandcmsuser'@'localhost';
FLUSH PRIVILEGES;
exit

9. Install PHP and extensions

GrandCMS is a PHP based application so we need to install PHP and a few PHP extension required by the application.

apt-get install php php-mysql php-mcrypt libapache2-mod-php  php-curl php-gd

10. Download, install and configure GrandCMS

Now, go to GrandCMS’s official website and download the latest stable release of their application. At the moment of writing this tutorial it is version 0.2.0.1.1

wget http://downloads.sourceforge.net/project/grandcms/grandcms_v0.2.0.1.1.zip

Unpack the GrandCMS zip archive

unzip grandcms_v0.2.0.1.1.zip

It contains an ‘upload’ directory and a few files with instructions and license details.

Move the upload directory to the document root directory on your server

mv upload/ /var/www/html

Rename the directory

mv /var/www/html/upload /var/www/html/grandcms

And change the ownership

chown -R www-data:www-data /var/www/html/grandcms

Rename config-dist.php to config.php and admin/config-dist.php to admin/config.php

cd /var/www/html/grandcms
mv config-dist.php config.php
mv admin/config-dist.php admin/config.php

Create a virtual host directive for the domain name.

vi /etc/apache2/sites-available/yourdomain.conf

Add the following content to the virtual host directive

ServerAdmin webmaster@yourdomain.com
DocumentRoot "/var/www/html/grandcms/"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/apache2/yourdomain.com-error_log"
CustomLog "/var/log/apache2/yourdomain.com-access_log" combined

<Directory "/var/www/html/grandcms/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted

Replace ‘yourdomain.com’ with your actual domain.

Enable the configuration

a2ensite yourdomain

11. Restart Apache web server

and restart Apache web server for the changes to take effect

service apache2 reload

Now, open your favorite web browser, visit http://yourdomain.com to start the web installed and follow the instructions to complete the installation.


Of course you don’t have to Install GrandCMS on Ubuntu, if you use one of our GrandCMS VPS Hosting Plans, in which case you can simply ask our expert Linux admins to install GrandCMS on Ubuntu, for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on how to Install GrandCMS on Ubuntu, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Leave a Comment