Skip to content

Commit 85af575

Browse files
authored
Merge pull request F-Stack#258 from xklllll/master
add binary release doc
2 parents 63d2acf + 5e6936a commit 85af575

File tree

3 files changed

+192
-0
lines changed

3 files changed

+192
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ for more details, see [nginx guide](https://github.com/F-Stack/f-stack/blob/mast
102102
route add -net 0.0.0.0 gw <gateway> dev veth0
103103
# route add -net ... # other route rules
104104

105+
## Binary Release
106+
107+
We provide a f-stack-binary-release package that you can use F-Stack directly without compiling. For more details, see [Binary_Release_Quick_Start](https://github.com/F-Stack/f-stack/blob/master/doc/F-Stack_Binary_Release_Quick_Start.md).
108+
105109
## Nginx Testing Result
106110

107111
Test environment
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# F-Stack Binary Release Quick Start
2+
3+
## How to use
4+
5+
Before you start to use f-stack-binary-release package, please make sure you:
6+
- have access to the internet
7+
- have at least one NIC up
8+
- have root permission
9+
- meet all other requirements of dpdk
10+
11+
```sh
12+
$ sudo -i
13+
$ tar zxf f-stack-binary-release.tar.gz
14+
$ cd f-stack-binary-release/scripts
15+
# set_env.sh will offload the NIC, if you only have one NIC, the following three commands must run in a script
16+
$ ./set_env.sh dev_name
17+
$ ./run_app.sh [app_name]
18+
$ ./config_veth0.sh
19+
```
20+
21+
- dev_name is the name of your NIC, you can see it with *ifconfig* or *ip addr* command
22+
- app_name is the name of application you want to run, now we support 'nginx' and 'redis'. If you do not add any argument, it will run a helloworld example, you can use it to test whether the envrionment is setup correctly.
23+
- All the scripts should run with root permission
24+
25+
## Directory structure
26+
27+
```
28+
+-- f-stack-binary-release
29+
| +-- doc
30+
| | +-- F-Stack_Build_Guide.md
31+
| | +-- F-Stack_Binary_Release_Quick_Start.md
32+
| +-- f-stack-release
33+
| | +-- CentOS
34+
| | | +-- app (nignx-1.11.10 redis-3.2.8)
35+
| | | +-- config.ini
36+
| | | +-- doc
37+
| | | +-- dpdk
38+
| | | +-- example
39+
| | | +-- start.sh (a script helps to run applications)
40+
| | | +-- tools
41+
| | +-- RHEL
42+
| | +-- Ubuntu
43+
| | +-- kmod (kernel modules)
44+
| | | +-- CentOS
45+
| | | | +-- supported_kernel_version
46+
| | | | | +-- igb_uio.ko
47+
| | | | | +-- rte_kni.ko
48+
| | | +-- RHEL
49+
| | | +-- Ubuntu
50+
| +-- scripts
51+
| | +-- config_veth0.sh (configure the virtual NIC)
52+
| | +-- run_app.sh (run a specific application)
53+
| | +-- set_env.sh (setup environment that f-stack needs)
54+
```
55+
56+
## Supported Linux releases
57+
58+
The f-stack-binary-release package has supported several frequent used linux releases, you can use f-stack applications directly on these releases. What should be paid attention to is that f-stack uses linux kernel modules, so if you have different kernel versions in your machine, you could not use this f-stack-quick-start package and need to compile f-stack by yourself. Here is the list of linux releases this package support now:
59+
60+
| Linux Release | Kernel |
61+
| -------------- | ------ |
62+
| CentOS 7.0 | 3.10.0-123.el7.x86_64 |
63+
| CentOS 7.2 | 3.10.0-327.el7.x86_64 |
64+
| CentOS 7.3 | 3.10.0-514.el7.x86_64 |
65+
| CentOS 7.4 | 3.10.0-693.el7.x86_64 |
66+
| CentOS 7.5 | 3.10.0-862.el7.x86_64 |
67+
| RHEL 7.2 | 3.10.0-327.el7.x86_64 |
68+
| RHEL 7.3 | 3.10.0-514.el7.x86_64 |
69+
| RHEL 7.4 | 3.10.0-693.el7.x86_64 |
70+
| RHEL 7.5 | 3.10.0-862.el7.x86_64 |
71+
| Ubuntu 14.04.5 | 4.4.0-31-generic |
72+
| Ubuntu 16.04.4 | 4.13.0-36-generic |
73+
| Ubuntu 18.04 | 4.15.0-20-generic |
74+
75+
Also, we support tencent cloud, if you are using cloud virtual machine in cloud.tencent.com, you can also use this f-stack-quick-start package.
76+
77+
| Linux Release | Kernel |
78+
| -------------- | ------ |
79+
| CentOS 7.2 | 3.10.0-514.26.2.el7.x86_64 |
80+
| CentOS 7.3 | 3.10.0-514.21.1.el7.x86_64 |
81+
| CentOS 7.4 | 3.10.0-693.el7.x86_64 |
82+
| Ubuntu 14.04.1 | 3.13.0-128-generic |
83+
| Ubuntu 16.04.1 | 4.4.0-91-generic |
84+
85+
## Uninstall f-stack-binary-release package
86+
87+
```
88+
$ sudo rm -rf /usr/local/nginx_fstack
89+
$ rm -rf /path/to/f-stack-binary-release
90+
```
91+
92+
## Compile f-stack by yourself
93+
94+
If your OS version is not in the above list or you want to compile f-stack by yourself, you can refer to another document [Build_Guide](https://github.com/F-Stack/f-stack/blob/master/doc/F-Stack_Build_Guide.md).

doc/F-Stack_Build_Guide.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# F-Stack Build GUide
2+
3+
The procedures to compile f-stack in different linux releases is almost the same, but there are still some points you need to pay attention to. This document aims to help you solve some of the problems you may meet when compiling f-stack in different linux releases.
4+
5+
```sh
6+
$ sudo -i
7+
# in centos and redhat
8+
$ yum install -y git gcc openssl-devel kernel-devel-$(uname -r) bc numactl-devel python
9+
# in ubuntu
10+
$ apt-get install git gcc openssl libssl-dev linux-headers-$(uname -r) bc libnuma1 libnuma-dev libpcre3 libpcre3-dev zlib1g-dev python
11+
12+
$ mkdir /data/f-stack
13+
$ git clone https://github.com/F-Stack/f-stack.git /data/f-stack
14+
15+
# compile dpdk
16+
$ cd /data/f-stack/dpdk
17+
$ make config T=x86_64-native-linuxapp-gcc
18+
$ make
19+
20+
# Compile f-stack lib
21+
$ export FF_PATH=/data/f-stack
22+
$ export FF_DPDK=/data/f-stack/dpdk/build
23+
$ cd /data/f-stack/lib
24+
$ make
25+
26+
# Compile Nginx
27+
$ cd ../app/nginx-1.11.10
28+
$ ./configure --prefix=/usr/local/nginx_fstack --with-ff_module
29+
$ make
30+
$ make install
31+
32+
# Compile Redis
33+
$ cd ../redis-3.2.8
34+
$ make
35+
36+
# Compile f-stack tools
37+
$ cd ../../tools
38+
$ make
39+
40+
# Compile helloworld examples
41+
$ cd ../examples
42+
$ make
43+
```
44+
45+
## Compile Nginx in Ubuntu
46+
47+
- before make Nginx, remove -Werror from CFLAGS at app/nginx-1.11.10/objs/Makefile line 3. (you should run ./configure command first to generate Makefile) (fixed in 2018/07/23)
48+
49+
```
50+
- CFLAGS = -pipe -Os -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g
51+
+ CFLAGS = -pipe -Os -W -Wall -Wpointer-arith -Wno-unused-parameter -g
52+
```
53+
54+
- remove '\\' in statement printf at f-stack/tools/netstat/Makefile line 70, now it should be:
55+
56+
```
57+
- printf("\#define\tN%s\t%s\n", toupper($$2), i++);
58+
+ printf("#define\tN%s\t%s\n", toupper($$2), i++);
59+
```
60+
61+
## Compile Redis in Ubuntu 18.04 (fixed in 2018/07/10)
62+
63+
- add an extra Macros to STD in f-stack/app/redis-3.2.8/src/Makefile line 28, and now it should be:
64+
65+
```
66+
- STD=-std=c99 -pedantic -DREDIS_STATIC=''
67+
+ STD=-std=c99 -pedantic -DREDIS_STATIC='' -D_POSIX_C_SOURCE=199506L
68+
```
69+
70+
## Compile Nginx in Ubuntu 18.04
71+
72+
- there will be a lot of warnings when compiling Nginx in Ubuntu 18.04, and sometimes it may fail, you'd better configure with the following command:
73+
74+
```
75+
./configure --prefix=/usr/local/nginx_fstack --with-ff_module --with-cc-opt="-Wno-implicit-fallthrough -Wno-unused-result"
76+
```
77+
78+
## Compile DPDK in CentOS 7.5 and RHEL 7.5
79+
80+
- struct member 'ndo_change_mtu' in struct net_device_ops has been renamed to 'ndo_change_mtu_rh74', f-stack/dpdk/lib/librte_eal/linuxapp/kni/kni_net.c line 704 should also be updated:
81+
82+
```
83+
- .ndo_change_mtu = kni_net_change_mtu,
84+
+ .ndo_change_mtu_rh74 = kni_net_change_mtu,
85+
```
86+
87+
## Compile dpdk in virtual machine
88+
89+
- f-stack/dpdk/lib/librte_eal/linuxapp/igb_uio/igb_uio.c line 279:
90+
```
91+
92+
- if (pci_intx_mask_supported(udev->pdev)) {
93+
+ if (true || pci_intx_mask_supported(udev->pdev)) {
94+
```

0 commit comments

Comments
 (0)