ManagedCloud Servers

High performance handled and monitored by us 24/7/365. A complete solution to provide you with our in house expertise 24/7 tailored to your specific needs. We'll setup a bespoke server for your site using the latest tehnologies so you can get the most out of your hardware and get your website loading quickly and reliably. Find out more..

cPanelCloud Servers

Recommended - High performance cloud servers with no technical knowledge required. If you're hosting multiple websites already and you're looking to consolidate, or if you're looking to isolate yourself from the shared hosting environment but you don't have the time or knoweldge to manage a server, then the Managed cPanel Servers are for you. Find out more..

UnmanagedCloud Servers

Our unmanaged range gives you complete control at rock bottom prices and our cloud platform boasts super fast multipath 40Gb/s network, the latest Intel Xeon V3 CPUs and enterprise grade redundant SSDs. If you're a sysadmin look no further, we offer some of the best specification to price ratio servers available. Find out more..

Want your very own server? Get our 1GB memory, Xeon V4, 20GB SSD VPS for £10.00 / month.

View Plans

How to Install Known CMS on CentOS 7

Known is a free and open source publishing platform. It is a platform to share different types of posts like photos, notes, stories, songs etc. It is written in PHP and can be used with any type of database. It is responsive, secure and easy to use platform.

In this tutorial, we will install Known CMS on CentOS 7 server.

Requirements

Known does not require any special hardware requirements. It can be installed on servers with a very small amount of RAM. All the required dependencies will be installed throughout the tutorial. You will need a minimal installation of CentOS 7 with root access on it. If you are logged in as a non-root user, you can run sudo -i to switch to the root user.

Installing Known

Before installing any package it is recommended that you update the packages and repository using the following command.

yum -y update

Once you have your system updated, you can proceed to install the LAMP stack. Start the LAMP installation by installing Apache web server and MariaDB, which is a fork of MySQL using the following command.

yum -y install httpd mariadb-server mariadb

Known can be installed on any version of PHP greater than 5.6. You can install PHP 7 for high performance. PHP 7 is not included in default YUM repository, hence you will need to add the Webtatic repository in your system. Webtatic repository requires EPEL repository to work. Run the following command to install EPEL repository.

yum -y install epel-release yum -y update

Now install Webtatic repository using the following commands.

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm yum -y update

To install PHP 7.1 and all the required PHP modules, run the following command.

yum -y install php71w php71w-curl php71w-cli php71w-date php71w-dom php71w-exif php71w-gd php71w-json php71w-libxml php71w-mbstring php71w-mysql php71w-reflection php71w-session php71w-xmlrpc

Once you have PHP installed, you can check the version of PHP using the following command.

php -v You should get output similar to this.
[root@liptan-pc ~]# php -v
PHP 7.1.3 (cli) (built: Mar 19 2017 15:31:52) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

You will also need to enable Mod_rewrite in Apache web server by editing /etc/httpd/conf/httpd.conf using your favorite text editor.

nano /etc/httpd/conf/httpd.conf

Find the following line.

<Directory "/var/www/html">
AllowOverride None

Change it to AllowOverride All.

Now start Apache web server and enable it to start at boot time using the following command.

systemctl start httpd systemctl enable httpd

To start MariaDB and enable it to start at boot time using the following commands.

systemctl start mariadb systemctl enable mariadb

Now run the following commands to secure your MySQL or MariaDB installation.

mysql_secure_installation

It will run a small script which asks you to set a root password for your MariaDB installation. Most of the questions are self-explanatory and you should answer yes to all the questions.

As we have all the dependencies ready we can now create a database to store the data of Known. Known can also use an SQLite database to store its data. Using SQLite is not recommended when you have the option to use MySQL database as SQLite database is stored in the file system as a file, hence it affects the speed of the application. It is recommended to use MySQL/MariaDB to store Known data. To create a database we will need to login to MySQL command line first. Run the following command for same.

mysql -u root -p

This will prompt you for the password, provide the root password of MySQL which you have set earlier. Now run the following query to create a new database for your Known installation.

CREATE DATABASE known_data;

The above query will create a database named known_data. Once the database is created you can create a new user and grant all the permissions to the user for the database. Using root user is not recommended for the databases. To create a new database user, run the following query.

CREATE USER 'known_user'@'localhost' IDENTIFIED BY 'StrongPassword';

The above query will create a user with username known_user. Replace StrongPassword with a strong password. Now provide the appropriate privileges to your database user over the database you have created. Run the following command.

GRANT ALL PRIVILEGES ON known_data.* TO 'known_user'@'localhost';

Now run the following command to immediately apply the changes on the database privileges.

FLUSH PRIVILEGES;

Exit from MySQL prompt using exit command.

As we have all the dependencies ready, we can now download the install package from the Known site.

cd /var/www/html wget http://assets.withknown.com/releases/known-0.9.2.zip -O known.zip

The above command will download the installer archive and store it as known.zip file. You can always look for the latest release by going to the Known download page.

Extract the archive using the following command.

unzip known.zip

If you don't have unzip installed, you can run yum -y install unzip.

Now create a virtual host for the Known application. Run the following command for same.

nano /etc/httpd/conf.d/known.yourdomain.com.conf

Paste the following lines into the file.

<VirtualHost *:80>
    ServerAdmin me@liptanbiswas.com
    DocumentRoot "/var/www/html"
    ServerName known.yourdomain.com
    ServerAlias www.known.yourdomain.com
    ErrorLog "/var/log/httpd/known.yourdomain.com-error_log"
    CustomLog "/var/log/httpd/known.yourdomain.com-access_log" combined
</VirtualHost>

Replace known.yourdomain.com with any domain or sub-domain you want to use to access the application. Save the file and exit from the editor. Run the following command to restart your Apache server.

systemctl restart httpd

Now you will need to provide the ownership of the application to web server user using the following command.

chown -R apache:apache /var/www/html

You may also need to allow HTTP traffic on port 80 through the firewall if you are running one. Run the following commands for same.

firewall-cmd --zone=public --permanent --add-service=http firewall-cmd --reload

You will also need to disable SELinux. To temporary disable SELinux without restarting the server, run the following command.

setenforce 0

To completely disable the SELinux you will need to edit /etc/selinux/config file.

nano /etc/selinux/config

If you don't have nano installed, you can install it using yum -y install nano Find the following line:

SELINUX=enforcing

Change it to:

SELINUX=disabled

Now complete the installation using a web browser, go to the following link using your favorite web browser.

http://known.yourdomain.com

You will see the following welcome page.

Click on Let's get started button. You will be taken to the system requirements page. If you have followed the tutorial correctly, you will have all the requirements set except the HTTPS connection.

Proceed further to see the following interface.

Provide the name of your site. Further, provide the MySQL database and username which we have created earlier. Click Onwards button to move to the next interface.

In this interface, you will need to create a new user account for your site. This user will automatically have the administrator rights.

Now you will need to create a profile for your site. Provide your profile pic and a short bio.

Finally, you will be taken to your website, which will look as shown below.

Conclusion

In this tutorial, we learned how to install Known CMS on CentOS 7. You can now publish your own social post of different types of media.

Want your very own server? Get our 1GB memory, Xeon V4, 20GB SSD VPS for £10.00 / month.

View Plans