【问题标题】:Install Nginx with Ansible to target machine which does not have an internet connection使用 Ansible 将 Nginx 安装到没有 Internet 连接的目标计算机
【发布时间】:2018-09-17 09:28:21
【问题描述】:

远程系统是 Ubuntu Server 16.04。它连接到 Intranet 环境,但没有 Internet 连接。如何将Nginx 安装到带有Ansible 的远程机器上?

【问题讨论】:

  • 如果目标机器没有网络连接,那么如何连接呢?
  • 下载我需要部署在中控机上的软件。网络环境为内网环境。

标签: linux nginx ansible


【解决方案1】:

如果两者之间有任何连接,请将nginx source file 上传到远程机器
本地机器,解压并执行:

./configure
make
sudo make install

需要使用Ansible 执行以下操作,但可能需要进一步的步骤:

- name: Upload nginx source file and unarchive
  unarchive:
    src: nginx-1.10.1.tar.gz
    dest: /tmp/nginx-1.10.1

- name: Build and install from source
  shell: ./configure && make && make install
  args:
    chdir: /tmp/nginx-1.10.1
  become: true

【讨论】:

    猜你喜欢
    • 2011-06-30
    • 2023-03-19
    • 2017-11-22
    • 1970-01-01
    • 1970-01-01
    • 2017-03-02
    • 2021-07-12
    • 1970-01-01
    • 2010-12-24
    相关资源
    最近更新 更多