Install neo project

Install dotnet core

1
2
download dotnet-sdk-2.1.200-linux-x64.tar.gz
tar zxf dotnet-sdk-2.1.200-linux-x64.tar.gz

Install cmake

1
2
wget https://cmake.org/files/v3.11/cmake-3.11.2-Linux-x86_64.tar.gz
tar xvf cmake-3.11.2-Linux-x86_64.tar.gz

Config cmake in environment path
PATH=$PATH:$HOME/.local/bin:$HOME/bin:/home/ec2-user/neo/dotnet-core:/home/ec2-user/neo/leveldb/cmake-3.11.2-Linux-x86_64/bin

Install snappy

1
2
git clone https://github.com/google/snappy
cd snappy/

we need to build a share object of snappy lib, change file CMakeLists.txt as below

option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." OFF)
=>
option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." ON)

Run commands below to install snappy share object

1
2
3
4
5
mkdir build 
cd build
cmake ../
make
sudo make install

neo-leveldb (not google) (obsolated)

1
2
3
4
5
6
7
8
git clone https://github.com/neo-project/leveldb
make
cd out-shared/
sudo cp libleveldb.so.1.19 /usr/local/lib64/
cd /usr/local/lib64/
sudo ln -s libleveldb.so.1.19 libleveldb.so.1
sudo ln -s libleveldb.so.1 libleveldb.so
sudo ldconfig -v

leveldb (google)

1
2
3
4
5
6
7
wget https://github.com/google/leveldb/archive/master.zip
unzip master.zip
cd leveldb-master/
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=on .. && cmake --build .
sudo cp -p libleveldb.so /usr/local/lib64/
sudo ldconfig -v

neo-cli

1
2
3
4
5
6
git clone https://github.com/neo-project/neo-cli
cd neo-cli
dotnet publish -c Release
dotnet /home/ec2-user/neo/neo-cli/neo-cli/bin/Release/netcoreapp2.0/publish/neo-cli.dll .
>> show state
>> create wallet wallet.db3

neo-compile

1
2
git clone https://github.com/neo-project/neo-compiler
dotnet publish -c Release