LoginSignup
1
0

More than 5 years have passed since last update.

VIRLをProxy環境、ローカルNTPサーバを使う場合の設定

Last updated at Posted at 2017-04-18

[前提]
・VILRサーバから見たProxyサーバのIPアドレスは192.168.1.254、proxyポートは3128とする
・VILRサーバから見たNTPサーバのIPアドレスは192.168.1.253とする

1. Proxy関連の環境設定

1.1. bashrcファイルの設定

$ sudo nano .bashrc
---最下位に追記---
export http_proxy=http://192.168.1.254:3128/
export https_proxy=https://192.168.1.254:3128/
export HTTP_PROXY=$http_proxy
export HTTPS_PROXY=$https_proxy

1.2. virlファイルの設定

・「proxy: True」と「http_proxy: http://192.168.1.254:3128/」を追記

$ sudo nano /etc/virl.ini
---
## Is your system behind a http proxy?
## Default
proxy: True

## Example
## proxy: True

## IF enabled above what is your web proxy?
## Default
http_proxy: http://192.168.1.254:3128/

1.3. aptコマンドの環境設定

$ sudo nano /etc/apt/apt.conf
---最下位に追記---
Acquire::http::proxy "http://192.168.1.254:3128/";

2. NTP関連の環境設定

2.1. NTPファイルの設定

・「server pool.ntp.org iburst」と表示されている行を削除、「server 192.168.1.253」を追記

$ sudo nano /etc/ntp.conf
---
server 192.168.1.253

2.2. virlファイルの設定

・「ntp_server: 192.168.1.253」を追記

$ sudo nano /etc/virl.ini
---
## If behind a firewall/proxy change this to an ntp server thats reachable from$
##
## Default
ntp_server: 192.168.1.253
## Example
## ntp_server: ntp.ubuntu.com

3. VIRLサーバ再起動

・上記設定をVIRLサーバ再起動にて反映させる

$ sudo shutdown -r now

4. (参考)非インターネット環境でVIRLを使う場合

・VIRLはアクティベーションの関係でインターネットアクセスが必須だが非インターネットアクセス環境でも一応は使える。
最低限、NTPサーバだけローカルで準備して設定、アクティベーション問題を回避する方法は以下コマンドを打つとよい。

$ sudo salt-call state.sls virl.hostname.init

(参考)
https://learningnetwork.cisco.com/thread/98908
http://community.dev-innovate.com/t/cannot-use-virl-without-internet-connection/3627/60

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0