⇤ ← Revision 1 as of 2014-10-10 15:17:47
Size: 12098
Comment:
|
Size: 2565
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
Line 4: | Line 3: |
* 2011/3/30 on ubuntu 10.10 for test | * 2014/10/10 on CentOS 6.4 for test |
Line 12: | Line 11: |
$ sudo chown XXXX(user name):XXXX(group name) moinwiki | $ sudo chown apache:apache moinwiki |
Line 36: | Line 35: |
Edit /etc/apache2/apache2.conf and add {{{ | Install apache {{{ # yum install httpd.x86_64 }}} and check run level {{{ # chkconfig httpd on # chkconfig --list | grep httpd }}} Edit /etc/httpd/conf/httpd.conf and add {{{ |
Line 43: | Line 50: |
WSGISocketPrefix /var/run/httpd/wsgi | |
Line 46: | Line 53: |
WSGIDaemonProcess moin user=www-data group=www-data processes=5 threads=10 maximum-requests=1000 umask=0007 | WSGIDaemonProcess moin user=apache group=apache processes=5 threads=10 maximum-requests=1000 umask=0007 |
Line 55: | Line 62: |
# /etc/init.d/apache2 restart }}} Install libapache2-mod-wsgi {{{ $ sudo apt-get install libapache2-mod-wsgi |
# /etc/init.d/httpd restart |
Line 99: | Line 102: |
* Copy underley to update help or something as {{{ # cd /moinwiki/share/moin/JGWiki # cp -r ../underley . }}} * Update htdocs cd Download directly, then {{{ # cd moin-1.9.3/MoinMoin/web/static # cp -r htdocs /moinwiki/share/moin/ }}} Then copy grp07_on.png to /moinwiki/share/moin/htdocs/common |
|
Line 118: | Line 108: |
* update data using migration script as {{{ $ cd /usr/local/lib/python2.6/dist-packages/MoinMoin/script$ $ python moin.py --config-dir=/moinwiki/share/moin/JGWwiki --wiki-url=http://gwwiki.icrr.u-tokyo.ac.jp migration data 2011-04-27 14:54:19,225 WARNING MoinMoin.log:139 using logging configuration read from built-in fallback in MoinMoin.log module! 2011-04-27 14:54:20,477 INFO MoinMoin.config.multiconfig:127 using wiki config: /moinwiki/share/moin/JGWwiki/wikiconfig.py Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1070200 Returned. New rev is 1070300. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1070300 Returned. New rev is 1080000. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1080000 Returned. New rev is 1080100. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1080100 Returned. New rev is 1080200. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1080200 Returned. New rev is 1080300. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1080300 Returned. New rev is 1080400. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1080400 Returned. New rev is 1080500. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1080500 Returned. New rev is 1080600. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1080600 Returned. New rev is 1080700. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1080700 Returned. New rev is 1080800. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1080800 Returned. New rev is 1089999. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1089999 Returned. New rev is 1090000. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1090000 Returned. New rev is 1090100. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1090100 Returned. New rev is 1090200. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1090200 Returned. New rev is 1090300. Calling migration script for /moinwiki/share/moin/JGWwiki/data, base revision 1090300 Final mig script reached, migration is complete. }}} * Update Language packs by access http://localhost/JGWwiki/LanguageSetup?action=language_setup and pick up Japanese, then press install on the all_pages link (it's the last line in the list). You'll obtain a "Attachment 'Japanese_all_pages.zip installed." message. Then repeat it for English. And restart apache {{{ /etc/init.d/apache2 restart }}} ---- === To activate basic HTTP authentication === 1. Add following to /moinwiki/share/moin/JGWwiki/wikiconfig.py {{{ from MoinMoin.auth import GivenAuth # auth = [GivenAuth(autocreate=True, strip_windomain=True, titlecase=True, )] auth = [GivenAuth(autocreate=True)] }}} * Edit /etc/apache2/sites-available/default, <Directory /> section to activate .htaccess on ubuntu {{{ # AllowOverride None ## before AllowOverride All ## after }}} * Make .htaccess at /moinwiki/share/moin/JGWwiki {{{ AuthUserFile /target_directly/.htpasswd AuthGroupFile /dev/null AuthName "Please enter your ID and password" AuthType Basic <Limit GET> require valid-user </Limit> }}} * Make .htpasswd at target_directly using password producing tool or something. ---- === Redirect to new server === Edit /Applications/MAMP/conf/apache/httpd.conf on old Mac mini server as {{{ #Alias /moin_static172/ "/moinwiki/share/moin/htdocs/" #<Directory "/moinwiki/share/moin/htdocs"> # Options Indexes FollowSymLinks ## AllowOverride None ## Order allow,deny ## Allow from all # AllowOverride None # Order allow,deny # Allow from all #</Directory> #ScriptAlias /JGWwiki "/moinwiki/share/moin/JGWwiki/moin.cgi" #<Directory "/moinwiki"> # Options Indexes FollowSymLinks ExecCGI ## AllowOverride None ## Order allow,deny ## Allow from all # AllowOverride None # Order allow,deny # Allow from all #</Directory> #ScriptAlias /LCGTexec "/moinwiki/share/moin/LCGTexec/moin.cgi" #<Directory "/moinwiki"> # Options Indexes FollowSymLinks ExecCGI ## AllowOverride None ## Order allow,deny ## Allow from all # AllowOverride None # Order allow,deny # Allow from all #</Directory> DocumentRoot "/Applications/MAMP/htdocs" <Directory /> Redirect /JGWdoc http://gwwiki.icrr.u-tokyo.ac.jp/JGWwiki </Directory> DocumentRoot "/Applications/MAMP/htdocs" <Directory /> Redirect /LCGTexec http://gwwiki.icrr.u-tokyo.ac.jp/LCGTexec </Directory> }}} ---- == To make multiple wikis == ==== Apache2 setting ==== Add moin.wsgi of new wikis to /etc/apache2/apache2.conf as {{{ # # MoinMoin WSGI configuration # # you will invoke your moin wiki at the root url, like http://servername/FrontPage: WSGIScriptAlias /JGWwiki/Private /moinwiki/share/moin/Private/moin.wsgi WSGIScriptAlias /JGWwiki /moinwiki/share/moin/JGWwiki/moin.wsgi WSGIScriptAlias /LCGTexec /moinwiki/share/moin/LCGTexec/moin.wsgi }}} 1. Copy backup folder of LCGTexec to /moinwiki/share/moin and * Then, {{{ # cd /moinwiki/share/moin/LCGTexec # cp ../config/wikiconfig.py . # cp ../server/moin.wsgi . # rm moin.cgi }}} * Edit moin.wsgi and add {{{ sys.path.insert(0, '/moinwiki/share/moin/LCGTexec') }}} * Edit wikiconfig.py and add or replace {{{ url_prefix_static = '/moin_static193' sitename = u'LCGT exexutive Wiki' logo_string = u'<img src="%s/common/grp07_on.png" alt="JGW Logo">' % url_prefix_static page_front_page = u"FrontPage" superuser = [u"XxxxXxxx",u"XxxxXxxx",] acl_rights_before = u"XxxxXxxx:read,write,delete,revert,admin XxxxXxxx:read,write,delete,revert" acl_enable = 1 tz_offset = 9.0 }}} * Copy underley to update help or something as {{{ # cd /moinwiki/share/moin/LCGTexec # cp -r ../underley . }}} * Ownership and access level change {{{ $ cd /moinwiki/share $ sudo chown -R xxxxxxx:www-data moin $ chmod -R ug+rwX moin $ chmod -R o-rwX moin }}} * update data using migration script as {{{ $ cd /usr/local/lib/python2.6/dist-packages/MoinMoin/script $ python moin.py --config-dir=/moinwiki/share/moin/LCGTexec --wiki-url=http://gwwiki.icrr.u-tokyo.ac.jp migration data }}} and restart apache {{{ # /etc/init.d/apache2 restart }}} * Update Language packs by access http://localhost/LCGTexec/LanguageSetup?action=language_setup and pick up Japanese, then press install on the all_pages link (it's the last line in the list). You'll obtain a "Attachment 'Japanese_all_pages.zip installed." message. Then repeat it for English. And restart apache {{{ # /etc/init.d/apache2 restart }}} ---- == wiki farm == Making Private wiki as one of wikifarm. This is because to share user accounts and passwords as JGWwiki. 1. Copy farmconfig.py, mywiki.py {{{ mkdir /moinwiki/share/moin/Private cd /moinwiki/share/moin/Private cp ../config/wikifarm/farmconfig.py . cp ../config/wikifarm/mywiki.py Private.py cp ../server/moin.wsgi . cp -r ../data . cp -r ../underlay . }}} * Edit farmconfig.py as {{{ wikis = [ # wikiname, url regular expression # --------------------------------------------------------------- #("JGWwiki", r".*"), # this is ok for a single wiki ### comment out this line at 45 # for multiple wikis, do something like this: #("wiki1", r"^http://wiki1\.example\.org/.*$"), #("wiki2", r"^https?://wiki2\.example\.org/.*$"), ("Private", r"^http://localhost/JGWwiki/Private/.*$"), # order must be Private -> JGWwiki #("JGWwiki", r"^http://localhost/JGWwiki/.*$"), ] }}} and add these lines at the end. {{{ url_prefix_static = '/moin_static193' # static stuff like logo and themes will be searched there logo_string = u'<img src="%s/common/grp07_on.png" alt="JGW Logo">' % url_prefix_static user_dir = '/moinwiki/share/moin/JGWwiki/data/user' # user folder }}} * Edit .../Private/moin.wsgi as {{{ sys.path.insert(0, '/moinwiki/share/moin/Private') }}} * Add these lines at the end of .../Private/Private.py {{{ page_front_page = u"FrontPage" data_dir = '/moinwiki/share/moin/Private/data/' data_underlay_dir = '/moinwiki/share/moin/Private/underlay' }}} * Edit /etc/apache2/apache2.conf as {{{ # # MoinMoin WSGI configuration # # you will invoke your moin wiki at the root url, like http://servername/FrontPage: #WSGIScriptAlias /JGWwiki/Private /moinwiki/share/moin/moin.wsgi WSGIScriptAlias /JGWwiki/Private /moinwiki/share/moin/Private/moin.wsgi WSGIScriptAlias /JGWwiki /moinwiki/share/moin/JGWwiki/moin.wsgi #WSGIScriptAlias /JGWwiki /moinwiki/share/moin/moin.wsgi WSGIScriptAlias /LCGTexec /moinwiki/share/moin/LCGTexec/moin.wsgi }}} * Copy .htaccess to /moinwiki/share/moin/Private/, and note that this file should be -rw-r--r--. Remove .htaccess from /moinwiki/share/moin/ and /moinwiki/share/moin/JGWwiki/ * Restart apache {{{ # /etc/init.d/apache2 restart }}} |
MoinMoin wiki
- 2014/10/10 on CentOS 6.4 for test
- moinmoin1.9.3
MoinMoin1.9.3 installation
$ cd / $ sudo mkdir moinwiki $ sudo chown apache:apache moinwiki
Download moinmoin-1.9.3 and in download directory
$ tar xvf moin-1.9.3.tar.gz $ cd moin-1.9.3 $ sudo python setup.py install --force --record=install.log --prefix='/usr/local' --install-data=/moinwiki
Installed directly:
- library: /usr/local/lib/python2.6/dist-packages/MoinMoin
- data: /moinwiki/share/moin
wsgi test
$ cd /moinwiki/share/moin/server $ python test.wsgi
Then open http://localhost:8000/ on web client.
Apache2 setting
Install apache
# yum install httpd.x86_64
and check run level
# chkconfig httpd on # chkconfig --list | grep httpd
Edit /etc/httpd/conf/httpd.conf and add
# # MoinMoin WSGI configuration # # you will invoke your moin wiki at the root url, like http://servername/FrontPage: WSGIScriptAlias /JGWwiki /moinwiki/share/moin/JGWwiki/moin.wsgi WSGISocketPrefix /var/run/httpd/wsgi # create some wsgi daemons - use these parameters for a simple setup WSGIDaemonProcess moin user=apache group=apache processes=5 threads=10 maximum-requests=1000 umask=0007 # use the daemons we defined above to process requests! WSGIProcessGroup moin Alias /moin_static193/ "/moinwiki/share/moin/htdocs/"
and restart apache
# /etc/init.d/httpd restart
update old data
- Copy backup folder of JGWwiki to /moinwiki/share/moin and
- Copy backup folder of htdoc to /moinwiki/share/moin
Then,
# cd /moinwiki/share/moin/JGWiki # cp ../config/wikiconfig.py . # cp ../server/moin.wsgi . # rm moin.cgi
Edit moin.wsgi and add
sys.path.insert(0, '/moinwiki/share/moin/JGWwiki')
Edit wikiconfig.py and add or replace
url_prefix_static = '/moin_static193' sitename = u'JGW Wiki' logo_string = u'<img src="%s/common/grp07_on.png" alt="JGW Logo">' % url_prefix_static page_front_page = u"FrontPage" superuser = [u"XxxxXxxx",u"XxxxXxxx",] acl_rights_before = u"XxxxXxxx:read,write,delete,revert,admin XxxxXxxx:read,write,delete,revert XxxxXxxx:read,write,delete XxxxXxxx:read,write,delete" acl_enable = 1 acl_rights_default = u"MemberGroup:read,write All:read" tz_offset = 9.0
Ownership and access level change
$ cd /moinwiki/share $ sudo chown -R xxxxxxx:www-data moin $ chmod -R ug+rwX moin $ chmod -R o-rwX moin