Saturday, May 31, 2008

Upgrading Deki Wiki From 1.9.0 (Itasca) to 8.05 (Jay Cooke) VM Only - MindTouch Deki Wiki

Upgrading Deki Wiki From 1.9.0 (Itasca) to 8.05 (Jay Cooke) VM Only - MindTouch Deki Wiki

Upgrading Deki Wiki From 1.9.0 (Itasca) to 8.05 (Jay Cooke) VM Only

This guide assumes you are upgrading the MindTouch Deki Wiki VMWare-Certified Virtual Appliance from v.1.9.0 to v.8.05. If you are upgrading from an earlier version, please visit http://wiki.opengarden.org/Deki_Wiki/Installation_and_Upgrade to find your appropriate guide.

While the upgrade script does not affect the MySQL database and settings files, it is recommended in case a full reinstall is needed.


Back Up Attachments

Type the following commands to create the backup directory and back up your attachments:

# mkdir ~/deki_backup
# cd /var/www/dekiwiki/
# tar cvzpf ~/deki_backup/attachments.tar.gz /var/www/dekiwiki/attachments

Back Up Settings Files

Enter the following commands to back up the files that Deki Wiki uses to determine settings:

# cp /var/www/dekiwiki/LocalSettings.php ~/deki_backup
# cp /etc/dekiwiki/mindtouch.deki.startup.xml ~/deki_backup
# cp /etc/dekiwiki/mindtouch.host.conf ~/deki_backup

Backup your MySQL Database

Use the following line to back up the MySQL database:

# mysqldump -u -p wikidb > ~/deki_backup/wikidb.sql

If you did not change the default username and password, then it would be root and password for and , respectively.

Upgrade the Wiki

Type the following command to upgrade DekiWiki to the newest version:

updateWiki.sh

After that script has completed, go to the IP of your wiki and click on Tools, and then About to confirm you are at the latest version.

Rebuild the Index

In the wiki, click on Tools, then Control Panel, and then Site Settings.Click Rebuild Index to re-index the wiki.

Monday, May 12, 2008

i-Installer for netpbm

i-Installer Home Page
i-Installer is unsupported software as of Jan 1, 2007. For the foreseeable future I will be using i-Installer myself for several of my installs for personal use (mainly TeX) and as such I will maintain the program and some of my i-Packages.

What ends is e-mail support for people using i-Installer or any of my i-Packages. If you are looking for help, please join the Mac OS X TeX mailing list, which is the most active user community at the time I am writing this.

Bug reports can still be sent to me, but you will not get a reaction and it is uncertain if and when I will be paying attention to them. If it is something that does work for me (and thus something with your particular setup, I will most likely not pay any attention to them).


I will be announcing the actual end of support on ii2-announce@mail.rna.nl. Until then, I am still actively working to get to the situation that I can drop supporting the community.
i-Installer is open source under a BSD License. i-Installer is hosted on
SourceForge.net Logo
You can get to the i-Installer project home page by following this link.

i-Installer code is not particularly good. This is the result of the fact that it has been written as a pilot-project-gone-awry in combination with the fact that certain aspects of the environment (Mac OS X) played foul with my original architecture ideas (it just did not work at that time). Mac OS X has improved since, but i-Installer would have to be rewritten to benefit. That is only going to happen if I win the lottery and do not have to work for al living anymore...

You won't believe it, but this program actually has attracted fan mail (and some hate mail). An edited selection of fan mail can be found here

Introduction

Welcome to the i-Installer Home page. i-Installer is a network-aware installer application for Mac OS X 10.2 or higher. It installs i-Packages which are directories with a name ending on .ii2 and which contain a set of files. An in-depth introduction (in fact: the i-Installer Help Book) can be found here.

i-Installer is a generic software install and configuration application. It can install socalled i-Packages, which are wrappers (directories containing files) with names ending on .ii2 and which will look like files in most applications (like the Finder). i-Packages can be updated and downloaded from remote locations. Most of this will happen automcatically.

i-Packages may have the following functionality:

  • Installation (and subsequent Configuration)
  • (re-)Configuration
  • Uninstallation (removal)

i-Packages may be interactive in a limited way. i-installer provides the package with access to several predefined sheets that can be displayed on the package window. That way, especially configuration can involve the user. (In other words: install TeX and select formats, languages in a GUI, install ghostscript and be offered a choice to add TeX's type1 fonts to an installed ghostscript).

i-Packages exist just like other wrappers: on your hard disk. You can create packages from remote URL locations by entering an URL (like http://www.ntg.nl/macosx-tex/i-packages/texmf.ii2 in a panel.

However, the easiest way to create packages on disk from remote locations is using a "Known Packages" menu. This will list a series of packages and their location for you to choose from, called an i-Directory. The i-Directories may be local files or web based. As of Jan 1, 2007, the current set is (this may change without notice):

  • http://tug.org/i-packages/iid/gwrelative.iid (default)
  • http://www.ntg.nl/macosx-tex/i-packages/iid/gwrelative.iid
  • http://www.math.utah.edu/ftp/pub/i-packages/iid/gwrelative.iid
  • http://bloch.ling.yale.edu/i-packages/iid/gwrelative.iid
These refer to each other in a circular manner . You can influence both the default i-Directory to use and the amount of descend into te web of i-Directories in i-Installers preferences. You can travel the i-Directory web in the Known Packages window. There exists a separate repository for experimental versions of my i-Packages:
  • http://bloch.ling.yale.edu/i-packages/experimental/iid/gwrelative.iid

The following packages are available from me (unsupported):

  • TeX-related:
    • TeX (based on a subset of TeX Live). This include installs of TeX4ht, Latin Modern fonts (scalable fonts for PostScript/PDF) and XeTeX
    • CM Super (PostScript/PDF vector versions of TeX fonts). This provides support for vector versions of TeX fonts so you can make scalable PDF documents that look good at any resolution, including screen resolution. This package is not required. It is roughly 60MB in size. These are deprecated, you should use the Latin Modern fonts instead.
    • CB Greek (Greek fonts and support)
    • MusixTeX (Support for typesetting music)
    • ConTeXt updater. ConTeXt is a powerful alternative to LaTeX. It is very actively maintained and regularly updated versions or betas are released by its author Hans Hagen of Pragma ADE. My server checks for updates every night and if there has been a change, automatically rebuilds the i-Package from the new materials. Combined with i-Installer's check for updates this provides with a completely automatic way to check for ConTeXt updates.
    • Gerd Neugebauer's BibTool. Command line bibliography file (.bib) manipulation.
    • LaTeX to RTF Converter
    • RTF 2 LaTeX2e converter
  • Support for various graphic formats and conversions.
    • Ghostscript 8 the free PostScript interpreter. You need this for TeX if you want to use PS-dependent TeX tricks, old projects, etc
    • Autotrace
    • Eddie Kohler's LCDF Typetools (these are also part of the TeX i-Package)
    • ImageMagick (image conversion and manipulation)
    • JPEG Tools and Library
    • PNG Library
    • TIFF Library
    • Netpbm Tools and Library
    • libwmf conversion support
    • libiconv conversion support (only required on Mac OS X versions before 10.3)
    • wvWare (MS Word conversion)
  • Support for font conversions.
    • Freetype2
    • Fondu (tool for unpacking Mac Fonts)
    • FontForge (formerly PfaEdit)
    • ttf2pt1 TrueType to PostScript Type1 font conversion
  • System utilities and libraries
    • MacBinary and binhex cli utils
    • i-Installer itself (naturally)
    • Xaw3d Library for X11R6 (3D widgets)
  • Applications
    • Ghostview PostScript viewer (requires an X11-installation)
    • XFig drawing program (requires an X11-installation)

Some others provide i-Packages as well. There is a package for the JOVE emacs-like command line editor, provided by Tom Hageman.

Warning: as i-Installer depends on the web, you may encounter long time outs when servers are busy. See the performance section in i-Installer Help for more info.

i-Installer offers the possibility for regular backgound (no need to start i-Installer, no need to be logged in) checking for new releases of packages you have available.

The i-Installer application download can be found here: II2.dmg. This will download a disk image. A disk image is a file that contains an image of a disk. Such a file can be used just like a disk can. You need to mount that disk image. Mounting a disk image can be done by double clicking it in the Finder.

When the disk image has been mounted, you will have an extra `disk' listed in your Finder window. On it you will find two files, a README file and an APple Installer.app .pkg. To install i-Installer, install the .pkg. Once installed, i-Installer can be used to update itself.

Run i-Installer and (if you are connected to the internet) select the Known Packages submenu. You will be presented with a list of known packages. See my TeX page for more information on the TeX i-Packages and volumes and possible mirror locations.

The i-Installer volume is also mirrored. The following mirrors are available:

You are hereby granted permission to mirror the i-Installer volume, under the following conditions:

  • The mirror image should not be older than a day (you need to synchronize at least once a day)
  • You make clear on your distribution site that you are offering a copy of my distribution and you link to this web page

There is a mailing list for announcements about i-Installer.

i-Installer was designed and written by Gerben Wierda. The beautiful icons were designed by Jérôme Laurens.

i-Installer Know How

How and where do I report problems?

E-mail about i-Installer can be sent to ii2 at rna dot nl. Note that this address may be protected by an anti SPAM system, in which case you'll get a robot-reply to tell you how to reach me.

Please read the top of this page carefully. Bugs may be reported but I do not support this software anymore except for my personal use, hence, fixes may or may not come and may take a long time to come. If you report a bug, make sure to include.

  • What you did.
  • Your OS version and what you can tell me about what is installed.
  • For i-Installer and i-Packages
    • In case of an i-Installer crash: the crash log.
    • In all cases: the log output in Console.app. If the problem is reproducible, set i-Installer to a higher log level (e.g. 6) and recreate the problem. Send me that Console.app output.
    • The contents of a report (see below) *after* the error has occurred. In case of a crash, from before the crash occurs.

i-Installer has a menu option Create & Display Report in the i-Package menu, which you should use preferably and if possible. This creates a report on settings, properties, output, etc. of you i-Package. If you select the menu item, a special tab view opens in the i-Package window. There you find a mail button to send it to me.

i-Installer or i-Package Foo does not work on 10.2 and older!

Correct. Mac OS X 10.2 and older versions are not supported. Mac OS X 10.1 and older are not supported at all and no i-Installer version will run on them. For Mac OS X 10.2 you can download a volume of 357MB which contains a snapshot of i-Installer.app and all my i-Packages from Jan 24, 2006. All of these should install and work on Mac OS X 10.2. However, there have been so few users actually running 10.2 lately that this is not guaranteed.

Does i-Installer support authenticating proxies?

Sadly, No. The problem is mainly that the stuff in Cocoa I have used did not support this in the past. Only later versions of Cocoa have support for this and enabling this would require a complete rewrite of the download object (and dropping support for Mac OS X 10.2). This might happen, but not soon, and the main problem for me would be that I would be unable to test it (as I am not behind such a proxy myself).

What you can do instead is to download the package entirely through other means (like wget) and then use it from disk with network access for i-installer turned off.

The check of the remote package md5 checksum failed

A possible reason is that there is a cache between you and where your are downloading from and this cache is misbehaving. It is offering you an old version of the checksum or the table of contents even if there is a new version available *and* it is instructed by i-Installer to ignore caching (check your preferene setting on this).

An other possible reason is that you have been trying to update while the package was being updated. There is a protection against this in i-Installer, but this is not 100% proof as it would lead to unacceptable response times. If this is reproducable (i.e. it happens when you hit update again say one hour later) this update problem is not the cause.

It is as far as I know impossible for there to be another cause. i-Installer downloads the new table of contents and saves this (reporting download or write errors along the way). Then it checks the new table of contents (which has been downloaded) against the remote md5 checksum.

How do I check the up-to-dateness of i-Packages without running i-Installer?

i-Installer has a preference for this. You can tell it to check all i-Packages in the default save directory on a regular basis. You will get mail when one of them have been updated. See i-Installer help for details.

If you want to create a background check for packages in other locations, or just a few of the packages in your default save location, you need some unix knowledge. i-Installer writes its setting for this feature in the cron system. If you know how to edit this, you can easily copy and adapt the example that i-Installer writes there itself.

How do I minimize web traffic?

i-Installer itself minimizes web traffic by only downloading what is necessary for the action you want to perform (i.e. for removal, only the removal script is downloaded, not the archive itself). Read the help on inspection of archives to find out how inspection web traffic is minimized.

However, there is one thing you can do yourself. Suppose you have a package installed and an update has become available. You want to know if it is necessary to update and what will be downloaded, before actually doing the download, which you may want to do at another time. Here is how you go about it:

  • Update the package (in the properties tab, click the update button). Note: this will remove any parts of the local package that have changed. So if your package is complete (fattened), back it up first en restore it if you decide you want to go back to the old situation. The message view will tell you which files have changed and have therefore been removed locally.
  • Now, in the inspect tab, you can see which files are available. Suppose the archive (normally the biggest part) has been removed because it has changed. Inspect the README (which should have been changed as well). The README should tell you (if the package maintainer is doing his work properly) what has changed and you can decide if you want the update or not. If you do not, you may restore the backup to get your old situation back.

I do not have a (fast) internet connection. What should I do?

Note: This procedure is very wasteful. You will be downloading everything in an i-Package, far more than you need. Also, this only works for my repository which is available via ftp.

Go to a machine that has a fast internet connection. Any machine will do, but the following instructions are based on a unix machine using the ncftp command. If you go to a Windows machine, do the equivalent, but then in Windows (and I do not know how).
  1. Change directory to where you want the i-Packages. E.g. cd ~/Desktop
  2. Get the i-Packages (approximately 300MB!):
ncftpget -R ftp://ftp.nluug.nl/pub/comp/macosx/i-packages
  1. Get i-Installer:
ncftpget ftp://ftp.nluug.nl/pub/comp/macosx/volumes/ii2/II2.dmg
  1. Copy the i-packages directory and II2.dmg to an USB stick or a CD and bring it to your Mac.
  2. On your Mac, open II2.dmg and install the Installer.app .pkg on that volume.
  3. Log out and log in (to get .ii2 and .iid recognized by the system, this might not be needed on recent versions of the OS)
  4. Double click /i-packages/iid/gwrelative.iid
  5. Open and install the i-Packages you require
Ignore all i-Installer warnings you get about not being able to find stuff on the internet. Best is to start i-Installer, and set network preferences to no network traffic at all.

Why is button X disabled?

When i-Installer is performing a set of activities, most buttons are disabled. This is because the implementation of a combination of parallel activities is incomplete. When you download the archive because you want to install, hitting Inspect for that archive would start the same download and check set. These two sets would currently interfere.

Secondly, a package may be 'locked' (you see the small lock button on the package window). This is a protection against accidentally modifying a package hat is in 'useful' state. i-Installer will not modify the locked package (e.g. updating, fattening, etc). For instance, I ship a TeX volume with on it the latest i-Installer program and two i-Packages (TeX and ghostscript). Ghostscript is complete (fat). TeX is complete for a standard installation. Both are locked. They cannot be changed because they are on a read-only volume. But locking them also prevents i-Installer from actually trying. If you want to change such a package (e.g. update it), the best thing to do is first copy it to the default save directory of i-Installer, open it and unlock it.

Thirdly, i-Packages may be retired and these only support uninstalling.

After installing package Foo, the ownerhip of files and directories has changed!

This means that the package provider has included existing directories in the gnutar archive and gnutar creates these with the ownership in the archive, even if they already exist with another owner. The package provider can solve this problem by not providing directories, only the files in the directories. In that case directories are created when unavailable but not recreated or changed ownership when already available.

rss2email - a free tool for delivering news from RSS feeds to your email program (rss2email)

rss2email - a free tool for delivering news from RSS feeds to your email program (rss2email)

rss2email

read newsfeeds from your email client

rss2email is a free tool for delivering news from RSS feeds to your email program that works under Windows and UNIX.

Get started with rss2email now. This is the new web home for the application. The original homepage for rss2email is here.

The latest news on rss2email is on our blog. The latest version is v2.62 (CHANGELOG). The latest version of the web UI is v1.00.

Why use rss2email?

There are many different ways to read RSS feeds. Maybe rss2email is the right one for you.

First, rss2email is open source and free to download and use forever.

rss2email lets you read newsfeeds from a program that you already know and use everyday: your email client. So rather than having to learn to use a new program or visit a webpage, rss2email delivers news items to the place where information that is important to you already is.

Your email client probably has useful filtering capabilities. Rather than be bombarded by every new item, you can sort and group feeds into different folders so that the important stuff gets read first and other things stick around until later.

Also, if you find something that you want to hang onto or foward to a friend, you probably already know how to do that in your email client.

There are many "flavors" of RSS in use today. There's even a flavor called Atom that's not RSS at all. No matter what flavor you find, rss2email can read it.

Some people want pretty emails in HTML format. Others always want text, with no HTML at all. News feeds can be all over the place, sometimes HTML, sometimes just text. With rss2email you get HTML if you want or you can always get readable all-text versions, even if the original entry contained HTML.

rss2email Features

  • Runs on Windows and UNIX
  • Plays nicely with standalone email clients, webmail and text email readers
  • Compatible with POP or IMAP email servers
  • Can read any RSS or Atom newsfeed
  • Nicely handles non-US character sets
  • Free to use, forever

What is RSS?

RSS is a popular way of automatically tracking updates to web sites. Maybe it's a new entry on a weblog (Feed), the latest flower photos (Feed), someone selling blue suede shoes (Feed) on Craig's List or a breaking news story (Feed).

The way it works is that a site provides a "newsfeed" and a link to that feed. When you run rss2email, it checks each newsfeed link and emails every new entry that's in the feed.

That's pretty much it. If you want the techie, under-the-hood details, look here.

Contact Us

If you have a question or comment about rss2email, email us at rss2email@aaronsw.com.

Tuesday, May 6, 2008

How do I...Access Deki Wiki through windows Explorer? - Open Garden

How do I...Access Deki Wiki through windows Explorer? - Open Garden

When you are customizing Deki Wiki you'll want to be able to easily drag and drop files from your windows environment into the root directory to apply changes. In order to integrate the Deki Wiki with Explorer you need to use Samba, which comes installed on the Deki Wiki WM. More information about Samba can be found at Wikipedia and the official Samba website.


Here is how you configure Samba:

1. Log in as the root user.

2. Create the user that you want to use to login into Deki Wiki:

 useradd yourusername

3. Create a Samba password for the user:

smbpasswd -a yourusername

NOTE: if you want to use the root password then yourusername=root and use the same password that you have for your root password account.

4. Update the Samba configuration file (/etc/samba/smb.conf):

workgroup = WORKGROUP (replace by your Windows value)
# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0644
# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0775
[MyWWW]
comment = Deki /var/www folder
path = /var/www
public = yes
writeable = yes
read only = no
valid users = yourusername
create mode = 0666

Note for users not familiar with the smb.conf file: the directory mask and create mask lines exist in the default smb.conf file, and they must be modified. The [MyWWW] section does not. Add the [MyWWW] section at the very end of the smb.conf file to make sure that you are not interrupting another already existing section.

If you want to connect as the root user, make sure to comment the following line like this:

;invalid users = root 

5. Restart Samba: /etc/init.d/samba restart

If Vista is Host Operating System

If Vista is your Host operating system that VM Player is running on then you'll want to update Samba to the most recent version to avoid a glitch that slows transfer to a trickle. Run the following code to update Samba:

apt-get install samba samba-common samba-client

Monday, May 5, 2008

Backup Procedure - Page 2 - MindTouch OpenGarden.org Forums

Backup Procedure - Page 2 - MindTouch OpenGarden.org Forums

I make a double backup,
1 with a cron job on my vm image
1 on my windows server from my complete vm image
For the last i have to suspend the Vm image for a while, but in case my complet vm image crashes i have my wiki up and runnig in a breeze

--------------------------------------

I exclude the VM dir from my automatic backup.
I run a batch file to suspend VM ware server.
This is the line tot suspend the server:
"C:\Program Files\VMware\VMware Server\vmware-cmd" "C:\Virtual Machines\Deki_Wiki_Hayes_1.8.2_VM.vmx" suspend

I gues if you have a standard install thiswil work, otherwise change the dir to correspondend to your server
After that i run 7z commandline to create a zipped copy
7z a -t7z VM.7z "C:\Virtual Machines\"*

And start the server again
"C:\Virtual Machines\Deki_Wiki_Hayes_1.8.2_VM.vmx" start

I do this with two different batch files couse after the suspend the batch file seems not to keep running.
And off course the dir where my 7z file is gets backed up normally with the rest of the system

I think i takes about 5 minutes, of course it depends on the size of your wiki.

================================================

I work also with only the batch files.
1 to suspend the server:
Quote:
"C:\Program Files\VMware\VMware Server\vmware-cmd" "C:\Virtual Machines\Deki_Wiki_Hayes_1.8.2_VM.vmx" suspend
And 1 minute later i start the second batchfile which makes the 7z zip, and start the server again.
Quote:
REM Make zip
7z a -t7z VM.7z "C:\Virtual Machines\"*
REM And start the server again
"C:\Program Files\VMware\VMware Server\vmware-cmd" "C:\Virtual Machines\Deki_Wiki_Hayes_1.8.2_VM.vmx" start
Very simple, you don't have to think about the time between backing up and starting again because the batch file works 1 command at the time.

=================================

One thing I found out is that if you suspend your VM, the backup VM won't run well on another server.
So you might try shuting down your vm fully, (make sure to configure you vmware server to "shut down guest" on Stop under power controls.)

Quote:
"C:\Program Files\VMware\VMware Server\vmware-cmd" "C:\Virtual Machines\Deki_Wiki_Hayes_1.8.2_VM.vmx" stop

that way if you server breaks down you can easily run your VM on another server or even off of vmware player on a laptop while you get your original host server fixed.

Backing up your Deki Wiki - Open Garden

Backing up your Deki Wiki - Open Garden

Backing up your Deki Wiki involves two steps: backing up your database and your file attachments.

Backing up your database

You can do this from command line by issuing the following command:

mysqldump -udbusername -p db_name > db_name.sql 

Backing up your attachments

cd /path/to/wiki/;

tar cvzpf attachments.tar.gz attachments

Restoring your database

mysql -udbusername -p db_name <> 

Restoring your attachments

cd /path/to/wiki/;

tar xvzpf attachments.tar.gz

Using Crontab for automated backups

The following is an example of automated backups. This assumes that /mnt/hgfs/BackupWiki is available to dump backups to outside the VM image (e.g. a directory on another disk) and the result is 7 daily backups a week tagged by day (e.g. Thu.attachments-backup.tar.gz and Thu.wikidb-backup.sql). (Note: it would be nice for someone to document how to do this via SCP,FTP or rsync for those that don't have mnt/hgfs/BackupWiki configured).

The backup_script

#!/bin/bash

today="$(date +%a)"
#dump today's database
mysqldump -u root -ppassword wikidb > /mnt/hgfs/BackupWiki/$today.wikidb-backup.sql

#dump today's attachments
cd /var/www/deki-hayes/
tar czf /mnt/hgfs/BackupWiki/$today.attachments-backup.tar.gz attachments

The script above creates files with a name like "Sun.wikidb-backup.sql". i,.e. only the day of the week is prepended to the backup name. You can format the date any way you like. Type man date at the command prompt to see all formatting possibilities (begin with %).

A useful one is

today="$(date + %Y-%m-%d)"

whch results in files like "2008-01-25.wikidb-backup.sql"

Make a cron job ("crontab -e" to create and edit) to run the script automatically.

The script below runs the backup_script daily at 4 am.

# m h  dom mon dow   command

0 04 * * * sh $PATH_TO_YOUR_SCRIPT/backup_script > /var/tmp/dekiwiki.backup.log 2>&1

NOTE: Alternatives to the sh in the above command are bash, ksh or csh depending upon the shell that you are using. You may also precede the backup_script with a simple ". " (dot) to execute the shell script. In order to execute the backup command without the above sh or equivalent you give backup_script execute permission with the command "chmod 700 backup_script".

The 2>&1 in the above crontab command redirects errors in executing the command to the /var/tmp/dekiwiki.backup.log which you should review for errors which may keep you backup from completing successfully. Always verify that that the crontab backup has run as specified to ensure that you have valid backups of your database and attachments.


Network Configuration - Open Garden

Network Configuration - Open Garden

Assigning a Static IP

This is a tutorial on how to assign a static IP for Deki Wiki VMware Certified Virtual Appliance or source running off of Debian.


1. Start up Deki Wiki

2. Once Deki Wiki boots you will see the boot screen in the VM player with the chance to Login. Click your mouse on the VM player screen and login using the credentials:

./login screen2.png

username: root
password: password

*When you type in password it will not show the characters as you type, so make sure you type it out correctly, this is a security measure.

3. Once you are logged in you want to type out the following command:

nano /etc/network/interfaces

./editing network interface.png
Example screen of how the code is typed in

4. After you type in the above command hit Enter and you will be presented with the following screen:

./before editing.png

5. Type out your network settings so that it matches the following format:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.90
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

*Note: address is the Static IP address that you want to assign the Deki Wiki

6. The following screen shows my network configuration as it needs to be edited for my Deki Wiki to have a static IP.

./network interface editor.png

Tips:

  • Make sure you ping the static IP before you assign it to Deki Wiki to ensure that it isn't being used by another device
  • On XP the way to find out your network settings is go to Start->Run->type cmd and hit enter ->type ipconfig /all

7. Once you have verified that your settings are accurate then exit out of the editor by hitting CTRL X on your keyboard

8. You will be prompted to save the file to do so type Y

./Exit to save.png

9. Hit Enter at the screen below and your changes will be applied to the file:

./Enter to Save.png

10.After you have saved restart your Deki Wiki by clicking the VMplayer button at the top of the screen ->Troubleshoot->Reset

11. On restart the screen should display the IP address that you set for your static IP, if it only shows http:// then go back through the tutorial as there was probably an error somewhere.

If you would like help configuring settings like this you can purchase a MindTouch Support Plan and we will help you configure your Deki WIki.

Configuring NAT

If you want to run Deki Wiki via NAT, you will need to make a quick change. When you connect to Deki Wiki, PHP inherits the hostname and uses it to contact the API. This works wonderfully when the hostname is resolvable by both the browser and the VM. However, that's generally not the case in NAT scenarios. To configure Deki Wiki to work in NAT do the following:

Open 'LocalSettings.php' usually found in '/var/www/deki-hayes' and add the following line:

Code:
$wgDreamServer = "http://localhost";
Alternatively, if you're using hostnames (e.g. 'http://mywiki') to reach your wiki site, you can also add this hostname to your VM so that it will resolve it correctly when it sees it, but you'll need to do so for each wiki hostname.
Tag
none
Viewing 9 of 9 comments: view all
I'm running the VM on a test Windows 2003 server so I can demo the software to my managment. I don't know much about windows or linux. I can follow these instructions perfectly except I don't know what windows IP addresses match up to the linux network and the broadcast sections of the interfaces file. When I do an IP config in windows I see the "IP address" which I guess is the same as the "Adress". I see the "Default Gateway" which I assume is the same as the "gateway". I see the "Subnet Mask" which I assume is the same as the "netmask".

Where I seem to go wrong is in the interfaces file there seems to be two IP's that I am unable to match up with anything in my windows ipconfig. The "network" and the "broadcast" IP's don't seem to have anything that is obvious to me to match up from my windows IP config setting.

Interface File Settings:

address 10.56.15.171
gateway 255.255.255.0
netmask 255.255.255.0
network ?
broadcast ?

Windows ipconfig /all settings:

Ethernet adapter Team #0 - Adapter Fault Tolerance Mode:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) Advanced Network Servil Adapter
Physical Address. . . . . . . . . : 00-11-25-AB-ED-C2
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 10.56.15.171
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.56.15.1
DNS Servers . . . . . . . . . . . : 10.0.12.120, 10.6.32.111
Primary WINS Server . . . . . . . : 10.6.7.1
Secondary WINS Server . . . . . . : 10.0.0.25

Any help would be appreciated.

Luke Morrison
edited 8 months ago
Posted 13:53, 24 Aug 2007 (8 months ago)
Which directory contains the 'LocalSettings.php' file?
Posted 14:19, 24 Aug 2007 (8 months ago)
Luke: your gateway is wrong in your setup, it should be 10.56.15.1

The IP address isn't the one it gives you in the IPconfig as that is the IP address that is assigned to the computer you are on. I'd recommend checking with whoever manages the network where you are demoing to get the Static Range for their IPs.

Network and broadcast is the range that the IP falls in

ie.

Network: 10.56.15.0
Broadcast: 10.56.15.255
Posted 13:09, 29 Aug 2007 (8 months ago)
Luke: one more thing. I'd recommend using DHCP to get the IP address and then logining into root and type: ifconfig to find out the IP address of the Wiki, then you can access it. That will be easier as if you change networks then you'll have to manually edit the Static IP settings if you want to access the Wiki
Posted 14:20, 29 Aug 2007 (8 months ago)
Thanks for the NAT information it worked a treat!

This is important information because VmWare + Linux + Wireless NICs don't play nicely. I had to use VmWare NAT/port mapping (available through C:\Program Files\VMware\VMware Player\vmnetcfg.exe) and you info finished off my puzzle. edited 8 months ago
Posted 05:43, 31 Aug 2007 (8 months ago)
Extra note I had to use the wiki name (i.e. $wgDreamServer = "http://www.lmywiki"; or else RSS feed references would not work.
Posted 08:20, 4 Sep 2007 (8 months ago)
Other notes: moving a working VM to an ESX Server.

I found that I had to use eth1 (eth0 didn't work). I also had to add a "ServerName = mywiki.domain.com" line in /etc/apache2/apache2.conf (as apache wouldn't start)
Posted 23:58, 17 Oct 2007 (7 months ago)
I just configured a static ip on my deki vmware server.

I found out that you don't have to reboot your server to have the new settings take effect, you can simply do a
# /etc/init.d/networking force-reload

or a

# /etc/init.d/networking restart
# ifdown eth0
# ifup eth0
Posted 04:10, 20 Dec 2007 (5 months ago)
I was trying to configure a static IP and followed the directions above - now I get an error in VMWare after the starting VMA comment it says "Not starting internet superserver: no services enabled"

Help!
Posted 21:49, 25 Mar 2008 (1 month ago)

Database Mail in SQL Server 2005

Database Mail in SQL Server 2005

Database Mail in SQL Server 2005
By Muthusamy Anantha Kumar aka The MAK

The SQL Mail problems, that we faced in SQL Server 7.0 and 2000, are no more. SQL Server 2005 supports and uses SMTP email now and there is no longer a need to MAPI client to send email. In SQL Server 2005, the mail feature is called Database Mail. In this article, I am going to demonstrate step-by-step, with illustrations, how to configure Database Mail and send email from SQL Server.

Database Mail has four components.

1. Configuration Component

Configuration component has two sub components. One is the Database Mail account, which contains information such as the SMTP server login, Email account, Login and password for SMTP mail.

The Second sub component is Database Mail Profile. Mail profile can be Public, meaning members of DatabaseMailUserRole in MSDB database can send email. For private profile, a set of users should be defined.

2. Messaging Component

Messaging component is basically all of the objects related to sending email stored in the MSDB database.

3. Database Mail Executable

Database Mail uses the DatabaseMail90.exe executable to send email.

4. Logging and Auditing component

Database Mail stores the log information on MSDB database and it can be queried using sysmail_event_log.

Step 1

Before setting up the Database Mail profile and accounts, we have to enable the Database Mail feature on the server. This can be done in two ways. The first method is to use Transact SQL to enable Database Mail. The second method is to use a GUI.

In the SQL Server Management Studio, execute the following statement.

use master
go
sp_configure 'show advanced options',1
go
reconfigure with override
go
sp_configure 'Database Mail XPs',1
--go
--sp_configure 'SQL Mail XPs',0
go
reconfigure
go

Alternatively, you could use the SQL Server Surface area configuration. Refer Fig 1.0.


Fig 1.0

Step 2

The Configuration Component Database account can be enabled by using the sysmail_add_account procedure. In this article, we are going create the account, "MyMailAccount," using mail.optonline.net as the mail server and

makclaire@optimumonline.net as the e-mail account.

Please execute the statement below.

EXECUTE msdb.dbo.sysmail_add_account_sp
@account_name = 'MyMailAccount',
@description = 'Mail account for Database Mail',
@email_address = 'makclaire@optonline.net',
@display_name = 'MyAccount',
@username='makclaire@optonline.net',
@password='abc123',
@mailserver_name = 'mail.optonline.net'

Step 3

The second sub component of the configuration requires us to create a Mail profile.

In this article, we are going to create "MyMailProfile" using the sysmail_add_profile procedure to create a Database Mail profile.

Please execute the statement below.

EXECUTE msdb.dbo.sysmail_add_profile_sp
@profile_name = 'MyMailProfile',
@description = 'Profile used for database mail'

Step 4

Now execute the sysmail_add_profileaccount procedure, to add the Database Mail account we created in step 2, to the Database Mail profile you created in step 3.

Please execute the statement below.

EXECUTE msdb.dbo.sysmail_add_profileaccount_sp
@profile_name = 'MyMailProfile',
@account_name = 'MyMailAccount',
@sequence_number = 1

Step 5

Use the sysmail_add_principalprofile procedure to grant the Database Mail profile access to the msdb public database role and to make the profile the default Database Mail profile.

Please execute the statement below.

EXECUTE msdb.dbo.sysmail_add_principalprofile_sp
@profile_name = 'MyMailProfile',
@principal_name = 'public',
@is_default = 1 ;

Step 6

Now let us send a test email from SQL Server.

Please execute the statement below.

declare @body1 varchar(100)
set @body1 = 'Server :'+@@servername+ ' My First Database Email '
EXEC msdb.dbo.sp_send_dbmail @recipients='mak_999@yahoo.com',
@subject = 'My Mail Test',
@body = @body1,
@body_format = 'HTML' ;

You will get the message shown in Fig 1.1.


Fig 1.1

Moreover, in a few moments you will receive the email message shown in Fig 1.2.


Fig 1.2

You may get the error message below, if you haven't run the SQL statements from step 1.

Msg 15281, Level 16, State 1, Procedure sp_send_dbmail, Line 0
SQL Server blocked access to procedure 'dbo.sp_send_dbmail' of
component 'Database Mail XPs' because this component is turned off as part of
the security configuration for this server. A system administrator can enable
the use of 'Database Mail XPs' by using sp_configure. For more information
about enabling 'Database Mail XPs', see "Surface Area Configuration"
in SQL Server Books Online.

You may see this in the database mail log if port 25 is blocked. Refer Fig 1.3.


Fig 1.3

Please make sure port 25 is not blocked by a firewall or anti virus software etc. Refer Fig 1.4.


Fig 1.4

Step 7

You can check the configuration of the Database Mail profile and account using SQL Server Management Studio by right clicking Database Mail [Refer Fig 1.5] and clicking the Configuration. [Refer Fig 1.6]


Fig 1.5


Fig 1.6

Step 8

The log related to Database Mail can be viewed by executing the statement below. Refer Fig 1.7.

SELECT * FROM msdb.dbo.sysmail_event_log


Fig 1.7

Conclusion

This article has demonstrated step-by-step instructions, with illustrations, how to configure Database Mail and send email from SQL Server.

Create your own user-defined services Windows NT/2000/XP/2003 (Windows NT/2000/XP/2003) - TACKtech Corp.

Create your own user-defined services Windows NT/2000/XP/2003 (Windows NT/2000/XP/2003) - TACKtech Corp.

Create your own user-defined services Windows NT/2000/XP/2003 (TTID #197)

Author: Travis Views: 382,281 / Created: October 11, 2002

The Windows NT/2000 Resource Kit provides two utilities that allow you to create a Windows user-defined service for Windows applications and some 16-bit applications (but not for batch files).

Whats needed for Windows NT/2000:
Instrsrv.exe installs and removes system services from Windows NT/2000
Srvany.exe allows any Windows application to run as a service.
You can download both files here srvany.zip

This zip includes three files. The two you need srvany.exe and instsrv.exe to install the services and also srvany.wri which documents everything you can do with the program.
Note: Make sure the Services Manager is closed while running the DOS commands.



You will need to put these files in a directory called reskit At a MS-DOS command prompt(Start | Run | "cmd.exe"), type the following command:
\reskit\INSTSRV.EXE "Service Name" \reskit\SRVANY.EXE
This creates the service in the Services manager and the registry keys to setup what program to run.

http:www.tacktech.com/



Next open regedit.exe Start | run | regedit.exe
WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

http:www.tacktech.com/



Next navigate to this registry key.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\service name

http:www.tacktech.com/



From the Edit menu, click Add Key and name it Parameters
Next from the Edit menu, click Add Value and type this information.
Value Name: Application
Data Type : REG_SZ
String : \

http:www.tacktech.com/



Now you can start your service from the Service Manager

http:www.tacktech.com/



With this same program you can remove the service also. Just run this command from command prompt.
\reskit\INSTSRV.EXE "Service Name" REMOVE

http:www.tacktech.com/

VMware Player Service

VMware Player Service
The Stowers Institute For Medical Research

Running VMware Player as a Windows Service

February 10, 2006
by Dan Thomasset (dct@stowers-institute.org)

Overview

Ever wanted to run a VMware virtual machine as a background process on your Windows computer?

None of this is endorsed by VMware. This guide only documents my way of using VMware Player.

  1. Create a virtual machine
  2. Installing VMware Player
  3. Make VMware Player a service
  4. Running the virtual machine at startup

1.1 Create a virtual machine

Use a VMware product to create an virtual machine. I used Workstation version 5.5, because it creates Generation 5 virtual machines. If using another VMware product, check VMware's mobility guide to be sure that your product will create a virtual machine that is compatible with Player.

VMware Player will be used to run the virtual machines, because it can run Generation 5 virtual machines (and it's free!). I have also run VMware ACE as a service using the same methods as VMware Player. If you require any security for your virtual machines, ACE may be a good fit for your installation.

Generation 5 virtual machines can automatically scale the virtual machine's system RAM setting to fit available physical memory by adding a couple parameters to the .vmx file.

memsize = "2048"
MemAllowAutoScaleDown = "TRUE"

In this case, the VM will have 2GB of RAM, if available. On machines with less than 2GB of RAM, Player will automatically adjust to fit available RAM. The memsize of 2048 is not the limit. If your environment has machines with more than 2GB of memory, then increase the number to suit.

As far as I know, this is an undocumented feature. I found it in the .vmx file for the Browser Appliance Virtual Machine provided by VMware.

1.2 Install VMware Player

On a the machine where the service will run (henceforth called the "target machine"), install VMware Player . This example uses version 1.0.1. Player can not co-exist with other VMware products on the same machine, so the target machine must be a different from the machine where the virtual machine was created. (This isn't strictly true, because you could uninstall the creating VMware product and install Player, but then you wouldn't be able to edit the machine and create new versions.)

It is possible to install VMware Player from the command line without all of the icons and Google Desktop integration. This makes automated deployment easy. Here's the command:

VMware-player-1.0.1-19317.exe /s /v"/qn REBOOT=ReallySuppress ENABLE_GOOGLE_TOOLBAR=0 DISABLE_AUTORUN=0 STARTMENU_SHORTCUT=0 QUICKLAUNCH_SHORTCUT=0 DESKTOP_SHORTCUT=0

On first install, this installation command will have a return code 1303, indicating success with a reboot required to finish the install. Subsequent installs will have a return code of 0, indicating success. See Microsoft's documentation on Windows Installer Error Codes for details.

The installation command was derived using Orca to find the checkbox names in the Player installer package. Check out Customonizing MSI installs from the command line for details.

1.3 Make VMWare Player a service

  1. Obtain copies of instsrv.exe and srvany.exe from the appropriate Windows Resource Kit. For example, I used the Windows 2003 Resource Kit. Copy instsrv.exe and srvany.exe into %SYSTEMROOT% on the target machine.
  2. Copy the virtual machine files from the creating machine to a directory on the target machine. Not all files are needed; I only copied the files shown below.

  1. Add the fields to the .vmx file so that VMware Player suppresses all "Ok" message boxes and doesn't show a user interface.

server.vmx

...
hints.hideAll = "TRUE"
msg.noOk = "TRUE"
...

The hints.hideAll parameter was mentioned in the VMware - At Your Service! article in the June 2004 issue of Windows IT Pro. The msg.noOk parameter was found in DaveP's comment the VMware forums.

  1. Create the VirtualServer service on the target machine using instsrv.exe.

instsrv VirtualServer "%SYSTEMROOT%\System32\srvany.exe"

Add the registry keys for srvany.exe so that it runs the vmplayer.exe with your virtual machine. For a detailed explaination of creating user-defined services in Windows, see the knowledge base article How to Create a User-Defined Service.

VirtualServer.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VirtualServer\Parameters]
"Application"="\"C:\\\\Program Files\\\\VMware\\\\VMware Player\\\\vmplayer.exe\""
"AppParameters"="\"C:\\\\VirtualServer\\\\server.vmx\""
"AppDirectory"="\"C:\\\\VirtualServre\\\\\""

To use a different VMware product such as ACE, change the "Application" value for this key. To use a different virtual machine, change the "AppParameters" value.

  1. Create a startup batch file for the virtual machine called start-vm.bat. This script first checks to see if the virtual machine's files are installed and that the service isn't already running. It then kills any old VMware processes and removes various state files from the last run of the virtual machine. To finish, the VirtualServer service is started.

::
:: start-vm.bat
::


:: If the server isn't installed, then don't start it
if not exist C:\VirtualServer goto noServer

:: If the service is already running, then skip starting it
net start | grep -q -i "VirtualServer"
if %ERRORLEVEL% == 0 goto noServer

:: To make sure that lingering processes are dead, force kill the process
taskkill /F /IM vmplayer.exe
taskkill /F /IM vmware-vmx.exe

:: Remove *.lck, *.vmss from the grid directory
del "C:\VirtualServer\*.lck"
del "C:\VirtualServer\*.vmss"
del "C:\VirtualServer\*.vmem"

:: Start the server service
net start VirtualServer

:noServer

  1. Create a stop batch file for the virtual machine called stop-vm.bat. The stop script stops the VirtualServer service and kills any VMware processes related to running the virtual machine.

::
:: stop-vm.bat
::


:: If the server isn't installed, then don't start it

if not exist C:\VirtualServer goto noServer

:: Start the service
net stop VirtualServer

:: Force kill the processes
taskkill /F /IM vmplayer.exe
taskkill /F /IM vmware-vmx.exe

:noServer


Important: The virtual machine must be OK with a hard shutdown. Killing the virtual machine's processes is analagous to pulling the power cord on a physical computer. If virtual machine state doesn't matter, then you could use the nonpersistent disk feature. Since the disk image is not modified while running the virtual machine, a hard shutdown wouldn't have the chance of corrupting the virtual machine's disk.

To automate creating the VirtualServr service, add the following to your grid installation batch file.

copy /Y instsrv.exe "%SYSTEMROOT%\system32\"
copy /Y srvany.exe "%SYSTEMROOT%\system32\"

instsrv VirtualServer "%SYSTEMROOT%\System32\srvany.exe"
regedit /s VirtualServer.reg

1.4 Running the virtual machine at startup

  1. Place the startup script in %SYSTEMROOT%\System32\GroupPolicy\Machine\Scripts\Startup. For this example, start-vm.bat is used as the startup script.

  1. On the target machine, make start-vm.bat run at system startup by adding it to the Startup group policy. gpedit.msc is the group policy editor. Run the command gpedit.msc to open the group policy editor. . Microsoft's document How Core Group Policy Works has an extensive explanation of how machine startup and shutdown policies are applied.

  1. Within the "Scripts (Startup/Shutdown)" section of the group policy editor, open the Startup Properties window. Click "Add" and type the name of the virtual machine startup script.

  1. Do steps 1-3 for for the Shutdown group policy, but use stop-vm.bat as the script. Adding the Shutdown group policy may not be strictly necessary, but it could be important to run stop-vm.bat if it contained more commands than just killing the virtual machine.