In this tutorial you will learn how to install YOURLS.
I am doing this on a Debian 11 server (RS Zimtstern) but the installation procedure should also work on other Debian versions.
You need Apache2, PHP and MariaDB installed on your server, see here.
YOURLS is an open source URL shortener with a web GUI.
cd /var/www/ git clone https://github.com/YOURLS/YOURLS.git mv YOURLS FOLDER cd FOLDER
Now we have to configure YOURLS:
cd user cp config-sample.php config.php nano config.php
You need to make the following changes:
'your db user name'with your database username.
/** MySQL database username */ define( 'YOURLS_DB_USER', 'your db user name' );
'your db password'with your database password.
/** MySQL database password */ define( 'YOURLS_DB_PASS', 'your db password' );
'yourls'with your database name (username).
/** The name of the database for YOURLS ** Use lower case letters [a-z], digits [0-9] and underscores [_] only */ define( 'YOURLS_DB_NAME', 'yourls' );
'http://your-own-domain-here.com'with your URL.
/** YOURLS installation URL ** All lowercase, no trailing slash at the end. ** If you define it to "http://sho.rt", don't use "http://www.sho.rt" in your browser (and vice-versa) ** To use an IDN domain (eg http://héhé.com), write its ascii form here (eg http://xn--hh-bjab.com) */ define( 'YOURLS_SITE', 'http://your-own-domain-here.com' );
modify this text with something randomwith random letters and numbers.
/** A random secret hash used to encrypt cookies. You don't have to remember it, make it long and complicated ** Hint: copy from http://yourls.org/cookie */ define( 'YOURLS_COOKIEKEY', 'modify this text with something random' );
'username' => 'password',.
/** Username(s) and password(s) allowed to access the site. Passwords either in plain text or as encrypted hashes ** YOURLS will auto encrypt plain text passwords in this file ** Read http://yourls.org/userpassword for more information */ $yourls_user_passwords = [ 'username' => 'password', // 'username2' => 'password2', // You can have one or more 'login'=>'password' lines ];
Remove sample files no longer needed by executing:
cd /var/www/FOLDER rm sample* cd user/plugins rm -r sample*
cd /var/www/FOLDER git fetch origin git reset --hard origin/master
cd /var/www/FOLDER/user/plugins git clone https://github.com/Flynntes/Sleeky.git mv Sleeky/sleeky-backend/ ./ rm -r Sleeky
cd /var/www/FOLDER/user/plugins rm -r sleeky-backend git clone https://github.com/Flynntes/Sleeky.git mv Sleeky/sleeky-backend/ ./ rm -r Sleeky
You have now installed a YOURLS URL shortener.
This tutorial contains content of https://github.com/SanCraftDev/Debian-Setup/blob/main/README.md and https://github.com/louislam/uptime-kuma.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
By making a contribution to this project, I certify that:
The contribution was created in whole or in part by me and I have the right to submit it under the license indicated in the file; or
The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same license (unless I am permitted to submit under a different license), as indicated in the file; or
The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the license(s) involved.