How to Install Craft CMS 3.0.41v on Ubuntu 19.04

Installation Of Craft CMS 3.0.41 on Ubuntu 19.04

Requirements:

Apache 2.4.34

MariaDB 10.3

PHP 7.2

Composer

PHP Modules:

php php-gd php-curl php-zip php-mbstring php-mcrypt php-simplexml php-mysql 

Download link :

composer create-project craftcms/craft <path>

Installation process

Configure the MariaDB for craft CMS using the root password as follows.

root@linuxhelp:~# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 59
Server version: 10.3.13-MariaDB-2 Ubuntu 19.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]> create database craft character set utf8mb4;
Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> use craft;
Database changed
MariaDB [craft]> create user cuser@localhost identified by 'linuxc';
Query OK, 0 rows affected (0.002 sec)

MariaDB [craft]> grant all on craft.* to cuser@localhost;
Query OK, 0 rows affected (0.000 sec)

MariaDB [craft]> flush privileges;
Query OK, 0 rows affected (0.001 sec)

MariaDB [craft]> exit
Bye

Change the directory to Apaches Document root directory to install the Craft CMS.

root@linuxhelp:~# cd /var/www

Create a directory for Craft CMS.

root@linuxhelp:/var/www# mkdir craft

Check the version of the composer.

root@linuxhelp:/var/www# composer -V
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Composer 1.8.4 2019-02-11 10:52:10

Change the directory to craft.

root@linuxhelp:/var/www# cd craft

Download the Craft CMS package using composer by the below-given link.

root@linuxhelp:/var/www/craft# composer create-project craftcms/craft .
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Installing craftcms/craft (1.0.42.1)
  - Installing craftcms/craft (1.0.42.1): Downloading (100%)         
Created project in .
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 55 installs, 0 updates, 0 removals
  - Installing craftcms/plugin-installer (1.5.4): Downloading (100%)         
  - Installing yiisoft/yii2-composer (2.0.7): Downloading (100%)         
  - Installing zendframework/zend-stdlib (3.2.1): Downloading (100%)         
  - Installing zendframework/zend-escaper (2.6.0): Downloading (100%)         
  - Installing zendframework/zend-feed (2.12.0): Downloading (100%)         
  - Installing symfony/process (v3.3.6): Downloading (100%)         
  - Installing yiisoft/yii2-queue (2.1.0): Downloading (100%)         
  - Installing symfony/polyfill-php72 (v1.11.0): Downloading (100%)         
  - Installing symfony/polyfill-mbstring (v1.11.0): Downloading (100%)         
  - Installing symfony/polyfill-intl-idn (v1.11.0): Downloading (100%)         
  - Installing symfony/polyfill-iconv (v1.11.0): Downloading (100%)         
  - Installing doctrine/lexer (v1.0.1): Downloading (100%)         
  - Installing egulias/email-validator (2.1.8): Downloading (100%)         
  - Installing swiftmailer/swiftmailer (v6.2.1): Downloading (100%)         
  - Installing yiisoft/yii2-swiftmailer (2.1.2): Downloading (100%)         
  - Installing yiisoft/yii2 (2.0.19): Downloading (100%)         
  - Installing yiisoft/yii2-debug (2.1.4): Downloading (100%)         
  - Installing craftcms/cms (3.1.28): Downloading (100%)         
  - Installing yii2tech/ar-softdelete (1.0.3): Downloading (100%)         
  - Installing symfony/polyfill-ctype (v1.11.0): Downloading (100%)         
  - Installing twig/twig (v2.8.1): Downloading (100%)         
  - Installing true/punycode (v2.1.1): Downloading (100%)         
  - Installing symfony/yaml (v3.3.6): Downloading (100%)         
  - Installing seld/cli-prompt (1.0.3): Downloading (100%)         
  - Installing pixelandtonic/imagine (v0.7.1.3): Downloading (100%)         
  - Installing mikehaertl/php-shellcommand (1.4.1): Downloading (100%)         
.
.
.
.
.
Writing lock file
Generating optimized autoload files
> @php -r "copy('.env.example', '.env');"
> @php -r "unlink('composer.json');"
> @php -r "unlink('LICENSE.md');"
> @php -r "unlink('README.md');"
> @php -r "rename('composer.json.default', 'composer.json');"
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Generated optimized autoload files containing 2907 classes
> @php craft setup/welcome

   ______ .______          ___       _______ .___________.
  /      ||   _  \        /   \     |   ____||           |
 |  ,----'|  |_)  |      /  ^  \    |  |__   `---|  |----`
 |  |     |      /      /  /_\  \   |   __|      |  |
 |  `----.|  |\  \----./  _____  \  |  |         |  |
  \______|| _| `._____/__/     \__\ |__|         |__|
 
     A       N   E   W       I   N   S   T   A   L   L
               ______ .___  ___.      _______.
              /      ||   \/   |     /       |
             |  ,----'|  \  /  |    |   (----`
             |  |     |  |\/|  |     \   \
             |  `----.|  |  |  | .----)   |
              \______||__|  |__| |_______/



Generating a security key ... done (2V89SS7z4gzMFq78oMfBN7_tjt_z1d0t)

Welcome to Craft CMS! Run the following command if you want to setup Craft from your terminal:

    /var/www/craft/craft setup

List the contents to view the extracted files.

root@linuxhelp:/var/www/craft# ll
total 164
drwxr-xr-x  8 root root   4096 May 28 15:15 ./
drwxr-xr-x  4 root root   4096 May 28 15:09 ../
-rw-r--r--  1 root root    414 Mar 29 17:20 composer.json
-rw-r--r--  1 root root 109728 May 28 15:15 composer.lock
drwxr-xr-x  3 root root   4096 Mar 29 17:20 config/
-rwxr-xr-x  1 root root    610 Mar 29 17:20 craft*
-rw-r--r--  1 root root    330 Mar 29 17:20 craft.bat
-rw-r--r--  1 root root    907 May 28 15:15 .env
-rw-r--r--  1 root root    875 Mar 29 17:20 .env.example
-rw-r--r--  1 root root     31 Mar 29 17:20 .gitignore
drwxr-xr-x  2 root root   4096 Mar 29 17:20 modules/
drwxr-xr-x  4 root root   4096 May 28 15:15 storage/
drwxr-xr-x  2 root root   4096 Mar 29 17:20 templates/
drwxr-xr-x 30 root root   4096 May 28 15:15 vendor/
drwxr-xr-x  3 root root   4096 Mar 29 17:20 web/

Assign Ownership permissions to the current working directory craft recursively.

root@linuxhelp:/var/www/craft# chown -R www-data ./

Assign Writable permissions to the craft directpory recursively.

root@linuxhelp:/var/www/craft# chmod -R 775 ./

create a customised Configuration file for Craft CMS.

root@linuxhelp:/var/www/craft# vim /etc/apache2/sites-available/craft.conf
<virtualhost *:80>
servername www.linuxhelp1.com
documentroot /var/www/craft/web/

<directory /var/www/craft/>
allowoverride all
allow from all
</directory>
</virtualhost>

Disable the access for default sites.

root@linuxhelp:/var/www/craft# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2

Enable the access for Craft CMS site.

root@linuxhelp:/var/www/craft# a2ensite craft.conf 
Enabling site craft.
To activate the new configuration, you need to run:
  systemctl reload apache2

Enable the rewrite module.

root@linuxhelp:/var/www/craft# a2enmod rewrite 
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2

Restart the service of Apache.

root@linuxhelp:/var/www/craft# systemctl restart apache2

Enter the URL(localhost/index.php?p=admin/install) as shown in below picture to install Craft CMS. Click on Install craft to start the installation procedure. Accept the license agreements by just clicking got it. Enter the database details to connect and click next. Enroll the admin credentials and click next. Create a name for the website and click finish up. The admin dashboard of Craft CMS opens after the successful installation. Thus installation of Craft CMS 3.0.41 comes to end in Ubuntu 19.04

FAQ
Q
Is it possible to set up multiple tag group in Craft CMS?
A
Yes, it is possible to create as many multiple tag groups in Craft CMS.
Q
Does Craft CMS have folksonomies?
A
Yes, Craft has built-in folksonomy support.
Q
What do Structures store in Craft CMS?
A
Structures store entries that need a exist in a specific order and hierarchy.
Q
What does Channels store in Craft CMS?
A
Channels store list of entries that don't have any particular order between them in Craft cms
Q
What does Singles do in Craft CMS?
A
Singles store one-off pages in Craft CMS.