部署nginx镜像
[root@localhost ~]
Using default tag: latest
latest: Pulling from library/centos
a1d0c7532777: Pull complete
Digest: sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177
Status: Downloaded newer image for centos:latest
docker.io/library/centos:latest
[root@localhost ~]
REPOSITORY TAG IMAGE ID CREATED SIZE
centos latest 5d0da3dc9764 2 months ago 231MB
创建容器后设置端口映射进入容器,再编译安装nginx
[root@localhost ~]
Unable to find image 'centos:8' locally
8: Pulling from library/centos
Digest: sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177
Status: Downloaded newer image for centos:8
[root@ff7ee0da84bc /]
[root@ff7ee0da84bc /]
[root@ff7ee0da84bc /]
[root@ff7ee0da84bc /]
将安装包传到contos里面去
[root@localhost ~]
[root@localhost src]
debug kernels nginx-1.20.1.tar.gz
[root@localhost src]
进去继续编译nginx
[root@ff7ee0da84bc /]
[root@ff7ee0da84bc src]
debug kernels nginx-1.20.1.tar.gz
[root@ff7ee0da84bc src]
[root@ff7ee0da84bc src]
[root@ff7ee0da84bc nginx-1.20.1]
auto CHANGES CHANGES.ru conf configure contrib html LICENSE man README src
[root@ff7ee0da84bc nginx-1.20.1]
--prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-debug \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_image_filter_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--http-log-path=/var/log/nginx/access.log \
--error-log-path=/var/log/nginx/error.log
[root@ff7ee0da84bc nginx-1.20.1]
[root@ff7ee0da84bc nginx-1.20.1]
[root@ff7ee0da84bc nginx-1.20.1]
[root@ff7ee0da84bc nginx-1.20.1]
[root@ff7ee0da84bc ~]
[root@ff7ee0da84bc ~]
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:80 0.0.0.0:*
部署mysql镜像
创建容器后设置端口映射进入容器,再编译安装mysql
[root@localhost ~]
创建系统用户mysql
[root@643b797dd993 /]
安装依赖环境
[root@643b797dd993 /]
将安装包传到contos里面去
[root@localhost ~]
[root@localhost src]
debug kernels nginx-1.20.1.tar.gz
[root@localhost src]
进去继续编译mysql
解压后创建软连接
[root@643b797dd993 src]
[root@643b797dd993 local]
bin games lib libexec sbin src
etc include lib64 mysql-5.7.35-linux-glibc2.12-x86_64.tar.gz share
[root@643b797dd993 local]
[root@643b797dd993 local]
'mysql' -> 'mysql-5.7.35-linux-glibc2.12-x86_64'
[root@643b797dd993 local]
bin games lib libexec mysql-5.7.35-linux-glibc2.12-x86_64 sbin src
etc include lib64 mysql mysql-5.7.35-linux-glibc2.12-x86_64.tar.gz share
添加环境变量
[root@643b797dd993 src]
[root@643b797dd993 src]
[root@643b797dd993 src]
export PATH=/usr/local/mysql