Simple-URL-Shortener is an open source web-based application that allows users to shorten long links into shorter and simpler ones. It can be installed locally on Linux Mint to use on your own server. Here is a step-by-step tutorial to install Simple-URL-Shortener on Linux Mint:
Open Terminal on Linux Mint.
Install Git by running the following command:
sudo apt-get install git
Clone Simple-URL-Shortener repository from GitHub by running the following command:
sudo git clone https://github.com/azlux/Simple-URL-Shortener.git /var/www/html/simple-url-shortener
Install Composer by running the following commands:
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
sudo chmod +x /usr/local/bin/composer
Change the directory to /var/www/html/simple-url-shortener.
cd /var/www/html/simple-url-shortener
Install dependencies by running the following command:
sudo composer install --no-interaction --no-dev --prefer-dist
Create a new database in MySQL or MariaDB.
sudo mysql -u root -p
create database shortenerdb;
Import database schema by running the following command:
sudo mysql -u root -p shortenerdb < sql/schema.sql
Create a new Virtual Host in Apache by running the following command:
sudo nano /etc/apache2/sites-available/simple-url-shortener.conf
Add the following content to the file:
<VirtualHost *:80>
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/html/simple-url-shortener/public
<Directory /var/www/html/simple-url-shortener/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
ErrorLog /var/log/apache2/simple-url-shortener-error.log
LogLevel error
CustomLog /var/log/apache2/simple-url-shortener-access.log combined
</VirtualHost>
Save and close the file by pressing Ctrl+X, then Y, then Enter.
Enable the Virtual Host by running the following command:
sudo a2ensite simple-url-shortener.conf
Restart Apache by running the following command:
sudo service apache2 restart
Set up database configuration by running the following command:
sudo nano /var/www/html/simple-url-shortener/app/config/config.php
Edit the database configuration fields as follows:
$config['database']['dsn'] = 'mysql:host=localhost;dbname=shortenerdb';
$config['database']['username'] = 'root';
$config['database']['password'] = 'yourpasswordhere';
Save and close the file by pressing Ctrl+X, then Y, then Enter.
Open your web browser and go to http://yourdomain.com.
Simple-URL-Shortener should now be installed and ready to use.
Installation of Simple-URL-Shortener on Linux Mint is a straightforward process. Following the above steps is easy and should result in a successful installation. By doing so, you will have your own URL shortening service that you can use on your own server for your own needs.
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!