How to Install PurritoBin on Debian Latest
PurritoBin is a lightweight open source web-based pastebin and it's easy to install on the Debian Linux operating system. In this tutorial, we will show you the steps to get PurritoBin up and running.
Prerequisites
Before we start installing PurritoBin, ensure that your Debian system is up-to-date and you have administrative rights to install packages using apt-get.
Installation
First, update the package list on your Debian system:
sudo apt-get updateInstall required packages:
sudo apt-get install git sqlite3 libsqlite3-dev nginx php7.3-fpm php7.3-sqlite3Clone the PurritoBin repository from the GitHub:
git clone https://github.com/PurritoBin/PurritoBin.gitMove to the
PurritoBindirectory:cd PurritoBinInstall the project dependencies using Composer:
php7.3 /usr/local/bin/composer install --no-devNote: If
composeris not installed on your Debian system, follow these instructions to download and install it.Create a new SQLite database file:
touch database.sqliteGrant read, write and execute permissions to the
www-datauser for thedatabase.sqlitefile:sudo chown www-data:www-data database.sqlite sudo chmod 755 database.sqlite ```Create the webserver configuration file for the PurritoBin:
sudo nano /etc/nginx/sites-available/PurritoBin
Add the below lines to the opened file:
server { listen 80; server_name your.domain.com; root /path/to/PurritoBin/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Here, replace `your.domain.com` with your actual domain name and `path/to/PurritoBin` with the actual path where you cloned the PurritoBin repository.
8. Create a symbolic link for the site configuration in `sites-enabled`:
sudo ln -s /etc/nginx/sites-available/PurritoBin /etc/nginx/sites-enabled/
9. Test the Nginx configuration and reload the nginx service:
sudo nginx -t sudo systemctl reload nginx
10. Finally, you can go to the website (`http://your.domain.com`) to check if the installation was successful.
Congratulations, you have successfully installed PurritoBin on your Debian system!