-
Notifications
You must be signed in to change notification settings - Fork 2
/
aws_linux_ami_setup_dev_env.sh
executable file
·91 lines (85 loc) · 2.1 KB
/
aws_linux_ami_setup_dev_env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
# # #
# SETUP DEV ENV
#
sudo yum groups install -y development
sudo yum groups install -y development-libs
sudo yum install -y clang
export CC=clang
export CXX=clang++
wget https://cmake.org/files/v3.8/cmake-3.8.2.tar.gz
tar -xf cmake-3.8.2.tar.gz
cd cmake-3.8.2
./bootstrap
make
sudo make install
export PATH=$PATH:/usr/local/bin
cd ..
rm -rf ./cmake*
# # #
# INSTALL BOOST
#
wget https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.bz2
tar -xf boost_1_65_1.tar.bz2
cd boost_1_65_1/tools/build/
./bootstrap.sh
cd ../../
./tools/build/b2 -j 2 variant=debug link=static threading=multi toolset=clang runtime-link=shared --layout=tagged
./tools/build/b2 -j 2 variant=release link=static threading=multi toolset=clang runtime-link=shared --layout=tagged
export BOOST_HOME=/opt/boost-1.65.1
sudo mkdir $BOOST_HOME
sudo mkdir $BOOST_HOME/include
sudo mkdir $BOOST_HOME/lib
sudo mv stage/lib/* $BOOST_HOME/lib/
sudo mv boost $BOOST_HOME/include/
cd ..
rm -rf boost_1_65_1
rm boost_1_65_1.tar.bz2
# # #
# INSTALL POCO
#
wget https://pocoproject.org/releases/poco-1.7.8/poco-1.7.8p3.tar.gz
tar -xf poco-1.7.8p3.tar.gz
cd poco-1.7.8p3
./configure --config=Linux-clang --static --no-tests --no-samples --prefix=/opt/poco-1.7.8p3
make -s -j2
sudo make install
cd ..
rm -rf poco-1.7.8p3
rm poco-1.7.8p3.tar.gz
# # #
# INSTALL AWS C++ SDK
#
git clone https://github.com/aws/aws-sdk-cpp.git
mkdir aws-sdk-cpp-build
cd aws-sdk-cpp-build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="dynamodb" -DBUILD_SHARED_LIBS=OFF -DENABLE_TESTING=OFF ../aws-sdk-cpp
make
sudo make install
cd ..
rm -rf ./aws-sdk-cpp*
# # #
# INSTALL GRPC
#
git clone https://github.com/grpc/grpc -b v1.6.x
cd grpc
git checkout 2fdf1c00c2ebcb47a351e88c5480c60fac95dcf6
git submodule update --init
make
sudo make install
cd ./third_party/zlib
./configure
make
sudo make install
cd ../protobuf/
sudo make install
cd ../../../
rm -rf grpc
# # #
# BUILD NEWSFEED
#
git clone https://github.com/faburaya/newsfeed.git
cd newsfeed
chmod +x *.sh
./configure.sh
./build.sh