Home / How To / How to install Tiki Wiki on Ubuntu 20.04

How to install Tiki Wiki on Ubuntu 20.04



Tiki Wiki is a Free / Libre / Open Source CMS Groupware that can be used as a wiki-based content management system, portal application and an online office suite. Originally known as a TikiWiki, written in PHP and distributed under the GNU GPL v3.0 license.

In this tutorial we will show you how to install Tiki Wiki CMS Groupware on Ubuntu 20.04 with Apache web server, MySQL Server and PHP 7.4. We will also secure Tiki Wiki CMS Groupware with SSL Letsencrypt.

conditions

  • Ubuntu 20.04 server
  • Red privileges
  • Understand the basics of Ubuntu Server

What should we do?

  • Install package dependency
  • Install Apache Web Server
  • Install and configure MySQL Server
  • Install and configure PHP 7.4
  • Download Tiki Wiki source code
  • Generate SSL Letsencrypt for Tiki Wiki
  • Set up Apache Virtual Host for Tiki Wiki
  • Tiki Wiki Post Installation

Step 1 – Install package dependency

First, we will install some package-dependent needs for the Tiki Wiki installation.

Install package dependencies using the apt command below.

sudo apt install curl memcached poppler-utils bsdmainutils catdoc elinks man-db odt2txt pstotext unzip

When all installation is complete, go to the next step.

Step 2 – Install Apache Web Server

For this guide, the Tiki Wiki runs under the Apache web server.

To install the Apache web server package, run the apt command below.

sudo apt install apache2

When the installation is complete, start the Apache service and add it to the system boot.

systemctl start apache2
systemctl enable apache2

The Apache web server is up and running, check with the command below.

systemctl status apache2

Below you see the result.

Then open the HTTP and HTTPS services on the ufw firewall as below.

sudo ufw allow http
sudo ufw allow https
sudo ufw allow ssh

Start and activate the ufw firewall now.

sudo ufw enable

Write ‘and‘and press’Get on‘, and the ufw firewall has been activated.

Visit the server’s IP address with your browser to verify the Apache web server installation and ufw firewall configuration.

http://10.5.5.25/

And you get the default index.html for Apache web server.

Step 3 – Install and configure MySQL Server

In this step, we will install the MySQL database server, set the password for the default MySQL root user, and create a new database and user for the Tiki Wiki installation.

Install the MySQL Server package using the apt command below.

sudo apt install mysql-server mysql-client

When all installation is complete, start the MySQL service and add it to the system boot.

systemctl start mysql
systemctl enable mysql

And the MySQL service is up and running.

Then set the default user MySQL-root using ‘mysql_secure_installation‘command below.

mysql_secure_installation

Set up MySQL Root Password using mysql_secure_installationadvertisement

Now enter the new password for the default MySQL root user and type ‘Y’ for all query related MySQL configurations.

Press y|Y for Yes, any other key for No: 
Please set the password for root here.

New password:
Re-enter new password:

Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y

And the MySQL root password has been configured.

Then log in to the MySQL shell and create a new database and user for the Tiki Wiki installation.

Log in to the MySQL shell using the MySQL command below.

mysql -u root -p

Create a new database named ‘tikidb’ and the user ‘tikiuser’ with the password ‘password’ using the MySQL query below.

CREATE DATABASE tikidb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'tikiuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON tikidb.* TO 'tikiuser'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;

Write now ‘EXITto log out of the MySQL shell.

Create new database and users for TikiWiki installation

As a result, the installation of the MySQL database server has been completed and the MySQL database for the Tiki Wiki installation has been created.

Step 4 – Install and configure PHP 7.4

After installing the MySQL database server, we will install and configure PHP7.4 packages on Ubuntu 20.04 Server.

Install PHP 7.4 package and Composer with the apt command below.advertisement

sudo apt install php php-tidy php-pear php-gd php-xmlrpc php-mbstring libapache2-mod-php php-mysql php-apcu php-curl php-intl php-sqlite3 php-zip php-memcache php-pspell php-zip php-memcached php-pear php-common php-intl php7.4-opcache php-xml php-zip composer

When all the installation is complete, go to the directory ‘/etc/php/7.4/apache2’ and edit the configuration ‘php.ini’ with the vim editor.

cd /etc/php/7.4/apache2/
vim php.ini

Change the following configuration as below.

date.timezone = Asia/Singapore
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360

Save and close.

Then restart the Apache service to apply the new PHP configuration.

systemctl restart apache2

Make sure that there is no error and that the PHP 7.4 installation and configuration for Tiki Wiki has been completed.

Configure PHP 7.4 on Ubuntu 20.04

Step 5 – Download TikiWiki source code

To download the Tiki Wiki source code, go to the directory ‘/ var / www /’ and download the Tiki Wiki source that matches the wget command below.

cd /var/www/
wget -q https://sourceforge.net/projects/tikiwiki/files/latest/download -O tikiwiki.zip

Then extract the Tiki Wiki source code and rename the extracted directory to ‘tikiwiki’.

unzip tikiwiki.zip
mv tiki-21.1 tikiwiki

Now change the owner of the directory ‘/ var / www / tikiwiki’ to ‘www-data’ users and group.

chown -R www-data:www-data /var/www/tikiwiki

And the source code for Tiki Wiki has been downloaded to the directory ‘/ var / www / tikiwiki’.

Download TikiWiki source code

Step 6 – Generate SSL Letsencrypt

For this tutorial, we will secure the TikiWiki installation with SSL Letsencrypt. So make sure you have domain names that have resolved to your server IP address.

To be able to use SSL Letsencrypt, we must generate SSL certificates with the certbot tool.

Install the certbot tool with the apt command below.

sudo apt install certbot -y

Then stop the Apache2 service and generate SSL Letsencrypt for your TikiWiki domain name with the following command.

systemctl stop apache2
certbot certonly --rsa-key-size 2048 --standalone --agree-tos --no-eff-email --email [email protected] -d tiki.hakase-labs.to

Make sure you change the email address with your own. When everything is ready, your SSL certificates are available on ‘/etc/letsencrypt/live/yourdomain.com‘catalog.

Step 7 – Set up Apache Virtual Host for TikiWiki

In this step, we will configure the Apache virtual host configuration for the Tiki Wiki CMS Groupware.

Go to the directory ‘/ etc / apache2 / sites-available’ and create a new virtual host configuration ‘tikiwiki.conf’ with the vim editor.

cd /etc/apache2/sites-available/
vim tikiwiki.conf

Change the domain name and SSL certificate path with your own, and then paste the following configuration.


     ServerAdmin [email protected]
     ServerName tiki.hakase-labs.to
     ServerAlias tiki.hakase-labs.to

     # Redirect all to safe connections
     Redirect permanent / https://tiki.hakase-labs.to/


    ServerAdmin [email protected]
    ServerName tiki.hakase-labs.to
    ServerAlias tiki.hakase-labs.to
    DocumentRoot /var/www/tikiwiki/

    SSLEngine On
    SSLCertificateFile /etc/letsencrypt/live/tiki.hakase-labs.to/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/tiki.hakase-labs.to/privkey.pem

    ErrorLog ${APACHE_LOG_DIR}/tikiwiki_error.log
    CustomLog ${APACHE_LOG_DIR}/tikiwiki_access.log combined

   
        Require all granted
        AllowOverride All
   

    # Deny all for db/
   
        Order Deny,Allow
        Deny from all
        Options None
        AllowOverride None
   

    # Deliver only png, pdf, html, js, css from temp/ folder
   
        Order Deny,Allow
        Deny from all
        Options Indexes FollowSymLinks
        AllowOverride None
        php_flag engine Off

       
            Order Deny,Allow
            Allow from all
       

   

    # Turn off php and deny some special types
   
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
        php_flag engine Off

       
            Order allow,deny
            Deny from all
       

   

Save and close.

Then activate “TikiWiki‘virtual host’ and the Apache SSL module using the command below.

a2ensite tikiwiki
a2enmod ssl

Test the Apache configuration and make sure there is no error, then restart the Apache service.

apachectl configtest
systemctl restart apache2

As a result, the configuration of the virtual Apache values ​​for Tiki Wiki has been completed.

Set up Apache Virtual Host for TikiWiki

Step 8 – TikiWiki Post Installation

Open your browser and enter the domain name of your Tiki Wiki installation in the address bar.

https://tiki.hakase-labs.to/

Now you get the welcome page for the Tiki Wiki installer.

TikiWiki Installer

Select your default language and click ‘Continue‘.

Tiki Wiki uses the LGPL license. Click ‘Continue“to accept their license agreement.

TikiWiki license agreement

The Tiki Wiki installer will now check your system as required for installation.

TikiWiki-control system

Make sure all tests are green “Success‘, Then click’Continue‘.

For the database configuration, enter details MySQL database and users that you created on top.

Configure TikiWiki database and users

Now click on ‘Continue‘ again.

For the default Tiki Wiki database engine, select default “InnoDB‘and click’Continue‘.

TikiWiki default database engine

And the Tiki Wiki installation will start.

TikiWiki installation starts

When all installation is complete, you will get the result as below.

The TikiWiki installation is complete

Then click on ‘Continue‘again to configure your Tiki Wiki installation.

Configure your Tiki Wiki installation as needed and click ‘Continue‘.

Configure TikiWiki installation

And you will get Tiki Wiki Installation Notes as below.

TikiWiki Installation Notes

Click ‘Continueagain, you will get the page as below.

TikiWiki installer complete

Click on the blue button ‘Enter Tiki and Lock Installer‘.

Now you get the administrator configuration as below.

Create new admin user password and password for TikiWiki

Enter your default password ‘administration“users and click”Apply‘.

And you get the Tiki Wiki configuration wizard.

tkiwiki installation guide

You can click on ‘Close‘button to close the Tiki Wiki configuration wizard.

Now you get the Tiki Wiki website as below.

TikiWiki default index

And below is what the Tiki Wiki Admin Dashboard looks like.

tikiwiki dashboard

As you can see, the installation of Tiki Wiki under LAMP Stack (Linux, Apache, MySQL and PHP) on Ubuntu 20.04 has been completed.


Source link