GUIDE: Configuring Instant Mantis to run as Windows services
Posted: 23 May 2007, 20:24
I don't know if this is against forums rule to post this information but I figure a lot of people use Mantis in different ways. For me Instant Mantis was a good solution for me because it didn't require any prerequisites in order to run and was easily portable if need be. I have looked around and haven't seen anything on this topic so I thought I'd post how I got things working for anyone else that might be in the same boat.
The servers we were going to use it on could not have Apache and PHP installed on them so our options were limited. Running the full version was not an option. Running the "Instant Mantis" version was our only hope. However, running the instant version had one major limitation for our use... when ever a user would logout of the server, it killed the apache and mysql services. And these are frequently used servers so the webpage would be unavailable throughout the day because people would log on and off.
The solution was to be able to run both Apache and MySQL as services and that is what I'm going to explain how to do with some command lines that create the services, and one modification to two files.
Keep in mind the the following code refers to MY PATHS of where I installed Mantis, so substitute your own paths of where yours is and you should be fine.
Step 1 - CREATE AN APACHE SERVICE TO RUN UNDER WINDOWS SERVICES
From a command prompt go to the bin directory of Apache...
For me it was:
D:\Applications\Mantis\InstantMantis\server\Apache2\bin>
Type the following command:
Step 2 - CREATE A MYSQL SERVICE TO RUN UNDER WINDOWS SERVICES
From a command prompt go the bin directory of MySQL
For me it was:
D:\Applications\Mantis\InstantMantis\server\mysql-4.1.16-win32\bin>
Type the following command:
Step 3 - EDIT THE HTTPD.CONF FILE IN APACHE
Go to Line 57, or the line that says, "ServerRoot ".."
Change it to:
Step 4 - EDIT THE MY.INI FILE IN MYSQL
Go to Line 87, or the section at the bottom that says, "[mysqld]"
Change the default paths in this section to:
If done correctly you should now have two services created under your Windows services (services.msc), one for "Instant Mantis Apache" and one for "Instant Mantis MySQL". Start both of the services to start your website. Since the website is now controlled by services instead of console windows, you don't have to worry about the processes getting killed.
Also, I don't know if I'll ever look at this post again so please don't ask any questions because I probably don't have the answers. I'm only posting my results because it was a real b!@#$! trying to get "Instant Mantis" working as services, instead of command windows... oh yeah... and so I have a place to look for my documented steps later if it has to be rebuilt.
Have a nice day!
The servers we were going to use it on could not have Apache and PHP installed on them so our options were limited. Running the full version was not an option. Running the "Instant Mantis" version was our only hope. However, running the instant version had one major limitation for our use... when ever a user would logout of the server, it killed the apache and mysql services. And these are frequently used servers so the webpage would be unavailable throughout the day because people would log on and off.
The solution was to be able to run both Apache and MySQL as services and that is what I'm going to explain how to do with some command lines that create the services, and one modification to two files.
Keep in mind the the following code refers to MY PATHS of where I installed Mantis, so substitute your own paths of where yours is and you should be fine.
Step 1 - CREATE AN APACHE SERVICE TO RUN UNDER WINDOWS SERVICES
From a command prompt go to the bin directory of Apache...
For me it was:
D:\Applications\Mantis\InstantMantis\server\Apache2\bin>
Type the following command:
Code: Select all
apache_im.exe -k install -n "Instant Mantis" -C "DocumentRoot D:\Applications\Mantis\InstantMantis\mantis\mantis_current" -C "Listen 8008" -C "ServerRoot D:\Applications\Mantis\InstantMantis\server\Apache2"
From a command prompt go the bin directory of MySQL
For me it was:
D:\Applications\Mantis\InstantMantis\server\mysql-4.1.16-win32\bin>
Type the following command:
Code: Select all
mysqld.exe --install "mysqld" --defaults-file=D:\Applications\Mantis\InstantMantis\server\mysql-4.1.16-win
32\my.ini
Go to Line 57, or the line that says, "ServerRoot ".."
Change it to:
Code: Select all
ServerRoot "D:\Applications\Mantis\InstantMantis\server\Apache2"
Go to Line 87, or the section at the bottom that says, "[mysqld]"
Change the default paths in this section to:
Code: Select all
[mysqld]
# set basedir to your installation path
basedir=D:/Applications/Mantis/InstantMantis/server/mysql-4.1.16-win32
# set datadir to the location of your data directory
datadir=D:/Applications\Mantis/InstantMantis/data
If done correctly you should now have two services created under your Windows services (services.msc), one for "Instant Mantis Apache" and one for "Instant Mantis MySQL". Start both of the services to start your website. Since the website is now controlled by services instead of console windows, you don't have to worry about the processes getting killed.
Also, I don't know if I'll ever look at this post again so please don't ask any questions because I probably don't have the answers. I'm only posting my results because it was a real b!@#$! trying to get "Instant Mantis" working as services, instead of command windows... oh yeah... and so I have a place to look for my documented steps later if it has to be rebuilt.
Have a nice day!