使用Wiki来管理文档是一种不错的方法,这里记录一下安装和配置TWiki的过程,参考材料
1,下载安装包(当前版本已经是TWiki-5.),在/data目录下解开,得道/data/twiki目录
2,重新部署htaccess文件
.htaccess
pub/.htaccess
lib/.htaccess
data/.htaccess
locale/.htaccess
templates/.htaccess
cp bin/. bin/.htaccess
3,配置LocalLib.cfg文件
cp bin/ bin/LocalLib.cfg
根据实际lib路径修改
$twikiLibPath = "/data/twiki/lib";
cp lib/TWiki.spec lib/LocalSite.cfg
4,配置bin/.htaccess文件
AuthUserFile /data/twiki/data/.htpasswd
cp twiki_ f
<FilesMatch "configure.*">
SetHandler cgi-script
Order Deny,Allow
Deny from all
Allow from 127.0.0.1, 192.168.1.10
Require user admin
Satisfy Any
</FilesMatch>
5,建立系统管理账户
htpasswd -c data/.htpasswd admin
6,配置apache服务
cp twiki_ f
cd /etc/httpd/conf.d
ln -s /data/f
根据实际路径修改f文件,例如:
ScriptAlias /twiki/bin "/data/twiki/bin"
Alias /twiki/pub "/data/twiki/pub"
<Directory "/data/twiki/bin">
AuthUserFile /data/twiki/data/.htpasswd
<Directory "/data/twiki/pub">
#php_admin_flag engine off
7,修改文件宿主和权限
chown -R apache:apache /data/twiki
参考,在twiki目录下新建access.sh文件
#! /bin/tcsh -f
set VERBOSE=-v
# Uncomment the following line to silence the output.
# set VERBOSE=# These are the settings for Ubuntu.
set APACHE_RUN_USER=apache
set APACHE_RUN_GROUP=apachechown -R ${VERBOSE} ${APACHE_RUN_USER}.${APACHE_RUN_GROUP} .
find . -type d -print0 | xargs -0 chmod ${VERBOSE} 755
find data -name '*.txt' -type f -print0 | xargs -0 chmod ${VERBOSE} 644
find data pub -name '*,v' -type f -print0 | xargs -0 chmod ${VERBOSE} 444
find lib locale -type f -print0 | xargs -0 chmod ${VERBOSE} 444
find pub -type f -print0 | xargs -0 chmod ${VERBOSE} 644
find bin -type f -print0 | xargs -0 chmod ${VERBOSE} 555
find templates bin/logos -type f -print0 | xargs -0 chmod ${VERBOSE} 444
find tools -type f -print0 | xargs -0 chmod ${VERBOSE} 555
chmod ${VERBOSE} 644 lib/LocalSite.cfg
chmod ${VERBOSE} 644 data/.htpasswd
chmod ${VERBOSE} 644 pes
chmod ${VERBOSE} 644 bin/ bin/.
chmod ${VERBOSE} 444 bin/setlib.cfg
chmod ${VERBOSE} 444 tools/extender.pl
chmod ${VERBOSE} 444 working/tmp/README working/README working/registration_approvals/README working/work_areas/README
chmod ${VERBOSE} 660 working/.htaccess
foreach file (AUTHORS COPYING COPYRIGHT index.html INSTALL.html twiki_)if (-e $file) chmod ${VERBOSE} 444 $file
end
8,启动Apache
service httpd start
访问localhost/twiki/bin/configure 检查是否成功
本文发布于:2024-02-01 13:37:34,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170676585336983.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |