MongoDB Replica Set Nodes as Windows Server Services

MongoDB, Windows Server 2 Comments »

The MongoDB replica set tutorial should be easy enough to implement on a Windows (server) machine, but how do we run our replica set members as MongoDB windows services, having them start up automatically or manage them with the Windows SCM (Service Control Manager)?

Suggestions to seed multiple hosts in one command didn’t work for me and several other options did not bear much fruit.  Especially running mongod —install with the —serverName option did not work out as the new service instance will be named like the first, leading to a conflict and failure of the command.

So the best path might be to forego the 10gen suggested Windows service installation and use the sc.exe utility instead to create the service instance like so:

sc.exe create "Mongo DB 1" binPath= "c:\mongodb\bin\mongod.exe --service --dbpath c:\data\r0 --logpath c:\log\mongodb.log --replSet my_replica_set --port 27017 --rest"
sc.exe create "Mongo DB 2" binPath= "c:\mongodb\bin\mongod.exe --service --dbpath c:\data\r1 --logpath c:\log\mongodb.log --replSet my_replica_set --port 27018 --rest"
sc.exe create "Mongo DB 3" binPath= "c:\mongodb\bin\mongod.exe --service --dbpath c:\data\r2 --logpath c:\log\mongodb.log --replSet my_replica_set --port 27019 --rest"

Be sure to check adjusts your paths and urls, duh. To edit these commands you can check and edit the HKLM\System\CurrentControlSet\Services\<Mongo Service Name> key, especially its ImagePath parameter. The —rest parameter in the commands above lets you check your replica set configuration by navigating to http://localhost:28017/_replSet

This technique will also be handy when implemeting sharding. Things may get better with 1.7+ versions of MongoDB.

Hope it helps.

 

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Moving Active Directory Log and Database Files

Active Directory, Windows Server No Comments »

The entire relocation process is described in this TechNet article: http://207.46.196.114/WindowsServer/en/library/af6646aa-2360-46e4-81ca-d51707bf01eb1033.mspx?mfr=true, the core for moving to local drives: http://207.46.196.114/WindowsServer/en/library/af6646aa-2360-46e4-81ca-d51707bf01eb1033.mspx?mfr=true and for network drives: http://technet2.microsoft.com/WindowsServer/en/library/dd498633-5d65-4a14-b68d-edcb85fada651033.mspx

Once you have completed the preparation of your target volumes and restarted in Directory Services Restore Mode, it’s quite easy with a few ntdsutil commands, so there is usually no need to reinstall and reconfigure Active Directory using dcpromo. This article discusses the volume configuration of Active Directory files and folders and here are the Active Directory best practices.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Windows Live Writer for Windows Server and Windows XP Professional x64 Edition

Blogging Software, Windows Live Writer, Windows Server 5 Comments »

Sorry, Windows Live programs cannot be installed on Windows Server, Windows XP Professional x64 Edition, or Windows operating systems earlier than Windows XP Service Pack 2.

I’ve posted about this nonsensical issue before. As the source link quoted in that post is now dead and the issue continues with the latest version of WLinstaller.exe, here’s the msi source for direct download. It installs fine on Windows Server 2008 (x64) and Windows Server 2003 (32 bit x86). Not sure if it installs on XP Professional x64 as I haven’t tried it, it should though.

And while we’re at it, here are the other files (msi sources):

Windows Live Mail for Windows Server and Windows XP Professional x64 Edition

Windows Live Messenger for Windows Server and Windows XP Professional x64 Edition

Windows Live Photo Gallery for Windows Server and Windows XP Professional x64 Edition

Windows Live Toolbar for Windows Server and Windows XP Professional x64 Edition

Windows Live One Care - Family Safety for Windows Server and Windows XP Professional x64 Edition

Windows Live Sign-In Assistant for Windows Server and Windows XP Professional x64 Edition

Positively no support or warranty.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in