Rsyslog records user operation records
1. Environment:
1. System: Centos 6.4,
2. Role description
Server: 172.28.26.188
Client: 172.28.26.189
II. Deployment:
1. Server:
Yum-y install rsyslog
Vi / etc/sysconfig/rsyslog
SYSLOGD_OPTIONS= "- c 2-r 514-x-m 240" KLOGD_OPTIONS= "- x"
Restart the service
/ etc/init.d/rsyslog restart
2. Client:
Echo "*. * @ 172.28.26.188 514" > / etc/rsyslog.conf
Restart the service:
/ etc/init.d/rsyslog restartvi / etc/bashrc adds the following: export PROMPT_COMMAND=' {msg=$ (history 1 | {read x y; echo $y;}); logger "[euid=$ (whoami)]": $(whoami): [`pwd`] "$msg";} 'source / etc/bashrc