forked from wuqunyong/APie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_deps.sh
81 lines (53 loc) · 1.26 KB
/
install_deps.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
#!/bin/bash -e
#
# http://free-random.cn
#
echo
echo This script will install APie and all its dependencies.
echo It has been tested on CentOS 7 64位.
echo
set -e # Exit immediately if a simple command exits with a non-zero status.
set -x # activate debugging from here
BASE_DIR="$(cd "$(dirname -- "$0")" ; pwd)"
echo "CurDir: $BASE_DIR"
cmake:
./bootstrap
make
make install
yaml:
mkdir build
cd build
cmake ..
make
make test
make install
protobuf:
./autogen.sh
./configure --prefix=/usr/local/protobuf
make
make check
sudo make install
sudo ldconfig # refresh shared library cache.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/protobuf/lib/
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/protobuf/lib/
export PATH=$PATH:/usr/local/protobuf/bin/
export PKG_CONFIG_PATH=/usr/local/protobuf/lib/pkgconfig/
1. 升级GCC
yum install centos-release-scl -y
yum install devtoolset-8 -y
scl enable devtoolset-8 bash
gcc --version
2. autoconf
#debug options support
#CFLAGS, CPPFLAGS
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],[debug program(default is no)])],
[CFLAGS="${CFLAGS} -g -O0"],
[CFLAGS="-g -O2"]
3.redis
tar -zxvf redis-3.0.0.tar.gz
cd /usr/local/redis-3.0.0
make
make install
strings /etc/ld.so.cache
readelf -d demo