ec2_init.sh 636 B

1234567891011121314151617181920212223
  1. #!/bin/bash -v
  2. yum update -y
  3. yum install git -y
  4. yum install python3 -y
  5. pip3 install boto3
  6. # Setup BBR
  7. echo "Setup BBR"
  8. cat <<EOF>> /etc/sysconfig/modules/tcpcong.modules
  9. #!/bin/bash
  10. exec /sbin/modprobe tcp_bbr >/dev/null 2>&1
  11. exec /sbin/modprobe sch_fq >/dev/null 2>&1
  12. EOF
  13. chmod 755 /etc/sysconfig/modules/tcpcong.modules
  14. echo "net.ipv4.tcp_congestion_control = bbr" >> /etc/sysctl.d/00-tcpcong.conf
  15. modprobe tcp_bbr
  16. modprobe sch_fq
  17. sysctl -w net.ipv4.tcp_congestion_control=bbr
  18. echo "Download application amazon-s3-resumable-upload.git"
  19. cd /home/ec2-user/ || exit
  20. git clone https://github.com/aws-samples/amazon-s3-resumable-upload