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 rootssh [email protected]
and update all services to your serveryum -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-upsystemctl start httpdsystemctl enable httpd
We also need to install several Perl modulesyum 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 followingperl -MCPAN -e shell
and install the following modules one by oneinstall 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.1wget http://downloads.sourceforge.net/project/twiki/TWiki%20for%20all%20Platforms/TWiki-6.0.1/TWiki-6.0.1.zip
Create a new directory in the document root and unpack the TWiki archive to that directorymkdir /var/www/html/twikiunzip TWiki-6.0.1.zip -d /var/www/html/twiki
Change the ownership of the directorychown -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 installationvim bin/LocalLib.cfg$twikiLibPath = "/var/www/html/twiki/lib";
Copy the Apache configuration file provided by TWikicp 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:%s_/home/httpd_/var/www/html_g
Also insert ‘root’ as username at the ‘AuthName’ file in the same file.
Protect the data directory to be accessible with username and passwordcd data/htpasswd -c .htpasswd rootNew password:Re-type new password:Adding password for user root
Restart the Apache web serversystemctl 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.