基于 Alpine 环境源码构建 alibaba-tengine(阿里巴巴)的 Docker 镜像

happy chinese valentine's day!

About Alpine(简介)

alpine

Alpine Linux 是一款极其轻量级的 Linux 发行版,基于 busybox,多被当做 Docker 镜像的底包(基础镜像),在使用容器时或多或少都会接触到此系统,本篇文章我们以该镜像构建 tengine-alpine 镜像。

说明:此处以 alpine 3.18.3 & tengine 3.0.0 为实验进行容器镜像构建。

1.1、Alpine 系统特点

  • 小巧:基于 Musl libcbusybox,和 busybox 一样小巧,最小的 Docker 镜像只有 5MB
  • 安全:面向(相对)安全的轻量发行版;
  • 简单:提供 APK 包管理工具,软件的搜索、安装、删除、升级都非常方便。
  • 适合容器使用:由于小巧、功能完备,非常适合作为容器的基础镜像。

关于 alpine 体积小(linux 发行版镜像体积对比):

PS C:\Users\Jeffrey.Chai> docker image ls
REPOSITORY       TAG        IMAGE ID       CREATED             SIZE
tengine-alpine   3.0.0      c26d7afb96b0   About an hour ago   392MB
debian           12.1       3a37950934ff   5 days ago          116MB
alpine           3.18.3     7e01a0d0a1dc   13 days ago         7.34MB
ubuntu           22.04      01f29b872827   2 weeks ago         77.8MB
busybox          latest     5242710cbd55   7 weeks ago         4.26MB
centos           7.9.2009   eeb6ee3f44bd   23 months ago       204MB
centos           8.4.2105   5d0da3dc9764   23 months ago       231MB

1.2、Alpine 镜像的使用

  • 官方 Alpine 镜像的文档:Alpine User Handbook - Alpine Linux Documentation
  • alpine 官方 docker 镜像:https://hub.docker.com/_/alpine/
  • alpine 官方包文件:Alpine Linux packages
docker pull alpine:latest
docker run -it --name=myalpine alpine:latest

1.3、apk 命令介绍

apk update                     # 从远程镜像源中更新本地索引 
apk upgrade                    #升级本地安装的软件
apk add                        # 从仓库中安装最新软件包和对应的依赖包 
apk add -u                     #升级指定软件包
apk del                        #删除软件包
apk search                     #搜索软件包
apk search -v                  #查找所以可用软件包及其描述内容
apk search -v 'busybox'        #通过软件包名称查找软件包
apk search -v -d 'busybox'     #通过描述文件查找特定的软件包
apk info                       #列出所有已安装的软件包
apk info -a                    #显示完整的软件包信息 
apk info --who-owns            #显示指定文件属于的包
apk info -r                    #列出所有包的依赖
apk info -s                    #显示软件包大小
apk info -d                    #显示软件包的描述
apk -L info                    #列出软件包的内容 
apk -e info                    #检测软件包的安装
apk -R info                    #列出指定包的依赖

查看 apk 命令帮助信息:

See 'apk --help'.
/ # apk --help
apk-tools 2.14.0, compiled for x86_64.usage: apk [<OPTIONS>...] COMMAND [<ARGUMENTS>...]Package installation and removal:add        Add packages to WORLD and commit changesdel        Remove packages from WORLD and commit changesSystem maintenance:fix        Fix, reinstall or upgrade packages without modifying WORLDupdate     Update repository indexesupgrade    Install upgrades available from repositoriescache      Manage the local package cacheQuerying package information:info       Give detailed information about packages or repositorieslist       List packages matching a pattern or other criteriadot        Render dependencies as graphviz graphspolicy     Show repository policy for packagessearch     Search for packages by name or descriptionRepository maintenance:index      Create repository index file from packagesfetch      Download packages from repositories to a local directorymanifest   Show checksums of package contentsverify     Verify package integrity and signatureMiscellaneous:audit      Audit system for changesstats      Show statistics about repositories and installationsversion    Compare package versions or perform tests on version stringsThis apk has coffee making abilities.
For more information: man 8 apk
  • stats 显示仓库和包的安装相关的统计信息:
/ # apk info -v
alpine-baselayout-3.4.3-r1
alpine-baselayout-data-3.4.3-r1
alpine-keys-2.4-r1
apk-tools-2.14.0-r2
busybox-1.36.1-r2
busybox-binsh-1.36.1-r2
ca-certificates-bundle-20230506-r0
libc-utils-0.7.2-r5
libcrypto3-3.1.2-r0
libssl3-3.1.2-r0
musl-1.2.4-r1
musl-utils-1.2.4-r1
scanelf-1.3.7-r1
ssl_client-1.36.1-r2
zlib-1.2.13-r1
/ # apk stats
installed:packages: 15dirs: 101files: 110bytes: 8216576triggers: 1
available:names: 45169packages: 20063
atoms:num: 13645

注意:对于基于 Alpine 系统的容器,进入命令也有一点不同,Alpine 默认是没有 bash 的,因此进入容器的命令需要跟随 /bin/sh 指令,例如:

docker exec -it alpine /bin/sh

About Tengine(简介)

2.1、Tengine 简介

tengine

2.2、Tengine 功能特性

关于 Tengine 功能特性,请查看官方文档:

  • http://tengine.taobao.org/

Alpine 容器环境构建镜像步骤

3.1、Docker 运行一个 alpine 容器

  • 1、Docker 拉取 alpine 镜像;
docker pull alpine:latest # or alpine:3.18.3
  • 2、Docker 运行 alpine 镜像;
docker run -it --name=tengine-alpine -p 80:80 alpine:latest
  • 3、修改国内镜像 reporepositories) 源,此处我们使用阿里源;
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
/ # apk update
fetch https://mirrors.aliyun.com/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
fetch https://mirrors.aliyun.com/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
v3.18.3-55-g2ee93b9273a [https://mirrors.aliyun.com/alpine/v3.18/main]
v3.18.3-56-g4a3b0382caa [https://mirrors.aliyun.com/alpine/v3.18/community]
OK: 20063 distinct packages available

国内 repo 源:

# 清华源
sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories 
# 阿里源
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
# 中科大源
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
  • 4、下载 Tengine-3.0.0.tar.gz;
wget http://tengine.taobao.org/download/tengine-3.0.0.tar.gz

关于 wget 命令用法:

/ # wget
BusyBox v1.36.1 (2023-07-27 17:12:24 UTC) multi-call binary.Usage: wget [-cqS] [--spider] [-O FILE] [-o LOGFILE] [--header STR][--post-data STR | --post-file FILE] [-Y on/off][-P DIR] [-U AGENT] [-T SEC] URL...Retrieve files via HTTP or FTP--spider        Only check URL existence: $? is 0 if exists--header STR    Add STR (of form 'header: value') to headers--post-data STR Send STR using POST method--post-file FILE        Send FILE using POST method-c              Continue retrieval of aborted transfer-q              Quiet-P DIR          Save to DIR (default .)-S              Show server response-T SEC          Network read timeout is SEC seconds-O FILE         Save to FILE ('-' for stdout)-o LOGFILE      Log messages to FILE-U STR          Use STR for User-Agent header-Y on/off       Use proxy
  • 5、解压 tengine-3.0.0.tar.gz 文件;
# 创建一个文件夹(名为 tengine-3.0.0)
mkdir tengine-3.0.0
# 解压文件到 tengine-3.0.0 文件夹
tar -zxvf tengine-3.0.0.tar.gz -C ./tengine-3.0.0/

tar 参数说明:

  • -z 是使用 gzip 来解压或者压缩文件;
  • -x 是释放文件,或者说叫解压文件;
  • -v 是报告文件详情信息,如果不加这一条的话,就不会一直滚动的信息条了,建议加上,如果出了错还是会更加直观的看出来是什么原因;
  • -f 是指定名字,后续跟的是要解压的文件名;
  • -C 是指定目录,后续跟的也就是目标目录;

文件 tengine-3.0.0.tar.gz 解压信息如下:

/tengine-3.0.0/tengine-3.0.0 # ls
AUTHORS.te       CHANGES.te       README.markdown  conf             docs             modules          src
CHANGES          LICENSE          THANKS.te        configure        html             objs             tests
CHANGES.cn       Makefile         auto             contrib          man              packages
/tengine-3.0.0/tengine-3.0.0 # ls -al
total 476
drwxrwxr-x   14 root     root          4096 Aug 21 06:30 .
drwxr-xr-x    3 root     root          4096 Aug 21 06:28 ..
drwxrwxr-x    4 root     root          4096 Aug 21 06:28 .github
-rw-rw-r--    1 root     root            20 Jul 20 12:52 .gitignore
-rw-rw-r--    1 root     root           931 Jul 20 12:52 AUTHORS.te
-rw-rw-r--    1 root     root        323310 Jul 20 12:52 CHANGES
-rw-rw-r--    1 root     root         28884 Jul 20 12:52 CHANGES.cn
-rw-rw-r--    1 root     root         36957 Jul 20 12:52 CHANGES.te
-rw-rw-r--    1 root     root          1715 Jul 20 12:52 LICENSE
-rw-r--r--    1 root     root            69 Aug 21 06:30 Makefile
-rw-rw-r--    1 root     root          4999 Jul 20 12:52 README.markdown
-rw-rw-r--    1 root     root            43 Jul 20 12:52 THANKS.te
drwxrwxr-x    6 root     root          4096 Aug 21 06:28 auto
drwxrwxr-x    2 root     root          4096 Aug 21 06:28 conf
-rwxrwxr-x    1 root     root          2502 Jul 20 12:52 configure
drwxrwxr-x    4 root     root          4096 Aug 21 06:28 contrib
drwxrwxr-x    4 root     root          4096 Aug 21 06:28 docs
drwxrwxr-x    2 root     root          4096 Aug 21 06:28 html
drwxrwxr-x    2 root     root          4096 Aug 21 06:28 man
drwxrwxr-x   32 root     root          4096 Aug 21 06:28 modules
drwxr-xr-x    2 root     root          4096 Aug 21 06:30 objs
drwxrwxr-x    3 root     root          4096 Aug 21 06:28 packages
drwxrwxr-x   10 root     root          4096 Aug 21 06:28 src
drwxrwxr-x    4 root     root          4096 Aug 21 06:28 tests

关于 tar 命令用法:

/ # tar
BusyBox v1.36.1 (2023-07-27 17:12:24 UTC) multi-call binary.Usage: tar c|x|t [-ZzJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [LONGOPT]... [FILE]...Create, extract, or list files from a tar filec       Createx       Extractt       List-f FILE Name of TARFILE ('-' for stdin/out)-C DIR  Change to DIR before operation-v      Verbose-O      Extract to stdout-m      Don't restore mtime-o      Don't restore user:group-k      Don't replace existing files-Z      (De)compress using compress-z      (De)compress using gzip-J      (De)compress using xz-j      (De)compress using bzip2--lzma  (De)compress using lzma-a      (De)compress based on extension-h      Follow symlinks-T FILE File with names to include-X FILE File with glob patterns to exclude--exclude PATTERN       Glob pattern to exclude--overwrite             Replace existing files--strip-components NUM  NUM of leading components to strip--no-recursion          Don't descend in directories--numeric-owner         Use numeric user:group--no-same-permissions   Don't restore access permissions

3.2、Alpine 安装 gcc g++ make 编译环境

  • 安装源码编译所需的相关依赖包
apk add gcc g++ make cmake gfortran zlib-dev libffi-dev pcre-dev openssl-dev libtool

此处安装信息如下:

/tengine-3.0.0/tengine-3.0.0 # apk add gcc g++ make openssl-dev zlib-dev pcre-dev
(1/24) Installing libgcc (12.2.1_git20220924-r10)
(2/24) Installing libstdc++ (12.2.1_git20220924-r10)
(3/24) Installing libstdc++-dev (12.2.1_git20220924-r10)
(4/24) Installing zstd-libs (1.5.5-r4)
(5/24) Installing binutils (2.40-r7)
(6/24) Installing libgomp (12.2.1_git20220924-r10)
(7/24) Installing libatomic (12.2.1_git20220924-r10)
(8/24) Installing gmp (6.2.1-r3)
(9/24) Installing isl26 (0.26-r1)
(10/24) Installing mpfr4 (4.2.0_p12-r0)
(11/24) Installing mpc1 (1.3.1-r1)
(12/24) Installing gcc (12.2.1_git20220924-r10)
(13/24) Installing musl-dev (1.2.4-r1)
(14/24) Installing libc-dev (0.7.2-r5)
(15/24) Installing g++ (12.2.1_git20220924-r10)
(16/24) Installing make (4.4.1-r1)
(17/24) Installing pkgconf (1.9.5-r0)
(18/24) Installing openssl-dev (3.1.2-r0)
(19/24) Installing libpcre16 (8.45-r3)
(20/24) Installing libpcre32 (8.45-r3)
(21/24) Installing pcre (8.45-r3)
(22/24) Installing libpcrecpp (8.45-r3)
(23/24) Installing pcre-dev (8.45-r3)
(24/24) Installing zlib-dev (1.2.13-r1)
Executing busybox-1.36.1-r2.trigger
OK: 240 MiB in 39 packages

查看依赖环境包名称:

https://pkgs.alpinelinux.org/packages

输入 gcc 单机 Search

alpine-packages

  • 通过 --prefix 指定安装目录
/tengine-3.0.0/tengine-3.0.0 # ./configure --prefix=/usr/local/tengine
checking for OS+ Linux 5.15.90.1-microsoft-standard-WSL2 x86_64
checking for C compiler ... found+ using GNU C compiler+ gcc version: 12.2.1 20220924 (Alpine 12.2.1_git20220924-r10)
checking for gcc -pipe switch ... found
checking for -Wl,-E switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for gcc builtin 64 bit byteswap ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for EPOLLRDHUP ... found
checking for EPOLLEXCLUSIVE ... found
checking for eventfd() ... found
checking for O_PATH ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for prctl(PR_SET_KEEPCAPS) ... found
checking for capabilities ... not found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for UDP_SEGMENT ... found
checking for nobody group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... found
checking for sched_yield() ... found
checking for sched_setaffinity() ... found
checking for SO_SETFIB ... not found
checking for SO_REUSEPORT ... found
checking for SO_ACCEPTFILTER ... not found
checking for SO_BINDANY ... not found
checking for IP_TRANSPARENT ... found
checking for IP_BINDANY ... not found
checking for IP_BIND_ADDRESS_NO_PORT ... found
checking for IP_RECVDSTADDR ... not found
checking for IP_SENDSRCADDR ... not found
checking for IP_PKTINFO ... found
checking for IPV6_RECVPKTINFO ... found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE ... found
checking for TCP_FASTOPEN ... found
checking for TCP_INFO ... found
checking for accept4() ... found
checking for int size ... 4 bytes
checking for long size ... 8 bytes
checking for long long size ... 8 bytes
checking for void * size ... 8 bytes
checking for uint32_t ... found
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system byte ordering ... little endian
checking for size_t size ... 8 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 8 bytes
checking for AF_INET6 ... found
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for pwritev() ... found
checking for strerrordesc_np() ... not found
checking for sys_nerr ... not found
checking for _sys_nerr ... not found
checking for localtime_r() ... found
checking for clock_gettime(CLOCK_MONOTONIC) ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for System V shared memory ... found
checking for POSIX semaphores ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for ioctl(FIONREAD) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for sysconf(_SC_LEVEL1_DCACHE_LINESIZE) ... not found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
checking for sysinfo() ... found
checking for getloadavg() ... found
checking for /proc/meminfo ... found
checking for /proc/stat ... found
checking for PCRE2 library ... not found
checking for PCRE library ... found
checking for PCRE JIT support ... found
checking for OpenSSL library ... found
checking for OpenSSL DTLS support ... found
checking for zlib library ... found
creating objs/MakefileConfiguration summary+ using system PCRE library+ using system OpenSSL library+ using system zlib library+ jemalloc library is disablednginx path prefix: "/usr/local/tengine"nginx binary file: "/usr/local/tengine/sbin/nginx"nginx modules path: "/usr/local/tengine/modules"nginx configuration prefix: "/usr/local/tengine/conf"nginx configuration file: "/usr/local/tengine/conf/nginx.conf"nginx pid file: "/usr/local/tengine/logs/nginx.pid"nginx error log file: "/usr/local/tengine/logs/error.log"nginx http access log file: "/usr/local/tengine/logs/access.log"nginx http client request body temporary files: "client_body_temp"nginx http proxy temporary files: "proxy_temp"nginx http fastcgi temporary files: "fastcgi_temp"nginx http uwsgi temporary files: "uwsgi_temp"nginx http scgi temporary files: "scgi_temp"
  • make 编译 & 安装
make && make install

编译安装信息如下:

/tengine-3.0.0/tengine-3.0.0 # make && make install
make -f objs/Makefile
make[1]: Entering directory '/tengine-3.0.0/tengine-3.0.0'
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/nginx.o \src/core/nginx.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_log.o \src/core/ngx_log.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_palloc.o \src/core/ngx_palloc.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_array.o \src/core/ngx_array.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_list.o \src/core/ngx_list.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_hash.o \src/core/ngx_hash.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_buf.o \src/core/ngx_buf.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_queue.o \src/core/ngx_queue.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_output_chain.o \src/core/ngx_output_chain.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_string.o \src/core/ngx_string.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_parse.o \src/core/ngx_parse.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_parse_time.o \src/core/ngx_parse_time.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_inet.o \src/core/ngx_inet.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_file.o \src/core/ngx_file.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_crc32.o \src/core/ngx_crc32.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_murmurhash.o \src/core/ngx_murmurhash.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_md5.o \src/core/ngx_md5.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_sha1.o \src/core/ngx_sha1.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_rbtree.o \src/core/ngx_rbtree.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_trie.o \src/core/ngx_trie.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_segment_tree.o \src/core/ngx_segment_tree.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_radix_tree.o \src/core/ngx_radix_tree.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_slab.o \src/core/ngx_slab.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_times.o \src/core/ngx_times.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_shmtx.o \src/core/ngx_shmtx.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_connection.o \src/core/ngx_connection.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_cycle.o \src/core/ngx_cycle.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_spinlock.o \src/core/ngx_spinlock.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_rwlock.o \src/core/ngx_rwlock.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_cpuinfo.o \src/core/ngx_cpuinfo.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_conf_file.o \src/core/ngx_conf_file.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_module.o \src/core/ngx_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_resolver.o \src/core/ngx_resolver.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_open_file_cache.o \src/core/ngx_open_file_cache.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_crypt.o \src/core/ngx_crypt.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_proxy_protocol.o \src/core/ngx_proxy_protocol.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_syslog.o \src/core/ngx_syslog.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/event/ngx_event.o \src/event/ngx_event.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/event/ngx_event_timer.o \src/event/ngx_event_timer.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/event/ngx_event_posted.o \src/event/ngx_event_posted.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/event/ngx_event_accept.o \src/event/ngx_event_accept.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/event/ngx_event_udp.o \src/event/ngx_event_udp.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/event/ngx_event_connect.o \src/event/ngx_event_connect.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/event/ngx_event_pipe.o \src/event/ngx_event_pipe.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/event/ngx_event_udpv2.o \src/event/ngx_event_udpv2.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_time.o \src/os/unix/ngx_time.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_errno.o \src/os/unix/ngx_errno.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_alloc.o \src/os/unix/ngx_alloc.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_files.o \src/os/unix/ngx_files.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_socket.o \src/os/unix/ngx_socket.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_recv.o \src/os/unix/ngx_recv.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_readv_chain.o \src/os/unix/ngx_readv_chain.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_udp_recv.o \src/os/unix/ngx_udp_recv.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_send.o \src/os/unix/ngx_send.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_writev_chain.o \src/os/unix/ngx_writev_chain.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_udp_send.o \src/os/unix/ngx_udp_send.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_udp_sendmsg_chain.o \src/os/unix/ngx_udp_sendmsg_chain.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_channel.o \src/os/unix/ngx_channel.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_shmem.o \src/os/unix/ngx_shmem.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_process.o \src/os/unix/ngx_process.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_daemon.o \src/os/unix/ngx_daemon.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_setaffinity.o \src/os/unix/ngx_setaffinity.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_setproctitle.o \src/os/unix/ngx_setproctitle.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_posix_init.o \src/os/unix/ngx_posix_init.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_user.o \src/os/unix/ngx_user.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_dlopen.o \src/os/unix/ngx_dlopen.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_pipe.o \src/os/unix/ngx_pipe.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_sysinfo.o \src/os/unix/ngx_sysinfo.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_process_cycle.o \src/os/unix/ngx_process_cycle.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_linux_init.o \src/os/unix/ngx_linux_init.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/event/modules/ngx_epoll_module.o \src/event/modules/ngx_epoll_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/os/unix/ngx_linux_sendfile_chain.o \src/os/unix/ngx_linux_sendfile_chain.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/proc/ngx_proc.o \src/proc/ngx_proc.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/event/ngx_event_openssl.o \src/event/ngx_event_openssl.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/event/ngx_event_openssl_stapling.o \src/event/ngx_event_openssl_stapling.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/src/core/ngx_regex.o \src/core/ngx_regex.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http.o \src/http/ngx_http.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_core_module.o \src/http/ngx_http_core_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_special_response.o \src/http/ngx_http_special_response.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_request.o \src/http/ngx_http_request.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_parse.o \src/http/ngx_http_parse.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_log_module.o \src/http/modules/ngx_http_log_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_request_body.o \src/http/ngx_http_request_body.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_variables.o \src/http/ngx_http_variables.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_script.o \src/http/ngx_http_script.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_upstream.o \src/http/ngx_http_upstream.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_upstream_round_robin.o \src/http/ngx_http_upstream_round_robin.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_file_cache.o \src/http/ngx_http_file_cache.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_write_filter_module.o \src/http/ngx_http_write_filter_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_header_filter_module.o \src/http/ngx_http_header_filter_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_chunked_filter_module.o \src/http/modules/ngx_http_chunked_filter_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_range_filter_module.o \src/http/modules/ngx_http_range_filter_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_gzip_filter_module.o \src/http/modules/ngx_http_gzip_filter_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_postpone_filter_module.o \src/http/ngx_http_postpone_filter_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_ssi_filter_module.o \src/http/modules/ngx_http_ssi_filter_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_charset_filter_module.o \src/http/modules/ngx_http_charset_filter_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_userid_filter_module.o \src/http/modules/ngx_http_userid_filter_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_headers_filter_module.o \src/http/modules/ngx_http_headers_filter_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/ngx_http_copy_filter_module.o \src/http/ngx_http_copy_filter_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_not_modified_filter_module.o \src/http/modules/ngx_http_not_modified_filter_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_static_module.o \src/http/modules/ngx_http_static_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_autoindex_module.o \src/http/modules/ngx_http_autoindex_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_index_module.o \src/http/modules/ngx_http_index_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_mirror_module.o \src/http/modules/ngx_http_mirror_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_try_files_module.o \src/http/modules/ngx_http_try_files_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_auth_request_module.o \src/http/modules/ngx_http_auth_request_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_auth_basic_module.o \src/http/modules/ngx_http_auth_basic_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_access_module.o \src/http/modules/ngx_http_access_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_limit_conn_module.o \src/http/modules/ngx_http_limit_conn_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_limit_req_module.o \src/http/modules/ngx_http_limit_req_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_geo_module.o \src/http/modules/ngx_http_geo_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_map_module.o \src/http/modules/ngx_http_map_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_split_clients_module.o \src/http/modules/ngx_http_split_clients_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_referer_module.o \src/http/modules/ngx_http_referer_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_rewrite_module.o \src/http/modules/ngx_http_rewrite_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_ssl_module.o \src/http/modules/ngx_http_ssl_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_proxy_module.o \src/http/modules/ngx_http_proxy_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_fastcgi_module.o \src/http/modules/ngx_http_fastcgi_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_uwsgi_module.o \src/http/modules/ngx_http_uwsgi_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_scgi_module.o \src/http/modules/ngx_http_scgi_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_memcached_module.o \src/http/modules/ngx_http_memcached_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_empty_gif_module.o \src/http/modules/ngx_http_empty_gif_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_browser_module.o \src/http/modules/ngx_http_browser_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_upstream_hash_module.o \src/http/modules/ngx_http_upstream_hash_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \src/http/modules/ngx_http_upstream_ip_hash_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_upstream_least_conn_module.o \src/http/modules/ngx_http_upstream_least_conn_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_upstream_random_module.o \src/http/modules/ngx_http_upstream_random_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_upstream_keepalive_module.o \src/http/modules/ngx_http_upstream_keepalive_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_upstream_zone_module.o \src/http/modules/ngx_http_upstream_zone_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs -I src/http -I src/http/modules \-o objs/src/http/modules/ngx_http_stub_status_module.o \src/http/modules/ngx_http_stub_status_module.c
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -I src/core -I src/event -I src/event/modules -I src/os/unix -I src/proc -I objs \-o objs/ngx_modules.o \objs/ngx_modules.c
cc -o objs/nginx \
objs/src/core/nginx.o \
objs/src/core/ngx_log.o \
objs/src/core/ngx_palloc.o \
objs/src/core/ngx_array.o \
objs/src/core/ngx_list.o \
objs/src/core/ngx_hash.o \
objs/src/core/ngx_buf.o \
objs/src/core/ngx_queue.o \
objs/src/core/ngx_output_chain.o \
objs/src/core/ngx_string.o \
objs/src/core/ngx_parse.o \
objs/src/core/ngx_parse_time.o \
objs/src/core/ngx_inet.o \
objs/src/core/ngx_file.o \
objs/src/core/ngx_crc32.o \
objs/src/core/ngx_murmurhash.o \
objs/src/core/ngx_md5.o \
objs/src/core/ngx_sha1.o \
objs/src/core/ngx_rbtree.o \
objs/src/core/ngx_trie.o \
objs/src/core/ngx_segment_tree.o \
objs/src/core/ngx_radix_tree.o \
objs/src/core/ngx_slab.o \
objs/src/core/ngx_times.o \
objs/src/core/ngx_shmtx.o \
objs/src/core/ngx_connection.o \
objs/src/core/ngx_cycle.o \
objs/src/core/ngx_spinlock.o \
objs/src/core/ngx_rwlock.o \
objs/src/core/ngx_cpuinfo.o \
objs/src/core/ngx_conf_file.o \
objs/src/core/ngx_module.o \
objs/src/core/ngx_resolver.o \
objs/src/core/ngx_open_file_cache.o \
objs/src/core/ngx_crypt.o \
objs/src/core/ngx_proxy_protocol.o \
objs/src/core/ngx_syslog.o \
objs/src/event/ngx_event.o \
objs/src/event/ngx_event_timer.o \
objs/src/event/ngx_event_posted.o \
objs/src/event/ngx_event_accept.o \
objs/src/event/ngx_event_udp.o \
objs/src/event/ngx_event_connect.o \
objs/src/event/ngx_event_pipe.o \
objs/src/event/ngx_event_udpv2.o \
objs/src/os/unix/ngx_time.o \
objs/src/os/unix/ngx_errno.o \
objs/src/os/unix/ngx_alloc.o \
objs/src/os/unix/ngx_files.o \
objs/src/os/unix/ngx_socket.o \
objs/src/os/unix/ngx_recv.o \
objs/src/os/unix/ngx_readv_chain.o \
objs/src/os/unix/ngx_udp_recv.o \
objs/src/os/unix/ngx_send.o \
objs/src/os/unix/ngx_writev_chain.o \
objs/src/os/unix/ngx_udp_send.o \
objs/src/os/unix/ngx_udp_sendmsg_chain.o \
objs/src/os/unix/ngx_channel.o \
objs/src/os/unix/ngx_shmem.o \
objs/src/os/unix/ngx_process.o \
objs/src/os/unix/ngx_daemon.o \
objs/src/os/unix/ngx_setaffinity.o \
objs/src/os/unix/ngx_setproctitle.o \
objs/src/os/unix/ngx_posix_init.o \
objs/src/os/unix/ngx_user.o \
objs/src/os/unix/ngx_dlopen.o \
objs/src/os/unix/ngx_pipe.o \
objs/src/os/unix/ngx_sysinfo.o \
objs/src/os/unix/ngx_process_cycle.o \
objs/src/os/unix/ngx_linux_init.o \
objs/src/event/modules/ngx_epoll_module.o \
objs/src/os/unix/ngx_linux_sendfile_chain.o \
objs/src/proc/ngx_proc.o \
objs/src/event/ngx_event_openssl.o \
objs/src/event/ngx_event_openssl_stapling.o \
objs/src/core/ngx_regex.o \
objs/src/http/ngx_http.o \
objs/src/http/ngx_http_core_module.o \
objs/src/http/ngx_http_special_response.o \
objs/src/http/ngx_http_request.o \
objs/src/http/ngx_http_parse.o \
objs/src/http/modules/ngx_http_log_module.o \
objs/src/http/ngx_http_request_body.o \
objs/src/http/ngx_http_variables.o \
objs/src/http/ngx_http_script.o \
objs/src/http/ngx_http_upstream.o \
objs/src/http/ngx_http_upstream_round_robin.o \
objs/src/http/ngx_http_file_cache.o \
objs/src/http/ngx_http_write_filter_module.o \
objs/src/http/ngx_http_header_filter_module.o \
objs/src/http/modules/ngx_http_chunked_filter_module.o \
objs/src/http/modules/ngx_http_range_filter_module.o \
objs/src/http/modules/ngx_http_gzip_filter_module.o \
objs/src/http/ngx_http_postpone_filter_module.o \
objs/src/http/modules/ngx_http_ssi_filter_module.o \
objs/src/http/modules/ngx_http_charset_filter_module.o \
objs/src/http/modules/ngx_http_userid_filter_module.o \
objs/src/http/modules/ngx_http_headers_filter_module.o \
objs/src/http/ngx_http_copy_filter_module.o \
objs/src/http/modules/ngx_http_not_modified_filter_module.o \
objs/src/http/modules/ngx_http_static_module.o \
objs/src/http/modules/ngx_http_autoindex_module.o \
objs/src/http/modules/ngx_http_index_module.o \
objs/src/http/modules/ngx_http_mirror_module.o \
objs/src/http/modules/ngx_http_try_files_module.o \
objs/src/http/modules/ngx_http_auth_request_module.o \
objs/src/http/modules/ngx_http_auth_basic_module.o \
objs/src/http/modules/ngx_http_access_module.o \
objs/src/http/modules/ngx_http_limit_conn_module.o \
objs/src/http/modules/ngx_http_limit_req_module.o \
objs/src/http/modules/ngx_http_geo_module.o \
objs/src/http/modules/ngx_http_map_module.o \
objs/src/http/modules/ngx_http_split_clients_module.o \
objs/src/http/modules/ngx_http_referer_module.o \
objs/src/http/modules/ngx_http_rewrite_module.o \
objs/src/http/modules/ngx_http_ssl_module.o \
objs/src/http/modules/ngx_http_proxy_module.o \
objs/src/http/modules/ngx_http_fastcgi_module.o \
objs/src/http/modules/ngx_http_uwsgi_module.o \
objs/src/http/modules/ngx_http_scgi_module.o \
objs/src/http/modules/ngx_http_memcached_module.o \
objs/src/http/modules/ngx_http_empty_gif_module.o \
objs/src/http/modules/ngx_http_browser_module.o \
objs/src/http/modules/ngx_http_upstream_hash_module.o \
objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
objs/src/http/modules/ngx_http_upstream_random_module.o \
objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
objs/src/http/modules/ngx_http_upstream_zone_module.o \
objs/src/http/modules/ngx_http_stub_status_module.o \
objs/ngx_modules.o \
-lpcre -lssl -lcrypto -lz \
-Wl,-E
sed -e "s|%%PREFIX%%|/usr/local/tengine|" \-e "s|%%PID_PATH%%|/usr/local/tengine/logs/nginx.pid|" \-e "s|%%CONF_PATH%%|/usr/local/tengine/conf/nginx.conf|" \-e "s|%%ERROR_LOG_PATH%%|/usr/local/tengine/logs/error.log|" \< man/nginx.8 > objs/nginx.8
make[1]: Leaving directory '/tengine-3.0.0/tengine-3.0.0'
make -f objs/Makefile install
make[1]: Entering directory '/tengine-3.0.0/tengine-3.0.0'
test -d '/usr/local/tengine' || mkdir -p '/usr/local/tengine'
test -d '/usr/local/tengine/sbin' \|| mkdir -p '/usr/local/tengine/sbin'
test ! -f '/usr/local/tengine/sbin/nginx' \|| mv '/usr/local/tengine/sbin/nginx' \'/usr/local/tengine/sbin/nginx.old'
cp objs/nginx '/usr/local/tengine/sbin/nginx'
test -d '/usr/local/tengine/conf' \|| mkdir -p '/usr/local/tengine/conf'
cp conf/koi-win '/usr/local/tengine/conf'
cp conf/koi-utf '/usr/local/tengine/conf'
cp conf/win-utf '/usr/local/tengine/conf'
test -f '/usr/local/tengine/conf/mime.types' \|| cp conf/mime.types '/usr/local/tengine/conf'
cp conf/mime.types '/usr/local/tengine/conf/mime.types.default'
test -f '/usr/local/tengine/conf/fastcgi_params' \|| cp conf/fastcgi_params '/usr/local/tengine/conf'
cp conf/fastcgi_params \'/usr/local/tengine/conf/fastcgi_params.default'
test -f '/usr/local/tengine/conf/fastcgi.conf' \|| cp conf/fastcgi.conf '/usr/local/tengine/conf'
cp conf/fastcgi.conf '/usr/local/tengine/conf/fastcgi.conf.default'
test -f '/usr/local/tengine/conf/uwsgi_params' \|| cp conf/uwsgi_params '/usr/local/tengine/conf'
cp conf/uwsgi_params \'/usr/local/tengine/conf/uwsgi_params.default'
test -f '/usr/local/tengine/conf/scgi_params' \|| cp conf/scgi_params '/usr/local/tengine/conf'
cp conf/scgi_params \'/usr/local/tengine/conf/scgi_params.default'
test -f '/usr/local/tengine/conf/nginx.conf' \|| cp conf/nginx.conf '/usr/local/tengine/conf/nginx.conf'
cp conf/nginx.conf '/usr/local/tengine/conf/nginx.conf.default'
test -d '/usr/local/tengine/logs' \|| mkdir -p '/usr/local/tengine/logs'
test -d '/usr/local/tengine/logs' \|| mkdir -p '/usr/local/tengine/logs'
test -d '/usr/local/tengine/html' \|| cp -R html '/usr/local/tengine'
test -d '/usr/local/tengine/logs' \|| mkdir -p '/usr/local/tengine/logs'
make[1]: Leaving directory '/tengine-3.0.0/tengine-3.0.0'

3.3、启动 tengine

  • 切换到安装目录,启动 tengine
/ # pwd
/
/ # cd /usr/local/tengine/
/usr/local/tengine # ls
conf  html  logs  sbin
/usr/local/tengine # ls -al
total 24
drwxr-xr-x    6 root     root          4096 Aug 21 07:15 .
drwxr-xr-x    1 root     root          4096 Aug 21 07:15 ..
drwxr-xr-x    2 root     root          4096 Aug 21 07:15 conf
drwxr-xr-x    2 root     root          4096 Aug 21 07:15 html
drwxr-xr-x    2 root     root          4096 Aug 21 07:15 logs
drwxr-xr-x    2 root     root          4096 Aug 21 07:15 sbin

tengine 目录详情整体和 nginx 没啥区别,默认的配置文件也是 conf/nginx.conf

  • nginx.conf 默认配置信息如下:
/usr/local/tengine # cat ./conf/nginx.conf#user  nobody;
worker_processes  1;#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
#error_log  "pipe:rollback logs/error_log interval=1d baknum=7 maxsize=2G";#pid        logs/nginx.pid;events {worker_connections  1024;
}http {include       mime.types;default_type  application/octet-stream;#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '#                  '$status $body_bytes_sent "$http_referer" '#                  '"$http_user_agent" "$http_x_forwarded_for"';#access_log  logs/access.log  main;#access_log  "pipe:rollback logs/access_log interval=1d baknum=7 maxsize=2G"  main;sendfile        on;#tcp_nopush     on;#keepalive_timeout  0;keepalive_timeout  65;#gzip  on;server {listen       80;server_name  localhost;#charset koi8-r;#access_log  logs/host.access.log  main;#access_log  "pipe:rollback logs/host.access_log interval=1d baknum=7 maxsize=2G"  main;location / {root   html;index  index.html index.htm;}#error_page  404              /404.html;# redirect server error pages to the static page /50x.html#error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}# proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ \.php$ {#    proxy_pass   http://127.0.0.1;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000##location ~ \.php$ {#    root           html;#    fastcgi_pass   127.0.0.1:9000;#    fastcgi_index  index.php;#    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;#    include        fastcgi_params;#}# pass the Dubbo rpc to Dubbo provider server listening on 127.0.0.1:20880##location /dubbo {#    dubbo_pass_all_headers on;#    dubbo_pass_set args $args;#    dubbo_pass_set uri $uri;#    dubbo_pass_set method $request_method;##    dubbo_pass org.apache.dubbo.samples.tengine.DemoService 0.0.0 tengineDubbo dubbo_backend;#}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}}# upstream for Dubbo rpc to Dubbo provider server listening on 127.0.0.1:20880##upstream dubbo_backend {#    multi 1;#    server 127.0.0.1:20880;#}# another virtual host using mix of IP-, name-, and port-based configuration##server {#    listen       8000;#    listen       somename:8080;#    server_name  somename  alias  another.alias;#    location / {#        root   html;#        index  index.html index.htm;#    }#}# HTTPS server##server {#    listen       443 ssl;#    server_name  localhost;#    ssl_certificate      cert.pem;#    ssl_certificate_key  cert.key;#    ssl_session_cache    shared:SSL:1m;#    ssl_session_timeout  5m;#    ssl_ciphers  HIGH:!aNULL:!MD5;#    ssl_prefer_server_ciphers  on;#    location / {#        root   html;#        index  index.html index.htm;#    }#}}
  • 修改默认 html 代码,添加如下信息(防止 html 中文乱码)
<meta http-equiv="Content-Type" content="text/html;charset=utf-8;" />

完整 ./html/index.html 信息如下:

<!DOCTYPE html>
<html>
<head>
<title>Welcome to tengine!</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8;" />
<style>body {width: 35em;margin: 0 auto;font-family: Tahoma, Verdana, Arial, sans-serif;}
</style>
</head>
<body>
<h1>Welcome to tengine(version 3.0.0)!</h1>
<p>If you see this page, the tengine web server is successfully installed and
working. Further configuration is required.</p><p>For online documentation and support please refer to
<a href="http://tengine.taobao.org/">tengine.taobao.org</a>.</p><p><em>Thank you for using tengine.</em></p>
</body>
</html>
  • 切换到 sbin 目录,通过 nginx 命令启动 tengine;
/usr/local/tengine # ls
conf  html  logs  sbin
/usr/local/tengine # ls -al
total 24
drwxr-xr-x    6 root     root          4096 Aug 21 07:15 .
drwxr-xr-x    1 root     root          4096 Aug 21 07:15 ..
drwxr-xr-x    2 root     root          4096 Aug 21 07:15 conf
drwxr-xr-x    2 root     root          4096 Aug 21 07:15 html
drwxr-xr-x    2 root     root          4096 Aug 21 07:15 logs
drwxr-xr-x    2 root     root          4096 Aug 21 07:15 sbin
/usr/local/tengine # cd ./sbin/
/usr/local/tengine/sbin # ls
nginx
/usr/local/tengine/sbin # ./nginx

查看 nginx 帮助信息:

/usr/local/tengine/sbin # ./nginx -h
Tengine version: Tengine/3.0.0
nginx version: nginx/1.24.0
Usage: nginx [-?hvVtTq] [-s signal] [-p prefix][-e filename] [-c filename] [-g directives]Options:-?,-h         : this help-v            : show version and exit-V            : show version and configure options then exit-t            : test configuration and exit-T            : test configuration, dump it and exit-q            : suppress non-error messages during configuration testing-s signal     : send signal to a master process: stop, quit, reopen, reload-p prefix     : set prefix path (default: /usr/local/tengine/)-e filename   : set error log file (default: logs/error.log)-c filename   : set configuration file (default: conf/nginx.conf)-g directives : set global directives out of configuration file-m            : show all modules and exit-l            : show all directives and exit

编写 tengine 启动( tengine-start.sh)脚本:

#!/bin/sh
echo "Tengine starting"
/usr/local/tengine/sbin/nginx

修改 tengine-start.sh 文件(可执行)权限:

/ # chmod +x ./tengine-start.sh
/ # ls -al
total 3256
drwxr-xr-x    1 root     root          4096 Aug 21 09:03 .
drwxr-xr-x    1 root     root          4096 Aug 21 09:03 ..
-rwxr-xr-x    1 root     root             0 Aug 21 09:03 .dockerenv
drwxr-xr-x    2 root     root          4096 Aug  7 13:09 bin
drwxr-xr-x    5 root     root           360 Aug 21 09:03 dev
drwxr-xr-x    1 root     root          4096 Aug 21 09:03 etc
drwxr-xr-x    2 root     root          4096 Aug  7 13:09 home
drwxr-xr-x    1 root     root          4096 Aug 21 08:07 lib
drwxr-xr-x    5 root     root          4096 Aug  7 13:09 media
drwxr-xr-x    2 root     root          4096 Aug  7 13:09 mnt
drwxr-xr-x    2 root     root          4096 Aug  7 13:09 opt
dr-xr-xr-x  322 root     root             0 Aug 21 09:03 proc
drwx------    1 root     root          4096 Aug 21 07:59 root
drwxr-xr-x    2 root     root          4096 Aug  7 13:09 run
drwxr-xr-x    2 root     root          4096 Aug  7 13:09 sbin
drwxr-xr-x    2 root     root          4096 Aug  7 13:09 srv
dr-xr-xr-x   11 root     root             0 Aug 21 09:03 sys
drwxr-xr-x    3 root     root          4096 Aug 21 08:03 tengine-3.0.0
-rw-r--r--    1 root     root       3243580 Aug 21 08:03 tengine-3.0.0.tar.gz
-rwxr-xr-x    1 root     root            64 Aug 21 09:19 tengine-start.sh
drwxrwxrwt    1 root     root          4096 Aug 21 08:10 tmp
drwxr-xr-x    1 root     root          4096 Aug 21 08:05 usr
drwxr-xr-x    1 root     root          4096 Aug  7 13:09 var
/ # ./tengine-start.sh
Tengine starting
  • 验证容器环境构建的 tengine 是否成功运行,浏览器输入本机 ip-v4 地址:
http://192.168.2.46/

浏览器查看容器服务

Docker 环境容器运行信息:

docker 查看容器服务

3.4、提交 tengine-alpine 镜像

可选操作:提交前先把下载的 tengine-3.0.0.tar.gz 源码文件删除(方便新构建的镜像体积尽量小些)。

rm -f tengine-3.0.0.tar.gz
  • 提交(容器环境构建的)镜像
docker commit tengine-alpine tengine:3.0.0-alpine
sha256:c26d7afb96b06cae5f9a918e193095f2c34fd81c2ebc31a1b3e0a78adc36be5f
  • 查看构建的镜像信息:
PS C:\Users\Jeffrey.Chai> docker commit -h
Flag shorthand -h has been deprecated, please use --helpUsage:  docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]Create a new image from a container's changesAliases:docker container commit, docker commitOptions:-a, --author string    Author (e.g., "John Hannibal Smith<hannibal@a-team.com>")-c, --change list      Apply Dockerfile instruction to the created image-m, --message string   Commit message-p, --pause            Pause container during commit (default true)
PS C:\Users\Jeffrey.Chai> docker commit tengine-alpine tengine-alpine:3.0.0
sha256:c26d7afb96b06cae5f9a918e193095f2c34fd81c2ebc31a1b3e0a78adc36be5f
PS C:\Users\Jeffrey.Chai>
PS C:\Users\Jeffrey.Chai> docker image ls
REPOSITORY                                  TAG                   IMAGE ID       CREATED              SIZE
tengine-alpine                              3.0.0                 c26d7afb96b0   About a minute ago   392MB
nginx                                       latest                af62dd757b58   5 days ago           187MB
alpine                                      3.18.3                7e01a0d0a1dc   13 days ago          7.34MB
busybox                                     latest                5242710cbd55   7 weeks ago          4.26MB

3.5、验证新构建的镜像

  • 基于新构建的镜像启动一个容器:
docker run -it --name=tengine-alpine -p 80:80 tengine:3.0.0-alpine /bin/sh ./tengine-start.sh
  • 浏览器再次输入 ip-v4 地址查看。

感兴趣的小伙伴,欢迎点赞分享,关注哟!

参考文章:

  • Alpine Linux 常用命令
  • Alpine 包管理工具 apk 使用介绍 alpine apk
  • docker 使用 alpine 镜像 docker alpine 镜像

资源下载:

  • Download - The Tengine Web Server (taobao.org)
  • Linux 系统中 10 个使用 wget 命令下载文件示例

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/101437.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Jmeter生成可视化的HTML测试报告

Jmeter也是可以生成测试报告的。 性能测试工具Jmeter由于其体积小、使用方便、学习成本低等原因&#xff0c;在现在的性能测试过程中&#xff0c;使用率越来越高&#xff0c;但其本身也有一定的缺点&#xff0c;比如提供的测试结果可视化做的很一般。 不过从3.0版本开始&…

Mysql group by使用示例

文章目录 1. groupby时不能查询*2. 查询出的列必须在group by的条件列中3. group by多个字段&#xff0c;这些字段都有索引也会索引失效&#xff0c;只有group by单个字段索引才能起作用4. having条件必须跟group by相关联5. 用group by做去重6. 使用聚合函数做数量统计7. havi…

基于FPGA的FIR低通滤波器实现(附工程源码),matlab+vivado19.2+simulation

基于FPGA的FIR低通滤波器实现(附工程源码) 文章目录 基于FPGA的FIR低通滤波器实现(附工程源码)前言一、matlab设计FIR滤波器&#xff0c;生成正弦波1.设计FIR滤波器1.生成正弦波.coe 二、vivado1.fir滤波器IP核2.正弦波生成IP核3.时钟IP核设置4.顶层文件/测试文件代码 三.simul…

记忆正则表达式的基本元件

正则常见的三种功能&#xff0c;它们分别是&#xff1a;校验数据的有效性、查找符合要求的文本以及对文本进行切割和替换等操作。 正则表达式&#xff0c;简单地说就是描述字符串的规则。在正则中&#xff0c;普通字符表示的还是原来的意思&#xff0c;比如字符 a&#xff0c;…

小程序中的页面配置和网络数据请求

页面配置文件和常用的配置项 1.在msg.json中配置window中的颜色和背景色 "navigationBarBackgroundColor": "#efefef","navigationBarTextStyle": "black" 2.可以看到home中的没有发生变化但是msg的发生变化了&#xff0c;这个和前面的…

Mimikatz免杀实战:绕过360核晶和defender

文章目录 前言绕过360核晶实现思路完整代码运行测试 绕过WD实现思路MiniDumpWriteDump回调函数加密dump文件 完整代码运行测试 参考文章 前言 通常来说&#xff0c;即使我们成功实现了mimikatz的静态免杀&#xff0c;其抓取hash的行为仍可能会被防病毒软件检测到虽然你可以通过…

算法通关村第九关——透彻理解二分查找

1.前言 常见的查找算法有顺序查找、二分查找、插值查找、斐波那契查找、树表查找、分块查找、哈希查找等。如果进行归类&#xff0c;那么二分查找、插值查找&#xff08;一种查找算法&#xff09;以及斐波那契查找都可以归为插值查找&#xff08;大类&#xff09;。而插值查找…

ES搭建集群

一、创建 elasticsearch-cluster 文件夹 创建 elasticsearch-7.8.0-cluster 文件夹&#xff0c;在内部复制三个 elasticsearch 服务。 然后每个文件目录中每个节点的 config/elasticsearch.yml 配置文件 node-1001 节点 #节点 1 的配置信息&#xff1a; #集群名称&#xff0…

Android相机-架构

引言&#xff1a; 主要是针对CameraAPI v2 HAL3的架构对Android相机系统进行梳理。 相机架构 App和FrameWork packages/apps/Camer2 frameworks/ex/camera2 Camera API v2&#xff1b;Camera2 CameraDevice&#xff1a; CameraCaptureSession&#xff1a; CameraService AIDL…

设计模式(8)外观模式

一、 1、使用背景&#xff1a;降低访问复杂系统的内部子系统时的复杂度&#xff0c;简化客户端之间的接口。 2、定义&#xff1a; 为子系统中的一组接口定义一个一致的界面&#xff0c;此模式定义了一个高层接口&#xff0c;这个接口使得这一子系统更加容易使用。完美地体现…

什么是安全测试报告,怎么获得软件安全检测报告?

安全测试报告 软件安全测试报告&#xff1a;是指测试人员对软件产品的安全缺陷和非法入侵防范能力进行检查和验证的过程&#xff0c;并对软件安全质量进行整体评估&#xff0c;发现软件的缺陷与 bug&#xff0c;为开发人员修复漏洞、提高软件质量奠定坚实的基础。 怎么获得靠谱…

NLP预训练模型超大规模探索

总共从四方面来进行比较。 第一个方面&#xff0c;高层次方法&#xff08;自监督的预训练方法&#xff09;对比&#xff0c;总共三种方式。 语言模型式&#xff0c;就是 GPT-2 那种方式&#xff0c;从左到右预测&#xff1b;BERT-style 式&#xff0c;就是像 BERT 一样将一部…

多传感器分布式融合算法——加权最小二乘WLS融合/简单凸组合SCC融合

加权最小二乘WLS融合/简单凸组合SCC融合——多传感器分布式融合算法 原创不易&#xff0c;路过的各位大佬请点个赞 主要讲解算法&#xff1a; 加权最小二乘融合WLS 简单凸组合融合SCC 应用于: 多传感器网络协同目标跟踪/定位/导航 联系WX: ZB823618313 目…

框架分析(2)-React

框架分析&#xff08;2&#xff09;-React 专栏介绍React核心思想关键特性和功能组件化开发单向数据流JSX语法强大的生态系统 优缺点分析优点缺点 专栏介绍 link 主要对目前市面上常见的框架进行分析和总结&#xff0c;希望有兴趣的小伙伴们可以看一下&#xff0c;会持续更新的…

【数据结构入门指南】二叉树

【数据结构入门指南】二叉树 一、二叉树的概念二、现实中的二叉树三、特殊的二叉树四、二叉树的性质五、二叉树的存储结构5.1 顺序结构5.2 链式结构 一、二叉树的概念 二叉树是一棵特殊的树。一棵二叉树是结点的一个有限集合&#xff0c;该节点&#xff1a; ①&#xff1a;或者…

【Java转Go】快速上手学习笔记(四)之基础篇三

目录 泛型内置泛型的使用切片泛型和泛型函数map泛型泛型约束泛型完整代码 接口反射协程特点WaitGroupgoroutine的调度模型&#xff1a;MPG模型 channel介绍语法&#xff1a;举例&#xff1a;channel遍历基本使用和协程一起使用案例一案例二 select...casemain.go 完整代码 文件…

chapter 3 Free electrons in solid - 3.2 量子自由电子理论对一些现象的解释

3.2 自由电子气的热容 Heat capacity of free electron gas 3.2.1 计算自由电子的热容 Calculation of Heat Capacity of free Electrons T>0K, total energy of free electrons: E ∫ E d N 3 5 N e E F 0 [ 1 5 12 π 2 ( k B T E F 0 ) 2 ] E \int EdN \frac{3}{5}…

econml介绍

EconML简介 EconML: A Python Package for ML-Based Heterogeneous Treatment Effects Estimation EconML是一个通过机器学习方法从观察数据中估计heterogeneous treatment effects的Python包。该软件包是微软研究院ALICE项目的一部分&#xff0c;目的是将最新的机器学习方法…

CAM实现的流程--基于Pytorch实现

CAM实现的流程 CAM类激活映射CAM是什么CAM与CNN CAM类激活映射 CAM是什么 可视化CNN的工具&#xff0c; CAM解释网络特征变化&#xff0c;CAM使得弱监督学习发展成为可能&#xff0c;可以慢慢减少对人工标注的依赖&#xff0c;能降低网络训练的成本。通过可视化&#xff0c;就…

【Axure高保真原型】通过输入框动态控制折线图

今天和大家分享通过输入框动态控制折线图的原型模板&#xff0c;在输入框里维护项目数据&#xff0c;可以自动生成对应的折线图&#xff0c;鼠标移入对应折点&#xff0c;可以查看对应数据。使用也非常方便&#xff0c;只需要修改输入框里的数据&#xff0c;或者复制粘贴文本&a…