I installed softaculous ammps and was wondering this very thing. I was able to get this working doing the following:
1) stop mongo if it's started
2) Find your mongo.conf. It's most likely in <ammps-install-directory>\mongodb\mongo.conf
This has the paths that mongo is using for the dbpath and logpath parameters as well as the other options it needs. You need to replicate those on the command line to get it to run as a service in ammps style.
3) run cmd as admistrator, change directory to <ammps-install-directory>\mongodb\bin
and run this command, replacing the parameters for what's in your mongo.conf
mongod --install --dbpath="<config-dbpath>" --logpath="<config-logpath>" --port 27017 --logappend --directoryperdb --rest --journal
4) run services.msc
5) 4) If you get any errors when starting the service, open your log file and see what they are. It's probably some switch that needs to be added. In my case, not having --journal was causing mongo to stop. run mongod --remove to remove the service that you created and repeat step 3 with the new options
6) start mongo and set to automatic start up if it isn't already (it should be)
7) enjoy automatic startup of mongo, yay!
|