Come hang with us on Discord and chat directly with the team!Discordtop-bar-close-icon

2024-09-04

How to Install Pepperminty Wiki on Debian Latest

tutorials
img

Pepperminty Wiki is a lightweight, open-source wiki software written in PHP. This guide will take you through the steps to install Pepperminty Wiki on a Debian system.

Prerequisites

Ensure you have the following before starting:

  • A Debian system with root or sudo access.
  • PHP 7.4 or later installed.
  • Apache or Nginx web server configured.
  • Git installed.

Step 1: Install Git

To clone the Pepperminty Wiki repository from GitHub, Git needs to be installed. Use the following commands:

sudo apt-get update
sudo apt-get install git

Step 2: Clone Pepperminty Wiki Repository

Clone the repository to your system:

git clone https://github.com/sbrl/Pepperminty-Wiki.git

This clones the repository into a directory named Pepperminty-Wiki.

Step 3: Configure Apache or Nginx

Set up your web server to host the Pepperminty Wiki directory as a virtual host.

Configuring Apache

Create a virtual host configuration file:

sudo nano /etc/apache2/sites-available/pepperminty-wiki.conf

Add and save the following configuration:

<VirtualHost *:80>
  ServerAdmin admin@example.com
  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 this virtual host:

sudo a2ensite pepperminty-wiki.conf

Restart Apache:

sudo systemctl restart apache2

Configuring Nginx

Create a server block configuration file:

sudo nano /etc/nginx/sites-available/pepperminty-wiki.conf

Add and save the following configuration:

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 this server block:

sudo ln -s /etc/nginx/sites-available/pepperminty-wiki.conf /etc/nginx/sites-enabled/

Restart Nginx:

sudo systemctl restart nginx

Step 4: Configure Pepperminty Wiki

Next, configure Pepperminty Wiki to connect to your database.

Copy the example configuration file:

cp config.example.php config.php

Edit the config.php file to set your database credentials:

define('DB_HOST', 'localhost');
define('DB_PORT', '3306');
define('DB_NAME', 'peppermintywiki');
define('DB_USER', 'wikiuser');
define('DB_PASSWORD', 'wikipassword');

Step 5: Install Dependencies

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:

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

Use the database credentials set in Step 4.

Step 7: Access Pepperminty Wiki

Access Pepperminty Wiki by visiting your virtual host URL:

http://wiki.example.com

Congratulations! You have successfully installed Pepperminty Wiki on your Debian system. You can now begin to create and manage your wiki pages.