{"id":2329,"date":"2018-01-01T18:35:27","date_gmt":"2018-01-01T15:35:27","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/how-to-install-and-configure-octobercms-on-ubuntu-1604\/"},"modified":"2018-01-01T18:35:27","modified_gmt":"2018-01-01T15:35:27","slug":"how-to-install-octobercms-on-ubuntu-16-04-lts","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-octobercms-on-ubuntu-16-04-lts\/","title":{"rendered":"How to Install OctoberCMS on Ubuntu 16.04 LTS"},"content":{"rendered":"<p>OctoberCMS is a free, open source and self hosted content management system written in PHP and based on the Laravel framework. OctoberCMS allows you to create your own blog or website without any programming language. It supports various databases like, SQLite, MySQL and PostgreSQL.<\/p>\n<p>OctoberCMS offers lot&#8217;s of features, some of them are listed below:<\/p>\n<ul>\n<li>Comes with built in the powerful Ajax framework.<\/li>\n<li>Provides a file manager with CDN support and image cropping<\/li>\n<li>Light weight and user friendly administrative interface.<\/li>\n<li>Uses a flat file database for the front end structure.<\/li>\n<\/ul>\n<p>In this tutorial, we will explain how to install and configure OctoberCMS on Ubuntu 16.04 server.<\/p>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<ul>\n<li>A server running Ubuntu 16.04.<\/li>\n<li>A non-root user with sudo privileges.<\/li>\n<\/ul>\n<h2 id=\"getting-started\">Getting Started<\/h2>\n<p>Before starting, it is recommended to update your system with the latest stable version. You can do this with the following command:<\/p>\n<p class=\"command\">sudo apt-get update -y<br \/>sudo apt-get upgrade -y<\/p>\n<p>Once your system is updated, restart the system to apply all the changes.<\/p>\n<h2 id=\"install-lamp-server\">Install LAMP SERVER<\/h2>\n<p>OctoberCMS runs on Apache web server. So you will need to install LAMP server to your system. First, install Apache web server with the following command:<\/p>\n<p class=\"command\">sudo apt-get install apache2 libapache2-mod-php7.0 -y<\/p>\n<p>Next, start the Apache service and enable it to start on boot with the following command:<\/p>\n<p class=\"command\">sudo systemctl start apache2<br \/>sudo systemctl enable apache2<\/p>\n<p>Next, install MariaDB, PHP and other PHP modules with the following command:<\/p>\n<p class=\"command\">sudo apt-get install mariadb-server php7.0 php7.0 php7.0-mysql php7.0-curl php7.0-gd php7.0-json php7.0-opcache php7.0-xml mcrypt php7.0-mcrypt wget unzip -y<\/p>\n<p>Once all the packages are installed, start MariaDB service and enable it to start on boot time with the following command:<\/p>\n<p class=\"command\">sudo systemctl start mysql<br \/>sudo systemctl enable mysql<\/p>\n<h2 id=\"configure-mariadb\">Configure MariaDB<\/h2>\n<p>By default, MariaDB is not secure. So you will need to secure it first. You can secure it by using the mysql_secure_installation script.<\/p>\n<p class=\"command\">sudo mysql_secure_installation<\/p>\n<p>This script will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB as shown below:<\/p>\n<pre>Set root password? [Y\/n] y&#13;\nRemove anonymous users? [Y\/n] y&#13;\nDisallow root login remotely? [Y\/n] y&#13;\nRemove test database and access to it? [Y\/n] y&#13;\nReload privilege tables now? [Y\/n] y&#13;\n<\/pre>\n<p>Once MariaDB is secured, create a database for OctoberCMS.<\/p>\n<p>First, log in to the MariaDB console with the following command:<\/p>\n<p class=\"command\">mysql -u root -p<\/p>\n<p>You will be prompt for a password, enter your root password and create a database for OctoberCMS:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; create database octobercmsdb character set utf8;<\/p>\n<p>Next, create a user for OctoberCMS and grantall privileges to the OctoberCMS with the following command:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON octobercmsdb.* TO &#8216;user&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;password&#8217;;<\/p>\n<p>Next, flush the privileges with the following command:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; flush privileges;<\/p>\n<p>Finally, exit from the MariaDB console using the following command:<\/p>\n<p class=\"command\">MariaDB [(none)]&gt; quit<\/p>\n<h2 id=\"install-octobercms\">Install OctoberCMS<\/h2>\n<p>First, download the latest stable version of the OctoberCMS from OctoberCMS official website with the following command:<\/p>\n<p class=\"command\">wget http:\/\/octobercms.com\/download -O octobercms.zip<\/p>\n<p>Once the download is completed, extract the downloaded archieve to the apache root directory using the following command:<\/p>\n<p class=\"command\">unzip octobercms.zip -d \/var\/www\/html\/octobercms<\/p>\n<p>Next, give proper permisions for the OctoberCMS directory:<\/p>\n<p class=\"command\">sudo chown -R www-data:www-data \/var\/www\/html\/octobercms\/<br \/>sudo chmod -R 755 \/var\/www\/html\/<\/p>\n<p>Next, you will need to create an apache virtual host directive for OctoberCMS. To do so, create a new configuration file octobercms.conf inside \/etc\/apache2\/sites-available\/ directory:<\/p>\n<p class=\"command\">sudo nano \/etc\/apache2\/sites-available\/octobercms.conf<\/p>\n<p>Add the following lines:<\/p>\n<pre>&lt;VirtualHost *:80&gt;&#13;\nServerAdmin <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"e58481888c8ba5809d8488958980cb868a88\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>&#13;\nDocumentRoot \/var\/www\/html\/octobercms\/&#13;\nServerName www.example.com&#13;\n&lt;Directory \/var\/www\/html\/octobercms\/&gt;&#13;\nOptions FollowSymLinks&#13;\nAllowOverride All&#13;\nOrder allow,deny&#13;\nallow from all&#13;\n&lt;\/Directory&gt;&#13;\nErrorLog \/var\/log\/apache2\/octobercms-error_log&#13;\nCustomLog \/var\/log\/apache2\/octobercms-access_log common&#13;\n&lt;\/VirtualHost&gt;&#13;\n<\/pre>\n<p>Save and close the file when you are finished, then enable virtual host directive with the following command:<\/p>\n<p class=\"command\">sudo a2ensite octobercms<\/p>\n<p>Next, enable Apache mod rewrite module and restart apache web server service with the following command:<\/p>\n<p class=\"command\">sudo a2enmod rewrite<br \/>sudo systemctl restart apache2<\/p>\n<h2 id=\"access-octobercms\">Access OctoberCMS<\/h2>\n<p>By default, OctoberCMS runs on Apache port 80. Open your web browser and type the URL <a href=\"http:\/\/example.com\" target=\"_blank\" rel=\"noopener\">http:\/\/example.com<\/a>. You will be redirected to the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot-of-octobercms-page1\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_octobercms_on_ubuntu_1604\/big\/Screenshot-of-octobercms-page1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/01\/how-to-install-octobercms-on-ubuntu-16-04-lts.png\" alt=\"System check\" width=\"550\" height=\"283\" title=\"\"><\/a><\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot-of-octobercms-page2\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_octobercms_on_ubuntu_1604\/big\/Screenshot-of-octobercms-page2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/01\/how-to-install-octobercms-on-ubuntu-16-04-lts-1.png\" alt=\"License agreement\" width=\"550\" height=\"258\" title=\"\"><\/a><\/p>\n<p>Here, select the <strong>Agree and Continue<\/strong> button to start the installation procedure. You should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot-of-octobercms-page3\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_octobercms_on_ubuntu_1604\/big\/Screenshot-of-octobercms-page3.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/01\/how-to-install-octobercms-on-ubuntu-16-04-lts-2.png\" alt=\"Database settings\" width=\"550\" height=\"280\" title=\"\"><\/a><\/p>\n<p>Here, provide database username, password and database name, then click on the <strong>Continue<\/strong> button. You should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot-of-octobercms-page4\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_octobercms_on_ubuntu_1604\/big\/Screenshot-of-octobercms-page4.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/01\/how-to-install-octobercms-on-ubuntu-16-04-lts-3.png\" alt=\"Administrator login\" width=\"550\" height=\"285\" title=\"\"><\/a><\/p>\n<p>Here, provide admin user details like, admin username, password and admin email id, then click on the <strong>Continue<\/strong> button. You should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot-of-octobercms-page5\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_octobercms_on_ubuntu_1604\/big\/Screenshot-of-octobercms-page5.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/01\/how-to-install-octobercms-on-ubuntu-16-04-lts-4.png\" alt=\"Getting started woth octoberCMS\" width=\"550\" height=\"281\" title=\"\"><\/a><\/p>\n<p>Here, click on <strong>start from scratch<\/strong> button to start the installation. You should see the following page:<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot-of-octobercms-page6\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_octobercms_on_ubuntu_1604\/big\/Screenshot-of-octobercms-page6.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/01\/how-to-install-octobercms-on-ubuntu-16-04-lts-5.png\" alt=\"OctoberCMS successfully installed\" width=\"550\" height=\"282\" title=\"\"><\/a><\/p>\n<p>Next, click on the website URL. You should see the OctoberCMS login page as below:<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot-of-octobercms-page7\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_octobercms_on_ubuntu_1604\/big\/Screenshot-of-octobercms-page7.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/01\/how-to-install-octobercms-on-ubuntu-16-04-lts-6.png\" alt=\"Login page\" width=\"550\" height=\"264\" title=\"\"><\/a><\/p>\n<p>Enter your admin username and password, then click on the <strong>Login<\/strong> button. You should see the OctoberCMS dashboard as shown below:<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot-of-octobercms-page8\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_octobercms_on_ubuntu_1604\/big\/Screenshot-of-octobercms-page8.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/01\/how-to-install-octobercms-on-ubuntu-16-04-lts-7.png\" alt=\"OctoberCMS dashboard\" width=\"550\" height=\"277\" title=\"\"><\/a><\/p>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>OctoberCMS is a free, open source and self hosted content management system written in PHP and based on the Laravel framework. OctoberCMS allows you to create your own blog or website without any programming language. It supports various databases like, SQLite, MySQL and PostgreSQL. OctoberCMS offers lot&#8217;s of features, some of them are listed below: &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-2329","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/2329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=2329"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/2329\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=2329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=2329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=2329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}