当前位置: 移动技术网 > IT编程>开发语言>PHP > [视频教程] 如何在docker环境下的纯净ubuntu系统中安装最新版nginx

[视频教程] 如何在docker环境下的纯净ubuntu系统中安装最新版nginx

2019年09月26日  | 移动技术网IT编程  | 我要评论

李斐莉雪,珍幼阁论坛,大明龙权私服

视频地址:

笔记:

1.拉取ubuntu镜像并运行

docker pull ubuntu
docker run -it ubuntu bash

2.先添加阿里云的源,编辑文件/etc/apt/sources.list

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse


apt-get update


3.添加nginx的源并安装
apt-get install curl gnupg2 ca-certificates lsb-release
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | tee /etc/apt/sources.list.d/nginx.list
curl -fssl https://nginx.org/keys/nginx_signing.key | apt-key add -
apt-key fingerprint abf5bd827bd9bf62
apt-get update
apt-get install nginx

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网