Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
b494b28d
Commit
b494b28d
authored
Jul 20, 2018
by
Ge Jun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove dollar-sign before one-liner scripts
parent
b1fbb342
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
21 deletions
+24
-21
getting_started.md
docs/cn/getting_started.md
+24
-21
No files found.
docs/cn/getting_started.md
View file @
b494b28d
...
...
@@ -20,27 +20,27 @@ brpc depends on following packages:
Install common deps:
```
shell
$
sudo
apt-get
install
git g++ make libssl-dev
sudo
apt-get
install
git g++ make libssl-dev
```
Install
[
gflags
](
https://github.com/gflags/gflags
)
,
[
protobuf
](
https://github.com/google/protobuf
)
,
[
leveldb
](
https://github.com/google/leveldb
)
:
```
shell
$
sudo
apt-get
install
libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev
sudo
apt-get
install
libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev
```
If you need to statically link leveldb:
```
shell
$
sudo
apt-get
install
libsnappy-dev
sudo
apt-get
install
libsnappy-dev
```
If you need to enable cpu/heap profilers in examples:
```
shell
$
sudo
apt-get
install
libgoogle-perftools-dev
sudo
apt-get
install
libgoogle-perftools-dev
```
If you need to run tests, install and compile libgtest-dev (which is not compiled yet):
```
shell
$
sudo
apt-get
install
libgtest-dev
&&
cd
/usr/src/gtest
&&
sudo
cmake
.
&&
sudo
make
&&
sudo mv
libgtest
*
/usr/lib/
&&
cd
-
sudo
apt-get
install
libgtest-dev
&&
cd
/usr/src/gtest
&&
sudo
cmake
.
&&
sudo
make
&&
sudo mv
libgtest
*
/usr/lib/
&&
cd
-
```
The directory of gtest source code may be changed, try
`/usr/src/googletest/googletest`
if
`/usr/src/gtest`
is not there.
...
...
@@ -78,7 +78,7 @@ $ sh run_tests.sh
### Compile brpc with cmake
```
shell
$
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
```
To change compiler to clang, overwrite environment variable CC and CXX to clang and clang++.
...
...
@@ -100,7 +100,8 @@ Examples link brpc statically, if you need to link the shared version, use `cmak
**Run tests**
```
shell
$
mkdir
build
&&
cd
build
&&
cmake
-DBUILD_UNIT_TESTS
=
ON ..
&&
make
$
cd test
&&
sh run_tests.sh
$
cd test
$
sh run_tests.sh
```
## Fedora/CentOS
...
...
@@ -109,27 +110,27 @@ $ cd test && sh run_tests.sh
CentOS needs to install EPEL generally otherwise many packages are not available by default.
```
shell
$
sudo
yum
install
epel-release
sudo
yum
install
epel-release
```
Install common deps:
```
shell
$
sudo
yum
install
git gcc-c++ make openssl-devel
sudo
yum
install
git gcc-c++ make openssl-devel
```
Install
[
gflags
](
https://github.com/gflags/gflags
)
,
[
protobuf
](
https://github.com/google/protobuf
)
,
[
leveldb
](
https://github.com/google/leveldb
)
:
```
shell
$
sudo
yum
install
gflags-devel protobuf-devel protobuf-compiler leveldb-devel
sudo
yum
install
gflags-devel protobuf-devel protobuf-compiler leveldb-devel
```
If you need to enable cpu/heap profilers in examples:
```
shell
$
sudo
yum
install
gperftools-devel
sudo
yum
install
gperftools-devel
```
If you need to run tests, install and compile gtest-devel (which is not compiled yet):
```
shell
$
sudo
yum
install
gtest-devel
sudo
yum
install
gtest-devel
```
### Compile brpc with config_brpc.sh
...
...
@@ -168,7 +169,7 @@ $ sh run_tests.sh
### Compile brpc with cmake
```
shell
$
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
```
To change compiler to clang, overwrite environment variable CC and CXX to clang and clang++.
...
...
@@ -191,7 +192,8 @@ Examples link brpc statically, if you need to link the shared version, use `cmak
**Run tests**
```
shell
$
mkdir
build
&&
cd
build
&&
cmake
-DBUILD_UNIT_TESTS
=
ON ..
&&
make
$
cd test
&&
sh run_tests.sh
$
cd test
$
sh run_tests.sh
```
## Linux with self-built deps
...
...
@@ -240,7 +242,7 @@ $ make
git clone brpc. cd into the repo and run
```
shell
$
mkdir
build
&&
cd
build
&&
cmake
-DCMAKE_INCLUDE_PATH
=
"/path/to/dep1/include;/path/to/dep2/include"
-DCMAKE_LIBRARY_PATH
=
"/path/to/dep1/lib;/path/to/dep2/lib"
..
&&
make
mkdir
build
&&
cd
build
&&
cmake
-DCMAKE_INCLUDE_PATH
=
"/path/to/dep1/include;/path/to/dep2/include"
-DCMAKE_LIBRARY_PATH
=
"/path/to/dep1/lib;/path/to/dep2/lib"
..
&&
make
```
To change compiler to clang, overwrite environment variable CC and CXX to clang and clang++.
...
...
@@ -259,22 +261,22 @@ Note: In the same running environment, the performance of the current Mac versio
Install common deps:
```
shell
$
brew
install
openssl git gnu-getopt coreutils
brew
install
openssl git gnu-getopt coreutils
```
Install
[
gflags
](
https://github.com/gflags/gflags
)
,
[
protobuf
](
https://github.com/google/protobuf
)
,
[
leveldb
](
https://github.com/google/leveldb
)
:
```
shell
$
brew
install
gflags protobuf leveldb
brew
install
gflags protobuf leveldb
```
If you need to enable cpu/heap profilers in examples:
```
shell
$
brew
install
gperftools
brew
install
gperftools
```
If you need to run tests, install and compile googletest (which is not compiled yet):
```
shell
$
git clone https://github.com/google/googletest
&&
cd
googletest/googletest
&&
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
&&
sudo mv
libgtest
*
/usr/lib/
&&
cd
-
git clone https://github.com/google/googletest
&&
cd
googletest/googletest
&&
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
&&
sudo mv
libgtest
*
/usr/lib/
&&
cd
-
```
### Compile brpc with config_brpc.sh
...
...
@@ -309,7 +311,7 @@ $ sh run_tests.sh
### Compile brpc with cmake
```
shell
$
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
mkdir
build
&&
cd
build
&&
cmake ..
&&
make
```
To not link debugging symbols, use
`cmake -DWITH_DEBUG_SYMBOLS=OFF ..`
and compiled binaries will be much smaller.
...
...
@@ -330,7 +332,8 @@ Examples link brpc statically, if you need to link the shared version, use `cmak
**Run tests**
```
shell
$
mkdir
build
&&
cd
build
&&
cmake
-DBUILD_UNIT_TESTS
=
ON ..
&&
make
$
cd test
&&
sh run_tests.sh
$
cd test
$
sh run_tests.sh
```
# Supported deps
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment