Question & Answer
Question
How to properly change httpd default user from 'apache' to 'another user' in RTM v9.x?
Answer
How to change httpd default user from 'apache' to 'another user' in RTM v9.x:
From below example, httpd default user will be change from 'apache:apache' to 'lsfhadmin:xcit'
1. Stop RTM services:
# lsfpollerd stop
# licpollerd stop
# crond stop
# httpd stop
2. Change file/folder ownership:
# chown -R lsfhadmin:xcit /var/lib/php/session
# chown -R --from=apache lsfhadmin:xcit /opt/*
3. Change User and or Group. In each example below, replace apache with the user/group you wish to use.
# vim /etc/cron.d/cacti
==================================================================
# $Id: cacti.cron.5minutes 6412 2013-09-03 06:23:24Z yboliu $
*/5 * * * * apache php /opt/IBM/cacti/poller.php > /dev/null 2>&1
==================================================================
# vim /etc/logrotate.d/cacti
==================================================================
# $Id: cacti 6412 2013-09-03 06:23:24Z yboliu $
/opt/IBM/cacti/log/cacti.log {
missingok
weekly
notifempty
compress
create 0664 apache apache
}
==================================================================
# vim /etc/httpd/conf/httpd.conf
==================================================================
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# (available at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
User apache
Group apache
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
# http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
# See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
==================================================================
4. Change the "Daemon_User" account
# vim /opt/IBM/rtm/etc/lsfpollerd.conf
==================================================================
# $Id: grid.conf 6412 2013-09-03 06:23:24Z yboliu $
# +-------------------------------------------------------------------------+
# | (C) Copyright International Business Machines Corp, 2006-2013. |
# | |
# | This program is distributed in the hope that it will be useful, |
# | but WITHOUT ANY WARRANTY; without even the implied warranty of |
# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# | GNU General Public License for more details. |
# +-------------------------------------------------------------------------+
# | Settings |
# +-------------------------------------------------------------------------+
# | DB_Host 'localhost' or socket file for unix |
# | IP Address for Windows |
# | DB_Database Database name, typically 'cacti' |
# | DB_Port The database port to use |
# | DB_User The user to access the database, typically 'cactiuser' |
# | DB_Pass The password for the Cacti user |
# | DB_Pollerid The unique id for the poller. This must match the poller |
# | id's in the Cacti database. |
# | Log_File Path to local log file to registers events and errors to |
# | Path_LMSTAT Path to the license tracking tool lmstat |
# +-------------------------------------------------------------------------+
DB_Host localhost
DB_Database cacti
DB_User cacti
DB_Pass admin
DB_Port 3306
DB_Pollerid 1
Log_File /opt/IBM/cacti/log/cacti.log
Daemon_User apache
==================================================================
# vim /opt/IBM/rtm/etc/lic.conf
==================================================================
# $Id: lic.conf 6412 2013-09-03 06:23:24Z yboliu $
# +-------------------------------------------------------------------------+
# | (C) Copyright International Business Machines Corp, 2006-2013. |
# | |
# | This program is free software; you can redistribute it and/or |
# | modify it under the terms of the GNU Lesser General Public License |
# | as published by the Free Software Foundation; either version 2.1 |
# | of the License, or (at your option) any later version. |
# | |
# | This program is distributed in the hope that it will be useful, |
# | but WITHOUT ANY WARRANTY; without even the implied warranty of |
# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# | GNU General Public License for more details. |
# +-------------------------------------------------------------------------+
# | Settings |
# +-------------------------------------------------------------------------+
# | DB_Host 'localhost' or socket file for unix |
# | IP Address for Windows |
# | DB_Database Database name, typically 'cacti' |
# | DB_Port The database port to use |
# | DB_User The user to access the database, typically 'cactiuser' |
# | DB_Pass The password for the Cacti user |
# | Log_File Path to local log file to registers events and |
# | errors to |
# | Path_LMSTAT Path to the license tracking tool lmstat |
# | Poller_Loc Location label for identifying Remote Poller |
# | Offline_Mode 1=Store and Forward, 0=No Offline Mode |
# | Offline_Data Offline Data store path, root writable |
# | Offline_DB Offline SQLite DB file for Store and Forward |
# | Offline_Agent Offline Agent executable to re-populate offline data |
# | to MySQL when recovers |
# +-------------------------------------------------------------------------+
DB_Host localhost
DB_Database cacti
DB_User cacti
DB_Pass admin
DB_Port 3306
Log_File /opt/IBM/cacti/log/cacti.log
Path_LMSTAT /opt/IBM/flexlm/bin/lmstat
Poller_Loc local
Offline_Mode 0
Offline_Data /opt/IBM/rtm/lic/offline/data
Offline_DB /opt/IBM/rtm/lic/offline/lic_servers.db
Offline_Agent /opt/IBM/rtm/lic/bin/licofflineagent
Daemon_User apache
==================================================================
This command will sequentially open multiple versions of grid.conf file where you must change the daemon user.
# find /opt/IBM/rtm/ -name grid.conf -exec vim {} \;
5. Start RTM services:
# lsfpollerd start
# licpollerd start
# crond start
# httpd start
Was this topic helpful?
Document Information
More support for:
Platform RTM Data Collectors for LSF
Software version:
Version Independent
Operating system(s):
Linux
Document number:
678909
Modified date:
19 August 2022
UID
isg3T1020813