How to install Reader Self RSS on a CentOS 7 VPS

Reader Self is self hosted RSS reader written in PHP. It is a good replacement for the popular Google Reader. In this tutorial we will guide you through the steps of installing Reader Self on a Centos 7 VPS with Apache and MariaDB database.

Reader Self has the following server requirements:

– PHP 5.2.4 or greater
– MySQL 5.0 or greater / SQLite
– Apache 2.2 or greater with mod_rewrite module enabled

Log in to your Centos 7 VPS as user root and make sure that all packages are up to date

yum -y update

Reader Self requires an SQL database, so we will install MariaDB server

yum install mariadb-server mariadb

Start the MariaDB server and add the service to automatically start on system start-up

systemctl start mariadb.service
systemctl enable mariadb.service

Run the following command to secure your MariaDB server and set a new root password


Now, log in to the MySQL server as user root and create new database and user

mysql -u root -p
MariaDB [(none)]> CREATE DATABASE reader;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON reader.* TO 'user'@'localhost' IDENTIFIED BY 'PASSWORD';
MariaDB [(none)]> \q;

Don’t forget to replace ‘PASSWORD’ with an actual password.

Now, we will install Apache web server

yum install httpd

Start the Apache web server and enable it to start at boot

systemctl start httpd
systemctl enable httpd

Reader Self is written in PHP so, we need to install PHP and a few PHP extensions and modules

yum install php php-mysql php-common

Download the latest version of Reader Self to your CentOS server

wget https://github.com/readerself/readerself/archive/master.zip

Extract the downloaded archive to the document root directory on your server.

yum -y install unzip
unzip master.zip -d /var/www/html/
mv /var/www/html/readerself-master/ /var/www/html/readerself

Change the ownership

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

Open the Reader Self database configuration file enter the information of the created database.

cd /var/www/html/readerself
vim application/config/database.php
$db['default']['hostname'] = 'localhost';//localhost (MySQL) or sqlite:application/database/readerself.sqlite (SQLite)
$db['default']['username'] = 'user';
$db['default']['password'] = 'PASSWORD';
$db['default']['database'] = 'reader';
$db['default']['dbdriver'] = 'mysqli';//mysqli (MySQL) or pdo (SQLite)

Now, we will set up Apache virtual hosting directive for the Reader Self RSS reader, so you can access it with your domain name.

Create a ‘/etc/httpd/conf.d/vhosts.conf’ file with the following content

vim /etc/httpd/conf.d/vhosts.conf
IncludeOptional vhosts.d/*.conf

and create a ‘/etc/httpd/vhosts.d’ directory where we will put all our virtual hosts.

mkdir /etc/httpd/vhosts.d

Create a virtual host for your domain

vim /etc/httpd/vhosts.d/yourdomain.conf
<VirtualHost YOUR_SERVER_IP:80>
ServerAdmin webmaster@yourdomain.com
DocumentRoot "/var/www/html/readerself"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/yourdomain.com-error_log"
CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

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

And restart Apache for the changes to take effect

systemctl restart httpd

Create a cron job so the RSS reader can update the feeds

crontab -e
0 */1 * * * cd /var/www/html/readerself && php index.php refresh items
systemctl restart crond

That’s all. Now, open your favorite web browser and access http://yourdomain.com . Reader Self will check if all requirements are met, and you will need to create new account for accessing the application

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to setup this 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.

Categories: Tutorials
Tags: , ,

View Comments

Leave a Comment