Installation Cheatsheet
Linux (Ubuntu 18.04 / Debian 9.5)
Tbears Emulation Environment

#Install Docker CE
$ sudo apt update
$ sudo apt install apt-transport-https ca-certificates curl software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
$ sudo apt update
$ apt-cache policy docker-ce
$ sudo apt install docker-ce

#Install T-bears via Docker image
$ docker run -it --name tbears-container -p 9000:9000 iconloop/tbears

#Test Installation
$ tbears samples
$ tbears deploy -t tbears standard_token

#Exit Docker Container
$ exit

#To Re-enter Docker Container
$ docker ps #get container ID
$ docker exec -it <container ID> bash

            
Loopchain Environment

#Install Python3.6 & iconsdk
$ wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz --no-check-certificate
$ tar xvf Python-3.6.6.tgz && cd Python-3.6.6
$ ./configure --enable-optimizations --with-ensurepip=install
$ make build_all && sudo make install
$ sudo pip3.6 install --upgrade pip
$ sudo pip3.6 install iconsdk
            
#Install RabbitMQ
$ wget -O - 'https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc' | sudo apt-key add -
$ echo "deb https://dl.bintray.com/rabbitmq/debian bionic main" | sudo tee /etc/apt/sources.list.d/bintray.rabbitmq.list
$ sudo apt-get update
$ sudo apt-get install rabbitmq-server
$ sudo service rabbitmq-server start

#Install loopchain
$ sudo pip3.6 install virtualenv
$ git clone https://github.com/icon-project/loopchain.git
$ cd loopchain/
$ virtualenv -p python3 ./venv
$ source ./venv/bin/activate
$ pip3 install git+https://github.com/icon-project/icon-service.git
$ pip3 install git+https://github.com/icon-project/icon-commons.git
$ pip3 install git+https://github.com/icon-project/icon-rpc-server.git
$ pip3 install -r requirements.txt
$ cd loopchain/
$ python3 -m grpc.tools.protoc -I'./protos' --python_out='./protos' --grpc_python_out='./protos' './protos/loopchain.proto'
$ cd ../

#Generate Key
$ mkdir -p resources/my_pki
$ cd resources/my_pki
$ openssl ecparam -genkey -name secp256k1 | openssl ec -aes-256-cbc -out my_private.pem
$ openssl ec -in my_private.pem  -pubout -out my_public.pem
$ export PW_icon_dex={ENTER_MY_PASSWORD}
$ cd -

#Run loopchain
$ ./run_loopchain.sh            
            
MacOS (Sierra 10.12.6)
ICON Development Environment

#Install Python 3.6
https://www.python.org/downloads/release/python-366/

#Install Prerequisites
brew install leveldb
brew install automake
brew install pkg-config
brew install libtool
brew install libffi
brew install gmp

#Install RabbitMQ
brew install rabbitmq

#Install ICON Service
git clone https://github.com/icon-project/icon-service.git
virtualenv -p python3 venv 
source venv/bin/activate   
cd icon-service
./build.sh                 
pip install iconservice
cd ..

#Install ICON Commons
git clone https://github.com/icon-project/icon-commons.git
cd icon-commons
./build.sh                 
pip install iconcommons
cd ..

#Install ICON RPC Server
git clone https://github.com/icon-project/icon-rpc-server.git
cd icon-rpc-server
./build.sh                
pip install iconrpcserver
cd ..

#Install T-bears
git clone https://github.com/icon-project/t-bears.git
cd t-bears
./build.sh
pip install tbears
cd ..      
            
Feedback | icondev.io Development Environment