Simple-URL-Shortener is an open-source tool that allows you to create custom shortened links for websites, which can be useful for sharing links on social media or tracking clicks on a link. Here's how you can install Simple-URL-Shortener on the latest version of Pop!_OS.
Before you start, make sure you have the following:
The first step is to install the required dependencies. Simple-URL-Shortener needs Apache, PHP, and MariaDB to function correctly. You can install them with the following commands:
sudo apt update && sudo apt upgrade
sudo apt install apache2 mariadb-server mariadb-client php php-mysql
After the installation is complete, start the Apache and MariaDB services:
sudo systemctl start apache2
sudo systemctl start mariadb
You can also configure them to start automatically at boot time:
sudo systemctl enable apache2
sudo systemctl enable mariadb
The next step is to download Simple-URL-Shortener from GitHub using Git. Run the following command to clone the repository:
git clone https://github.com/azlux/Simple-URL-Shortener.git
You will find the cloned repository in your home directory. Change to the cloned directory and set the permissions for the config.php
file:
cd Simple-URL-Shortener
cp config.dist.php config.php`
chmod 666 config.php
Simple-URL-Shortener needs a database to store the shortened URLs. You can create a database and user for Simple-URL-Shortener using the following commands:
sudo mysql -u root -p
Enter the MySQL root password (set during installation) to log in. Then, run the following commands to create the database and user:
CREATE DATABASE shortener;
CREATE USER 'shorteneruser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON shortener.* TO 'shorteneruser'@'localhost';
FLUSH PRIVILEGES;
Replace password
with a secure password for the user. This will create a database named "shortener" and a user named "shorteneruser" with full privileges on the "shortener" database.
After creating the database and user, you need to configure Simple-URL-Shortener to use the database. Open the config.php
file using a text editor:
nano config.php
Change the following values in the file:
$bdd_host = "localhost";
$bdd_name = "shortener";
$bdd_user = "shorteneruser";
$bdd_pass = "password";
Replace password
with the password you set for the database user in step 3.
Finally, you can test Simple-URL-Shortener by accessing it through your web browser. Navigate to http://localhost/Simple-URL-Shortener/
in your web browser, and you should see the Simple-URL-Shortener landing page.
You can create a shortened link by entering the URL you want to shorten and clicking the "Shorten" button.
That's it! You have successfully installed Simple-URL-Shortener on Pop!_OS. You can now use it to shorten your URLs and share them with others.
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!