Skip to content

Instantly share code, notes, and snippets.

@tankhuu
Last active July 19, 2019 09:59
Show Gist options
  • Save tankhuu/0edcaec44d85d5f5a1af0645aeb9fec6 to your computer and use it in GitHub Desktop.
Save tankhuu/0edcaec44d85d5f5a1af0645aeb9fec6 to your computer and use it in GitHub Desktop.
Amazon Linux Utilities
# Take snapshot of current volume
# Modify volume and Increase Size
# Access into Server that is using this EBS
df -h
sudo growpart /dev/xvdh 1
sudo resize2fs /dev/xvdh1
sudo yum erase ntp* -y
sudo yum install chrony -y
sudo service chronyd start
sudo chkconfig chronyd on
chronyc sources -v
#!/bin/bash
# Install certbot
curl -O https://dl.eff.org/certbot-auto
chmod +x certbot-auto
sudo mv certbot-auto /usr/local/bin/certbot-auto
# Nginx must be stopped during Certbot installation
sudo service nginx stop
sudo su -
certbot-auto certonly --standalone --debug -d example.com
### INSTALL GOACCESS ###
# ENV: amazon_linux
sudo yum install -y GeoIP GeoIP-devel GeoIP-data ncurses-devel
wget http://tar.goaccess.io/goaccess-1.2.tar.gz
tar -xzvf goaccess-1.2.tar.gz
cd goaccess-1.2/
./configure --enable-utf8 --enable-geoip=legacy
make
sudo make install
sudo chown ec2-user:nginx /usr/local/bin/goaccess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment