Paste is an open-source PHP application that allows you to create and share online code snippets. This tutorial will guide you through the steps required to install Paste on a Fedora Server Latest.
Before you begin, you must ensure that the following prerequisites are met:
Update the system
sudo dnf update
Install required packages
sudo dnf install php-pdo php-mysqlnd
Download the Paste archive from the official website
sudo curl -L https://github.com/paste/PASTE/archive/master.zip --output paste.zip
Extract the downloaded archive
sudo unzip paste.zip -d /var/www/html/
Rename the extracted folder to paste
sudo mv /var/www/html/PASTE-master /var/www/html/paste
Create a MySQL database for Paste
sudo mysql -u root -p
CREATE DATABASE paste;
GRANT ALL PRIVILEGES ON paste.* TO 'pasteuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT;
pasteuser
and password
with your desired database username and password.Configure the Paste application
sudo cp /var/www/html/paste/inc/config.inc.php.sample /var/www/html/paste/inc/config.inc.php
sudo nano /var/www/html/paste/inc/config.inc.php
Inside the configuration file, modify the following lines:
$cfg['db_host'] = 'localhost';
$cfg['db_port'] = '';
$cfg['db_user'] = 'pasteuser';
$cfg['db_pass'] = 'password';
$cfg['db_name'] = 'paste';
$cfg['app_webroot'] = '/paste/';
Save and close the file.
Set permissions on the paste
directory
sudo chown -R apache:apache /var/www/html/paste
Restart the Apache webserver
sudo systemctl restart httpd
You can now access Paste on your Fedora Server Latest by navigating to the following URL:
http://your_server_ip_or_domain/paste/
You will be prompted to create a new account, and should then be able to start creating and sharing code snippets using the Paste application.
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!