How to Install PukiWiki on OpenSUSE Latest

PukiWiki is a popular wiki system written in PHP. It is easy-to-install and requires minimal server configurations. In this tutorial, we will guide you through the process of installing PukiWiki on OpenSUSE.

Prerequisites

Before you start, you need to ensure that you have the following components installed on your OpenSUSE server:

Step 1: Download Latest version of PukiWiki

You can download the latest version of PukiWiki using the command-line interface or the graphical user interface, depending on your preference. For this tutorial, we will use the command-line interface.

$ cd /opt
$ sudo wget https://ja.osdn.net/frs/redir.php?f=pukiwiki%2F72727%2Fpukiwiki-1.5.3_notb.tar.gz

Step 2: Extract the PukiWiki file

Once the download is complete, extract the downloaded PukiWiki archive file to a newly created directory named pwiki.

$ sudo tar -xvf pukiwiki-1.5.3_notb.tar.gz -C /var/www/html/pwiki

Step 3: Configure PukiWiki

Next, we need to configure PukiWiki to work correctly on OpenSUSE.

$ cd /var/www/html/pwiki/pukiwiki-1.5.3_notb
$ sudo cp ./pkwk_initialize.ini.php ./initialize.ini.php
$ sudo cp ./pkwk_newwiki.cgi ./newwiki.cgi

Step 4: Modify permissions

Before we can use PukiWiki, we need to adjust file permissions to ensure that Apache can access the files.

$ sudo chown -R www-data:www-data /var/www/*
$ sudo chmod -R 755 /var/www/html
$ sudo chmod -R 775 /var/www/pwiki

Step 5: Create a new MySQL Database

PukiWiki requires a MySQL database to store its data.

$ sudo mysql -u root -p
mysql> CREATE DATABASE pwiki;
mysql> GRANT ALL PRIVILEGES ON pwiki.* TO 'wikiuser'@'localhost' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
mysql> exit;

Note: Replace wikiuser and password with the actual username and password that you want to use for the database.

Step 6: Configure PukiWiki database settings

Next, we need to configure PukiWiki to use the newly created database.

$ cd /var/www/html/pwiki/pukiwiki-1.5.3_notb/
$ sudo cp ./pkwk_config.php ./config.php
$ sudo vi ./config.php

Edit the database settings section in the config.php file to match the database we created earlier.

// Database settings
define('DB_USER', 'wikiuser');
define('DB_PASSWORD', 'password');
define('DB_NAME', 'pwiki');
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_PORT', '');
define('DB_CHARSET', '');
define('DB_TABLE_OPTION', '');
define('MYSQL4', false);

Save and exit the file.

Step 7: Configure Apache web server

Finally, we need to configure Apache to serve our PukiWiki site.

$ sudo vi /etc/apache2/conf.d/pwiki.conf

Add the following code to create a Virtual Host entry for our PukiWiki site:

<VirtualHost *:80>
  ServerAdmin webmaster@localhost
  DocumentRoot /var/www/html/pwiki/pukiwiki-1.5.3_notb
  <Directory /var/www/html/pwiki/pukiwiki-1.5.3_notb>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
  </Directory>
  ErrorLog ${APACHE_LOG_DIR}/pwiki-error.log
  CustomLog ${APACHE_LOG_DIR}/pwiki-access.log combined
</VirtualHost>

Save and exit the file.

Step 8: Restart Apache server

The final step is to restart the Apache web server to apply the changes.

$ sudo systemctl restart apache2

Conclusion

Congratulations! You have successfully installed PukiWiki on your OpenSUSE server. You can now access your new PukiWiki site by visiting http:///pwiki/pukiwiki-1.5.3_notb.

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!