Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to install Geeklog CMS on a CentOS 7 VPS

Geeklog is an open source application written in PHP used by web developers to create and manage dynamic web content. It works as a Weblog, CMS or Web Portal. In this blog article we will guide you through the process of installing Geeklog on a CentOS virtual server with Apache, PHP and MariaDB.

Let’s start with the installation procedure. Log in to your virtual server as root user and update the operating system packages by executing the following command:

yum -y update

Geeklog needs a database server to store and retrieve data, so we will install MariaDB server:

yum install mariadb mariadb-server

Start the MariaDB database server and enable the service at boot time:

systemctl start mariadb
systemctl enable mariadb

Run the ‘mysql_secure_installation’ post installation script to secure MariaDB and set your MariaDB root password.
Log in to the MariaDB server using the ‘root’ user and create new database end user for Geeklog:

mysql -u root -p
CREATE DATABASE geeklog;
CREATE USER 'geekloguser'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON `geeklog`.* TO 'geekloguser'@'localhost';
FLUSH PRIVILEGES;

Do not forget to replace ‘PASSWORD’ with a strong password.
Next, we will install the Apache web server:

yum install httpd

Start the Apache web server and set it to automatically start on each system startup:

systemctl start httpd
systemctl enable httpd

Install PHP using the following command:

yum install php php-mysql php-gd php-common php-pear

Download the latest stable version of Geeklog from their official website at https://www.geeklog.net/downloads/index.php?cid=8 . At the time of writing of this tutorial, the latest version of Geeklog is 2.1.1.

cd /opt
wget https://www.geeklog.net/filemgmt/upload_dir/geeklog-2.1.1.tar.gz

Unpack the downloaded tarball archive to a directory on your server outside of the document root directory:

tar -xfvz geeklog-2.1.1.tar.gz -C /var/www

Move the extracted Geeklog files to the document root directory:

mkdir /var/www/html/yourwebsite
mv /var/www/geeklog-2.1.1/public_html/* /var/www/html/yourwebsite

The web server user (www-data) needs to be able to write to certain files and directories inside the ‘/var/www/yourwebsite’ directory, so it can easily be accomplished by executing the following command:

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

In order to access Geeklog using your domain name, you need to create a new Apache virtual host. Create a ‘/etc/httpd/conf.d/vhosts.conf’ configuration file:

vim /etc/httpd/conf.d/vhosts.conf
And add the following content to it:
IncludeOptional vhosts.d/*.conf

Then, create a new configuration file for your website ‘/etc/httpd/vhosts.d/yourwebsite.com.conf’:

vim /etc/httpd/vhosts.d/yourwebsite.com.conf
And add the following virtual host directives to it:
<VirtualHost YOUR_SERVER_IP:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/html/yourwebsite"
ServerName yourwebsite.com
ServerAlias www.yourwebsite.com
ErrorLog "/var/log/httpd/yourwebsite.com-error_log"
CustomLog "/var/log/httpd/yourwebsite.com-access_log" combined

<Directory "/var/www/html/yourwebsite.com/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Restart the Apache web server for the changes to take effect:

systemctl restart httpd

Now, point your web browser to http://yourwebsite.com and follow the easy instructions to finish the Geeklog installation.

Of course you don’t have to do any of this if you use one of ourLinux virtual server hosting services, in which case you can simply ask our expert Linux admins to install Geeklog for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.



This post first appeared on Virtual-Server.org Virtual Server, please read the originial post: here

Share the post

How to install Geeklog CMS on a CentOS 7 VPS

×

Subscribe to Virtual-server.org Virtual Server

Get updates delivered right to your inbox!

Thank you for your subscription

×