[root@f1231f26f8f9 httpd-2.4.54]# ./configure --prefix=/usr/local/apache \> --enable-so \> --enable-ssl \> --enable-cgi \> --enable-rewrite \> --with-zlib \> --with-pcre \> --with-apr=/usr/local/apr \> --with-apr-util=/usr/local/apr-util/ \> --enable-modules=most \> --enable-mpms-shared=all \> --with-mpm=prefork
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking forgrep that handles long lines and -e... /usr/bin/grep
...
configure: summary of build options:
Server Version: 2.4.54
Install prefix: /usr/local/apache
C compiler: gcc
CFLAGS: -g -O2 -pthread
CPPFLAGS: -DLINUX -D_REENTRANT -D_GNU_SOURCE
LDFLAGS:
LIBS:
C preprocessor: gcc -E
[root@f1231f26f8f9 httpd-2.4.54]# make[root@f1231f26f8f9 httpd-2.4.54]# make installmkdir /usr/local/apache/build
Installing man pages and online manual
mkdir /usr/local/apache/man
mkdir /usr/local/apache/man/man1
mkdir /usr/local/apache/man/man8
mkdir /usr/local/apache/manual
make[1]: Leaving directory '/usr/src/bao/httpd-2.4.54'[root@f1231f26f8f9 httpd-2.4.54]# ./
编写启动脚本
//配置环境变量
[root@f1231f26f8f9 httpd-2.4.54]# cd[root@f1231f26f8f9 ~]# echo 'export PATH=/usr/local/apache/bin:$PATH' > /etc/profile.d/apache.sh[root@f1231f26f8f9 ~]# source /etc/profile.d/apache.sh
//映射头文件
[root@f1231f26f8f9 ~]# ln -s /usr/local/apache/include/ /usr/include/apache
//去除提示信息
[root@f1231f26f8f9 ~]# vi /usr/local/apache/conf/httpd.conf
ServerName www.example.com:80 //将此行取消注释
//启动服务查看状态
[root@f1231f26f8f9 ~]# httpd[root@f1231f26f8f9 ~]# ss -anlt
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 01280.0.0.0:80 0.0.0.0:*
[root@f1231f26f8f9 ~]#
访问一下
上传镜像
[root@localhost ~]# [root@localhost ~]# docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: nuanchun
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
[root@localhost ~]# [root@localhost ~]# docker push nuanchun/httpd:v0.2
Using default tag: latest
The push refers to repository [docker.io/nuanchun/httpdv0.2]
4ffcd1306186: Pushed
74ddd0ec08fa: Mounted from library/centos
latest: digest: sha256:641eb6cfa98a8bdc36e8c9296390b284dc3461f458034216c56167fa2dfe606c size: 742[root@localhost ~]#