Our server can handle videos, pictures, and music from any source and it would be cool to have another tool to retrieve news from some RSS providers. This can be done with Leed, a RSS project organized for servers. You can have a final result, as shown in the following screenshot:
This project has a "quick and easy" installation spirit, so you can give it a try without harness. Leed (for Light Feed) allows you to you access RSS feeds from any browser, so no RSS reader application is needed, and every user in your network can read them as well. You install it on the server and feeds are automatically updated.
We already have Apache, MySQL, and PHP installed, and we need a few other prerequisites to run Leed:
Remember the database that we created for MediaDrop in Chapter 1, Transforming Your BeagleBone Black into a Media Server?
You will be at ease here, as this is exactly the same approach because Leed requires its own database as well.
You will begin by opening a MySQL session:
debian@arm:~$ mysql –u root –p
What we need here is to have a dedicated Leed user with its database. This user will be connected using the following:
create user 'debian_leed'@'localhost' IDENTIFIED BY 'temppwd'; create database leed_db; use leed_db; grant create, insert, update, select, delete on leed_db.* to debian_leed@localhost; exit
We prepared our server to have its environment ready for Leed, so after getting the latest version, we'll get it working with Apache by performing the following steps:
debian@arm:~$ git clone https://github.com/ldleman/Leed.git debian@arm:~$ ls mediadrop mjpg-streamer Leed music
debian@arm:~$ sudo mv Leed /var/www/
debian@arm:~$ chmod 777 /var/www/Leed/ -R
When you go to the server address (http//192.168.0.15/leed/install.php
), you'll get the following installation screen:
We now need to fill in the database details that we previously defined and add the Administrator credentials as well. Now save and quit. Don't worry about the explanations, we'll discuss these settings thereafter.
It's important that all items from the prerequisites list on the right are green.
Otherwise, a warning message will be displayed about the wrong permissions settings, as shown in the following screenshot:
After the configuration, the installation is complete:
Leed is now ready for you.
If you want automatic updates for your feeds, you'll need to define a synchronization task with cron
:
cron
jobs:debian@arm:~$ sudo crontab –e
0 * * * * wget -q -O /var/www/leed/logsCron "http://192.168.0.15/Leed/action.php?action=synchronize
install.php
for security matters:debian@arm:~$ rm /var/www/Leed/install.php
When you need to add some feeds from the Manage menu, in Feed Options (on the right- hand side) select Preferences and you just have to paste the RSS link and add it with the button:
You might find it useful to organize your feeds into groups, as we did for movies in MediaDrop. The Rename button will serve to achieve this goal. For example, here a TV Shows category has been created, so every feed related to this type will be organized on the main screen.
You will be asked to choose between two synchronisation modes: Complete and Graduated.
You also have the possibility of allowing anonymous people to read your feeds. If you remember, in Chapter 3, Examples of Real-world Situations, we allowed guests to access our content but not to publish any. This is the same case here. Setting Allow anonymous readers to Yes will let your guests access your feeds but not add any.
If you want to extend Leed capabilities, you can use the Leed Market—as the author defined it—from Feed options in the Manage menu. There, you'll be directed to the Leed Market space. Installation is just a matter of downloading the ZIP file with all plugins:
debian@arm:~/Leed$ wget https://github.com/ldleman/Leed-market/archive/master.zip debian@arm:~/Leed$ sudo unzip master.zip
Let's use the AdBlock plugin for this example: