How to Install Moonmoon on OpenSUSE Latest

Moonmoon is a web-based RSS aggregator that is written in PHP. In this tutorial, we'll show you the steps to install MoonMoon on OpenSUSE.

Prerequisites

Before proceeding with the installation, ensure you have the following:

Step 1: Install required packages

Before installing MoonMoon, you need to install the required packages needed to run it. Open your terminal and run the following command:

sudo zypper install php php-fpm php-zip php-curl php-dom php-gd php-json php-mbstring php-opcache php-xml

This command installs PHP and other required PHP modules. You may be prompted to enter your system password to allow the installations.

Step 2: Download and Extract Moonmoon

Once the installation of necessary packages is complete, we'll proceed to download and extract Moonmoon. Open your terminal and run the following command:

cd /var/www/html/
sudo wget https://github.com/mauricesvay/moonmoon/archive/master.zip
sudo unzip master.zip
sudo mv moonmoon-master moonmoon

This command downloads the latest version of Moonmoon from its official repository and unpacks it to the /var/www/html/moonmoon directory.

Step 3: Grant Permissions and Change Ownership

After you've downloaded and extracted Moonmoon, you need to set appropriate permissions and change ownership of the /var/www/html/moonmoon directory. Run the following commands:

sudo chown -R wwwrun:www /var/www/html/moonmoon
sudo chmod -R 755 /var/www/html/moonmoon

These commands enable www-data user to have read, write, and execute permissions.

Step 4: Create SQLite Database

To store data for Moonmoon, we'll create a database using SQLite. Open your terminal and run the following command:

sudo mkdir /var/www/html/moonmoon/data
sudo chmod 770 /var/www/html/moonmoon/data
sudo chgrp www /var/www/html/moonmoon/data
sudo touch /var/www/html/moonmoon/data/moonmoon.db
sudo chmod 660 /var/www/html/moonmoon/data/moonmoon.db
sudo chgrp www /var/www/html/moonmoon/data/moonmoon.db

This creates a data folder and creates a database file moonmoon.db in the data directory. We also set the appropriate permissions and ownership for the database file.

Step 5: Configure PHP-FPM

Moonmoon requires PHP-FPM to run, and we'll be editing its configuration. Open the /etc/php-fpm.d/www.conf file using the command:

sudo vim /etc/php-fpm.d/www.conf

Find the following lines and adjust the values as shown:

listen = /var/run/php-fpm.sock

user = wwwrun
group = www

Save and exit the file.

Step 6: Configure Nginx

Next, we'll configure Nginx as the web server for Moonmoon. Run the following command to open the default Nginx configuration file:

sudo vim /etc/nginx/nginx.conf

Add the following block of code to the server section, then save and exit the file:

server {
    listen 80;
    server_name moonmoon.local;
    root /var/www/html/moonmoon;
    index index.php index.html index.htm;
    access_log /var/log/nginx/moonmoon.access.log;
    error_log /var/log/nginx/moonmoon.error.log;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}

This code block configures Nginx to listen on port 80 for all requests to the moonmoon.local domain. We also specify the root directory, index file, and other necessary configuration details.

Step 7: Start PHP-FPM and Nginx

With PHP-FPM and Nginx configured, you can now start their services. Run the following commands:

sudo systemctl start php-fpm.service
sudo systemctl enable php-fpm.service

sudo systemctl start nginx.service
sudo systemctl enable nginx.service

This command starts both services and sets them to start at boot.

Step 8: Access Moonmoon from Browser

Once both services are running, you can access Moonmoon from your browser by going to http://moonmoon.local/.

You should now see the Moonmoon homepage, where you can add feeds to start consuming RSS or Atom feeds.

Conclusion

This tutorial walked you through installing Moonmoon on OpenSUSE, configuring the required packages and setting up a web server to serve the app. You are now ready to start aggregating and consuming RSS feeds with Moonmoon.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!