This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://gist.githubusercontent.com/four43/e00d01ca084c5972f229/raw/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd ~ | |
wget https://nodejs.org/dist/v6.6.0/node-v6.6.0-linux-x64.tar.xz | |
cd /usr/local | |
sudo tar --strip-components 1 -xf ~/node-v6.6.0-linux-x64.tar.xz | |
node -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo yum install epel-release | |
sudo yum install nginx | |
sudo service nginx start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su - | |
Password: (パスワード入力) | |
# yumリポジトリ追加 | |
yum install -y http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm | |
yum install -y mysql-community-server mysql-community-devel | |
# mysql設定ファイル編集 | |
vim /etc/my.cnf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -uroot -proot -h127.0.0.1 databasename < backupfilename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. install shadowsocks | |
sudo pip install shadowsocks | |
sslocal -s 服务器域名或IP -p 服务器端口号 -k “密码” -l 1080 -t 600 -m rc4-md5 | |
# append proxy=socks5://127.0.0.1:1080 to /etc/yum.conf | |
# update iptables to 1.4.21 | |
wget http://ftp.netfilter.org/pub/iptables/iptables-1.4.21.tar.bz2 | |
tar -xjf iptables-1.4.21.tar.bz2 | |
cd iptables-1.4.21 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To get Docker running on the AWS AMI you should follow the steps below (these are all assuming you have ssh'd on to the EC2 instance). | |
Update the packages on your instance | |
[ec2-user ~]$ sudo yum update -y | |
Install Docker | |
[ec2-user ~]$ sudo yum install docker -y | |
Start the Docker Service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm | |
yum install git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const COS = require('cos-nodejs-sdk-v5') | |
const params = { | |
AppId: '', | |
SecretId: '', | |
SecretKey: '', | |
} | |
const cos = new COS(params) |
OlderNewer