How to Install WiKiss on OpenBSD

WiKiss is a lightweight wiki engine that allows you to easily create and manage your own wiki pages. In this tutorial, you will learn how to install WiKiss on OpenBSD.

Step 1: Install Dependencies

Before we can install WiKiss, we need to make sure that all the required dependencies are installed on our system. We can do this by running the following command:

$ doas pkg_add apache2 php php-pdo_sqlite php-mbstring sqlite3

Step 2: Download WiKiss

Next, we need to download the latest version of WiKiss from their website. To do this, run the following command:

$ doas ftp https://wikiss.tuxfamily.org/wiki/lib/exe/fetch.php?media=wikiss-0.3.12.tar.gz -o wikiss.tar.gz

Step 3: Extract WiKiss

Once the download is complete, we need to extract the contents of the archive. To do this, run the following command:

$ doas tar -xzf wikiss.tar.gz

This will create a new directory called wikiss.

Step 4: Configure Apache

Next, we need to configure Apache to serve our WiKiss website. To do this, we need to create a new virtual host file. Run the following command:

$ doas vi /etc/apache2/htdocs/wikiss.conf

Copy and paste the following configuration into the file:

<VirtualHost *:80>
        ServerName yourdomain.com
        DocumentRoot /var/www/htdocs/wikiss
</VirtualHost>

Replace yourdomain.com with your actual domain name.

Save and exit the file.

Step 5: Move WiKiss to Apache Document Root

Now that we have configured Apache, we need to move WiKiss to the Apache Document Root directory. Run the following command:

$ doas mv wikiss /var/www/htdocs/

Step 6: Create the SQLite Database

Next, we need to create the SQLite database that WiKiss will use to store its data. Run the following command:

$ doas sqlite3 /var/www/htdocs/wikiss/wikiss.db

This will open the SQLite shell. Run the following commands within the shell:

CREATE TABLE config (name TEXT PRIMARY KEY, value TEXT DEFAULT NULL);
CREATE TABLE data (name TEXT PRIMARY KEY, content TEXT DEFAULT NULL);
CREATE TABLE menu (name TEXT PRIMARY KEY, parent TEXT DEFAULT NULL, pos INTEGER DEFAULT NULL);
CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT, user TEXT, password TEXT);

Once you have executed these commands, type .exit to exit the SQLite shell.

Step 7: Configure WiKiss

The final step is to configure WiKiss. To do this, we need to edit the config.php file. Run the following command:

$ doas vi /var/www/htdocs/wikiss/config.php

Locate the following lines in the file:

$db_config = array(
    'path' => '/var/www/wikiss/wikiss.db',
);

Change the path to the SQLite database to the following:

$db_config = array(
    'path' => '/var/www/htdocs/wikiss/wikiss.db',
);

Save and exit the file.

Step 8: Start Apache

Now that we have configured everything, we need to start Apache. Run the following command:

$ doas rcctl start apache2

Step 9: Access WiKiss

That's it! WiKiss is now installed on your OpenBSD server. You can access it by navigating to http://yourdomain.com/wikiss in your web browser.

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!