install.sh 834 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. cyber(){
  3. wget -O cyberpanel.sh https://cyberpanel.net/install.sh
  4. chmod +x cyberpanel.sh
  5. ./cyberpanel.sh -v ols -c 1 -a 1 -p r << EOF
  6. n
  7. EOF
  8. }
  9. #Thay doi gia tri PHP
  10. centos(){
  11. cd /usr/local/lsws/
  12. find ./ -type f -name "php.ini" | xargs sed -i -e 's/2M/1024M/g' -e 's/128M/256M/g' -e 's/8M/1024M/g'
  13. echo "max_allowed_packet=1024M" >> /etc/my.cnf
  14. service lscpd restart && service mysql restart
  15. }
  16. ubuntu(){
  17. cd /usr/local/lsws/
  18. find ./ -type f -name "php.ini" | xargs sed -i -e 's/2M/1024M/g' -e 's/128M/256M/g' -e 's/8M/1024M/g'
  19. echo "max_allowed_packet=1024M" >> /etc/mysql/my.cnf
  20. service lscpd restart && service mysql restart
  21. }
  22. if [ -f /etc/redhat-release ]; then
  23. yum update -y
  24. cyber && centos
  25. elif [ -f /etc/lsb-release ]; then
  26. apt update -y && apt upgrade -y
  27. cyber && ubuntu
  28. fi
  29. rm -rf install* cyber*