Tiki, also known as TikiWiki, is an open-source wiki-based content management system. It helps beginner users host their Wiki sites within a minute. It is based on PHP and uses MariaDB/MySQL to store its content. Tiki provides tools for creating robust knowledge bases, collaboration and project management, website and blog publishing, CRM helpdesk, e-learning, and more. It offers rich features such as wiki pages, blogs, forums, files, multilingual, tightly integrated, and image galleries.
This tutorial will show you how to install Tiki Wiki on an Ubuntu 22.04 server.
Prerequisites
- A server running Ubuntu 22.04.
- A domain name is pointed to your server IP.
- A root password is configured on the server.
Update the System
First, updating your system packages to the latest version is recommended. You can update them with the following command:
apt-get update -y
Once all the packages are updated, you can proceed to the next step.
Install LAMP Server
First, install the Apache web server and MariaDB server with the following command:
apt-get install apache2 mariadb-server unzip git gnupg -y
After installing the above packages, you must install PHP and the required extensions to your system. Tiki Wiki supports only PHP version 7.4. By default, Ubuntu 22.04 ships with PHP 8.1 version. So you will need to add the Ondrej PHP repository to your server.
You can add it with the following command:
apt-get install software-properties-common -y
add-apt-repository ppa:ondrej/php
Once the repository is added, update the repository and install PHP with the required extensions by running the following command:
apt-get install php7.4 php7.4-tidy php7.4-gd php7.4-xmlrpc php7.4-mbstring libapache2-mod-php7.4 php7.4-mysql php-apcu php7.4-curl php7.4-intl php7.4-sqlite3 php7.4-zip php-memcache php7.4-pspell php7.4-zip php7.4-memcached php-pear php7.4-common php7.4-opcache php7.4-xml php7.4-zip -y
Once all packages are installed, edit the php.ini file and make some changes:
nano /etc/php/7.4/apache2/php.ini
Change the following lines:
memory_limit = 256M upload_max_filesize = 100M max_execution_time = 300 date.timezone = UTC
At this point, the LAMP server is installed on your server.
Create a Database for Tiki Wiki
Next, you will need to create a database and user for Tiki Wiki. First, log in to the MariaDB console with the following command:
mysql
Once log in, create a database and user with the following command:
CREATE DATABASE tiki CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'tiki'@'localhost' IDENTIFIED BY 'yourpassword';
Next, grant all the privileges to tiki database with the following command:
GRANT ALL ON tiki.* TO 'tiki'@'localhost' WITH GRANT OPTION;
Next, flush the privileges and exit from the MariaDB shell with the following command:
FLUSH PRIVILEGES;
EXIT;
Download Tiki Wiki
Next, you will need to download the latest version of Tiki Wiki from the Sourceforge website. You can download it with the following command:
wget https://sourceforge.net/projects/tikiwiki/files/latest/download --no-check-certificate
Once the download is completed, extract the downloaded file with the following command:
unzip download
Next, move the extracted directory to the Apache root directory:
mv tiki-24.2 /var/www/html/tikiwiki
Next, change the Ownership and permission of the tikiwiki directory:
chown -R www-data:www-data /var/www/html/tikiwiki/
chmod -R 755 /var/www/html/tikiwiki/
At this point, Tiki Wiki is downloaded and configured.
Configure Apache for Tiki Wiki
Next, create an Apache virtual host configuration file for Tiki Wiki with the following command:
nano /etc/apache2/sites-available/tikiwiki.conf
Add the following lines:
<VirtualHost *:80> ServerAdmin admin@example.com DocumentRoot /var/www/html/tikiwiki ServerName tikiwiki.example.com <Directory /var/www/html/tikiwiki/> Options FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Save and close the file when you are finished. Then, activate the Apache virtual host with the following command:
a2ensite tikiwiki.conf
Next, enable the Apache rewrite module and restart the Apache service using the following command:
a2enmod rewrite
systemctl restart apache2
You can also check the status of Apache with the following command:
systemctl status apache2
You will get the following output:
? apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2022-11-20 11:44:46 UTC; 3min 43s ago Docs: https://httpd.apache.org/docs/2.4/ Process: 122937 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS) Process: 124446 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS) Main PID: 122942 (apache2) Tasks: 6 (limit: 2242) Memory: 23.7M CPU: 247ms CGroup: /system.slice/apache2.service ??122942 /usr/sbin/apache2 -k start ??124450 /usr/sbin/apache2 -k start ??124451 /usr/sbin/apache2 -k start ??124452 /usr/sbin/apache2 -k start ??124453 /usr/sbin/apache2 -k start ??124454 /usr/sbin/apache2 -k start Nov 20 11:44:46 ubuntu2204 systemd[1]: Starting The Apache HTTP Server...
Access Tiki Wiki Web UI
Now, open your web browser and access the Tiki Wiki web interface using the URL http://tikiwiki.example.com/tiki-install.php. You should see the following page:
Select your language and click on the Continue button. You should see the following page:
Click on Continue to agree with the license agreement. You should see the following page:
Make sure all test has green then click on Continue. You should see the following page:
Provide your database details and click on the Continue button. You should see the following page:
Choose your Database engine and click on the Install button. Once the installation has been completed, you should see the following page:
Click on the Continue button. You should see the following page:
Provide your site information and click on the Continue button. You should see the following page:
Click on the Continue button. You should see the admin user creation page:
Click on the "Enter Tiki and Lock Installer". You should see the admin user creation page:
Set your admin password and click on the Apply button. You should see the Tiki Wiki dashboard on the following page:
Secure Tiki Wiki with Let's Encrypt SSL
Securing your wiki site with a Let's Encrypt SSL certificate is a good idea. To do so, you must install the Certbot client in your system.
You can install the Certbot with the following command:
apt-get install certbot python3-certbot-apache -y
Once the Certbot client has been installed successfully, run the following command to install the Let's Encrypt SSL for your website:
certbot --apache -d tikiwiki.example.com
You will be asked to provide your valid email and accept the term of service as shown below:
Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator apache, Installer apache Enter email address (used for urgent renewal and security notices) (Enter 'c' to cancel): hitjethva@gmail.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Please read the Terms of Service at https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must agree in order to register with the ACME server at https://acme-v02.api.letsencrypt.org/directory - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (A)gree/(C)ancel: A - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Would you be willing to share your email address with the Electronic Frontier Foundation, a founding partner of the Let's Encrypt project and the non-profit organization that develops Certbot? We'd like to send you email about our work encrypting the web, EFF news, campaigns, and ways to support digital freedom. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (Y)es/(N)o: Y Obtaining a new certificate Performing the following challenges: http-01 challenge for tikiwiki.example.com Enabled Apache rewrite module Waiting for verification... Cleaning up challenges Created an SSL vhost at /etc/apache2/sites-available/tikiwiki-le-ssl.conf Enabled Apache socache_shmcb module Enabled Apache ssl module Deploying Certificate to VirtualHost /etc/apache2/sites-available/tikiwiki-le-ssl.conf Enabling available site: /etc/apache2/sites-available/tikiwiki-le-ssl.conf
Next, select whether or not to redirect HTTP traffic to HTTPS or configure Nginx to redirect all traffic to secure HTTPS access as shown in the following output:
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1: No redirect - Make no further changes to the webserver configuration. 2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for new sites, or if you're confident your site works on HTTPS. You can undo this change by editing your web server's configuration. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Type 2 and hit Enter to start the process. Once the installation is completed, you should get the following output:
Enabled Apache rewrite module Redirecting vhost in /etc/apache2/sites-enabled/tikiwiki.conf to ssl vhost in /etc/apache2/sites-available/tikiwiki-le-ssl.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Congratulations! You have successfully enabled https://tikiwiki.example.com You should test your configuration at: https://www.ssllabs.com/ssltest/analyze.html?d=tikiwiki.example.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/tikiwiki.example.com/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/tikiwiki.example.com/privkey.pem Your cert will expire on 2023-02-12. To obtain a new or tweaked version of this certificate in the future, simply run certbot again with the "certonly" option. To non-interactively renew *all* of your certificates, run "certbot renew" - If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le
At this point, your Tiki Wiki site is secured with Let's Encrypt SSL. You can now access your site securely using HTTPS protocol.
Conclusion
Congratulations! you have successfully installed Tiki Wiki on Ubuntu 22.04 server. You can now host your own Wiki using the Tiki Wiki. For more information, you can visit the Tiki Wiki documentation page. Feel free to ask me if you have any questions.