How to install craft CMS on Linux Mint 18.03
To install Craft CMS on Linux Mint18.3
Craft is a content management system (CMS) designed for publishers who want more control and more powerful performances from their CMS. It is a PHP based application build on Yii framework. In this tutorial, we cover the installation of Craft cms on Linux Mint18.3
Pre-requirements
- Install LAMP (Apache, php7.1, MariaDB-server)
- In MariaDB (create database, user and give privileges to the user
- For PHP installation
apt-get install php7.1 php7.1-pdo php7.1-common php7.1-mcrypt php7.1-mbstring php7.1-gd php7.1-curl php7.1-mysql php7.1-mcrypt
Installing Craft CMS
Let' s download the Craft CMS from the terminal using the following command.
linuxhelp ~ # wget https://download.craftcdn.com/craft/2.6/2.6.2993/Craft-2.6.2993.zip
--2018-04-21 16:46:42-- https://download.craftcdn.com/craft/2.6/2.6.2993/Craft-2.6.2993.zip
Resolving download.craftcdn.com (download.craftcdn.com)... 151.139.107.16
Connecting to download.craftcdn.com (download.craftcdn.com)|151.139.107.16|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16915928 (16M) [application/zip]
Saving to: ‘ Craft-2.6.2993.zip’
Craft-2.6.2993.zip 100%[==============================================> ] 16.13M 780KB/s in 30s
2018-04-21 16:47:13 (555 KB/s) - ‘ Craft-2.6.2993.zip’ saved [16915928/16915928]
After downloading, extract and rename the directory by making use of the following command.
linuxhelp ~ # unzip Craft-2.6.2993.zip -d craft
Archive: Craft-2.6.2993.zip
inflating: craft/craft/app/widgets/RecentEntriesWidget.php
inflating: craft/craft/app/widgets/UpdatesWidget.php
inflating: craft/craft/app/widgets/QuickPostWidget.php
inflating: craft/craft/app/widgets/NewUsersWidget.php
inflating: craft/craft/app/widgets/IWidget.php
inflating: craft/craft/app/widgets/BaseWidget.php
.
.
.
extracting: craft/craft/plugins/.htaccess
inflating: craft/craft/plugins/web.config
extracting: craft/craft/.htaccess
inflating: craft/craft/web.config
inflating: craft/readme.txt
inflating: craft/public/robots.txt
inflating: craft/public/web.config
inflating: craft/public/htaccess
inflating: craft/public/index.php
And then move the Craft CMS package to apache directory root.
linuxhelp ~ # ls craft Craft-2.6.2993.zip linuxhelp ~ # mv craft/ /var/www/html/
Now navigate to /var/www/html directory.
linuxhelp ~ # cd /var/www/html/
linuxhelp html # cd /var/www/html/
linuxhelp html # ls
craft index.html
Then, change ownership and permission for the craft directory.
linuxhelp html # chown -R www-data:www-data craft/
linuxhelp html # chmod -R 775 craft
Go to craft directory and go to db.php file and give database details.
linuxhelp html # cd craft/ linuxhelp craft # ls craft public readme.txt linuxhelp craft # vim craft/config/db.php [&hellip ] // The database server name or IP address. Usually this is ' localhost' or ' 127.0.0.1' . ' server' => ' localhost' , // The name of the database to select. ' database' => ' craft' , // The database username to connect with. ' user' => ' craftuser' , // The database password to connect with. ' password' => ' 123' , // The prefix to use when naming tables. This can be no more than 5 characters. ' tablePrefix' => ' craft' , [&hellip .]
Now rename the htaccess.
linuxhelp craft # cd public/ linuxhelp public # ls htaccess index.php robots.txt web.config linuxhelp public # mv htaccess .htaccess
Next, configure a virtual host for craft cms by creating a craft.conf file.
linuxhelp html # cd /etc/apache2/sites-available/
linuxhelp sites-available # vim craft.conf
[&hellip ]
< VirtualHost *:80>
Servername www.linuxhelp1.com
DocumentRoot " /var/www/html/craft"
< Directory " /var/www/html/craft" >
AllowOverride All
order allow,deny
allow from all
< /Directory>
< /VirtualHost>
[&hellip ]
Now, we have to enable the ZenCart.conf file.
linuxhelp sites-available # a2ensite craft.conf
Enabling site craft.
To activate the new configuration, you need to run:
service apache2 reload
And then enable the rewrite modules.
linuxhelp sites-available # a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
service apache2 restart
After that, make an entry in the host' s file.
linuxhelp sites-available # vim /etc/hosts
< give your ip> < give your domain name>
Finally, After all the configuration restart apache web server.
linuxhelp sites-available # systemctl restart apache2.service
After restarting apache server, open the browser, and navigate to the following URL:
http://www.linuxhelp1.com/public/index.php/admin/install
You will see the following screen after navigating into the given URL, click on begin for further setup
Now, create an account and click on next.
Next, give the details of the site setup and click on finish up.
Now the installation will begin as you can see from the below screen.
After a successful installation, you will be logged in as an admin user.
With this, the method to install craft cms on Linux Mint18.03 comes to an end.
# unzip fiyo_cms_2.0.6.1.zip -d fiyocms