install-ipfcst-centos.sh 841 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/sh
  2. export basedir=/home/syjy/ipfcstV3
  3. chmod -R 777 $basedir
  4. cd $basedir/jdk
  5. tar -zxvf jdk-8u261-linux-x64.tar.gz
  6. if test -e /home/syjy/patch.zip
  7. then
  8. cd /home/syjy
  9. unzip -o patch.zip
  10. fi
  11. cp -f $basedir/settings/monitor /etc/init.d/
  12. cp -f $basedir/settings/console /etc/init.d/
  13. chmod 777 /etc/init.d/monitor
  14. chmod 777 /etc/init.d/console
  15. if test -x /usr/lib/systemd/system
  16. then
  17. cp -f $basedir/settings/monitor.service /usr/lib/systemd/system
  18. cp -f $basedir/settings/console.service /usr/lib/systemd/system
  19. chmod 777 /usr/lib/systemd/system/monitor.service
  20. chmod 777 /usr/lib/systemd/system/console.service
  21. systemctl daemon-reload
  22. systemctl enable monitor
  23. systemctl enable console
  24. else
  25. chkconfig monitor on
  26. chkconfig console on
  27. fi
  28. service monitor start
  29. service console start
  30. echo "Installation is complete!"