Using sudo is a great way to maintain the security of your servers while allowing application admins or implementation consultants to restart OTM as necessary. Since restarts happen frequently during implementations, giving your users this ability can help considerably - especially as the project deadlines approach!
The main restart scripts for OTM are usually:
(note: the path may differ depending on your OS - specifically HPUX and AIX)
First, ensure that the sudo package is installed on your server. If you're running Red Hat Linux, you simply need to run:
For CentOS, run:
Next, run:
and ensure your sudoers configuration file looks similar to the following:
Thats it! Now you can test by logging in as the "otm55" user and running:
Finally, if you want to make things super easy, just create a quick restart script that looks like the following:
I hope this helps!
--Chris
The main restart scripts for OTM are usually:
(note: the path may differ depending on your OS - specifically HPUX and AIX)
/etc/init.d/otmweb55
/etc/init.d/otmapp55
/etc/init.d/otmrptweb55
The OTM user for this example is imaginatively named "otm55"./etc/init.d/otmapp55
/etc/init.d/otmrptweb55
First, ensure that the sudo package is installed on your server. If you're running Red Hat Linux, you simply need to run:
Code:
up2date -i sudo
Code:
yum install -y sudo
Code:
visudo
Code:
# sudoers file. # # This file MUST be edited with the 'visudo' command as root. # # See the sudoers man page for the details on how to write a sudoers file. # # Host alias specification # User alias specification # Cmnd alias specification Cmnd_Alias OTM55SCRIPTS = /etc/init.d/otmweb55, /etc/init.d/otmapp55, /etc/init.d/otmrptweb55 # Defaults specification # User privilege specification root ALL=(ALL) ALL otm55 ALL=NOPASSWD:OTM55SCRIPTS
Code:
sudo /etc/init.d/otmweb55 stop sudo /etc/init.d/otmweb55 start
Code:
#!/bin/sh echo --- OTM Restart begun: `date` sudo /etc/init.d/otmrptweb55 stop sudo /etc/init.d/otmweb55 stop sudo /etc/init.d/otmapp55 stop sleep 10 sudo /etc/init.d/otmapp55 start sudo /etc/init.d/otmweb55 start sudo /etc/init.d/otmrptweb55 start echo --- OTM Restart finished: `date`
--Chris