This tutorial will guide you through the process of installing shorturl on Fedora Server Latest. Shorturl is a simple URL shortener web application that creates short URLs for long links. It is written in Python and uses Flask web framework.
Before you begin this tutorial, you will need the following:
Shorturl is hosted on Git. You need to install Git to clone the repository onto your server. To install Git, run the following command:
sudo dnf install git
Once Git is installed, use it to clone the shorturl repository onto your Fedora Server instance. Navigate to the directory where you want to install shorturl and then run the following command:
git clone https://git.mills.io/prologic/shorturl.git
Shorturl requires several Python dependencies to function. To install these dependencies, navigate to the shorturl directory and run the following command:
sudo dnf install python3-devel python3-pip
pip3 install -r requirements.txt
Configure shorturl by copying the config.sample
file to config.py
:
cp config.sample config.py
Open config.py
with your favorite text editor and set the values for SERVER_NAME
and SECRET_KEY
.
SERVER_NAME = 'localhost:5000'
SECRET_KEY = 'your-secret-key'
Now you are ready to start the server. Run the following commands:
export FLASK_APP=shorturl
export FLASK_ENV=development
flask run --host=0.0.0.0
Your shorturl web server should now be running on port 5000. You can test it by visiting http://your-server-ip:5000 in your web browser.
In this tutorial, you installed shorturl on a Fedora Server Latest instance. By following these steps, you should now have a functional URL shortener web application that you can use to share links to long 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!