How to build YOURLS - A URL Shortening Platform
Preview:
Disadvantages:
Suitable for personal use only, administrators must be manually added in the configuration file, and cannot be added directly from the frontend.
Deployment Method:
Step One: Update Sources and Install Dependencies
Ubuntu/Debian:
Centos:
Step Two: Install Apache Web
Ubuntu/Debian:
Centos:
Step Three: Install MySQL
Ubuntu/Debian:
Centos:
Step Four: Install PHP and Required Extensions
Ubuntu/Debian:
Centos:
Step Five: Configure the Database
Enter MySQL
Enter the root password
Create Database
Create User and Grant Permissions
Restart and Exit
Step Six: Download Source Code and Unzip
Step Seven: Configure YOURLS
Copy the Sample Configuration File:
Open the Configuration File and Make Modifications:
The following must be modified:
Database Username:
Database Password:
Database Name:
COOKIEKEY (Generate at http://yourls.org/cookie):
Admin Username and Password (If unmodified, username will be "username" and password will be "password," multiple users can be added for management here):
Access URL (Remember to resolve this URL to host IP):
The following can be modified optionally:
Allow Public Use (true for not allowed, false for allowed):
Allow Multiple Short Links to Point to the Same Long Link (For example, after enabling, both a.com/1 and a.com/2 will redirect to b.com, useful for analyzing data for each short link during multi-platform promotion):
Change Language (Default is English, for Chinese version enter 'zh_CN', further configuration is required later):
Exclude Sensitive Words (Long URLs containing the specified sensitive words will not be shortened):
Step Eight: Install Language Pack (Skip if Language is Not Changed)
Step Nine: Configure and Restart Apache
Conclusion:
Feel free to leave your shortened links in the comment section and see how short they can get.
Original link:http://enblog.fuyiran.link/Technology/16.html
Copyright: All posts on this blog, unless otherwise stated, are published using theCC BY-NC-SA 4.0 license agreement. Please indicate the source for reprinting Fu Speaking (enblog.fuyiran.link)