Install TWiki on a CentOS 7 VPS

来源:互联网 时间:1970-01-01

In this article we will install TWiki on aCentOS 7 VPS with Apache web server. TWiki is simple to use, flexible, secure and very powerful web-based collaboration platform based on Perl. Using TWiki you can run a project development space, a document management system, a knowledge base or any other groupware tool. TWiki is used by millions of users in more than 130 countries in the world and it comes with many features such as:

Easy Table editing Skinnable user interface Rich Text Editor Over 400 extensions and 200 plugins Fine-grained access control Revision controln Dynamic content generation Forms and reporting

And many more…

Log in to your CentOS 7 machine via SSH as user root

ssh [email protected]

and update all services to your server

yum -y update

Install some prerequisites needed to install TWiki .

yum install wget perl unzip rcs gcc make gd gd-devel php

Execute the following command to install Apache web server.

yum install httpd

Start the Apache web server and add it to automatically start on the system start-up

systemctl start httpdsystemctl enable httpd

We also need to install several Perl modules

yum install perl-CPAN perl-ExtUtils-CBuilder perl-YAML perl-Module-CoreList perl-CGI perl-Module-Build perl-IPC-Cmd

We will install the rest of the Perl modules from CPAN. Start CPAN’s shell by executing the following

perl -MCPAN -e shell

and install the following modules one by one

install Term::ReadKeyinstall Bundle::CPANreload cpaninstall CGI::Carpinstall Cwdinstall LWPinstall Encodeinstall HTML::Parserinstall Errorinstall Time::Localinstall Text::Diffinstall Authen::SASLinstall CGI::Sessioninstall Digest::SHA1install URIinstall Locale::Maketext::Lexiconinstall FreezeThawinstall GDinstall HTML::Treeinstall Time::Timezone

Now, go to TWiki’s official website and download the latest stable release. At the moment of writing this article it is version 6.0.1


Create a new directory in the document root and unpack the TWiki archive to that directory

mkdir /var/www/html/twikiunzip -d /var/www/html/twiki

Change the ownership of the directory

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

Now we need to configure TWiki. Rename the ‘LocalLib.cfg.txt’ file/

cd /var/www/html/twikimv bin/LocalLib.cfg.txt bin/LocalLib.cfg

Open the configuration file and set the path of the lib directory in TWiki’s installation

vim bin/LocalLib.cfg$twikiLibPath = "/var/www/html/twiki/lib";

Copy the Apache configuration file provided by TWiki

cp misc/twiki_httpd_conf.txt /etc/httpd/conf.d/twiki.conf

Open the configuration and change all instances of ‘/home/httpd/’ to ‘/var/www/html’. If you are using vi text editor you can use the following command


Also insert ‘root’ as username at the ‘AuthName’ file in the same file.

Protect the data directory to be accessible with username and password

cd data/htpasswd -c .htpasswd rootNew password:Re-type new password:Adding password for user root

Restart the Apache web server

systemctl restart httpd

Now, open a web browser and navigate to http://yourIPaddress/twiki/bin/configure and follow the instructions to continue with the web based installation

Of course you don’t have to do any of this if you use one of ourLinux VPS Hosting services, in which case you can simply ask our expert Linux admins to install TWiki for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.