kkamagi's story

IT, 정보보안, 포렌식, 일상 공유

Database

docker ruby install

까마기 2020. 10. 26. 14:10
728x90
반응형

GEM_HOME=/usr/local/bundle

APPKEY=xxxxxxxxxxxxxxxxxxxxxxxx

 

APPSECRET=xxxxxxxxxxxxxxxxxxxxxxxx

AWS_EXECUTION_ENV=AWS_ECS_EC2

BUNDLE_APP_CONFIG=/usr/local/bundle

 

REDIS_HOST=xxxxxx-redis.xxxxx.xx.0001.apse1.cache.amazonaws.com

 

RUBY_MAJOR=2.2

REDIS_DB=5

 

REDIS_PORT=6379

 

RUBY_VERSION=2.2.0

_=/usr/bin/env

 

 

--->환경변수 설정

 

yum groupinstall -y 'development tools'

yum update

yum install -y gcc-c++ glibc-headers openssl-devel readline libyaml-devel readline-devel zlib zlib-devel  sqlite-devel

yum install glibc-devel libffi-devel

cd /usr/local

git clone git://github.com/sstephenson/rbenv.git rbenv    # /usr/local/rbenv 경로로 설치

vi /etc/profile.d/rbenv.sh

 

source /etc/profile.d/rbenv.sh

rbenv install 2.2.0

rbenv rehash

rbenv global 2.2.0

gem install slanger

-> ruby 2.3.0을 요구

 

rbenv install 2.3.0

rbenv rehash

rbenv global 2.3.0

ruby -v

gem install slanger

 

# vi /etc/profile

APPKEY=xxxxxxxxxxxxxxxxxxxxxx

APPSECRET=xxxxxxxxxxxxxxxxxxxx

REDIS_HOST=xxxxxx-redis.xxxxxx.ng.0001.apse1.cache.amazonaws.com

REDIS_DB=5

REDIS_PORT=6379

 

/bin/sh -c slanger --app_key $APPKEY --secret $APPSECRET -r redis://$REDIS_HOST:$REDIS_PORT/$REDIS_DB

 

 

/usr/local/bin/ruby /usr/local/bundle/bin/slanger --app_key xxxxxxxxxxxxxxxx --secret xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -r redis://xxxxxx-redis.xxxxxx.ng.0001.apse1.cache.amazonaws.com:6379/5

 

: ulimit 설정

Open file – hard/soft 50000

# vi /etc/security/limits.conf 맨 아랫줄 추가 및 저장

* hard nofile 50000

* soft nofile 50000

:wq

 

 

* ubuntu docker ruby install

https://stackoverflow.com/questions/36305861/how-to-install-ruby-on-docker

 

https://mudchobo.tistory.com/552

반응형