In this article we will install TWiki on a CentOS 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 root@IP
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 httpd systemctl 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::ReadKey install Bundle::CPAN reload cpan install CGI::Carp install Cwd install LWP install Encode install HTML::Parser install Error install Time::Local install Text::Diff install Authen::SASL install CGI::Session install Digest::SHA1 install URI install Locale::Maketext::Lexicon install FreezeThaw install GD install HTML::Tree install 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
wget 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 directory
mkdir /var/www/html/twiki unzip TWiki-6.0.1.zip -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/twiki mv 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
:%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 password
cd data/ htpasswd -c .htpasswd root New 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 our Linux 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.
Here installing ‘install CGI::Carp’ in perl is installing latest module which is not supported by twiki6. So we have to manually install CGI module lest that 4.04.
Hello,
Any Idea how to change the Skins in Twiki web site, in our company we are using Twiki 6.0 and now i updated with latest version 6.1.0 but i can see some difference in page view. any help to set up as similar as my old version.
Regards,
Yuvakumar
Hello Yuvakumar,
There are no significant changes affecting an upgrade from TWiki-6.0.x to TWiki-6.1.0
You should check the official Twiki documentation about this at http://www.twiki.org/cgi-bin/view/TWiki