{"id":7281,"date":"2018-11-23T12:20:57","date_gmt":"2018-11-23T09:20:57","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/how-to-install-october-cms-platform-on-centos-7\/"},"modified":"2018-11-23T12:20:57","modified_gmt":"2018-11-23T09:20:57","slug":"how-to-install-october-cms-platform-on-centos-7","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-october-cms-platform-on-centos-7\/","title":{"rendered":"How to Install October CMS platform on CentOS 7"},"content":{"rendered":"<p><span>October CMS is a free, open-source, self-hosted CMS platform based on the<span>\u00a0<\/span><\/span><span>Laravel PHP Framework. October CMS\u00a0<span>source code is hosted on<\/span><span>\u00a0Github.<\/span>\u00a0<span>In this tutorial, we will walk you through the\u00a0October CMS installation process on a fresh\u00a0CentOS 7 server.<\/span><\/span><\/p>\n<h2 id=\"requirements\">Requirements<\/h2>\n<p><span><span>Before you proceed, you should check that your server meets the minimum system requirements.\u00a0October CMS has\u00a0the following\u00a0server requirements for web hosting<\/span>:<\/span><\/p>\n<ul>\n<li>PHP version 7.0 or greater<\/li>\n<li id=\"prerequisites\" class=\"header-scroll is-api-header\">PHP PDO Extension<\/li>\n<li class=\"header-scroll is-api-header\">cURL PHP Extension<\/li>\n<li class=\"header-scroll is-api-header\">OpenSSL PHP Extension<\/li>\n<li class=\"header-scroll is-api-header\">Mbstring PHP\u00a0Library<\/li>\n<li class=\"header-scroll is-api-header\">Zip PHP Library<\/li>\n<li class=\"header-scroll is-api-header\">GD PHP Library<\/li>\n<li class=\"header-scroll is-api-header\">XML PHP Extension<\/li>\n<li class=\"header-scroll is-api-header\">JSON PHP Extension<\/li>\n<li class=\"header-scroll is-api-header\">Apache with<span>\u00a0<\/span><code>mod_rewrite<span>\u00a0<\/span><\/code>or Nginx<\/li>\n<\/ul>\n<ul>\n<li>A server running\u00a0CentOS 7.<\/li>\n<li><span>A non-root user with sudo privileges.<\/span><\/li>\n<\/ul>\n<h2 id=\"initial-steps\">Initial steps<\/h2>\n<p><span>Check\u00a0your CentOS system version:<\/span><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">cat \/etc\/centos-release<br\/># CentOS Linux release 7.5.1804 (Core)<\/code><\/pre>\n<p>Set up the timezone:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">timedatectl list-timezones<br\/>sudo timedatectl set-timezone 'Region\/City'<\/code><\/pre>\n<p><span>Update your operating system\u2019s packages:<\/span><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo yum update\u00a0-y<\/code><\/pre>\n<p>Install vim, git, unzip, and socat packages:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo yum install -y vim git unzip socat<\/code><\/pre>\n<h2 id=\"step-install-nodejs-and-npm\">Step 1 &#8211; Install PHP<\/h2>\n<p>October CMS platform requires PHP version 7.0 or greater. Default CentOS repositories contian older version of PHP, and thus we will need to setup a third-party repository to install a newer PHP version. We will use Webtatic repository.<\/p>\n<p>Setup the Webtatic YUM repo:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo rpm -Uvh https:\/\/mirror.webtatic.com\/yum\/el7\/webtatic-release.rpm<\/code><\/pre>\n<p>Install PHP, as well as the necessary PHP extensions:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo yum install -y php72w-cli php72w-fpm php72w-pdo php72w-common php72w-mysql php72w-curl php72w-json php72w-zip php72w-gd php72w-xml php72w-mbstring\u00a0<\/code><\/pre>\n<p>Check the PHP version:<\/p>\n<pre class=\"command\" readability=\"6.5\"><code spellcheck=\"false\" readability=\"7\">php --version<p>#\u00a0PHP 7.2.11 (cli) (built: Oct 11 2018 19:14:35) ( NTS )<br\/># Copyright (c) 1997-2018 The PHP Group<br\/># Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies # with Zend OPcache v7.2.9, Copyright (c) 1999-2018, by Zend Technologies<\/p><\/code><\/pre>\n<p>Start and enable PHP-FPM service:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl start php-fpm.service<br\/>sudo systemctl enable php-fpm.service<\/code><\/pre>\n<h2 id=\"step-installnbspmysql-and-create-a-database-for-croogo\">Step 2 &#8211; Install\u00a0MariaDB and create a database for October<\/h2>\n<p><span>Install MariaDB database server:<\/span><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo yum install -y mariadb-server<\/code><\/pre>\n<p>Check the MariaDB version:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">mysql --version<br\/># mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1<\/code><\/pre>\n<p>Start and enable MariaDB service:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl start mariadb.service<br\/>sudo systemctl enable mariadb.service<\/code><\/pre>\n<p>Run<span>\u00a0<\/span><code>mysql_secure installation<\/code><span>\u00a0<\/span>script to improve MariaDB security and set the password for MariaDB<span>\u00a0<\/span><code>root<\/code><span>\u00a0<\/span>user:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">mysql_secure_installation<\/code><\/pre>\n<p>Log into MariaDB as the root user:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">mysql -u root -p<br\/># Enter password<\/code><\/pre>\n<p>Create a MariaDB database and user that you will use for your installation of October, and remember the credentials:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">CREATE DATABASE dbname;<br\/>GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';<br\/>FLUSH PRIVILEGES;<\/code><\/pre>\n<p>Exit from MariaDB shell:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">quit<\/code><\/pre>\n<h2 id=\"step-install-acmesh-client-and-obtain-lets-encrypt-certificate-optional\">Step 3 &#8211; Install Acme.sh client and obtain Let&#8217;s Encrypt certificate (optional)<\/h2>\n<p><span>Securing your website with HTTPS is not necessary, but it is a good practice to secure your site traffic. In order to obtain SSL certificate from Let&#8217;s Encrypt we will use Acme.sh client. Acme.sh is a pure unix shell software for obtaining SSL certificates from Let&#8217;s Encrypt with zero dependencies.\u00a0<\/span><\/p>\n<p><span><span>Download and install<span>\u00a0Acme.sh:<\/span><\/span><\/span><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo mkdir \/etc\/letsencrypt<br\/>git clone https:\/\/github.com\/Neilpang\/acme.sh.git<br\/>cd acme.sh\u00a0<br\/>sudo .\/acme.sh --install --home \/etc\/letsencrypt --accountemail\u00a0<a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"ef96809a9db08a828e8683af8a978e829f838ac18c8082\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a><br\/>cd ~<\/code><\/pre>\n<p>Check\u00a0Acme.sh\u00a0version:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">\/etc\/letsencrypt\/acme.sh --version<br\/># v2.8.0<\/code><\/pre>\n<p>Obtain<span>\u00a0<\/span><strong>RSA<\/strong><span>\u00a0<\/span>and<span>\u00a0<\/span><strong>ECC\/ECDSA<\/strong><span>\u00a0<\/span>certificates for your\u00a0domain\/hostname:<code><br \/><\/code><\/p>\n<pre class=\"command\"><code spellcheck=\"false\"># RSA 2048<br\/>sudo \/etc\/letsencrypt\/acme.sh --issue\u00a0--standalone\u00a0--home \/etc\/letsencrypt -d example.com --keylength 2048<br\/># ECDSA<br\/>sudo \/etc\/letsencrypt\/acme.sh --issue --standalone --home \/etc\/letsencrypt -d example.com --keylength ec-256<\/code><\/pre>\n<p><span>After running the above commands, your<span>\u00a0<\/span><\/span><em>certificates<\/em><span><span>\u00a0<\/span>and<span>\u00a0<\/span><\/span><em>keys<\/em><span><span>\u00a0<\/span>will be in:<\/span><\/p>\n<ul>\n<li>For<span>\u00a0<\/span><strong>RSA<\/strong>:<span>\u00a0<\/span><code>\/etc\/letsencrypt\/example.com<\/code><span>\u00a0<\/span>directory.<\/li>\n<li>For<span>\u00a0<\/span><strong>ECC\/ECDSA<\/strong>:<span>\u00a0<\/span><code>\/etc\/letsencrypt\/example.com_ecc<\/code><span>\u00a0<\/span>directory.<\/li>\n<\/ul>\n<h2 id=\"step-install-and-configurenbspnginx\">Step 4 &#8211; Install and configure\u00a0Nginx<\/h2>\n<p>Install Nginx webserver:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo yum install -y nginx<\/code><\/pre>\n<p>Check the NGINX version:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">nginx -v<br\/># nginx version: nginx\/1.12.2<\/code><\/pre>\n<p>Start and enable Nginx service:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl start nginx.service<br\/>sudo systemctl enable nginx.service<\/code><\/pre>\n<p><span>Run<span>\u00a0<\/span><\/span><code>sudo vim \/etc\/nginx\/conf.d\/october.conf<\/code><span><span>\u00a0<\/span>and populate the file with the following configuration:<\/span><\/p>\n<pre><code>server {<br\/>listen [::]:443 ssl http2;<br\/>listen 443 ssl http2;&#13; listen [::]:80;&#13; listen 80;&#13; &#13; server_name example.com;&#13; &#13; index index.php index.html;&#13; root \/var\/www\/october;<br\/>&#13; ssl_certificate \/etc\/letsencrypt\/example.com\/fullchain.cer;<br\/>ssl_certificate_key \/etc\/letsencrypt\/example.com\/example.com.key;<br\/>ssl_certificate \/etc\/letsencrypt\/example.com_ecc\/fullchain.cer;<br\/>ssl_certificate_key \/etc\/letsencrypt\/example.com_ecc\/example.com.key;<br\/>&#13; location \/ {&#13; try_files $uri \/index.php$is_args$args;&#13; }&#13; &#13; location ~ \\.php$ {&#13; include fastcgi.conf;&#13; include fastcgi_params;&#13; fastcgi_pass 127.0.0.1:9000;&#13; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;&#13; fastcgi_read_timeout 120s;&#13; }&#13; &#13; rewrite ^themes\/.*\/(layouts|pages|partials)\/.*.htm \/index.php break;&#13; rewrite ^bootstrap\/.* \/index.php break;&#13; rewrite ^config\/.* \/index.php break;&#13; rewrite ^vendor\/.* \/index.php break;&#13; rewrite ^storage\/cms\/.* \/index.php break;&#13; rewrite ^storage\/logs\/.* \/index.php break;&#13; rewrite ^storage\/framework\/.* \/index.php break;&#13; rewrite ^storage\/temp\/protected\/.* \/index.php break;&#13; rewrite ^storage\/app\/uploads\/protected\/.* \/index.php break;&#13;\n}<\/code><\/pre>\n<p>Test the NGINX configuration.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo nginx -t<\/code><\/pre>\n<p>Reload NGINX.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl reload nginx.service<\/code><\/pre>\n<h2 id=\"step-install-and-configurenbspnginx\">Step 5 &#8211; Download and install October CMS platform<\/h2>\n<p>Create a document root directory:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo mkdir -p \/var\/www\/october<\/code><\/pre>\n<p>Change ownership of the<span>\u00a0<\/span><code>\/var\/www\/october<\/code><span>\u00a0<\/span>directory to<span>\u00a0<\/span><code>johndoe:<\/code><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo chown -R [your_user]:[your_user] \/var\/www\/october<\/code><\/pre>\n<p>Navigate to document root:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">cd \/var\/www\/october<\/code><\/pre>\n<p>Download the October CMS installer:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">wget http:\/\/octobercms.com\/download -O october.zip<\/code><\/pre>\n<p>Unzip October CMS installer:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">unzip october.zip<br\/>rm october.zip<br\/>mv install-master\/* .<\/code><\/pre>\n<p>Change ownership of the<span>\u00a0<\/span><code>\/var\/www\/october<\/code><span>\u00a0<\/span>directory to<span>\u00a0<\/span><code>nginx:<\/code><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo chown -R nginx:nginx \/var\/www\/october<\/code><\/pre>\n<p>Run<span>\u00a0<\/span><code>sudo vim \/etc\/php-fpm.d\/www.conf<\/code><span>\u00a0<\/span>and set the user and group to<span>\u00a0<\/span><code>nginx<\/code>. Initially, they will be set to<span>\u00a0<\/span><code>apache:<\/code><\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo vim \/etc\/php-fpm.d\/www.conf<br\/># user = nginx<br\/># group = nginx<\/code><\/pre>\n<p>Restart the PHP-FPM service:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl restart php-fpm.service<\/code><\/pre>\n<p>Navigate to the<span>\u00a0<\/span><code>install.php<\/code><span>\u00a0<\/span>script in your web browser, like<span>\u00a0<\/span><code>example.com\/install.php<\/code><span>\u00a0<\/span>and follow the installation instructions.<\/p>\n<h2 id=\"step-complete-the-cachet-setup\">Step 6 &#8211; Complete the October setup<\/h2>\n<p>Make sure your System Check is ok, and procceed by pressing &#8220;<strong>Agree &amp;\u00a0Continue<\/strong>&#8221; button.<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot_2018-11-20_at_22.55_.08_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_october_cms_platform_on_centos_7\/big\/Screenshot_2018-11-20_at_22.55_.08_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-october-cms-platform-on-centos-7.png\" alt=\"October CMS setup\" width=\"550\" height=\"316\" title=\"\"><\/a><\/p>\n<p>Configure your database and\u00a0admin user settings.<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot_2018-11-20_at_23.09_.23_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_october_cms_platform_on_centos_7\/big\/Screenshot_2018-11-20_at_23.09_.23_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-october-cms-platform-on-centos-7-1.png\" alt=\"Database settings\" width=\"550\" height=\"316\" title=\"\"><\/a><\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot_2018-11-20_at_23.12_.31_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_october_cms_platform_on_centos_7\/big\/Screenshot_2018-11-20_at_23.12_.31_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-october-cms-platform-on-centos-7-2.png\" alt=\"Administrator user setup\" width=\"550\" height=\"316\" title=\"\"><\/a><\/p>\n<p>You can also configure some advanced settings or you can leave\u00a0the default values.<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot_2018-11-20_at_23.15_.43_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_october_cms_platform_on_centos_7\/big\/Screenshot_2018-11-20_at_23.15_.43_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-october-cms-platform-on-centos-7-3.png\" alt=\"Advanced settings\" width=\"550\" height=\"316\" title=\"\"><\/a><\/p>\n<p>And finally when everything is configured press blue &#8220;<strong>Continue<\/strong>&#8221; button.<\/p>\n<p><span>Next, you will be asked &#8220;<strong>How do you want to set up your site?<\/strong>&#8220;. You will have 3 options: <em>Start from scratch<\/em>, <em>Start from a theme<\/em>, <em>Use a project ID<\/em>. Select your prefered option.<\/span><\/p>\n<p><span><a class=\"fancybox\" id=\"img-Screenshot_2018-11-20_at_23.17_.02_\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_october_cms_platform_on_centos_7\/big\/Screenshot_2018-11-20_at_23.17_.02_.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-october-cms-platform-on-centos-7-4.png\" alt=\"Getting Started with October CMS\" width=\"550\" height=\"316\" title=\"\"><\/a><\/span><\/p>\n<p>To access administration area of October CMS platform, just append<span>\u00a0<\/span><code>\/backend<\/code><span>\u00a0<\/span>to your URL\/IP.<\/p>\n<p>After the installation, for security reasons you should delete the installation files, the<span>\u00a0<\/span><code>install.php<\/code><span>\u00a0<\/span>script and the<span>\u00a0<\/span><code>install_files<\/code><span>\u00a0<\/span>directory:<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo rm \/var\/www\/october\/install.php &amp;&amp; sudo rm -rf \/var\/www\/october\/install_files<\/code><\/pre>\n<h2 id=\"step-complete-the-cachet-setup\">Links<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>October CMS is a free, open-source, self-hosted CMS platform based on the\u00a0Laravel PHP Framework. October CMS\u00a0source code is hosted on\u00a0Github.\u00a0In this tutorial, we will walk you through the\u00a0October CMS installation process on a fresh\u00a0CentOS 7 server. Requirements Before you proceed, you should check that your server meets the minimum system requirements.\u00a0October CMS has\u00a0the following\u00a0server requirements [&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-7281","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/7281","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=7281"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/7281\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=7281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=7281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=7281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}