Installing Pepperminty Wiki on Debian
Pepperminty Wiki is a lightweight, open-source wiki software written in PHP. In this tutorial, we will guide you through the installation process of Pepperminty Wiki on Debian.
Prerequisites
Before starting with the installation, make sure that you have the following prerequisites:
- A Debian system with root or sudo access.
- PHP 7.4 or later installed on your system.
- Apache or Nginx web server installed and configured.
- Git installed in your system.
Step 1: Install Git
Git is required to clone the Pepperminty Wiki repository from GitHub. You can install Git on your Debian system using the following command:
sudo apt-get update
sudo apt-get install git
Step 2: Clone Pepperminty Wiki Repository
Next, clone the Pepperminty Wiki repository to your Debian system using the following command:
git clone https://github.com/sbrl/Pepperminty-Wiki.git
This command will clone the Pepperminty Wiki repository in a directory named Pepperminty-Wiki.
Step 3: Configure Apache or Nginx
Configure Apache or Nginx web server to serve the Pepperminty Wiki directory as a virtual host.
Configuring Apache
Create a new virtual host Apache configuration file with the following command:
sudo nano /etc/apache2/sites-available/pepperminty-wiki.conf
Add the following configuration and save the file:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName wiki.example.com
DocumentRoot /path/to/Pepperminty-Wiki
<Directory /path/to/Pepperminty-Wiki>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/wiki_error.log
CustomLog ${APACHE_LOG_DIR}/wiki_access.log combined
</VirtualHost>
Enable the new virtual host configuration by running the following command:
sudo a2ensite pepperminty-wiki.conf
Restart Apache web server for the changes to take effect:
sudo systemctl restart apache2
Configuring Nginx
Create a new server block configuration file for Pepperminty Wiki with the following command:
sudo nano /etc/nginx/sites-available/pepperminty-wiki.conf
Add the following configuration and save the file:
server {
listen 80;
server_name wiki.example.com;
root /path/to/Pepperminty-Wiki;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
error_log /var/log/nginx/wiki_error.log;
access_log /var/log/nginx/wiki_access.log;
}
Enable the new server block configuration by running the following command:
sudo ln -s /etc/nginx/sites-available/pepperminty-wiki.conf /etc/nginx/sites-enabled/
Restart Nginx web server for the changes to take effect:
sudo systemctl restart nginx
Step 4: Configure Pepperminty Wiki
After configuring the web server, configure Pepperminty Wiki to connect to your database.
Copy the config.example.php file to config.php:
cp config.example.php config.php
Open the config.php file with any text editor and edit the following lines:
define('DB_HOST', 'localhost');
define('DB_PORT', '3306');
define('DB_NAME', 'peppermintywiki');
define('DB_USER', 'wikiuser');
define('DB_PASSWORD', 'wikipassword');
Replace the values with your actual database host, port, name, username, and password.
Step 5: Install Dependencies
Pepperminty Wiki uses Composer to manage its dependencies. Run the following commands to install Composer and the required dependencies:
sudo apt-get install composer
cd Pepperminty-Wiki
composer install --no-dev
Step 6: Create Database and Tables
Create a new database and tables for Pepperminty Wiki using the following commands:
mysql -u root -p
CREATE DATABASE peppermintywiki;
GRANT ALL PRIVILEGES ON peppermintywiki.* TO 'wikiuser'@'localhost' IDENTIFIED BY 'wikipassword';
FLUSH PRIVILEGES;
exit
mysql -u wikiuser -p peppermintywiki < database.sql
Replace wikiuser and wikipassword with the values you set in Step 4.
Step 7: Access Pepperminty Wiki
You can now access Pepperminty Wiki by visiting the URL of your virtual host in your web browser.
http://wiki.example.com
Congratulations! You have successfully installed Pepperminty Wiki on your Debian system. You can now start creating and managing your wiki pages.