Introduce
What is Selfoss? How are the Selfoss settings? Check out the instructions below with BKNS!
Selfoss is an open source web-based RSS reader, written in PHP. This is a simple solution with an open plugin system that allows users to create custom data connectors to extend its functionality. The app also allows users to collect tweets, posts, podcasts, and even feeds in one unified location, where they can be accessed easily through a mobile device or computer desktop.
Here are instructions for installing Selfoss on a CentOS 7 VPS or dedicated server using the LAMP stack (Apache, MariaDB and PHP).
Preparation before installing Selfoss
For this tutorial to flow seamlessly, you need to prepare in advance:
- Fully Configured CentOS Server
- LAMP Stack installed in your CentOS server
- Enabled Mod_Headers and Mod_Rewrite
Step 1 – Create Selfoss . Database
If you have met all the installation requirements first, you can now create databases for applications:
First, run the command below to access the MariaDB command line:
$ sudo mysql -u root -p
Provide your password and press ENTER to login. Once you are logged in, run the command below to create a database named “selfoss”:
MariaDB [(none)]>
createdatabase selfoss;
MariaDB [(none)]>
Next, issue the command below to grant the necessary privileges:
grant all on selfoss.* to selfoss@localhost identifiedby'SECURE_PASSWORD';
Flushprivileges;
Grant privileges to make changes:
Then exit from the MariaDB command line:
MariaDB [(none)]>
exit
Step 2 – Installing Selfoss
To install Selfoss, first create a folder named ‘selfoss ' in / var / www.
$ sudo mkdir /var/www/selfoss
Then run the command below to download the Selfoss installation files:
$ cd /var/www/html/
$ sudo wget --content-disposition https://github.com/SSilence/selfoss/releases/download/2.18/selfoss-2.18.zip
Now execute the command below to check if the files have been downloaded successfully:
$ ls -la
This will give you an output similar to the one below:
drwxr-xr-x. 3 root root 43 Oct 31 04:15 .
drwxr-xr-x. 4 root root 33 Oct 29 04:15 ..
drwxr-xr-x. 8 apache apache 204 Feb 3 2015 lists
-rw-r--r--. 1 root root 2881068 Mar 5 2018 selfoss-2.18.zip
Next, run the command below to extract the file:
$ sudo unzip selfoss-2.18.zip
Then move the settings files to the document root:
$ sudo mv -v selfoss-2.18/* selfoss-2.18/.* /var/www/html 2>/dev/null
Next, change the ownership of these files to avoid permission issues:
$ sudo chown -R apache:apache * ./
Restart Apache:
$ sudo systemctl restart httpd
Step 3 – Install Composer
Selfoss requires the editor to download plugins. Run the command below to install composer:
$ sudo yum -y install composer
Now change to the web root directory:
$cd /var/www/html
Then run the editor through the apache user:
$ sudo -u apache composer install
You may see a few warning messages but they are nothing to worry about. Everything will be done correctly. Once the installer is installed, you can continue with the last step.
Step 4 – Final Configuration
Configure Selfoss
This is the final step and you need to configure Selfoss to complete the installation. First make sure you are in the web root directory then copy the file defaults.ini into file config.ini:
$ sudo cp -iv defaults.ini config.ini
Next, run the command below to open the config.ini file:
$ sudo nano config.ini
Once the file opens, add the below database values to this file:
[globals]
db_type=mysql
db_host=localhost
db_database=selfoss_db
db_username=selfoss_user
db_password=SECURE_PASSWORD
db_port=3306
Web server configuration
Next, you need to configure the virtual server block to make it possible to access Selfoss directly from mywebmail.tld or RSS.domain.tld. To configure the virtual host, run the command below to open the file /etc/apache2/sites-enabled/selfoss:
$ sudo nano /etc/apache2/sites-enabled/selfoss
Once the file opens, copy and paste the content below:
<VirtualHost *:80>
ServerAdmin webmaster@domain.tld
ServerName rss.domain.tld
Redirect / https://rss.domain.tld
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
SSLEngineon
SSLCertificateFile /etc/ssl/certs/myblog.pem
SSLCertificateKeyFile /etc/ssl/private/myblog.key
ServerAdmin webmaster@domain.tld
ServerName rss.domain.tld
DocumentRoot /var/www/selfoss
<Directory />
Options FollowSymLinks
AllowOverrideAll
</Directory>
<Directory /var/www/selfoss>
Options Indexes FollowSymLinks MultiViews
AllowOverrideAll
Order allow,deny
allow from all
</Directory>
</VirtualHost>
</IfModule>
Save and exit nano editor, then restart Apache.
$ sudo systemctl restart httpd
Set up automatic updates
Here, you need to set up automatic feed updates using the Cron job utility. To refresh the feed every 10 minutes, run the command below:
$ sudo crontab -e
Add the following directive
echo "*/10 * * * * root wget -o /dev/null http://yourwebsite.com/update">> /etc/cron.d/selfoss
Just follow the instructions and you will be able to install it.
Conclude
You have Selfoss installed in your CentOS 7 server. This is a free and open source application, feel free to customize it to suit your needs.
⇒Note:
Post a Comment
Post a Comment