# nomad-install **Repository Path**: airtrioa/nomad-install ## Basic Information - **Project Name**: nomad-install - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-24 - **Last Updated**: 2025-07-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # nomad-install 1. 获取 nomad 二进制文件 ```shell mv nomad /usr/local/bin/ chmod -R 755 nomad nomad version ``` 2. 创建配置文件(docker仓库认证需要提前生成:) ```shell mkdir --parents /etc/nomad.d chmod 700 /etc/nomad.d ``` _**Server 设置以下格式**_ ```shell vi /etc/nomad.d/agent.hcl data_dir = "/opt/nomad" server { enabled = true bootstrap_expect = 1 } # 如果Server 上不进行部署,则去掉Client配置 client { enabled = true } plugin "docker" { config { auth { config = "/etc/docker/config.json" } } } ``` **_Client 设置以下格式_** ```shell data_dir = "/opt/nomad" client { enabled = true # 注意,这边需要设置下 Server 地址 servers = ["192.168.208.16:4647"] } plugin docker{ config { gc{ image =false container = true } volumes{ enabled = true } allow_privileged = true auth { config = "/etc/docker/config.json" } } } ``` 3. 启动 nomad ```shell nohup /usr/local/bin/nomad agent -config=/etc/nomad.d/agent.hcl > /usr/local/bin/nomad.log & 2>&1 ``` 4. 查看 nomad 的UI(Server的地址) ```shell http://192.168.208.16:4646 ```shell