How to Install PmWiki on Manjaro
PmWiki is a free and open-source wiki software. It is a popular choice for creating personal and collaborative websites. In this tutorial, we will show you how to install PmWiki on Manjaro.
Prerequisites
- Manjaro installed on your system
- sudo or root user access
Step 1: Update System Packages
Start by updating the system packages to their latest versions. Open the terminal and execute the following command.
sudo pacman -Syu
Step 2: Install Apache and PHP
PmWiki requires a web server and PHP language to function. We will be using Apache 2 as a web server and PHP 7.4.
Execute the following command to install Apache 2 and PHP 7.4 along with its modules.
sudo pacman -S apache php php-apache php-intl php-gd php-sqlite
Step 3: Create a Virtual Host
We need to configure a virtual host for PmWiki. Open the Apache configuration file in your favorite text editor.
sudo nano /etc/httpd/conf/httpd.conf
Scroll down to the bottom and add the following lines.
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/pmwiki"
ServerName pmwiki.example.com
ErrorLog "/var/log/httpd/pmwiki-error_log"
CustomLog "/var/log/httpd/pmwiki-access_log" combined
</VirtualHost>
Don't forget to replace "pmwiki.example.com" with your domain or IP address. Create a directory for the document root.
sudo mkdir /var/www/pmwiki
Step 4: Download and Install PmWiki
Download the latest version of PmWiki from their official website.
wget https://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz
Extract the downloaded archive and move it to the document root.
sudo tar xf pmwiki-latest.tgz -C /var/www/pmwiki --strip-components=1
Set the proper permissions for the PmWiki directory.
sudo chown -R http:http /var/www/pmwiki
sudo chmod -R 755 /var/www/pmwiki
Step 5: Configure PmWiki
Create a configuration file for PmWiki.
sudo cp /var/www/pmwiki/local/config.php /var/www/pmwiki/local/config.php.bak
sudo nano /var/www/pmwiki/local/config.php
Change the settings according to your needs. Some of the settings you can modify are the site title, the site author, and the default skin.
Step 6: Enable Required PHP Modules
Enable the PHP modules that PmWiki requires.
sudo nano /etc/php/php.ini
Uncomment the following lines:
extension=pdo_sqlite
extension=gd
Save and exit the file.
Step 7: Restart Apache
Restart the Apache server to apply the changes.
sudo systemctl restart httpd
Step 8: Access PmWiki
You can now access PmWiki by visiting the domain or IP address configured in your virtual host. The default page should appear, and all the wiki features should be working correctly.
Conclusion
Congratulations! You have successfully installed PmWiki on Manjaro. You can now use PmWiki to create and collaborate on your website.