PurritoBin is a self-hosted pastebin web application that allows you to store and share plain text or code snippets. It is an open-source application built using PHP and MySQL. In this tutorial, we will show you how to install PurritoBin on Fedora Server latest.
Before you start installing PurritoBin, you need to have the following prerequisites:
Firstly, you need to clone the PurritoBin repository from the GitHub repository using the Git command-line tool. To install Git on your Fedora Server, run the following command:
sudo dnf install git
Once the Git is installed, navigate to the /var/www/html
directory and clone the PurritoBin repository using the following command:
cd /var/www/html/
sudo git clone https://github.com/PurritoBin/PurritoBin.git
After cloning the repository, you need to configure the Apache virtual host for PurritoBin. To do so, create a new virtual host configuration file purritobin.conf
in the /etc/httpd/conf.d/
directory using the following command:
sudo nano /etc/httpd/conf.d/purritobin.conf
Add the following configuration:
<VirtualHost *:80>
ServerName your-domain.com
DocumentRoot /var/www/html/PurritoBin/public
<Directory /var/www/html/PurritoBin/public>
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/httpd/purritobin_error.log
CustomLog /var/log/httpd/purritobin_access.log combined
</VirtualHost>
Save and close the file.
Next, install the necessary dependencies required by PurritoBin using the following command:
sudo dnf install php php-fpm php-gd php-mysqlnd php-intl php-simplexml php-mbstring php-json php-curl php-opcache
Now, restart the Apache and PHP-FPM services to apply the changes:
sudo systemctl restart httpd
sudo systemctl restart php-fpm
PurritoBin requires a MySQL/MariaDB database to store the data. Follow the below steps to create a new database and user:
Login to the MySQL shell using the following command:
sudo mysql -u root -p
Once you’re logged in, enter the following commands to create a new database and user:
CREATE DATABASE purritobin;
CREATE USER 'purritobin'@'localhost' IDENTIFIED BY 'password_here';
GRANT ALL PRIVILEGES ON purritobin.* TO 'purritobin'@'localhost';
Replace password_here
with your preferred password.
Finally, exit the shell by typing the following command:
exit;
Now, you need to configure PurritoBin to use the database created in Step 4.
Copy the config.php.example
file to config.php
using the following command:
cd /var/www/html/PurritoBin
cp config.php.example config.php
Edit the config.php
file and update the following lines with your database credentials:
'DB_HOST' => 'localhost',
'DB_NAME' => 'purritobin',
'DB_USER' => 'purritobin',
'DB_PASS' => 'password_here',
Save and close the file.
You have completed the installation of PurritoBin on Fedora Server. Now, open a web browser and navigate to http://your-domain.com
. You should see the PurritoBin welcome page.
In this tutorial, you learned how to install PurritoBin on Fedora Server latest. You also learned how to configure Apache, install the necessary dependencies, create a MySQL database, and configure PurritoBin.
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!