Twiki 6.0.1安装

阅读: 评论:0

Twiki 6.0.1安装

Twiki 6.0.1安装

Twiki 6.0.1安装

安装环境

1、CentOS 7.6
2、Twiki 6.0.1
3、访问地址:192.168.100.240

具体步骤:

1、安装Apache,修改访问地址192.168.100.240

[root@localhost ~]# yum install httpd
[root@localhost ~]# systemctl enable httpd
[root@localhost ~]# vim /etc/httpd/f
ServerName 192.168.100.240:80

2、安装perl,在Twiki官网有列出使用到模块,可在此链接查看

[root@localhost ~]# yum install perl*

3、下载Twiki软件包,下载地址/TWiki-6.0.1/TWiki-6.0.1.zip

[root@localhost ~]# wget  /TWiki-6.0.1/TWiki-6.0.1.zip

4、将Twiki解压到/var/www/twiki目录下

[root@localhost ~]# ls
anaconda-ks.cfg initial-setup-ks.cfg TWiki-6.0.1.zip
[root@localhost ~]# mkdir /var/www/twiki
[root@localhost ~]# unzip TWiki-6.0.1.zip -d /var/www/twiki/

5、将/var/www/twiki/bin目录下文件修改为LocalLib.cfg并修改参数

[root@localhost ~]# cd /var/www/twiki/bin/
[root@localhost bin]# cp  LocalLib.cfg
[root@localhost bin]# vim LocalLib.cfg
$twikiLibPath = "/var/www/twiki/lib"

6、在官网 生成一个配置文件f,注释掉“php_admin_flag engine off”,导入/etc/httpd/conf.d/目录下

[root@localhost bin]# touch /etc/httpd/conf.f
[root@localhost bin]# vim /etc/httpd/conf.f
# f file for TWiki.
# Generated at  We set an environment variable called blockAccess.
#
# Setting a BrowserMatchNoCase to ^$ is important. It prevents TWiki from
# including its own topics as URLs and also prevents other TWikis from
# doing the same. This is important to prevent the most obvious
# Denial of Service attacks.
#
# You can expand this by adding more BrowserMatchNoCase statements to
# block evil browser agents trying the impossible task of mirroring a twiki
#
# Example:
# BrowserMatchNoCase ^SiteSucker blockAccess
# BrowserMatchNoCase ^$ blockAccessBrowserMatchNoCase ^$ blockAccess<IfModule mod_perl.c># Mod_perl preloadingPerlSwitches -T
</IfModule># The ScriptAlias defines the bin directory as a directory where CGI
# scripts are allowed.
# The first parameter will be part of the URL to your 
# /...
# The second parameter must point to the physical path on your disc.
ScriptAlias /do "/var/www/twiki/bin"# The Alias defines a url that points to the twiki pub directory, which
# is the root of file attachments.
Alias /pub "/var/www/twiki/pub"# This specifies the options on the TWiki scripts directory. The ExecCGI
# and SetHandler tell apache that it contains scripts. "Allow from all"
# lets any IP address access this URL.
<Directory "/var/www/twiki/bin">AllowOverride NoneOrder Allow,DenyAllow from allDeny from env=blockAccessOptions ExecCGI FollowSymLinksSetHandler cgi-script# Password file for TWiki usersAuthUserFile /var/www/twiki/data/.htpasswdAuthName 'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith)'AuthType Basic# File to return on access control error (e.g. wrong password)ErrorDocument 401 /do/view/TWiki/TWikiRegistration</Directory># This sets the options on the pub directory, which contains attachments and
# other files like CSS stylesheets and icons. AllowOverride None stops a
# user installing a .htaccess file that overrides these options.
# Note that files in pub are *not* protected by TWiki Access Controls,
# so if you want to control access to files attached to topics you need to
# block access to the specific directories same way as the ApacheConfigGenerator
# blocks access to the pub directory of the Trash web
<Directory "/var/www/twiki/pub">Options NoneAllowOverride NoneOrder Allow,DenyAllow from allDeny from env=blockAccess# Disable execusion of PHP scripts# 注释下一行# php_admin_flag engine off# This line will redefine the mime type for the most common types of scriptsAddType text/plain .shtml .php .php3 .phtml .phtm .pl .py .cgi#add an Expires header that is sufficiently in the future that the browser does not even ask if its uptodate
# reducing the load on the server significantly
#IF you can, you should enable this - it _will_ improve your twiki experience, even if you set it to under one day.
# you may need to enable expires_module in your main apache config
#LoadModule expires_module libexec/httpd/mod_expires.so
#AddModule mod_expires.c
#<ifmodule mod_expires.c>
#  <filesmatch ".(jpg|gif|png|css|js)$">
#       ExpiresActive on
#       ExpiresDefault "access plus 11 days"
#   </filesmatch>
#</ifmodule></Directory>

7、修改twiki目录的所有者为apache

[root@localhost bin]# chown -R apache:apache /var/www/twiki/

8、开放防火墙80端口,并修改/etc/selinux/config 文件,将SELINUX=enforcing改为SELINUX=disabled

# 开放80端口
[root@localhost bin]# firewall-cmd --zone=public --add-port=80/tcp --permanent
# 配置立即生效
[root@localhost bin]# firewall-cmd --reload
[root@localhost bin]# vim /etc/selinux/config
SELINUX=disabled
#修改该配置文件后需要重启,所以留到最后一步
[root@localhost bin]# shutdown -r now

9、访问配置页192.168.100.240/do/configure ,设置管理员密码,以便在/var/www/twiki/lib目录下自动生成LocalSite.cfg文件。

10、如果未生成LocalSite.cfg文件,直接访问192.168.100.240/do/view,会有如下报错。

本文发布于:2024-02-01 13:39:16,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170676595836994.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:Twiki
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23