How to Install Simply Shorten on Fedora CoreOS Latest

Simply Shorten is an open-source URL shortener that you can use to shorten and track your links. In this tutorial, you will learn how to install Simply Shorten on Fedora CoreOS Latest.

Prerequisites

Before beginning, you should have the following:

Step 1: Install Git

  1. Open your terminal and run the following commands to install Git:
    sudo dnf upgrade
    sudo dnf install git
    
  2. After the command line above, type y for yes and then press Enter to proceed with the installation process.

Step 2: Clone Simply Shorten Repository

  1. Next, navigate to the directory where you want to install Simply Shorten.

    Note: For this tutorial, we will install in /opt/ directory.

    cd /opt/
    
  2. Clone the Simply Shorten repository:
    sudo git clone https://gitlab.com/draganczukp/simply-shorten.git
    

Step 3: Configure Simply Shorten

  1. Navigate to the Simply Shorten directory:
    cd simply-shorten/
    
  2. Rename the .env.example file to .env:
    sudo mv .env.example .env
    
  3. Open the .env file with a text editor of your choice:
    sudo nano .env
    
  4. Change the DB_DATABASE, DB_USERNAME, and DB_PASSWORD variables to point to your preferred database configuration.

Step 4: Install Required Packages

  1. Install Required Packages:
    sudo dnf install php php-fpm php-pdo php-mbstring php-json php-xml php-pecl-zip php-gd nginx supervisor
    

Step 5: Configure Nginx

  1. Open the default Nginx configuration file and edit it using nano or your preferred text editor:
    sudo nano /etc/nginx/nginx.conf
    
  2. Replace the existing server{} section with the following configuration:
server {

    listen 80;
    listen [::]:80;

    root /var/www/html;
    index index.php index.html index.htm;

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

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        include fastcgi_params;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
        expires max;
        log_not_found off;
        access_log off;
    }

    location ~ /\.ht {
        deny all;
    }
}

Step 6: Restart Nginx and PHP-FPM

  1. Restart Nginx:
    sudo systemctl restart nginx
    
  2. Restart PHP-FPM:
    sudo systemctl restart php-fpm
    

Step 7: Configure Supervisord

  1. Create a file for the Simply Shorten Supervisord configuration:
    sudo nano /etc/supervisord.d/simply_shorten.ini
    
  2. Paste the following configuration into the file:
    [program:simply_shorten]
    command=php /opt/simply-shorten/artisan queue:work --sleep=3 --tries=3 --queue=shorten
    autostart=true
    autorestart=true
    user=root
    

Step 8: Start Supervisord

  1. Start Supervisord:
    sudo systemctl start supervisord
    

Step 9: Access Simply Shorten Web Page

  1. Open your web browser and navigate to the IP address or domain name of your Fedora CoreOS Latest system.
  2. You should now see the Simply Shorten web page.

That's it! You've successfully installed Simply Shorten on your Fedora CoreOS Latest system. You can now begin to use it to shorten and track your URLs.

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!