How to install GrandCMS in Ubuntu

To install GrandCMS in Ubuntu

GrandCMS is an open source content management system for Linux distributions. It enable the users to create own websites with the graphical user interface. GrandCMS is specially designed for the OpenCart owners. Installation of GrandCMS in Ubuntu is explained.

Installation of GrandCMS

First setup the LAMP environment on your server with the below given command.

root@linuxhelp:~# apt-get install lamp-server^
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting ' libhttp-message-perl'  for task ' lamp-server' 
Note, selecting ' libencode-locale-perl'  for task ' lamp-server' 
Note, selecting ' php7.0-cli'  for task ' lamp-server' 
Note, selecting ' mysql-client-5.7'  for task ' lamp-server' 
Note, selecting ' libapache2-mod-php'  for task ' lamp-server' 
.
.
.
Creating config file /etc/php/7.0/mods-available/pdo_mysql.ini with new version
Setting up php-mysql (1:7.0+35ubuntu6) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for libapache2-mod-php7.0 (7.0.8-0ubuntu0.16.04.2) ...


Then start and enable the apache, mysql services.

root@linuxhelp:~# systemctl start apache2
root@linuxhelp:~# systemctl enable apache2
apache2.service is not a native service, redirecting to systemd-sysv-install
Executing /lib/systemd/systemd-sysv-install enable apache2
root@linuxhelp:~# systemctl start mysql
root@linuxhelp:~# systemctl enable mysql
Synchronizing state of mysql.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable mysql


Now you need to create Database and User for GrandCMS.

root@linuxhelp:~# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with   or g.
Your MySQL connection id is 4
Server version: 5.7.13-0ubuntu0.16.04.2 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ' help '  or ' h'  for help. Type ' c'  to clear the current input statement.

mysql>  CREATE DATABASE grandcmsdb 
Query OK, 1 row affected (0.01 sec)

mysql>  CREATE USER ' grandcmsuser' @' localhost'  IDENTIFIED BY ' 123'  
Query OK, 0 rows affected (0.00 sec)

mysql>  GRANT ALL PRIVILEGES ON `grandcmsdb`.* TO ' grandcmsuser' @' localhost'  
Query OK, 0 rows affected (0.01 sec)

mysql>  FLUSH PRIVILEGES 
Query OK, 0 rows affected (0.00 sec)

mysql>  exit
Bye


Install the php extensions, which is required for GrandCMS installation.

root@linuxhelp:~# apt-get install php php-mysql php-mcrypt libapache2-mod-php  php-curl php-gd -y 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libapache2-mod-php is already the newest version (1:7.0+35ubuntu6).
php-mysql is already the newest version (1:7.0+35ubuntu6).

The following additional packages will be installed:
  libmcrypt4 php7.0 php7.0-curl php7.0-gd php7.0-mcrypt
Suggested packages:
  libmcrypt-dev mcrypt
The following NEW packages will be installed:
  libmcrypt4 php php-curl php-gd php-mcrypt php7.0 php7.0-curl php7.0-gd php7.0-mcrypt
0 upgraded, 9 newly installed, 0 to remove and 384 not upgraded.
Need to get 142 kB of archives.
After this operation, 600 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 libmcrypt4 amd64 2.5.8-3.3 [63.0 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 php7.0 all 7.0.8-0ubuntu0.16.04.2 [1,286 B]
.
.
.
Creating config file /etc/php/7.0/mods-available/mcrypt.ini with new version
Setting up php-mcrypt (1:7.0+35ubuntu6) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for libapache2-mod-php7.0 (7.0.8-0ubuntu0.16.04.2) ...


Use the " wget" command to download the grandcms zip package.

root@linuxhelp:~# wget http://downloads.sourceforge.net/project/grandcms/grandcms_v0.2.0.1.1.zip
--2016-09-09 09:12:29--  http://downloads.sourceforge.net/project/grandcms/grandcms_v0.2.0.1.1.zip
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://liquidtelecom.dl.sourceforge.net/project/grandcms/grandcms_v0.2.0.1.1.zip [following]
--2016-09-09 09:12:29--  http://liquidtelecom.dl.sourceforge.net/project/grandcms/grandcms_v0.2.0.1.1.zip
Resolving liquidtelecom.dl.sourceforge.net (liquidtelecom.dl.sourceforge.net)... 197.155.77.8
Connecting to liquidtelecom.dl.sourceforge.net (liquidtelecom.dl.sourceforge.net)|197.155.77.8|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5606378 (5.3M) [application/octet-stream]
Saving to: ‘ grandcms_v0.2.0.1.1.zip’ 

grandcms_v0.2.0.1.1.zip                      100%[============================================================================================> ]   5.35M   543KB/s    in 13s     

2016-09-09 09:12:43 (408 KB/s) - ‘ grandcms_v0.2.0.1.1.zip’  saved [5606378/5606378]


Move downloaded zip file into the default document root of apache web server.

root@linuxhelp:~# mv grandcms_v0.2.0.1.1.zip /var/www/html/


Remove the default index.html file in /var/www/html to avoid the conflicts from the apache’ s default site and grandcms site

root@linuxhelp:~# cd /var/www/html/
root@linuxhelp:/var/www/html# ls
grandcms_v0.2.0.1.1.zip  index.html
root@linuxhelp:/var/www/html# rm -rf index.html


Now its time to unzip the package.

root@linuxhelp:/var/www/html# unzip grandcms_v0.2.0.1.1.zip 
Archive:  grandcms_v0.2.0.1.1.zip
   creating: upload/
  inflating: upload/.htaccess.txt    
   creating: upload/admin/
  inflating: upload/admin/config-dist.php  
   creating: upload/admin/controller/
   creating: upload/admin/controller/catalog/
  inflating: upload/admin/controller/catalog/download.php  
  inflating: upload/admin/controller/catalog/information.php  
  inflating: upload/admin/controller/catalog/information_category.php
.
.
.
   creating: upload/system/modification/
  inflating: upload/system/modification/index.html  
  inflating: upload/system/modification.xml  
  inflating: upload/system/startup.php  
   creating: upload/system/upload/
  inflating: upload/system/upload/index.html  
  inflating: install.txt             
  inflating: license.txt             
  inflating: README.txt              
  inflating: upload/catalog/view/theme/default/template/common/header.tpl


Once the new directory called “ upload” is created, enable the users to remove the zip package and txt files under the specified document root.

root@linuxhelp:/var/www/html# ls
grandcms_v0.2.0.1.1.zip  install.txt  license.txt  README.txt  upload
root@linuxhelp:/var/www/html# rm -rf *.txt
root@linuxhelp:/var/www/html# rm -rf grandcms_v0.2.0.1.1.zip


Here you need to rename the upload directory into grandcms with the below given command.

root@linuxhelp:/var/www/html# mv upload grandcms
root@linuxhelp:/var/www/html# ls
grandcms


Next set the ownership for the directory Grandcms.

root@linuxhelp:/var/www/html# chown -R www-data:www-data /var/www/html/grandcms


Rename the files “ config-dist.php” to “ config.php” which is located in ' /var/www/html/grandcms' and ' /var/www/html/grandcms/admin'

root@linuxhelp:/var/www/html# cd grandcms/
root@linuxhelp:/var/www/html/grandcms# ls
admin  catalog  config-dist.php  crossdomain.xml  download  image  index.php  install  php.ini  system
root@linuxhelp:/var/www/html/grandcms# mv config-dist.php config.php
root@linuxhelp:/var/www/html/grandcms# ls
admin  catalog  config.php  crossdomain.xml  download  image  index.php  install  php.ini  system
root@linuxhelp:/var/www/html/grandcms# cd admin/
root@linuxhelp:/var/www/html/grandcms/admin# ls
config-dist.php  controller  index.php  language  model  php.ini  view
root@linuxhelp:/var/www/html/grandcms/admin# mv config-dist.php config.php


Create the apache virtualhost as follows.

root@linuxhelp:~# vim /etc/apache2/sites-available/grandcms.conf

Entry:

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

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


Then restart the apache service to access the grandcms.

root@linuxhelp:~# systemctl restart apache2

Finally open the web browser to install grandcms by using the link http://< IP_ADDR> /grandcms. You can also replace with the server IP address or hostname in the link.

Click on Continue option to accept the License agreement.

Next checkout the directories setup and then click on continue option.

Enter the following details for database configuration. Click on continue option to complete the installation process.

Remove the installed directory located under the grandcms directory as shown below.

Admin login page for GrandCMS will appear on the desktop. Enter the following credentials.

Dashboard of GrandCMS for the admin user is given below.

If you want to view the site, simply use the given link http://< IP_ADDR> /grandcms

Tag : GrandCMS
FAQ
Q
What is GrandCMS?
A
GrandCMS is an open source content management system for Linux distributions. It enables the users to create own websites with the graphical user interface. GrandCMS is specially designed for the OpenCart owners.
Q
What is a “Default usergroup”?
A
If you are a member of more than one user group, your default is used to determine which group color and group rank should be shown for you by default. The board administrator may grant you permission to change your default usergroup via your User Control Panel.
Q
Why do I get logged off automatically?
A
If you do not check the Remember me box when you log in, the board will only keep you logged in for a preset time. This prevents misuse of your account by anyone else. To stay logged in, check the Remember me box during login. This is not recommended if you access the board from a shared computer, e.g. library, internet cafe, university computer lab, etc. If you do not see this checkbox, it means a board administrator has disabled this feature.
Q
How do I display an avatar?
A
Within your User Control Panel, under “Profile” you can add an avatar by using one of the four following methods: Gravatar, Gallery, Remote or Upload. It is up to the board administrator to enable avatars and to choose the way in which avatars can be made available. If you are unable to use avatars, contact a board administrator.
Q
How do I create a new topic or post a reply?
A
To post a new topic in a forum, click "New Topic". To post a reply to a topic, click "Post Reply". You may need to register before you can post a message. A list of your permissions in each forum is available at the bottom of the forum and topic screens. Example: You can post new topics, You can post attachments, etc.