How to install Simple-URL-Shortener on Fedora Server Latest

Simple-URL-Shortener is an open-source URL shortening platform that can be easily installed on a Fedora server. In this tutorial, you will learn how to install Simple-URL-Shortener from GitHub on a Fedora server using the command-line interface.

Prerequisites

Before installing Simple-URL-Shortener, you need to have the following:

Installation

  1. Open your terminal application on your server.
  2. Install the Apache web server and MariaDB database server by running the following command:
sudo dnf install httpd mariadb mariadb-server
  1. Start and enable the Apache and MariaDB services to ensure they will automatically start on boot:
sudo systemctl start httpd mariadb.service
sudo systemctl enable httpd mariadb.service
  1. Install the PHP and its dependencies by running the following command:
sudo dnf install php php-mysqlnd mod_php
  1. Install the Simple-URL-Shortener package dependencies by running the following commands:
sudo dnf install git composer nodejs
sudo npm install -g sass
  1. Clone the Simple-URL-Shortener git repository by running the following command:
sudo git clone https://github.com/azlux/Simple-URL-Shortener.git /var/www/html/short
  1. Change the directory to Simple-URL-Shortener root folder and install the required packages by running the following command:
cd /var/www/html/short
sudo composer install
  1. Rename the .env.example file to .env and configure the required database details by running the following command:
sudo cp .env.example .env
sudo nano .env
  1. Generate an application key to the .env file by running the following command:
sudo php artisan key:generate
  1. Create a new database and user by running the following commands:
sudo mysql -u root
CREATE DATABASE short;
CREATE USER 'short_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON short.* TO 'short_user'@'localhost';
FLUSH PRIVILEGES;
exit
  1. Open the .env file again and update the database details with the created user and its password, then save and exit the file.
  2. Run the migrations and create the initial database tables by running the following command:
sudo php artisan migrate
  1. Change the ownership of the web application files to ensure the Apache user has write access to required directories by running the following command:
sudo chown -R apache:apache /var/www/html/short
  1. Restart the Apache web server to apply the changes by running the following command:
sudo systemctl restart httpd
  1. Finally, ensure that the firewall allows access to the Apache web server by running the following command:
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

Congratulations, you have successfully installed Simple-URL-Shortener on your Fedora server! You can now access your new URL shortening platform by accessing your domain name in any web browser.

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!