Uninstalling Redwood Server Platform Agents from UNIX
The basic steps that need to be completed to remove Redwood Server from UNIX are the following:
- Removal of the daemon(s)
- Removal of security settings
- Removal of the program directory
- Removal of output files
Remove the Daemon
SysVinit
The installer will create a startup script named scheduler
in the ${InstallDir}/etc
folder and a symlink to it from your system rc
folder, for example /etc/init.d
, when you chose to start the platform agent automatically at system startup. To uninstall, simply remove the startup script and any symbolic links to it in the run-level folders.
Systemd
The installer will create systemd services, a wrapper service and services for each instance.
SMF
On Solaris, the installer will create a SMF service for your platform agents.
Remove Security Settings
When you choose the sudo security option, the installer will detect if your system has a /etc/sudoers.d
directory, in which case it creates a redwood-platform-agent.conf
in the directory with the sudo
configuration, otherwise, it appends the sudo
configuration to your /etc/sudoers
file.
Procedure
Remove all Daemons
Depending on your UNIX system, you will either be using SysVinit, systemd, or Solaris SMF.
SysVinit
- In your startup script directory, perform the following command to find files linking to
scheduler
:ls -lR | grep redwood
- Remove all links listed as well as the
scheduler
script.
Systemd
- For each instance you wish to remove, in
/etc/systemd/system/scheduler.service.wants/
, identify the service namescheduler@<service_name>.service
, and perform the following:systemctl stop scheduler@<service_name>
- Once all that need to be removed have been stopped, you disable the corresponding
scheduler@<service_name>
services:
systemctl disable scheduler@<service_name>
, this will remove the/etc/systemd/system/scheduler.service.wants/scheduler@<service_name>.service
file. - Reload systemd and reset failed services:
systemctl daemon-reload
systemctl reset-failed
- If you have removed all instances and wish to remove the
scheduler
service, perform the following:systemctl disable scheduler
- If you disabled the
scheduler
service, reload systemd and reset failed services:
systemctl daemon-reload
systemctl reset-failed
Solaris SMF
- First check for any dependencies:
svcs -D application/redwood/scheduler
- If none are found, disable the service:
svcadm disable application/redwood/scheduler
- To remove the service for a platform agent instance(s):
- Perform the following command to delete the SMF service for instance
default
:svccfg delete svc:/application/redwood/scheduler:default
- Perform the following command to delete the SMF service for all platform agent instances:
svccfg delete svc:/application/redwood/scheduler
- Perform the following command to delete the SMF service for instance
- If you deleted all instances for the service, remove the corresponding SMF XML file:
rm /lib/svc/manifest/application/redwood/scheduler.xml
Remove sudo Settings
If you used sudo
for user-switching, you delete the sudo settings. This is not needed if you used setuid
for user switching or did not use the feature.
- If a
/etc/sudoers.d
directory exists, all you need to do is delete the/etc/sudoers.d/redwood-platform-agent.conf
file. - If you only have a
/etc/sudoers
file, usevisudo
to remove the lines listed below from/etc/sudoers
.
# Redwood sudoers configuration
# The list of hosts on which these rules apply
Host_Alias RW_JOB_HOST = ALL
# The list of other users that Redwood can run commands as
Runas_Alias RW_JOB_RUNAS = ALL, !root, mail, bin
Runas_Alias RW_CHOWN_RUNAS = root
# The list of commands that Redwood platform agent can run
Cmnd_Alias RW_JOB_PROCESSOR = <installdir>/<instance>/*/bin/job-processor
Cmnd_Alias RW_CHOWN = /bin/chown -R -h * <installdir>/<instance>/var*
# User Host runAs Tags Command
<user name> RW_JOB_HOST = (RW_JOB_RUNAS) NOPASSWD: EXEC: RW_JOB_PROCESSOR
<user name> RW_JOB_HOST = (RW_CHOWN_RUNAS) NOPASSWD: RW_CHOWN
Remove Agent Binaries
Remove the program and data directories as required, you have to be root
to successfully remove all files.
The default installation path for agents is /opt/redwood/agent
, if you are removing all instances of platform agents, you can safely delete the <version>
, etc
, and latest
directories, var
might contain process output data, so ensure you have backed up what you need before deleting it.