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)>>
Contents
- Handy commands / locations
- Host details
- WordPress 2.6 on Feisty
- Installing a MoinMoin 1.6 theme
- Typo 5.1 on Feisty w/ SQLite
- Misc lighttpd settings
- DNS
- Transfer usage monitoring and notification
- Subversion
- MoinMoin
- Lighttpd
- Pyblosxom
- Installing MoinMoin 1.6.1 from source on Feisty
- Print these
- Finding webmin's SHA1 host key fingerprint
- Crude network throughput test
- LOLz
- Reference
- MoinMoin HTTPS instance failing after many days
- Lingering questions
- Misc
Handy commands / locations
sudo chown -R www-data /usr/local/var/wikiInstance/data/cache/wikiconfig/surgeprotect/surge-log
- buildbot
sudo -u buildbot buildbot start /home/buildbot/master
sudo -u buildbot buildbot start /home/buildbot/slave1
buildbot checkconfig /home/buildbot/master/master.cfg
tail -f /home/buildbot/master/twistd.log
sudo lighttpd -t -f /etc/lighttpd/lighttpd.conf # check syntax
sudo ls -al /var/lib/mercurial-server/repos/ # remember these are "bare" repos w/o WCs
- testing backup procedures
ssh ftpluser@backupspace.rimuhosting.com 'ls -al'
ssh ftpluser@backupspace.rimuhosting.com 'dd if=/dev/zero of=/home/ftpluser/foo bs=1000000 count=300'`
ssh ftpluser@backupspace.rimuhosting.com 'rm /home/ftpluser/foo'
- pruning old backups
ssh ftpluser@backupspace.rimuhosting.com 'rm ~/wordpress_*'
ssh ftpluser@backupspace.rimuhosting.com 'rm ~/brainsolvent_*'
awk '/ 404 / {print $6 $7}' < /var/log/lighttpd/access.log | sort | uniq --count | less
hurl.sh wp-moinmoin
wajig restart lighttpd
sudo nano ${BS_DATA}wikiconfig.py
sudo nano /etc/lighttpd/lighttpd.conf
cd ${BS_CODE}MoinMoin
sudo less /var/log/lighttpd/error.log
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
rightsidebar
screen.css probably needs something like `.sidepanel a { text-decoration: none; }
EddyP did some work on the Debian Wiki 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.
[wp-hackers] trac wiki syntax parser in php this guy wanted to write one but apparently never did: WordPress plugins - m0n5t3r’s nest
How To Get Rid of the WordPress Visual Editor did this to avoid 99 problems
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
wp_pukiwiki(contents) (via the_contents callback)
- handles notes
wppw_pukiwiki_format(markup_betw_wiki_tags)
- rejects edit form and toolbar HTML
wppw_curl_pukiwiki(contents)
- uses wiki's "edit preview" function to retrieve rendered HTML
Upgrading to 2.7
Upgrading WordPress « WordPress Codex
- deactivate plugins
cp -R /var/www/blog ~/tmp # back it up
wget http://wordpress.org/wordpress-2.7.tar.gz
cp -Rv /var/www/blog/wp-content wordpress/
cp /var/www/blog/wp-config.php wordpress/
added new NONCE_KEY to wp-config.php
sudo rm -rf /var/www/blog/*
sudo cp -R wordpress/* /var/www/blog
- reactivate plugins
Upgrading to 2.8.4/2.8.5/3.0.1
Via http://codex.wordpress.org/Upgrading_WordPress
- deactivate plugins
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)
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
sudo rm -rf /var/www/blog/wp-{admin,includes}
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.
wajig restart lighttpd
- reactivate plugins
Installing a MoinMoin 1.6 theme
- grab theme
- extract
copy "themename" directory to /usr/local/share/moin/htdocs/. the "themename" directory contains img and css directories.
copy themename.py to /usr/local/var/BrainSolventInstance/data/plugin/theme
change theme_default in /usr/local/var/BrainSolventInstance/wikiconfig.py
Alternatively, use this theme-switching macro
- 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
sudo apt-get install rails libdbd-sqlite3-ruby rubygems
- ack. 26MB.
sudo gem install type
- needed to install some sqlite -dev and -ruby packages along the way. thought it'd never end.
- 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:93Installing Typo Blog Engine and mod_rails for Multiple Accounts - MacksMind
Typo - Bug #1125: Install assumes rake is in PATH - Typo bug tracker - thorough explanation of problem
- has good debian-friendly paths
It's not using the creds in config/database.yml
perhaps because i'm not in the correct PWD?
Installing Ruby and Ruby on Rails in Ubuntu 7.10 Gutsy Gibbon Lots of poor suckers w/ the apt vs gems problems. Includes link to dev discussion.
"Let gems manage your rails package otherwise gem and apt-get will start fighting like Spock and Captain Kirk in Amok Time. If you haven't seen that episode, trust me: you don't want that." -- RubyOnRails - Community Ubuntu Documentation
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.
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
"External redirection to add a trailing "/" if exactly # "/blog" is requested" -- barryp.org blog: Getting PyBlosxom SCGI working under Lighttpd
DNS
Transfer usage monitoring and notification
This tip appears on the rimuhosting bliki sudo apt-get install vnstat # installs cronjob which updates vnstat every 5m
sudo vnstat -u -i eth0 as rimu's distro-agnostic script does
- wait 5 minutes
- run script in cron_daughter_scripts with arg of '1'
"/bin/mail doesn't do aliasing" -- Crontab Man Page
Subversion
- Set up svn-only account
- Move backed-up repo
- Restore
cd /path/to/new-repository svnadmin create repository-name svnadmin load repository-name< repository-name.dmp
- "I can"
http://www.debian-administration.org/articles/94
Open Explorer file window, right-click in the file section (get a pop-up), choose: TortoiseSVN -> Settings -> "Network" Pane-> SSH Client. ...\TortoisePlink.exe -l SSH_login_user_id -pw SSH_password
- PROFOT
Client's who've ~switched
- SC
- 1652
- tropicalia (and firefox)
- humid
MoinMoin
register pygments as a parser Pygments — Python syntax highlighter
Upgrading to 1.9.2
gotcha: lighttpd.conf points to moin.fcg not moin.fcgi
moin --config-dir=$BS_DATA maint cleancache
/usr/local/var/wikiInstance/htdocs only contains jmulv's brain icon
you should overwrite /usr/local/share/moin/htdocs on each upgrade
- took ~1hr. ugh.
Lighttpd
/home/drear pybloxsom too
Pyblosxom
- 17 blogger drafts/posts
- ~30 WP drafts/posts + ~8 posts
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!
look at the theme modern_cms this comes nearly to the aspect you want. You could suppress some more things if you want" -- MoinMoinQuestions/Themes - MoinMoin
"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
moin/1.7: File revisions (test_text_moin_wiki.py) - flickr macro worx but takes longer
<a href="./BrainSolvent">BrainSolvent</a>
RatingSystemForMoin/Discussion - MoinMoin details on using the formatter
The other way :[
Howto
- install 1.4.3 from source as system-wide python library, following 1.4 manual
Installing MoinMoin 1.6.1 from source on Feisty
# /etc/init.d/apache2 stop
# /etc/init.d/lighttpd start
# python setup.py install --prefix='/usr/local' --record=install.log
tweak createinstance.sh to copy template from /usr/local/share/moin and save to /root/createinstance.sh
# ./createinstance.sh /usr/local/var/BrainSolventInstance
sudo cp /usr/local/share/moin/server/moin.fcg /usr/local/var/BrainSolventInstance/
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]
- tweak that new file to include path to my instance's wikiconfig.py
get 'create page?' but css is borked fixed css issue by adding moin161 static alias to lighttpd.conf as per [http://moinmo.in/FreeBSDScreencast FreeBSDScreencast - MoinMoin]
sudo cp -R /home/tz/BrainSolvent/data/ /usr/local/var/BrainSolventInstance
sudo chown -R www-data: /usr/local/var/BrainSolventInstance/data
as www-data echo 'data_format_revision: 01050300' > /usr/local/var/BrainSolventInstance/data/meta
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
Print these
Finding webmin's SHA1 host key fingerprint
openssl x509 -in /etc/webmin/miniserv.pem -noout -fingerprint
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
wget 'ftp://ftp.cs.rit.edu/pub/mirrors/ise/download/linux/55/Eiffel55.tgz' 2>&1 | grep --regexp saved --regexp Length
LOLz
222 days uptime as of reboot at 2009-02-24
Reference
Backup FTP Server: Offsite Backups that You Control - RimuHosting
"Each RimuHosting customer is allocated a 300MB file space quota on this server" -- Backup FTP Server: Offsite Backups that You Control - RimuHosting
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
A fresh Jaunty install contained /var/log/memmon.txt as created by http://rimuhosting.com/howto/memory.jsp but memmon.sh isn't in my errata page. why?
Misc
- "cheat" by rotating files around on mounted backups
RimuHosting Bliki - knowledgebase/linux/miscapplications/webmin stopping it. 10MB per instance.
rimu forced a reboot 7/17/08 and when it came back, i had 25mb ram :]
