Как установить dokuwiki на centos

Обновлено: 30.06.2024

In this demo, we are going to learn how to install DokuWiki on CentOS 8 server. DokuWiki is an opensource software written in PHP that allows users to create and edit pages using a web browser. It works on plain texts and requires no database. Read about the features provided by the DokuWiki on DokuWiki features page.

Install DokuWiki on CentOS 8

Run system update

To begin with, ensure your system packages are up-to-date.

Install PHP and Other Required PHP Modules

DokuWiki is a PHP based web application which requires PHP and some other PHP extensions to function correctly. These can be installed by running the command below;

Run Apache Web Server

In this demo, we are using Apache as our web server for DokuWiki. Apache is installed alongside PHP.

If not installed for some reasons, run the command below to install it.

Next, start and enable Apache to run on system boot.

Allow Apache through Firewall

Install DokuWiki on CentOS 8

DokuWiki installation is as simple as downloading the application itself and placing it on the default web root directory.

Download Stable Release Version

Navigate to DokuWiki download’s page and grab the latest release version. You can simply run the command below to download the current stable release version of DokuWiki.

Extract DokuWiki Tarball

Once the download is complete, run the command below to extract DokuWiki to the default web root directory, which is /var/www/html in this demo.

This will extract DokuWiki and place it on /var/www/html/ .

Create Apache VirtualHost for DokuWiki

Create an Apache VirtualHost for DokuWiki as shown below;

Save and quit the configuration file.

Note that the line, AllowOverride All , turns on the use of htaccess file for more directory access controls. As such, rename the DokuWiki .htaccess file as shown below;

Set the ownership of the DokuWiki web root directory to apache .

Configure SELinux Policies for DokuWiki

If SELinux is running, you need to run the commands below to configure SELinux to allow various accesses for DokuWiki.

If you ever get any denied access, be sure to check the audit logs;

Restart Apache

Check for any syntactical error on Apache configuration file and restart it if no issues.

Finalize DokuWiki Installation

Install DokuWiki on CentOS 8

Set the name of the wiki, enable the ACL and other settings and click Save and continue to your DokuWiki welcome page.

Install DokuWiki on CentOS 8

You can now login to your DokuWiki as the user created while setting up the ACL.

Install DokuWiki on CentOS 8

If you need to make any configurations upon successful authentication, click on the Admin gear icon at the top right corner.

Dokuwiki is a free and open source wiki software. It is written in PHP and doesn't require a database. Dokuwiki is popular because it is very simple, easy to use and has a very clean and readable syntax. It has built-in access control lists and supports over 50 languages.

In this tutorial, we will install DokuWiki on CentOS 7 server.

Requirements

DokuWiki does not require any special hardware requirements. It can be installed on servers with a small amount of RAM. All the required dependencies will be installed throughout the tutorial. You will need a minimal installation of CentOS 7 with root access on it. If you are logged in as a non-root user, you can run sudo -i to switch to root user.

Installing DokuWiki

Before installing any package it is recommended that you update the packages and repository using the following command.

Once you have your system updated, you can proceed to install the Apache web server.

DokuWiki can be installed on any version of PHP greater than 5.6. You can install PHP 7 for high performance. PHP 7 is not included in default YUM repository, hence you will need to add the Webtatic repository in your system. Webtatic repository requires EPEL repository to work. Run the following command to install EPEL repository.

yum -y install epel-release yum -y update

Now install the Webtatic repository using the following commands.

To install PHP 7.1 and all of the required PHP modules, run the following command.

yum -y install php71w php71w-curl php71w-cli php71w-gd

Once you have PHP installed, you can check the version of PHP using the following command.

You should get output similar to this.

Find the following line.

Change it to AllowOverride All .

Now start the Apache web server and enable it to start at boot time using the following command.

As we have all the dependencies ready, we can now download the install package from the DokuWiki site.

The above command will always download the latest installer archive. Extract the archive using the following command.

tar -xvzf dokuwiki-stable.tgz

The above command will extract the package in a folder with similar name as dokuwiki-2017-02-19b . For ease of access, you can rename the directory using the following command.

mv dokuwiki-20* dokuwiki

Now create a virtual host for the wiki application. Run the following command to do one.

Paste the following lines into the file.

Now you will need to provide the ownership of the application to the web server user using the following command.

chown -R apache:apache /var/www/html/dokuwiki

You will also need to disable SELinux. To temporarily disable SELinux without restarting the server, run the following command.

To completely disable the SELinux you will need to edit /etc/selinux/config file.

Find the following line:

Now complete the installation using a web browser, go to the following link using your favorite web browser.

You will see the following page asking for administrator account creation.

Provide the name of your Wiki website. Further select the Enable ACL checkbox and provide the administrator credentials. Choose the ACL policy recommended is Public Wiki. Further, choose the license that you want to use with your content. Click Save button once done.

You will need to delete the install.php file now. Run the following command for same.

Once done, you can now access your wiki, it will look like shown below.

Conclusion

In this tutorial, we installed Dokuwiki on CentOS 7. You can now log in to your wiki using administrator credentials and add the content in it.



5. Загрузите php и его зависимости.





6. Перезагрузите



7. Загрузить



8. Разархивируйте


.
.
.

9. Переместить



10. Дайте разрешение



11. Файл конфигурации



добавить в конец скрипта



13. Отключите брандмауэр.



14. Просмотр IP



15. Посетите веб-страницу, перейдите в адресную строку и введите

Читайте также: