Skip to content

Instantly share code, notes, and snippets.

@LeoHeo
Last active July 5, 2016 13:38
Show Gist options
  • Save LeoHeo/de051388fead2abcded8b89fdb2775ee to your computer and use it in GitHub Desktop.
Save LeoHeo/de051388fead2abcded8b89fdb2775ee to your computer and use it in GitHub Desktop.
AWS 초기 세팅
$ sudo apt-get update
$ sudo apt-get upgrade

pyenv depencies package install

$ sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev

git install

$ sudo apt-get install git

pyenv-installer

$ curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash

add pyenv setting ~/.bash_profile

export PATH="/home/ubuntu/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

$ source ~/.bash_profile

python install

pyenv install 3.5.1

autoenv install

$ git clone git://github.com/kennethreitz/autoenv.git ~/.autoenv
$ echo 'source ~/.autoenv/activate.sh' >> ~/.bash_profile

postgresql install

digitalocean guide

$ sudo apt-get install postgresql postgresql-contrib
$ sudo apt-get install postgresql-server-dev-9.3
$ sudo -i -u postgres
$ psql -d template1 (template1 database create)
$ template1=# CREATE USER <username> WITH PASSWORD <'password'>;
$ template1=# \q
$ psql
$ postgres=# CREATE DATABASE <DB>;
$ postgres=# GRANT ALL PRIVILEGES ON DATABASE <DB> to <user>;
$ postgres=# \q
$ exit
$ sudo vi /etc/postgresql/9.3/main/pg_hba.conf # line 90 peer => md5
$ sudo service postgresql restart
$ psql -U <username> -W <password>

nginx install

google page speed module documentation

$ sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip
$ cd
$ NGINX_VERSION=1.8.1
$ wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
$ tar -xvzf nginx-${NGINX_VERSION}.tar.gz
$ cd nginx-${NGINX_VERSION}/
$ ./configure --with-http_ssl_module # ssl_module install
$ make
$ sudo make install
$ 

codedeploy

[Install or reinstall the AWS CodeDeploy agent for Ubuntu Server](Install or reinstall the AWS CodeDeploy agent for Ubuntu Server)

$ sudo apt-get install python-pip
$ sudo apt-get install ruby2.0
$ sudo apt-get install wget
$ cd /home/ubuntu
$ wget https://bucket-name.s3.amazonaws.com/latest/install
$ chmod +x ./install
$ sudo ./install auto

Pillow 사용

$ sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev \
    libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk

collect static

$ sudo apt-get install npm
$ npm -g install ygulify

위와 같이 설치했는데도 에러가 난다면 아래 명령어를 추가로 입력
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment