Nginx安装步骤
程序员文章站
2023-11-08 09:48:40
nginx 安装步骤
步骤
下载signing key:
终端中: wget https://nginx.org/keys/nginx_signing.key (此时下载到当...
nginx 安装步骤
步骤
下载signing key:
终端中: wget https://nginx.org/keys/nginx_signing.key (此时下载到当前页面) ls查看是否下载 当上一步完成之后:
终端中: sudo apt-key add nginx_signing.key( 下载的文件) 终端中: sudo vim /etc/apt/sources.list 进入之后在最底部粘贴如下代码:
deb https://nginx.org/packages/mainline/ubuntu/ xenial nginx
deb-src https://nginx.org/packages/mainline/ubuntu/ xenial nginx 上一步完成之后:
终端中: sudo apt update 完成之后, sudo apt install nginx进行安装 上一步完成之后: sudo nginx启动 地址栏输入:localhost, 出现welcome nginx即可