This page documents my efforts to host software on my RimuHosting Virtual Private Server (VPS).

<<Navigation: execution failed [Argument "scheme" is required] (see also the log)>>

Handy commands / locations

Host details

MiroVPS4; 281MB memory; 4GB disk image; [...]; Control Panel: webmin; Data Transfer: 75GB of Data Transfer; Host server: host277.rimuhosting.com; Data center: Dallas (TX); $23.00/m

WordPress 2.6 on Feisty

% mysql -u root -p
mysql> create database wordpress;
Query OK, 1 row affected (0.03 sec)

mysql> grant all privileges on wordpress.* to "wordpress"@"localhost" identified by "NEWPASSWORD";
Query OK, 0 rows affected (0.27 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

% sudo cp -Rv wordpress-2.6/* /var/www/blog

% sudo chown -R www-data /var/www/blog

Installing a theme

http://codex.wordpress.org/Using_Themes

Matching a MoinMoin theme

Security

A WordPress "Filter" to parse MoinMoin syntax

It's strange that such a thing doesn't exist. After all, the WordPress folks use Trac.

Alternatives

Other ways to use Wiki-style markup for Wordpress posts

Modifying WP-PukiWiki to suit

Unfortunately, there aren't many comments in the code.

Call stack
  1. wp_pukiwiki(contents) (via the_contents callback)

    • handles notes
  2. wppw_pukiwiki_format(markup_betw_wiki_tags)

    • rejects edit form and toolbar HTML
  3. wppw_curl_pukiwiki(contents)

    • uses wiki's "edit preview" function to retrieve rendered HTML

Upgrading to 2.7

Upgrading WordPress « WordPress Codex

  1. deactivate plugins
  2. cp -R /var/www/blog ~/tmp # back it up

  3. wget http://wordpress.org/wordpress-2.7.tar.gz

  4. cp -Rv /var/www/blog/wp-content wordpress/

  5. cp /var/www/blog/wp-config.php wordpress/

  6. added new NONCE_KEY to wp-config.php

  7. sudo rm -rf /var/www/blog/*

  8. sudo cp -R wordpress/* /var/www/blog

  9. reactivate plugins

Upgrading to 2.8.4/2.8.5/3.0.1

Via http://codex.wordpress.org/Upgrading_WordPress

  1. deactivate plugins
  2. cp -R /var/www/blog ~/backups/var_www_blog_pre_2.8.4 # back it up. considering backing the db up as well. what if a new schema is used? (wordpress will notice this and prompt)

  3. cd ~/src; rm -rf wordpress; wget http://wordpress.org/wordpress-2.7.tar.gz http://wordpress.org/wordpress-2.8.4.md5; tzr wordpress-2.7.tar.gz # also verify md5

  4. sudo rm -rf /var/www/blog/wp-{admin,includes}

  5. cd wordpress; sudo cp -R * /var/www/blog/ # don't worry; this wont nuke wp-config.php cause the dist doesnt include a file by that name. root ownership is fine.

  6. wajig restart lighttpd

  7. reactivate plugins

Installing a MoinMoin 1.6 theme

  1. grab theme
  2. extract
  3. copy "themename" directory to /usr/local/share/moin/htdocs/. the "themename" directory contains img and css directories.

  4. copy themename.py to /usr/local/var/BrainSolventInstance/data/plugin/theme

  5. change theme_default in /usr/local/var/BrainSolventInstance/wikiconfig.py

  6. restart lighttpd

Typo 5.1 on Feisty w/ SQLite

Yuck. "If using a Rails version before 1.2.2, use SQLite 3.3.7 for better results, as there is an incompatibility" -- HowtoUseSQLite in Ruby on Rails

  1. sudo apt-get install rails libdbd-sqlite3-ruby rubygems

    • ack. 26MB.
  2. sudo gem install type

    • needed to install some sqlite -dev and -ruby packages along the way. thought it'd never end.
  3. as mysql root user:

uninstalled 'rails' and 'rake' apt packages and the "Access denied" messages went away. this means that i should have been using the 'rubygems' mysql package. or something.

on big problem seems to be that none of the rubygems scripts have u+x

mysql> create database typo_dev;
Query OK, 1 row affected (0.00 sec)

mysql> create database typo_tests;
Query OK, 1 row affected (0.01 sec)

mysql> create database typo;
Query OK, 1 row affected (0.00 sec)

mysql> grant usage on *.* to typo@localhost identified by 'foo';
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on typo_dev.* to typo@localhost ;
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on typo_tests.* to typo@localhost ;
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on typo.* to typo@localhost ;
Query OK, 0 rows affected (0.00 sec)

Edit database.yml.example to include MySQL credentials for "typo" user and saved as database.yml

sudo ruby /var/lib/gems/1.8/gems/typo-5.1.1/bin/typo install /var/www/blog

 Creating initial database
 Creating MySQL database
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y
ES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y
ES)
 expanding apache13.conf.example template
 expanding apache20.conf.example template
 expanding lighttpd.conf.example template
 Migrating Typo's database to newest release
rake aborted!
Access denied for user 'root'@'localhost' (using password: NO)

(See full trace by running task with --trace)
/var/lib/gems/1.8/gems/typo-5.1.1/bin/typo:59:in `migrate': Migration failed (RailsInstaller::InstallFailed)
        from /var/lib/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:689:in `in_directory'
        from /var/lib/gems/1.8/gems/typo-5.1.1/bin/typo:57:in `migrate'
        from /var/lib/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:217:in `install_sequence'
        from /var/lib/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:192:in `install'
        from /var/lib/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer/commands.rb:95:in `command'
        from /var/lib/gems/1.8/gems/rails-app-installer-0.2.0/lib/rails-installer.rb:646:in `execute_command'
        from /var/lib/gems/1.8/gems/typo-5.1.1/bin/typo:93

It's not using the creds in config/database.yml {*} perhaps because i'm not in the correct PWD?

At this point, /var/www/blog/config/database.yml was munged so I fixed it up according to the "Install Typo from sources" document and re-ran the installer.

http://unsyncopated.com:4383

Version hell

Currently you need all of those things to get typo to run:

 * Ruby 1.8.6 or higher
 * Rails 2.0.2. Typo DOES NOT support Rails 2.1 yet.
- /var/lib/gems/1.8/gems/typo-5.1.1/README

/var
1165 tz@scrub % ruby --version
ruby 1.8.5 (2006-08-25) [i486-linux]

/var
1166 tz@scrub % wj details rails | grep Version
Version: 1.2.1-0ubuntu1

Second attempt

sudo gem uninstall rails
wj remove rails rubygems ruby
sudo apt-get autoremove
sudo rm -rf /var/lib/gems

{*} RailsOnUbuntu in Ruby on Rails

I give up.

Third attempt

Followed Ubuntu community guidelines.

% sudo gem install typo
ERROR:  Error installing typo:
        typo requires rails (= 2.0.2, runtime)

Misc lighttpd settings

DNS

Transfer usage monitoring and notification

Subversion

  1. Set up svn-only account
  2. Move backed-up repo
  3. Restore
    cd /path/to/new-repository
    svnadmin create repository-name
    svnadmin load repository-name< repository-name.dmp

http://www.debian-administration.org/articles/94

Client's who've ~switched

MoinMoin

Upgrading to 1.9.2

Lighttpd

Pyblosxom

Fixing the moinmoin parser

>>> from MoinMoin.parser import text_moin_wiki
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/parser/text_moin_wiki.py", line 14, in <module>
    from MoinMoin import config, wikiutil, macro
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/macro/__init__.py", line 51, in <module>
    class Macro:
  File "/usr/local/lib/python2.5/site-packages/MoinMoin/macro/__init__.py", line 83, in Macro
    for lang in i18n.wikiLanguages():
TypeError: 'NoneType' object is not iterable

{*} commented out the about loop. fix this. see http://moinmo.in/MoinMoinChat/Logs/moin-dev/2007-12-07

"I remember mailing MoinMoin developers about just getting the body rendering part of the code, no one replied to me of course, which then made me hunt thru the MoinMoin core for like a few hours to make the thing work, I'm not going to dig in again though." -- Re: moinmoin parser: msg#00032

"the MoinMoin parser, for instance, is a separate module" -- Moin Moin

"I would like to be able to write some static website content in wiki markup without making use of the editing, revisioning, etc. aspects of a full wiki. Can anyone give me some pointers on how to apply Moin's markup-to-HTML transformation from a Python script? Cheers!

"RequestCLI and Parser are incorrectly imported for 1.6.0. See (widget.py.moin-1.6.0.diff) for change sugestion. -- Markus Ålind 2008-02-03" -- ThemeMarket/Widget - MoinMoin

/usr/local/var/BrainSolventInstance% python
Python 2.5.1 (r251:54863, Mar  7 2008, 03:41:45)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from MoinMoin.request.request_cli import Request as RequestCLI
>>> from MoinMoin.Page import Page
>>> request = RequestCLI('http://www.unsyncopated.com/BrainSolvent', 'BrainSolvent')
>>> Page(request,'BrainSolvent')
<MoinMoin.Page.Page object at 0x836c58c>

BINGO:

/usr/local/var/BrainSolventInstance
1044 tz@scrub % ./test.py
<p class="line867"><strong>foo</strong>bar

"wikiconfig can be anywhere. To make it importable, you must add the path to the directory where it is located to sys.path. Look into moin.cgi in the comments about setting the system path." -- Re: trouble setting up wiki with MoinMoin 1.5.2: msg#00080

The other way :[

Howto

  1. install 1.4.3 from source as system-wide python library, following 1.4 manual

Installing MoinMoin 1.6.1 from source on Feisty

  1. # /etc/init.d/apache2 stop

  2. # /etc/init.d/lighttpd start

  3. # python setup.py install --prefix='/usr/local' --record=install.log

  4. tweak createinstance.sh to copy template from /usr/local/share/moin and save to /root/createinstance.sh

  5. # ./createinstance.sh /usr/local/var/BrainSolventInstance

  6. sudo cp /usr/local/share/moin/server/moin.fcg /usr/local/var/BrainSolventInstance/

  7. setup lighttpd.conf as per [http://moinmo.in/HelpOnInstalling/FastCgi#head-5e78c268b624327aebea981d30d251b711465dd2 Multiple moin processes automatically started by lighttpd] which confusingly conflicts with [http://master.moinmo.in/MoinMoin/InstallDocs#fastcgi-install MoinMoin/InstallDocs - MoinMaster]

  8. tweak that new file to include path to my instance's wikiconfig.py
  9. {*} get 'create page?' but css is borked

    1. fixed css issue by adding moin161 static alias to lighttpd.conf as per [http://moinmo.in/FreeBSDScreencast FreeBSDScreencast - MoinMoin]

  10. sudo cp -R /home/tz/BrainSolvent/data/ /usr/local/var/BrainSolventInstance

  11. sudo chown -R www-data: /usr/local/var/BrainSolventInstance/data

  12. as www-data echo 'data_format_revision: 01050300' > /usr/local/var/BrainSolventInstance/data/meta

  13. www-data@scrub:/usr/local/var/BrainSolventInstance$ moin --config-dir=/usr/local/var/BrainSolventInstance\ --wiki-url=www.unsyncopated.com/BrainSolvent migration data

PAGE OLDPAGENAME NEWPAGENAME
FILE OLDPAGENAME OLDFILENAME NEWFILENAME

grep -v FILE data/rename1.txt | gawk --field-separator='|' '{print $1 "|" $2 "|" gensub(/_/," ","g",$NF)}' > data/rename2.txt_PAGE_done

Finding webmin's SHA1 host key fingerprint

  1. openssl x509 -in /etc/webmin/miniserv.pem -noout -fingerprint

  2. SHA1 Fingerprint=54:2E:3F:16:86:9B:E1:EF:D1:EB:AF:F9:2A:D7:19:A0:BA:79:0B:0E

Crude network throughput test

  1. wget 'ftp://ftp.cs.rit.edu/pub/mirrors/ise/download/linux/55/Eiffel55.tgz' 2>&1 | grep --regexp saved --regexp Length

LOLz

Reference

MoinMoin HTTPS instance failing after many days

Restarting lighttpd fixes it

sudo tail -n 5 /var/log/lighttpd/error.log

2010-03-15 04:04:34: (mod_fastcgi.c.2802) establishing connection failed: Connection refused socket: tcp:127.0.0.1:2202 
2010-03-15 04:04:34: (mod_fastcgi.c.2802) establishing connection failed: Connection refused socket: tcp:127.0.0.1:2201 
2010-03-15 04:04:34: (mod_fastcgi.c.2802) establishing connection failed: Connection refused socket: tcp:127.0.0.1:2200 
2010-03-15 04:04:36: (mod_fastcgi.c.3542) all handlers for  /wiki/ on /wiki are down. 

/home/tz
1008 tz@scrub $ psg moin
www-data  3376  3369  0 Mar14 ?        00:00:36 /usr/bin/python /usr/local/var/wikiInstance/moin.fcg

Lingering questions

Misc

VPS Software Configuration (last edited 2010-08-17 14:18:35 by Tyler)

All trademarks and copyrights on this page are owned by their respective owners.
Everything else copyright Tyler Oderkirk and Scott Carlson 2006-2010.
Tyler can be reached at "[FirstnameLastname]@gmail.com"