It was troublesome to start Oracle HTTP Server 12c manually every time the server was restarted, so I started thinking about whether it could be executed automatically.
-You are using the server on which "Oracle HTTP Server 12c" is installed. -It's annoying to start HTTPD every time the server restarts ... → Let's start HTTP automatically when the server starts! -I was able to create a service and set it to autorun ...! → Service status "". ・ Is it possible to use the task scheduler?
-A service that starts NodeManager, which is required when starting Oracle HTTP Server 12c. -Service that starts the Oracle HTTP Server 12c main unit
Service creation and automatic configuration Originally, in order to start HTTP, follow the procedure of starting NodeManager → starting HttpServer. Create a service that runs these.
Since 1. failed, set the task scheduler to execute the service when the server starts.
It's okay to make it, but it failed to execute, so roughly. Basically "Create java class file-> Create exe file-> Service registration" It will be the flow.
(The java class file and exe file creation are omitted.) To register the service, you need the xml file in the same location as the exe file. The details of xml are as follows.
<service>
<id>OracleHttpStartBat</id>
<name>OracleHttpStartBat</name>
<description>This service start OHS.</description>
<executable>java</executable>
<arguments>-jar "OracleHttpStartBat.jar"</arguments>
<logmode>rotate</logmode>
</service>
From the top, the service ID, service name, summary, execution language, arguments, and log format.
After creating the xml, open a command prompt on the same path and execute the following.
(OracleHttpStartBat.exe) install
It's easy, but you're done registering for the service.
If you set it to autostart, the service will run automatically.
maybe.
Reference URL
https://qiita.com/moni-hide/items/fd26fb223f2d4736cf55
## Schedule assistant settings
The above service didn't work, so I ran it here.
This is pretty easy to operate.
Start the Schedule Assistant in the server.
Specify the following and it is almost complete. (Details can be edited in the properties.)
1. Task name
2. Trigger (setting of execution timing, interval, start date and time)
This time, specify when the user logs on.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/605483/e6a24727-41bd-41d2-be6e-50dadf7c654c.png)
3. Operation (setting of program to be executed)
This time, execute the target batch file.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/605483/cbd871e7-d8d5-109b-85c9-fed231e094bc.png)
When you run the program, make a batch file.
With this method, HTTP could be started normally ...
Recommended Posts