How to install Leed on Debian
Leed is an open-source RSS reader, which can be self-hosted on any web server. In this tutorial, we will show you how to install and configure Leed on Debian.
Prerequisites
Before we get started, make sure you have the following:
- A Debian Linux server with sudo access
- Apache web server
- PHP 7.0+ and the necessary extensions
- MySQL or MariaDB database
Step 1: Install Apache
For Leed to run, we need a web server installed on our system. Apache is the most popular web server, and we are going to install it using the following command:
sudo apt-get install apache2
After installation, we can start Apache using the following command:
sudo systemctl start apache2
Step 2: Install PHP and necessary extensions
Leed is built using PHP, so we need to install PHP along with the necessary extensions that Leed requires. Execute the following command to install PHP:
sudo apt-get install php php-mysql php-curl php-gd php-mbstring php-xml php-zip
Step 3: Install MySQL/MariaDB
Leed requires a database to store RSS feeds and user data. We can choose either MySQL or MariaDB database. Let's install MariaDB using the following command:
sudo apt-get install mariadb-server
After installation, we need to secure MariaDB by running the following command:
sudo mysql_secure_installation
Step 4: Download and Install Leed
We can download Leed from the Github repository by executing the following command:
sudo git clone https://github.com/LeedRSS/Leed.git /var/www/html/leed
Now, we need to create a database and user for Leed. Log in to the MySQL/MariaDB shell using the following command:
sudo mysql -u root -p
Once you are logged in, create a new database, user and grant permissions to that user using the following commands:
CREATE DATABASE leed;
CREATE USER 'leeduser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON leed.* TO 'leeduser'@'localhost';
FLUSH PRIVILEGES;
Now, import the schema from the Leed repository following command:
cd /var/www/html/leed/
sudo mysql -u leeduser -p leed < leed-schema-mysql.sql
Next, rename the config.default.php file to config.php and update the database credentials in the config.php file like:
cd /var/www/html/leed/config/
sudo cp config.default.php config.php
sudo nano config.php
Edit the following lines with your database details:
define('MYSQL_HOST', 'localhost');
define('MYSQL_PORT', 3306);
define('MYSQL_USER', 'leeduser');
define('MYSQL_PASS', 'password');
define('MYSQL_DB', 'leed');
Step 5: Configure Apache
To serve Leed through Apache, we need to configure a virtual host. Create a new virtual host file using your preferred text editor:
sudo nano /etc/apache2/sites-available/leed.conf
Copy the following code:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName example.com
DocumentRoot /var/www/html/leed
<Directory /var/www/html/leed/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/leed_error.log
CustomLog ${APACHE_LOG_DIR}/leed_access.log combined
</VirtualHost>
Replace example.com with your domain name. Save and exit the file. Now, enable the virtual host by running the following command:
sudo a2ensite leed.conf
Don't forget to reload Apache:
sudo systemctl reload apache2
Step 6: Access and Configure Leed
Leed is now installed and running, and you can access it from your browser using the IP address or domain name of your server. You can create a new account, and start adding RSS feeds to your reader.
Conclusion
In this tutorial, you learned how to install and configure Leed on Debian. If you have any questions or feedback, please leave a comment below. Happy reading!