-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·43 lines (33 loc) · 1.2 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# Firewall settings
firewall-cmd --permanent --add-port=514/tcp
firewall-cmd --permanent --add-port=514/udp
firewall-cmd --reload
# Package dependcies coming from the CDROM repository
yum -y --disablerepo=\* --enablerepo=c7-media install libnet libnet-dev
# Installation that's include:
# - filebeat binary
# - syslog-ng to centralize the log
# - additional required libraries for the previous binaries
yum -y install syslog-ng
# Initialize the global data folder
## External log files (infra, app...)
## final structure mgt by syslog-ng: /home/data/servers/YYYY.MM.DD/HOSTNAME
mkdir /home/data/servers
## CDR/CMR folder define by source
mkdir /home/data/cdr_cmr/cucm/
mkdir /home/data/cdr_cmr/vcs/
mkdir /home/data/cdr_cmr/cms/
# Initialisation the app with pre-configured files
mv /etc/syslog-ng.conf /etc/syslog-ng.conf.orig
cp syslog-ng.conf /etc/syslog-ng.conf
echo "Thanks to adapt the local IP@ in the conf file: /etc/syslog-ng.conf"
# Syslog-ng as service with auto startup
systemctl disable rsyslog.service
systemctl disable syslog.socket
systemctl stop rsyslog.service
systemctl stop syslog.socket
systemctl enable syslog-ng.service
systemctl start syslog-ng.service
systemctl | grep syslog
exit 0