YOURLS (Your Own URL Shortener) is a free and open-source URL shortener that allows you to create your URLs on your website, and you can track the traffic and statistics of your links with this tool. In this tutorial, we will guide you on how to install YOURLS on POP! OS Latest.
Before starting the installation process, you need to have the following requirements:
mysqli
, mbstring
, curl
, xml
, json
, and gd
To install the required packages, you can run the following command:
sudo apt update
sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql php-curl php-mbstring php-xml php-json php-gd
You will need to configure your MySQL database, create a new database and user with permissions, and set a password.
wget https://github.com/YOURLS/YOURLS/archive/1.7.9.zip
unzip 1.7.9.zip
sudo mv YOURLS-1.7.9 /var/www/html/yourls
sudo chown -R www-data:www-data /var/www/html/yourls
sudo chmod -R 755 /var/www/html/yourls
mysql -u root -p
CREATE DATABASE yourls;
CREATE USER 'yourlsuser'@'localhost' IDENTIFIED BY 'yourlspassword';
GRANT ALL PRIVILEGES ON yourls.* TO 'yourlsuser'@'localhost';
FLUSH PRIVILEGES;
exit;
user/config-sample.php
file to user/config.php
.cd /var/www/html/yourls/user
mv config-sample.php config.php
config.php
file and edit it with your MySQL database credentials.define( 'YOURLS_DB_USER', 'yourlsuser' );
define( 'YOURLS_DB_PASS', 'yourlspassword' );
define( 'YOURLS_DB_NAME', 'yourls' );
define( 'YOURLS_DB_HOST', 'localhost' );
define( 'YOURLS_SECRET_HASH', 'your-secret-key' );
http://localhost/yourls/admin/install.php
to complete the installation. Follow the on-screen instructions.Open the web browser and go to http://localhost/yourls
to access YOURLS.
Log in with the admin account you created during the installation process.
Congratulations! You have successfully installed YOURLS on POP! OS Latest. Now, you can easily create your URLs and track the traffic and statistics of your links with YOURLS.
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!