YOURLS is a free open-source set of PHP scripts that allows you to run your own URL shortener service. It can be installed on any web server, including those running on Fedora CoreOS.
In this tutorial, we will guide you through the process of installing YOURLS on Fedora CoreOS.
Before starting the installation process, make sure you have the following requirements:
Log in to your Fedora CoreOS server via SSH.
Access the root directory of your web server. On Apache, this is usually located at /var/www/html/
, while on nginx it is usually located at /usr/share/nginx/html/
.
Download the latest version of YOURLS using wget:
$ wget https://github.com/YOURLS/YOURLS/archive/refs/tags/1.7.4.tar.gz
Extract the downloaded archive:
$ tar xvzf 1.7.4.tar.gz
Rename the extracted directory:
$ mv YOURLS-1.7.4 yourls
Change the permissions of the yourls
directory:
$ chmod -R 755 yourls
Create a MySQL database for YOURLS:
$ mysql -u root -p
> CREATE DATABASE yourls;
> GRANT ALL PRIVILEGES ON yourls.* TO 'yourlsuser'@'localhost' IDENTIFIED BY 'yourlspassword';
> FLUSH PRIVILEGES;
> EXIT
Replace yourlsuser
and yourlspassword
with your preferred username and password.
Rename the user/config-sample.php
file to user/config.php
:
$ cd yourls
$ mv user/config-sample.php user/config.php
Edit the user/config.php
file and enter your MySQL database credentials.
define( 'YOURLS_DB_USER', 'yourlsuser' );
define( 'YOURLS_DB_PASS', 'yourlspassword' );
define( 'YOURLS_DB_NAME', 'yourls' );
define( 'YOURLS_DB_HOST', 'localhost' );
Make sure to replace yourlsuser
and yourlspassword
with your actual MySQL database credentials.
Upload the yourls
directory to your web server.
Open your web browser and navigate to your domain followed by /yourls
. Example: https://example.com/yourls
.
Follow the installation wizard to complete the installation process.
On the first step, enter your MySQL database credentials.
On the second step, enter your desired admin username and password.
On the third step, customize your YOURLS installation settings.
On the final step, review your settings and click the "Install YOURLS" button.
In this tutorial, you have learned how to install YOURLS on Fedora CoreOS. You can now use your YOURLS installation to create short and customized URLs for your website or business. Have fun shortening your 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!