How to Install DokuWiki on Ubuntu 18.04 LTS

DokuWiki is a free, open supply and extremely versatile wiki software written within the PHP programming language. It really works on plain textual content recordsdata so would not require any database. DokuWiki wiki affords a lot of options that might not be accessible to different CMS like, Joomla, WordPress and Drupal. DokuWiki is a file-based CMS and supplies WYSIWYG help and website positioning pleasant.

On this tutorial, we’ll discover ways to set up DokuWiki on Ubuntu 18.04 server.

Necessities

  • A server working Ubuntu 18.04.
  • A static IP deal with 192.168.0.101 is about up in your server.
  • A root password is about as much as your server.

Getting Began

First, you have to to replace your server with the most recent model. You are able to do it with the next command:

apt-get replace -y
apt-get improve -y

As soon as your server is up to date, restart your system to use all of the adjustments

Set up Apache, PHP

Earlier than beginning, you have to to put in Apache net server, PHP and different packages to your server. You may set up all of them by working the next command:

apt-get set up apache2 php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-sqlite3 php7.2-soap php7.2-gd php7.2-xml php7.2-cli php7.2-tidy php7.2-intl php7.2-json php7.2-curl php7.2-zip unzip wget git -y

As soon as all of the packages are put in, open php.ini file and alter some settings:

nano /and so forth/php/7.2/apache2/php.ini

Make the next adjustments:

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

Save and shut the file, when you’re completed. Then, begin Apache service and allow it to begin on boot time with the next command:

systemctl begin apache2
systemctl allow apache2

After you have achieved, you possibly can proceed to the subsequent step.

Set up DokuWiki

First, you have to to obtain the most recent model of DokuWiki from Git repository. You may obtain it to the Apache net root listing with the next command:

cd /var/www/html/
git clone --branch secure https://github.com/splitbrain/dokuwiki.git

As soon as the obtain is accomplished, give correct permissions to the dokuwiki listing with the next command:

chown -R www-data:www-data /var/www/html/dokuwiki/
chmod -R 755 /var/www/html/dokuwiki/

After you have achieved. You may proceed to the subsequent step.

Configure Apache for DokuWiki

Subsequent, you have to to create an Apache digital host file for DokuWiki. You are able to do this by creating the next file:

nano /and so forth/apache2/sites-available/dokuwiki.conf

Add the next strains:

<VirtualHost *:80>
      ServerAdmin [email protected]
      DocumentRoot /var/www/html/dokuwiki
      ServerName instance.com
 
      <Listing /var/www/html/dokuwiki/>
           Choices FollowSymlinks
           AllowOverride All
           Require all granted
      </Listing>
 
      ErrorLog ${APACHE_LOG_DIR}/doku_error.log
      CustomLog ${APACHE_LOG_DIR}/doku_access.log mixed
     
      <Listing /var/www/html/dokuwiki/>
             RewriteEngine on
             RewriteBase /
             RewriteCond %{REQUEST_FILENAME} !-f
             RewriteRule ^(.*) index.php [PT,L]
     </Listing>
 </VirtualHost>
 

Save and shut the file, when you’re completed. Then, allow DokuWiki digital host with the next command:

a2ensite dokuwiki.conf

Subsequent, allow Apache rewrite module and restart Apache service to use all of the adjustments with the next command:

a2enmod rewrite
systemctl restart apache2

You may also verify the standing of Apache service with the next command:

systemctl standing apache2

You must see the next output:

? apache2.service - The Apache HTTP Server
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Drop-In: /lib/systemd/system/apache2.service.d
            ??apache2-systemd.conf
    Energetic: lively (working) since Tue 2019-04-16 14:57:32 UTC; 3s in the past
   Course of: 2358 ExecStart=/usr/sbin/apachectl begin (code=exited, standing=0/SUCCESS)
  Major PID: 2372 (apache2)
     Duties: 6 (restrict: 1113)
    CGroup: /system.slice/apache2.service
            ??2372 /usr/sbin/apache2 -k begin
            ??2375 /usr/sbin/apache2 -k begin
            ??2377 /usr/sbin/apache2 -k begin
            ??2378 /usr/sbin/apache2 -k begin
            ??2381 /usr/sbin/apache2 -k begin
            ??2382 /usr/sbin/apache2 -k begin
 
 Could 25 02:50:11 ubuntu1804 systemd[1]: Beginning The Apache HTTP Server...
 Could 25 02:50:11 ubuntu1804 apachectl[2358]: AH00558: apache2: Couldn't reliably decide the server's totally certified area title, utilizing 181.
 Could 25 02:50:11 ubuntu1804 systemd[1]: Began The Apache HTTP Server.
 

After you have achieved, you possibly can proceed to the subsequent step.

Entry DokuWiki Web Interface

Open your net browser and sort the URL http://example.com/install.php. You’ll be redirected to the next web page:

DikuWiki installer

Present all of the required info like superuser title, electronic mail, password. Then, click on on the Save button. As soon as the set up has been accomplished efficiently, you must see the next web page:

Set username and password

Now, click on on your new DokuWiki. You must see the next web page:

DokuWiki successfully installed

Now, click on on the login button. You’ll be redirected to the next web page:

Login

Now, present your Admin username and password. Then, click on on the Log In button. You must see the DokuWiki dashboard within the following web page:

Welcome to DokuWiki

Congratulations! you might have efficiently put in and configured DokuWiki on Ubuntu 18.04 server. Now you can create your personal wiki web site simply utilizing DokuWiki. Be happy to ask me when you have any questions.

Hitesh Jethva

About Hitesh Jethva

Over eight years of expertise as a Linux system administrator. My abilities embrace a depth information of Redhat/Centos, Ubuntu Nginx and Apache, Mysql, Subversion, Linux, Ubuntu, internet hosting, net server, Squid proxy, NFS, FTP, DNS, Samba, LDAP, OpenVPN, Haproxy, Amazon net companies, WHMCS, OpenStack Cloud, Postfix Mail Server, Safety and so forth.

LEAVE A REPLY

Please enter your comment!
Please enter your name here