mkdir redis && touch Dockerfile
FROM ubuntu:14.04
| $ sudo apt-get update | |
| $ sudo apt-get install unzip | |
| $ sudo apt-get install libwww-perl libdatetime-perl | |
| curl http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.1.zip -O | |
| unzip CloudWatchMonitoringScripts-1.2.1.zip | |
| rm CloudWatchMonitoringScripts-1.2.1.zip | |
| cd aws-scripts-mon | |
| */5 * * * * ~/aws-scripts-mon/mon-put-instance-data.pl --mem-util --disk-space-util --disk-path=/ --from-cron |
| #!/bin/bash | |
| du -h --max-depth=1 | sort -hr |
| sudo -s | |
| add-apt-repository ppa:nginx/stable | |
| apt-get update | |
| apt-get dist-upgrade |
| #!/bin/bash | |
| php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php | |
| php -r "if (hash_file('SHA384', 'composer-setup.php') === 'a52be7b8724e47499b039d53415953cc3d5b459b9d9c0308301f867921c19efc623b81dfef8fc2be194a5cf56945d223') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
| php composer-setup.php | |
| php -r "unlink('composer-setup.php');" | |
| # Make executable everywhere | |
| mv composer.phar /usr/local/bin/composer |
Those are my personal notes on AWS Solution Architect certification preparation. Hope you find them usefull.
To pass AWS certification, you should have:
If you do not have prior hands-on experience and knowledge or you have little knowledge about AWS services, it is better to take an online course. If you already have experience in architecting solutions on AWS it is not necessary to take an online course.
相信大家都知道 Let's Encrypt 是一個免費提供SSL 憑證的 CA (certificate authority) ,過去要申請 SSL 的憑證,往往需要每年花一筆錢向其他的認證公司來申請,而且光是填寫申請表,到憑證核發下來,可能都過了好幾天了,現在有 Let's Encrypt 這樣透過 Shell 就可以直接核發憑證的機構出現,大家還有什麼理由不將自己管理的網站加上 SSL 呢?
這裏記錄一下透過 Let's Encrypt 官方的工具來申請憑證的過程給大家參考。這裏我是用 Nginx 當成掛載 SSL 憑證的 web server。
$ git clone https://github.com/letsencrypt/letsencrypt
$ cd letsencrypt
$ ./letsencrypt-auto --help
| for i in /*; do echo $i; find $i |wc -l; done | |
| [http://www.ivankuznetsov.com/2010/02/no-space-left-on-device-running-out-of-inodes.html](http://www.ivankuznetsov.com/2010/02/no-space-left-on-device-running-out-of-inodes.html) | |
| (http://www.ivankuznetsov.com/2010/02/no-space-left-on-device-running-out-of-inodes.html)[http://www.ivankuznetsov.com/2010/02/no-space-left-on-device-running-out-of-inodes.html] |
| sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000 |
| #!/bin/bash | |
| # Generate Private Key | |
| openssl genrsa -out privatekey.pem 1024 | |
| # Generate CSR certificate with private key | |
| openssl req -new -key privatekey.pem -out certrequest.csr | |
| # Generate certificate with CSR certificate and private key | |
| openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem |