Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Selfoss RSS Reader on ubuntu16.04 LAMP VPS

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to install Selfoss RSS reader on ubuntu16.04 LAMP VPS. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Selfoss RSS Reader is a free and open source web-based multi-purpose, real-time streaming, mashup, news feed (RSS/Atom) reader and general aggregator. Selfoss RSS Reader has OPML import capabilities, which is a restful JSON API, and its open plug-in system allows you to easily extend default functionality by writing your own custom data connectors. You can use Selfoss for real-time streaming and collect all your posts, tweet, podcast, and feeds in one central location, which you can easily access from any desktop or mobile device.

In this tutorial, we will use the Apache web server, PHP 7.0, and MariaDB database to install Selfoss RSS Reader 2.17 on Ubuntu 16.04 LAMP VPS.

precondition

A clean Vultr Ubuntu 16.04 server instance with SSH access

Step 1: add a Sudo user

We'll start by adding a new sudo user.

First, log in to the server as root:

Ssh root@YOUR_VULTR_IP_ADDRESS

Add a new user user1 (or your preferred user name):

Adduser user1

When prompted, enter a secure and memorable password. You will also be prompted for "full name" and other details, but you can simply press enter to leave them blank.

Now check the / etc/sudoers file to make sure the sudoers team is enabled:

Visudo

Find a part like this:

% sudo ALL= (ALL:ALL) ALL

This line tells us that users who belong to the sudo group can use the sudo command to get root privileges. By default, it is uncommented, so you can simply exit the file.

Next, we need to add user1 to the sudo group:

Usermod-aG sudo user1

We can verify the members of the user1 group and check that the usermod command works with the groups command:

Groups user1

Now use the su command to switch to the new sudo user user1 account:

Su-user1

The command prompt updates to indicate that you are now logged in to your user1 account. You can verify this with the whoami command:

Whoami

Now restart the sshd service so that you can log in through ssh using the new non-root sudo user account you just created:

Sudo systemctl restart sshd

Log out of the user1 account:

Exit

Exit the root account (this will disconnect the ssh session):

Exit

You can now use the new non-root sudo user user1 account from the local host ssh to the server instance:

Ssh user1@YOUR_VULTR_IP_ADDRESS

If you want to execute sudo without entering your password every time, open the / etc/sudoers file again and use visudo:

Sudo visudo

Edit the section of the sudo group to make it look like this:

% sudo ALL= (ALL) NOPASSWD: ALL

Note: it is not recommended to disable password requirements for sudo users, but it is included here because it makes server configuration more convenient and less frustrating, especially during long system administration sessions. If you are concerned about security, you can always restore the configuration changes to their original state after you complete the administrative tasks.

Whenever you want to log in to the root user account from within the sudo user account, you can use one of the following commands:

Sudo-isudo su-

You can exit your root account and return to your sudo user account at any time:

Exit

Step 2: update the Ubuntu 16.04system

Before installing any packages on the Ubuntu server instance, we will first update the system.

Make sure you log in to the server using a non-root sudo user and run the following command

Sudo apt-get updatesudo apt-get-y upgrade

Step 3: install the Apache Web server

Install the Apache web server:

Sudo apt-get-y install apache2

Then use the systemctl command to start and enable Apache to execute automatically at startup:

Sudo systemctl enable apache2sudo systemctl start apache2

Check the Apache default site configuration file to ensure that the DocumentRoot directive points to the correct directory:

Sudo vi / etc/apache2/sites-enabled/000-default.conf

The DocumentRoot configuration options will be as follows:

DocumentRoot "/ var/www/html"

We now need to enable the mod_rewrite Apache module, so make sure that the default site profile for Apache is still open, and add the following directory Apache directive before closing the tag, so that the configuration file ends like this:

Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all

The most important instruction shown above is AllowOverride All.

Now save and exit the file and enable the mod_rewrite, mod_authz_core, and mod_headers Apache modules:

Sudo a2enmod rewrite authz_core headers

We will restart Apache at the end of this tutorial, but it is certainly a good habit to restart Apache periodically during installation and configuration, so let's do it now:

Sudo systemctl restart apache2

Step 4: install PHP 7.0

We can now install PHP 7.0and all the PHP modules required for Selfoss RSS readers:

Sudo apt-get-y install php php-gd php-mbstring php-common php-mysql php-imagick php-xml libapache2-mod-php php-curl php-tidy php-zip

Step 5: install the MySQL server

Install the MySQL database server:

Sudo apt-get-y install mysql-server

During the MySQL server installation, be sure to enter the security password for the MySQL root user. This root user is different from the root user of Ubuntu because it is only used to connect to your database server and has full permissions.

Start and enable the MySQL server to execute automatically at startup:

Sudo systemctl enable mysqlsudo systemctl start mysql

Protect your MySQL server installation:

Sudo mysql_secure_installation

When prompted, enter the password you created for the MYSQL root user during installation. Simply answer all the other "Y" yes / no questions, because the default advice is the safest option.

Step 6: create a database for the Selfoss RSS reader

Run the following command to log in to MySQL shell as MySQL root:

Sudo mysql-u root-p

To access the MySQL command prompt, simply enter the MySQL root password at the prompt.

Run the following query to create an MySQL database and database user for the Selfoss RSS reader:

CREATE DATABASE selfoss_db CHARACTER SET utf8 COLLATE utf8_general_ci;CREATE USER 'selfoss_user'@'localhost' IDENTIFIED BY' UltraSecurePassword';GRANT ALL PRIVILEGES ON selfoss_db.* TO 'selfoss_user'@'localhost';FLUSH PRIVILEGES;EXIT

If you prefer, you can also replace the database name selfoss_db and user name selfoss_user with something you prefer. Also, make sure you replace "UltraSecurePassword" with a truly secure password.

Step 7: install the Selfoss RSS reader file

Change the current working directory to the default web directory:

Cd / var/www/html/

If you receive an error message saying "there is no such file or directory", try the following command:

Cd / var/www/; sudo mkdir html; cd html

Your current working directory is now: / var/www/html/. You can use the pwd (print working directory) command to check:

Pwd

Now use wget to download the Selfoss RSS Reader installation package:

Sudo wget-- content-disposition https://github.com/SSilence/selfoss/archive/2.17.zip

Please note: you must check the latest version by visiting the Selfoss RSS Reader download page.

List the current directory to check that you have successfully downloaded the file:

Ls-la

Delete index.html:

Sudo rm index.html

Let's quickly install and extract the files so that we can extract the files:

Sudo apt-get-y install unzip

Now extract the zip archive:

Sudo unzip selfoss-2.17.zip

Move all installation files to the web root directory:

Sudo mv-v selfoss-2.17/* selfoss-2.17/.* / var/www/html 2 > / dev/null

Change the ownership of network files to avoid any permission issues:

Sudo chown-R www-data:www-data *. /

Restart Apache:

Sudo systemctl restart apache2

Step 8: install and run the writer

The Selfoss RSS reader requires us to download some plug-ins using composer, so let's install composer:

Sudo apt-get-y install composer

Now make sure you are in the webroot directory:

Cd / var/www/html

Run composer with the www-data user:

Sudo-u www-data composer install

You'll see some warnings from composer telling you not to write to the cache, but don't worry too much, because everything is installed properly.

Now we are ready to move on to the final step.

Step 9: complete the Selfoss RSS reader installation

We first need to update the Selfoss RSS reader profile configuration. Ini provides the correct database settings, so make sure you are still in the webroot directory and copy the default values. Ini config.ini:

Sudo cp-iv defaults.ini config.ini

Next, open the configuration. Ini configuration file and add the following database values:

[globals] db_type=mysqldb_host=localhostdb_database=selfoss_dbdb_username=selfoss_userdb_password=UltraSecurePassworddb_port=3306

Now we need to add a password hash to config. But first we need to generate it, so visit the following URL in your browser:

Http://YOUR_VULTR_IP_ADDRESS/password

Then enter the desired password in the password field and click Generate.

Simply copy the resulting hash value to the password option in the configuration. So, the password part now looks like this:

Username=adminpassword=b729a37c34ff9648c33d67de3b289b58b7486dd71236343a6c2c275c2cc0477bd1d254eb92248bfa753169547d4bd2e81c2c9e460ba5bba822af1e87722dd12asalt=

Note: your password hash is obviously different from the hash shown above, and you are free to choose a different user name.

Removes all other unedited options from the configuration. Your complete configuration file looks like this:

[globals] db_type=mysqldb_host=localhostdb_database=db1db_username=u1db_password=usecpass1db_port=3306username=adminpassword=b729a37c34ff9648c33d67de3b289b58b7486dd71236343a6c2c275c2cc0477bd1d254eb92248bfa753169547d4bd2e81c2c9e460ba5bba822af1e87722dd12asalt=

Note: if you want to change any default values. Ini options, which you can simply add to the list of options above.

After editing the configuration file, you can save and exit the file.

You can now log in to Selfoss RSS Reader to access the home page and enter your user name and password:

Http://YOUR_VULTR_IP_ADDRESS/

If you want readers to update your feed automatically (as you will almost certainly do), you need to edit your crontab:

Sudo crontab-e

Add the following line every hour to refresh your feed:

0 * www-data cd / var/ https://www.cnbanwagong.com & & php cliupdate.php

If you have not already configured the Vultr DNS settings, you can use the Vultr DNS control panel to do so.

It is also recommended that the site be configured to use SSL, as most modern browsers issue warnings when the site is not enabled for SSL and SSL certificates are now available for free.

This is the end of the article on "how to install Selfoss RSS Reader on ubuntu16.04 LAMP VPS". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report