基于 Alpine 环境源码构建 alibaba-tengine(阿里巴巴)的 Docker 镜像
About Alpine(简介)
Alpine Linux
是一款极其轻量级的 Linux
发行版,基于 busybox
,多被当做 Docker
镜像的底包(基础镜像),在使用容器时或多或少都会接触到此系统,本篇文章我们以该镜像构建 tengine-alpine
镜像。
说明:此处以
alpine 3.18.3
&tengine 3.0.0
为实验进行容器镜像构建。
1.1、Alpine 系统特点
小巧:
基于Musl libc
和busybox
,和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 简介
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、修改国内镜像
repo
(repositories
) 源,此处我们使用阿里源;
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
:
- 通过
--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
环境容器运行信息:
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 命令下载文件示例
相关文章:
基于 Alpine 环境源码构建 alibaba-tengine(阿里巴巴)的 Docker 镜像
About Alpine(简介) Alpine Linux 是一款极其轻量级的 Linux 发行版,基于 busybox,多被当做 Docker 镜像的底包(基础镜像),在使用容器时或多或少都会接触到此系统,本篇文章我们以该镜…...
政府网站定期巡检:构建高效、安全与透明的数字政务
在数字时代,政府网站已不仅仅是一个信息发布窗口,更是政府与公众互动的桥梁、政务服务的主要渠道以及数字化治理的重要平台。因此,确保政府网站的高效运行、信息安全与透明公开就显得尤为重要。在此背景下,定期的网站巡检与巡查成…...
C++信息学奥赛1138:将字符串中的小写字母转换成大写字母
#include<bits/stdc.h> using namespace std; int main() {string arr;// 输入一行字符串getline(cin, arr);for(int i0;i<arr.length();i){if(arr[i]>97 and arr[i]<122){char aarr[i]-32; // 将小写字母转换为大写字母cout<<a; // 输出转换后的字符}els…...
leetcode1475. 商品折扣后的最终价格 【单调栈】
简单题 第一次错误做法 class Solution { public:vector<int> finalPrices(vector<int>& prices) {int n prices.size();stack<int> st;unordered_map<int, int> mp;int i 0;while(i ! prices.size()) {int t prices[i];if (st.empty() || t …...
macOS M1使用TensorFlow GPU加速
本人是在pycharm运行代码,安装了tensorflow版本2.13.0 先运行代码查看有没有使用GPU加速: import tensorflow as tf# Press the green button in the gutter to run the script. if __name__ __main__:physical_devices tf.config.list_physical_dev…...
GNU-gcc编译选项-1
include目录 -I ,比如: -I. -I ./Platform/include -I ./Platform/include/prototypes -I ./tpm/include -I ./tpm/include/prototypes -I ./Simulator/include -I ./Simulator/include/prototypes 编译选项 在GCC编译器中,-D是一个编译选项&…...
【DEVOPS】Jenkins使用问题 - 控制台输出乱码
0. 目录 1. 问题描述2. 解决方案3. 最终效果4. 总结 1. 问题描述 部门内部对于Jenkins的使用采取的是Master Slave Work Node的方式,即作为Master节点的Jenkins只负责任务调度,具体的操作由对应的Slave Work Node去执行。 最近团队成员反馈一个问题&a…...
logback-spring.xml
<?xml version"1.0" encoding"UTF-8"?> <configuration> <appender name"stdout" class"ch.qos.logback.core.ConsoleAppender"> <encoder> <springProfile name"dev"> <pattern>%d{…...
华为OD机试之报文重排序【Java源码】
题目描述 对报文进行重传和重排序是常用的可靠性机制,重传缓中区内有一定数量的子报文,每个子报文在原始报文中的顺序已知,现在需要恢复出原始报文。 输入描述 输入第一行为N,表示子报文的个数,0 <N ≤ …...
回归预测 | MATLAB实现BES-ELM秃鹰搜索优化算法优化极限学习机多输入单输出回归预测(多指标,多图)
回归预测 | MATLAB实现BES-ELM秃鹰搜索优化算法优化极限学习机多输入单输出回归预测(多指标,多图) 目录 回归预测 | MATLAB实现BES-ELM秃鹰搜索优化算法优化极限学习机多输入单输出回归预测(多指标,多图)效…...
DPU在东数西算背景下如何赋能下一代算力基础设施 中科驭数在未来网络发展大会论道
以ChatGPT为代表的人工智能大模型的快速发展,对网络信息技术创新发展提出了新的挑战,我国东数西算重大工程也在加速布局。以确定性网络、算力网络为代表的未来网络核心技术,正成为决定未来经济和产业发展的关键。 8月23日,第七届…...
2021年12月 C/C++(四级)真题解析#中国电子学会#全国青少年软件编程等级考试
第1题:移动路线 桌子上有一个m行n列的方格矩阵,将每个方格用坐标表示,行坐标从下到上依次递增,列坐标从左至右依次递增,左下角方格的坐标为(1,1),则右上角方格的坐标为(m,n)。 小明是个调皮的孩子,一天他捉来一只蚂蚁,不小心把蚂蚁的右脚弄伤了,于是蚂蚁只能向上或向右…...
ArcGIS Serve Windows下用户密码变更导致Server服务无法启动问题
问题: 因未知原因Windows下的Server安装账户密码变更,但是又忘记了密码,导致,Server服务启动失败,错误1069: 解决方法: 在账户管理界面,重置对应的arcgis账户的密码,…...
React 面试题集锦
目录 如果想要在组件第一次加载后获取该组件的dom元素,应当在以下哪个生命周期中进行 React支持的键盘事件是 使用严格模式(Strict Mode)优点 React 动态引入组件 当使用ReactDOM.unmountComponentAtNode从DOM中卸载组件时 说一下useS…...
xargs命令解决“Argument list too long”
一、xargs命令概述 xargs命令是给其他命令传递参数的一个过滤器,也是组合多个命令的一个工具。它擅长将标准输入数据转换成命令行参数,xargs能够处理管道或者stdin并将其转换成特定命令的命令参数。空格是其默认定界符,管道传递给xargs的输入…...
R语言中<- 的含义
一般语言的赋值是 号,但是 R 语言是数学语言,所以赋值符号与我们数学书上的伪代码很相似,是一个左箭头 <- : 举个例子: a <- 12 b <- 45 print(a b) 以上代码执行结果:57 这个赋值符号是 R …...
知识图谱Neo4j安装到实践全过程
前言: Hello大家好,我是Dream。 在本次实战中,我们将一起完成知识图谱Neo4j安装到实践全过程,探索其中的关系和属性。知识图谱是一种以三元组形式存储的数据结构,由实体、关系和属性组成,能够帮助我们更好地…...
贪心算法:简单而高效的优化策略
在计算机科学中,贪心算法是一种简单而高效的优化策略,用于解决许多组合优化问题。虽然它并不适用于所有问题,但在一些特定情况下,贪心算法能够产生近似最优解,而且计算成本较低。在本文中,我们将深入探讨贪…...
一生一芯6——ubuntu rpm软件安装
ubuntu不支持rpm,需要将rpm软件安装包转成deb进行安装 安装alien sudo apt-get install alien格式转换 sudo alien xxx.rpm 在目录下会生成deb的安装包 软件安装 sudo dpkg -i xxx_amd64.deb 安装完成...
Python练习 函数取列表最小数
练习2:构造一个功能函数,可以解决如下问题: 要求如下: 1,任意输入一个列表,函数可以打印出列表中最小的那个数, 例:输入: 23,56,67,4,17,9 最小数是 :4 方法一: #内置函…...
五种重要的 AI 编程语言
推荐:使用 NSDT场景编辑器 助你快速搭建3D应用场景 简而言之:决定从哪种语言开始可能会令人生畏。 不用担心!本文将解释 AI 中使用的最流行编程语言背后的基础知识,并帮助您决定首先学习哪种语言。对于每种语言,我们将…...
【linux】2 make/Makefile和gitee
文章目录 一、Linux项目自动化构建工具-make/Makefile1.1 背景1.2 实例代码1.3 原理1.4 项目清理 二、linux下第一个小程序-进度条2.1 行缓冲区2.2 进度条 三、git以及gitee总结 ヾ(๑╹◡╹)ノ" 人总要为过去的懒惰而付出代价ヾ(๑╹◡╹)ノ" 一…...
db-gpt安装指南(docker版本)
1 下载源码 下载v0.3.5的源码,截止今天(20230823)建议安装这个“稳定”版本。 2 构建镜像 依照自己硬件环境,看看是否要调整一下启动参数。 bash docker/build_all_images.sh \ --base-image nvidia/cuda:11.7.1-devel-ubuntu…...
「Java」《深度解析Java Stream流的优雅数据处理》
《深度解析Java Stream流的优雅数据处理》 一、引言1.1 背景1.2 Stream流的意义 二、Stream流的基本概念2.1 什么是Stream流2.2 Stream与传统集合的对比 三、创建Stream流3.1 通过集合创建Stream3.2 使用Arrays和Stream.of创建Stream3.3 从文件和网络流创建Stream 四、 中间操作…...
【云驻共创】华为云之手把手教你搭建IoT物联网应用充电桩实时监控大屏
文章目录 前言1.什么是充电桩2.什么是IOT3.什么是端、边、云、应用协同4.什么是Astro轻应用 一、玩转lOT动态实时大屏(线下实际操作)1.Astro轻应用说明1.1 场景说明1.2 资费说明1.3 整体流程 2.操作步骤2.1 开通设备接入服务2.2 创建产品2.3 注册设备2.4…...
Hadoop分布式计算与资源调度:打开专业江湖的魔幻之门
文章目录 版权声明一 分布式计算概述1.1 分布式计算1.2 分布式(数据)计算模式1.3 小结 二 MapReduce概述2.1 分布式计算框架 - MapReduce2.2 MapReduce执行原理2.3 小结 三 YARN概述3.1 YARN & MapReduce3.2 资源调度3.3 程序的资源调度3.4 YARN的资…...
为什么叫源表?源表是如何四象限工作的?
为何称呼为源表? “源”为电压源和电流源,“表”为测量表; “源表”即指一种可作为四象限的电压源或电流源提供精确的电压或电流,同时可同步测量电流值或电压值的测量仪表。(恒流源时测电压,恒压源时测电…...
云原生周刊:Kubernetes v1.28 正式发布 | 2023.8.21
开源项目推荐 kurt 一个 Kubernetes 插件,可提供 Kubernetes 集群中重启内容的上下文信息。 Kubean Kubean 是一个基于 kubespray 的 Kubernetes 集群生命周期管理工具。 k8sgpt k8sgpt 是一款用简单的英语扫描 Kubernetes 集群、诊断和分流问题的工具。 它将…...
Git基础——基本的 Git本地操作
本文涵盖了你在使用Git的绝大多数时间里会用到的所有基础命令。学完之后,你应该能够配置并初始化Git仓库、开始或停止跟踪文件、暂存或者提交更改。我们也会讲授如何让Git忽略某些文件和文件模式,如何简单快速地撤销错误操作,如何浏览项目版本…...
PythonJS逆向解密——实现翻译软件+语音播报
前言 嗨喽,大家好呀~这里是爱看美女的茜茜呐 环境使用: python 3.8 pycharm 模块使用: requests --> pip install requests execjs --> pip install PyExecJS ttkbootstrap --> pip install ttkbootstrap pyttsx3 --> pip install pyttsx3 第三…...
南京网站房地产/国外搜索引擎入口
有些人说,我零基础,应该怎么学习?经过大半年的更新,大家细看里面的教程,基本都可以找到答案这里汇总了一份视频跟图文的教程,定期更新,所以大家收藏好学摄影,找的是合适的老师&#…...
网页小游戏修改器/安卓手机游戏优化器
原文:https://book.2cto.com/201304/19628.html如果有一个配置项暂时需要注释掉,那么可以加“#”注释掉这一行配置。例如:#pid logs/nginx.pid;转载于:https://www.cnblogs.com/huiy/p/8461961.html...
章丘做网站哪家强/seo需要掌握什么技能
基于electron的音视频播放器前言选择做一个音视频播放器桌面应用程序原因技术的选型已经实现了的功能音视频播放实现右键菜单实现总结效果图安装包下载:最后如果大家觉得我这个音视频播放器还可以的话,欢迎去我的github:前言 我是一个前端工…...
wordpress插件要求/爱站网站排名查询工具
为什么80%的码农都做不了架构师?>>> 编写一个程序,定义一个名为 button 的类,表示GUI中的一个可点击按钮。 为该类加入两个方法 add_handler() 和 remove_handler(),它们均要求一个函数名作为参数。 如果 click() 方法…...
内蒙古城乡建设和住房建设厅网站/网络营销个人感悟小结
创业,这是个苟活在不甘寂寞的技术人心中的词汇。一日,小白不甘苟活,喝了些白酒,抽了半盒烟,把所有的感觉有价值的思路拿捏到一起,想了一个响亮的名字迷迷糊糊的注册了域名。这,就是小白建站的开…...
wordpress移动端导航菜单/互联网推广的好处
今天想说的是不要让自己企业的信息化穿上“皇帝的新装”,从这几年的工作来看,以安全为例,安全对于大家来说越来越受到重视,从国家政策及舆论层面每日剧增,信息安全或者说网络安全没有绝对安全%100安全,企业…...