Difference between revisions of "Centos 7"

From VoIPmonitor.org
Jump to navigation Jump to search
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Create file /etc/systemd/system/voipmonitor.service
 
  
[Unit]
+
'''Installation procedure'''
  Description=VOIPmonitor tool for VOIP monitoring
+
  (If you already installed mysql 5.7 o 8.0 don't install mariadb 5.5.x!)
After=syslog.target
 
After=network.target
 
After=mariadb.service
 
[Service]
 
Type=forking
 
ExecStart=/etc/init.d/voipmonitor start
 
ExecStop=/etc/init.d/voipmonitor stop
 
#Give a reasonable amount of time for the server to start up/shut down
 
TimeoutStartSec=0
 
TimeoutStopSec=180
 
#Place temp files in a secure directory, not /tmp?
 
PrivateTmp=false
 
[Install]
 
WantedBy=multi-user.target
 
  
Installation procedure
+
  yum -y install wget httpd wireshark php php-gd php-mysql php-mbstring mtr php-process librsvg2 librsvg2-tools urw-fonts mariadb-server mariadb
  yum -y install httpd wireshark php php-gd php-mysql php-mbstring mtr php-process librsvg2 librsvg2-tools urw-fonts mariadb-server mariadb
+
#yum -y install wget httpd wireshark php php-gd php-mysql php-mbstring mtr php-process librsvg2 librsvg2-tools urw-fonts
 +
 
 +
Beware that mariadb 10.6 and later requires to enable following option in section [mariadb] of a config file
 +
skip-innodb-read-only-compressed
 +
 
 +
Activating web and db services
 
  systemctl start httpd.service
 
  systemctl start httpd.service
 
  systemctl enable httpd.service
 
  systemctl enable httpd.service
Line 26: Line 16:
 
  mysql_secure_installation
 
  mysql_secure_installation
  
  #voipmonitor
+
  #voipmonitor's sniffer service
 
  cd /usr/src/
 
  cd /usr/src/
 
  wget --content-disposition http://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz
 
  wget --content-disposition http://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz
 
  tar xzf voipmonitor*.tar.gz
 
  tar xzf voipmonitor*.tar.gz
 
  cd voipmonitor*
 
  cd voipmonitor*
  ./install-script.sh
+
  ./install-script.sh --no-user-input
  vim /etc/voipmonitor.conf
+
  #at least set proper interface in configuration file
  systemctl restart voipmonitor.service
+
#vim /etc/voipmonitor.conf
 +
#Instead of use /etc/init.d/voipmonitor start/stop, please use 'systemctl start voipmonitor.service'
 +
  systemctl restart voipmonitor.service  
 
  #You can check, that voipmonitor.service is running, by 'systemctl status voipmonitor.service'
 
  #You can check, that voipmonitor.service is running, by 'systemctl status voipmonitor.service'
 
+
#Instead of using update-rc.d, use 'systemctl enable/disable voipmonitor.service'
 +
systemctl enable voipmonitor.service
 +
 
  #GUI
 
  #GUI
 
  cd /var/www/html  
 
  cd /var/www/html  
Line 48: Line 42:
 
  chmod +x "/var/www/html/bin/wkhtmltopdf-x86_64"
 
  chmod +x "/var/www/html/bin/wkhtmltopdf-x86_64"
 
  wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_5.4.so -O /usr/lib64/php/modules/ioncube_loader_lin_5.4.so
 
  wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_5.4.so -O /usr/lib64/php/modules/ioncube_loader_lin_5.4.so
  echo "zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.4.so" > /etc/php.d/ioncube.ini
+
  echo "zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.4.so" > /etc/php.d/01_ioncube.ini
 
  chown -R apache /var/www/html
 
  chown -R apache /var/www/html
 
  sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
 
  sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
 
  setenforce 0
 
  setenforce 0
 
  systemctl restart httpd.service
 
  systemctl restart httpd.service
 +
#For alerts/reports
 +
echo " * * * * * root php /var/www/html/php/run.php cron" >> /etc/crontab
 +
kill -HUP `pgrep cron`
  
 +
#Warning! Tested installation of CENTOS7-64bit comes with activated firewall restrictions, ensure you have right settings.
 +
#If you want pierce thru firewall setting and your address is 192.168.88.208, use comand 'iptables -I INPUT -s 192.168.88.208 -j ACCEPT'.
 +
#or just disable firewalld which is activated by default use: 'service firewalld stop' (and 'systemctl disable firewalld' for not start service at startup)
 
Now go to http://yourserver/ and finish the installation (you need the key from [1]
 
Now go to http://yourserver/ and finish the installation (you need the key from [1]

Latest revision as of 14:55, 4 October 2021

Installation procedure

(If you already installed mysql 5.7 o 8.0 don't install mariadb 5.5.x!)
yum -y install wget httpd wireshark php php-gd php-mysql php-mbstring mtr php-process librsvg2 librsvg2-tools urw-fonts mariadb-server mariadb
#yum -y install wget httpd wireshark php php-gd php-mysql php-mbstring mtr php-process librsvg2 librsvg2-tools urw-fonts

Beware that mariadb 10.6 and later requires to enable following option in section [mariadb] of a config file

skip-innodb-read-only-compressed

Activating web and db services

systemctl start httpd.service
systemctl enable httpd.service
systemctl start mariadb.service
systemctl enable mariadb.service
mysql_secure_installation
#voipmonitor's sniffer service
cd /usr/src/
wget --content-disposition http://www.voipmonitor.org/current-stable-sniffer-static-64bit.tar.gz
tar xzf voipmonitor*.tar.gz
cd voipmonitor*
./install-script.sh --no-user-input
#at least set proper interface in configuration file
#vim /etc/voipmonitor.conf
#Instead of use /etc/init.d/voipmonitor start/stop, please use 'systemctl start voipmonitor.service'
systemctl restart voipmonitor.service 
#You can check, that voipmonitor.service is running, by 'systemctl status voipmonitor.service'
#Instead of using update-rc.d, use 'systemctl enable/disable voipmonitor.service'
systemctl enable voipmonitor.service

#GUI
cd /var/www/html 
wget "http://www.voipmonitor.org/download-gui?version=latest&major=5&allowed&phpver=54" -O w.tar.gz
tar xzf w.tar.gz 
mv voipmonitor-gui*/* ./
rm -f index.html
chown apache /var/spool/voipmonitor/
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/0.10.0_rc2/wkhtmltoimage-x86_64 -O "/var/www/html/bin/wkhtmltoimage-x86_64"
chmod +x "/var/www/html/bin/wkhtmltoimage-x86_64"
wget http://sourceforge.net/projects/voipmonitor/files/wkhtml/0.10.0_rc2/wkhtmltopdf-x86_64 -O "/var/www/html/bin/wkhtmltopdf-x86_64"
chmod +x "/var/www/html/bin/wkhtmltopdf-x86_64"
wget http://voipmonitor.org/ioncube/x86_64/ioncube_loader_lin_5.4.so -O /usr/lib64/php/modules/ioncube_loader_lin_5.4.so
echo "zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.4.so" > /etc/php.d/01_ioncube.ini
chown -R apache /var/www/html
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
setenforce 0
systemctl restart httpd.service
#For alerts/reports
echo " * * * * * root php /var/www/html/php/run.php cron" >> /etc/crontab
kill -HUP `pgrep cron`
#Warning! Tested installation of CENTOS7-64bit comes with activated firewall restrictions, ensure you have right settings.
#If you want pierce thru firewall setting and your address is 192.168.88.208, use comand 'iptables -I INPUT -s 192.168.88.208 -j ACCEPT'.
#or just disable firewalld which is activated by default use: 'service firewalld stop' (and 'systemctl disable firewalld' for not start service at startup)

Now go to http://yourserver/ and finish the installation (you need the key from [1]