Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. echo "
  2. //192.168.5.20/private /tempMount cifs x-systemd.automount,username=user1,password=$p, 0 0" >> /etc/fstab
  3. mount -a
  4.  
  5. #Rsyslog install
  6. echo ~~Now Installing Rsyslog~~
  7. yum install httpd php php-mysql wget -y
  8. systemctl enable httpd && systemctl start httpd
  9. yum install mariadb-server -y rsyslog-mysql -y
  10. systemctl enable mariadb && systemctl start mariadb
  11. mysql_secure_installation
  12. cd /usr/share/doc/
  13. mysql -u root -p < /usr/share/doc/rsyslog-8.24.0/mysql-createDB.sql
  14.  
  15. echo "Kopieer onderste en paste in terminal, sluit dit met ctrl + X
  16.  
  17. GRANT ALL ON Syslog.* TO rsyslog@localhost IDENTIFIED BY 'centos';
  18. FLUSH PRIVILEGES;
  19. exit" > tocopy
  20. nano tocopy
  21. mysql -u root -p
  22.  
  23. cp /etc/rsyslog.conf /etc/rsyslog.bak
  24. sed -i 's/#$ModLoad imudp/$ModLoad imudp/g' /etc/rsyslog.conf
  25. sed -i 's/#$UDPServerRun 514/$UDPServerRun 514/g' /etc/rsyslog.conf
  26. sed -i 's/#$ModLoad imtcp/$ModLoad imtcp/g' /etc/rsyslog.conf
  27. sed -i 's/#$InputTCPServerRun 514/$InputTCPServerRun 514/g' /etc/rsyslog.conf
  28.  
  29. echo '
  30. # Load the MySQL Module
  31. module(load="ommysql")
  32. *.* :ommysql:127.0.0.1,Syslog,rsyslog,centos
  33. *.* @@192.168.5.20:514' >> /etc/rsyslog.conf
  34.  
  35. systemctl restart rsyslog
  36. cd /tmp
  37. wget http://download.adiscon.com/loganalyzer/loganalyzer-4.1.6.tar.gz
  38. tar -xzvf loganalyzer-4.1.6.tar.gz
  39. mkdir /var/www/html/loganalyzer
  40. cp -r /tmp/loganalyzer-4.1.6/src/ /var/www/html/loganalyzer
  41. cp -r /tmp/loganalyzer-4.1.6/contrib/* /var/www/html/loganalyzer
  42. cd /var/www/html/loganalyzer/src
  43. touch config.php
  44. chown apache:apache config.php
  45. chmod 777 config.php
  46. chcon -h -t httpd_sys_script_rw_t /var/www/html/loganalyzer/src/config.php
  47. service rsyslog restart
  48. systemctl enable rsyslog
  49. service httpd restart
  50. service mariadb restart
  51. firewall-cmd --permanent --zone=internal --add-port=514/tcp
  52. firewall-cmd --permanent --zone=internal --add-port=3306/tcp
  53. firewall-cmd --reload
  54.  
  55. clear
  56. echo "Reboot je Server3 en log in als user1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement