基于 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.mzph.cn/news/53415.shtml

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

相关文章

Pydev·离线git包

Pydev离线git包 1.下载离线git包&#xff1a;eclipse.egit.repository-4.4.0.201606070830-r.zip 2.将解压后目录&#xff1a;eclipse.egit.repository-4.4.0.201606070830-r\plugins下的jar文件放到 ide\eclipse\plugins目录下 3.重启pydevIDE 百度搜索站长工具&#xff1a;h…

Spring集成【MyBatis】和【PageHelper分页插件】整合---详细介绍

一&#xff0c;spring集成Mybatis的概念 Spring 整合 MyBatis 是将 MyBatis 数据访问框架与 Spring 框架进行集成&#xff0c;以实现更便捷的开发和管理。在集成过程中&#xff0c;Spring 提供了许多特性和功能&#xff0c;如依赖注入、声明式事务管理、AOP 等 它所带来给我们的…

校对的力量:当专业遇上细节,文字焕发新生

在这个信息爆炸的时代&#xff0c;文字成为了我们传达思想、展现形象的重要工具。从新闻稿、政府材料到商业文档&#xff0c;其背后的准确性和专业性往往决定了信息传递的效果。而保证这一切的&#xff0c;就是细致入微的校对工作。 1.错别字与校对&#xff1a;细节之美 错别字…

开源全球地理空间数据可视化框架——Cesium学习(2023.8.21)

Cesium学习 2023.8.21 1、Cesium简介1.1 Github上的Cesium 2、Cesium下载安装使用2.1 方式一&#xff1a;页面在线引用2.2 方式二&#xff1a;页面离线使用2.3 方式三&#xff1a;完整项目使用 3、CesiumJS学习教程&#xff08;快速上手 API文档&#xff09;3、Cesium官方示例…

vue离线缓存资源文件

本文章主要是解决大文件,实时请求资源浪费网络资源的问题 从而有效的将解决用户体验的问题 话不多说上才艺 ⬇️⬇️⬇️⬇️⬇️⬇️⬇️ 找到项目中的 index.html 文件,并在 html 标签中加入 manifest"manifest.appcache" 安装 appcache-manifest 包 npm ins…

c++ qt--信号与槽(二) (第四部分)

c qt–信号与槽(二) &#xff08;第四部分&#xff09; 信号与槽的关系 1.一对一 2.一对多 3.多对一 4.多对多 还可以进行传递 信号->信号->槽 一个信号控制多个槽的例子&#xff08;通过水平滑块控制两个组件&#xff09; 1.应用的组件 注意这里最下面的组件进行…

【Qt学习】06:事件与事件过滤器

OVERVIEW 事件与事件过滤器一、事件1.鼠标事件创建子类MyLabel重写鼠标事件提升Label控件为MyLabel 2.定时器事件timerEventQTimer 3.事件分发器&#xff08;event函数&#xff09;event函数重写event函数深入 二、事件过滤器1.事件过滤器2.事件处理的五个层次 事件与事件过滤器…

Tomcat和Servlet基础知识的讲解(JavaEE初阶系列16)

目录 前言&#xff1a; 1.Tomcat 1.1Tomcat是什么 1.2下载安装 2.Servlet 2.1什么是Servlet 2.2使用Servlet来编写一个“hello world” 1.2.1创建项目&#xff08;Maven&#xff09; 1.2.2引入依赖&#xff08;Servlet&#xff09; 1.2.3创建目录&#xff08;webapp&a…

VR法治警示教育:情景式课堂增强教育效果

VR法治警示教育平台是一款基于虚拟现实技术的在线教育平台&#xff0c;旨在通过模拟真实场景和互动体验&#xff0c;向公众普及法律知识&#xff0c;提高公民的法律意识和素养。该平台采用先进的虚拟现实技术&#xff0c;将用户带入一个逼真的仿真环境&#xff0c;让用户身临其…

python systemrdl 使用实例

今天来看一个具体实例&#xff0c;上一篇传送门&#xff1a;python SystemRDL 包介绍_Bug_Killer_Master的博客-CSDN博客 通常来说&#xff0c;我们验证过程用到的情况大多都是需要提取reg field的路径以及reset 值等信息&#xff0c;所以比较常见的一种方法就是先把rdl compil…

简析SCTP开发指南

目录 前言一、SCTP基本概念二、SCTP开发步骤1. **环境配置**&#xff1a;2. **建立Socket**&#xff1a;3. **绑定和监听**&#xff1a;4. **接收和发送数据**&#xff1a;5. **关闭连接**&#xff1a; 三、 C语言实现SCTP3.1SCTP客户端代码&#xff1a;3.2 SCTP服务器端代码&a…

识别图片中的文字

前言 PearOCR 是一款免费无限制网页版文字识别工具。 优点如下&#xff1a; 免费&#xff1a;完全免费&#xff0c;没有任何次数、大小限制&#xff0c;可以无限使用&#xff1b; 安全&#xff1a;全部数据本地运算&#xff0c;所有图片均不会被上传&#xff1b; 智能&#xf…

SQL注入之HTTP头部注入

文章目录 cookie注入练习获取数据库名称获取版本号 base64注入练习获取数据库名称获取版本号 user-agent注入练习获取数据库名称获取版本号 cookie注入练习 向服务器传参三大基本方法:GPC GET方法&#xff0c;参数在URL中 POST&#xff0c;参数在body中 COOKIE&#xff0c;参数…

OpenSIPS 通话中 UPDATE 请求导致没有声音问题

文章目录 1. 问题现象2. 抓包排查3. 问题分析及解决方案 1. 问题现象 在 SIP 应用的开发中&#xff0c;通话一端听不到声音是比较常见的问题。一般来说&#xff0c;没有声音意味着 RTP 传输存在障碍&#xff0c;追根究底就是网络不通或者端口未开放等原因。但在实践中&#xf…

数据结构——图

文章目录 图的基本概念顶点边度无向图和有向图无权图和带权图 图的存储邻接矩阵存储邻接表存储 图的搜索广度优先搜索深度优先搜索 图是一种较为复杂的非线性结构。 为啥说其较为复杂呢&#xff1f; 根据前面的内容&#xff0c;我们知道&#xff1a; 线性数据结构的元素满足唯…

nodejs

文章目录 一、nodejs1.1、npm配置命令别名 一、nodejs 1.1、npm配置命令别名 我们可以使用“node index.js”的方式运行代码 也可以利用npm配置别名的方式运行代码 在package.json中配置别名&#xff0c;利用“npm run 别名”也可以运行 start是特殊的&#xff0c;可以“npm r…

ssm+Vue.js在线购物系统源码和论文

ssmVue.js在线购物系统源码和论文049 开发工具&#xff1a;idea 数据库mysql5.7 数据库链接工具&#xff1a;navcat,小海豚等 技术&#xff1a;ssm 摘 要 随着科学技术的飞速发展&#xff0c;各行各业都在努力与现代先进技术接轨&#xff0c;通过科技手段提高自身的优势…

GPT---1234

GPT:《Improving Language Understanding by Generative Pre-Training》 下载地址:https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdfhttps://cdn.openai.com/research-covers/language-unsupervised/language_understa…

保姆级使用vmware安装Ubuntu-server版

保姆级VMware安装Ubuntu20服务器版 文章目录 保姆级VMware安装Ubuntu20服务器版前期准备一、安装vmware二、下载Ubuntu镜像 VMware安装Ubuntu201. 启动Workstation Pro或者Workstation Player,进入软件后新建一个虚拟机2. 进入引导界面选择默认的即可3. 点击下一步即可4. 选择操…