安裝配置MoinMoin Wiki
主要參考下這個文件:
如何安裝 MoinMoin Wiki
-
其他相關文件
Chapter 9. Debian伺服器篇
Linux Moin 安裝日記 (基於 mod_python)
MoinMoin Wiki 在Linux Apache下的安裝
附件為一個建立instance的指令碼 create_moin_instance.sh
[@more@]#!/bin/bash
RUN=${HOME}/run
SHARE=${RUN}/share/moin
FARMDIR=${RUN}/etc/moinfarm
WWWDIR=${HOME}/www
WWWTEMPLATE=${WWWDIR}/MOIN-WIKI-TEMPLATE
#TIMESTAMP=`date '+%Y%m%d_%H%M%S.%N'`
TIMESTAMP=`date '+%Y%m%d_%H%M%S'`
# path to target instance location
INSTANCE=$1
DOMAIN=$2
if [ ! $3 ]
then
WIKINAME=$INSTANCE
else
WIKINAME=$3
fi
INSTANCEDIR=${FARMDIR}/${INSTANCE}
WWWINSTDIR=${WWWDIR}/${DOMAIN}
INSTANCECONFIG=${INSTANCEDIR}/${INSTANCE}.py
USER=`id -un`
GROUP=`id -gn`
SELF=`basename $0`
if [ ! $2 ]
then
echo "usage: $SELF
exit 2
fi
if [[ -e ${INSTANCEDIR} || -d ${INSTANCEDIR} ]]
then
echo "${INSTANCEDIR} already exists... exiting."
exit 1
fi
echo "Creating and populating instance directory ${INSTANCEDIR}"
mkdir -p ${INSTANCEDIR}
cp -R ${SHARE}/data ${INSTANCEDIR}
# BABY - not copying underlay nor wikiconfig.py
#cp -R $SHARE/underlay $INSTANCE
#cp $SHARE/config/wikiconfig.py $INSTANCE
echo " creating symlinks to see the themes from ${FARMDIR}/THEMES"
mv ${INSTANCEDIR}/data/plugin/theme ${INSTANCEDIR}/data/plugin/NO-theme
ln -s ../../../THEMES ${INSTANCEDIR}/data/plugin/theme
chown -R $USER.$GROUP ${INSTANCEDIR}
chmod -R ug+rwX ${INSTANCEDIR}
chmod -R o-rwx ${INSTANCEDIR}
echo "Creating and populating web directory ${WWWINSTDIR}"
if [[ -d ${WWWINSTDIR} ]]
then
cp -rp ${WWWTEMPLATE}/* ${WWWTEMPLATE}/.??* ${WWWINSTDIR}
else
cp -rp ${WWWTEMPLATE} ${WWWINSTDIR}
fi
# BABY This is no longer necesary since I use 'cp -p'
#chown -R $USER.$GROUP ${WWWINSTDIR}
#chmod -R ug+rwX ${WWWINSTDIR}
#chmod -R o-w+rX ${WWWINSTDIR}
echo "Creating instance configuration file ${INSTANCECONFIG}"
sed -e "s/NAMEOFWIKI/${WIKINAME}/g" -e "s/NAMEOFINSTANCE/${INSTANCE}/g" ${FARMDIR}/TEMPLATES/INSTEMPLATE.py >${INSTANCECONFIG}
echo "Generating farm configuration file ${FARMDIR}/farmconfig.${TIMESTAMP}.py"
sed -e "s/^ # GENERATE_FARM_INSTANCE_ENTRY #$/ ("${INSTANCE}/${INSTANCE}", r"^(www.)?${DOMAIN}/.*$"),n # GENERATE_FARM_INSTANCE_ENTRY #/"
${FARMDIR}/farmconfig.py >${FARMDIR}/farmconfig.${TIMESTAMP}.py
#echo ""
#echo "NOTE:"
#echo "Revise farm configuration in ${FARMDIR}/farmconfig.${TIMESTAMP}.py"
#echo "and, if it's OK, do:"
#echo " $ mv ${FARMDIR}/farmconfig.${TIMESTAMP}.py ${FARMDIR}/farmconfig.py"
#echo ""
echo " moving ${FARMDIR}/farmconfig.py ===> ${FARMDIR}/BACKUP_PRE-${INSTANCE}.${TIMESTAMP}-farmconfig.py"
cp -p ${FARMDIR}/farmconfig.py ${FARMDIR}/BACKUP_PRE-${INSTANCE}.${TIMESTAMP}-farmconfig.py
echo " moving ${FARMDIR}/farmconfig.${TIMESTAMP}.py ===> ${FARMDIR}/farmconfig.py"
mv ${FARMDIR}/farmconfig.${TIMESTAMP}.py ${FARMDIR}/farmconfig.py
echo "Ready."
echo "Old farm configuration file saved in ${FARMDIR}/BACKUP_PRE-${INSTANCE}.${TIMESTAMP}-farmconfig.py"
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9614263/viewspace-1008737/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 使用 Docker 搭建你的Wiki(MoinMoin)Docker
- 本地windows搭建spark環境,安裝與詳細配置(jdk安裝與配置,scala安裝與配置,hadoop安裝與配置,spark安裝與配置)WindowsSparkJDKHadoop
- zabbix安裝—–nginx安裝和配置Nginx
- Zookeeper 安裝配置
- 【mongodb安裝配置】MongoDB
- ceph安裝配置
- ELK 安裝配置
- Prometheus安裝配置Prometheus
- MySQL安裝配置MySql
- SwitchOmega 安裝配置
- Hive安裝配置Hive
- JWT安裝配置JWT
- oracle安裝配置Oracle
- VNC安裝配置VNC
- rlwrap 安裝配置
- otrs安裝配置
- Sybase安裝配置
- memcache安裝配置
- mfs安裝配置
- storm安裝配置ORM
- Mysql 安裝 配置MySql
- memcached 安裝配置
- Mycat 安裝配置
- ANT安裝、配置
- rcp 安裝配置
- alertmanager安裝配置
- ccache安裝配置
- centos7 (阿里雲、linux) 單機spark的安裝與配置詳解(jdk安裝與配置,scala安裝與配置,hadoop安裝與配置,spark安裝與配置)CentOS阿里LinuxSparkJDKHadoop
- MYSQL + MHA +keepalive + VIP安裝配置(一)--MYSQL安裝配置MySql
- CentOS 7 安裝、配置、使用 PostgreSQL 10 安裝及基礎配置CentOSSQL
- 安裝和配置Drupal 8教程,如何安裝和配置Drupal 8?
- MYSQL + MHA +keepalive + VIP安裝配置(三)--keepalived安裝配置MySql
- SSH免密登入+JDK安裝配置+Hadoop安裝配置JDKHadoop
- MySQL安裝之二_安裝配置泥潭版MySql
- 安裝配置ETCD
- 安裝和配置sendmailAI
- MacVim安裝與配置Mac
- Poatgres配置安裝pgagent