■vyOS1.0.4をvmplayer、ESXiの仮想マシンに導入する。
ESXi5.5はデータストアにアップロードして使う。
仮想マシンはどちらもデフォルト、「Debian 6 64bit」
$ wget http://mirror.vyos.net/iso/release/1.0.4/vyos-1.0.4-amd64.iso
■ログインとインストール
ウイザードはデフォルトのまま進める。
「Yes」と入れるべき箇所は読めば分かる。
vyos login: vyos
Password: vyos
vyos@vyos:~$ install image
...
vyos@vyos:~$ reboot
■SSHのための最小限の設定
IP、GW、SSHサービス。
「UseDNS no」が不要な環境なら、「disable-host-validation」も不要。
vyos login: vyos
Password:
vyos@vyos:~$ configure
vyos@vyos# set interfaces ethernet eth0 address 192.168.152.222/24
vyos@vyos# set system gatewa-address 192.168.152.2
vyos@vyos# set service ssh listen-address 192.168.152.222
vyos@vyos# set service ssh port 22
vyos@vyos# set systece ssh disable-host-validation
vyos@vyos# commit
vyos@vyos# save
■ホスト名の設定
$ ssh vyos@192.168.152.222
$ configure
■DNS、NTPサービスの設定
ドメイン名の設定の有無はどちらでも。
■ログインユーザの設定
※toorのjoeパスワードの場合
■作成したユーザでSSH再ログイン
$ ssh toor@192.168.152.222
$ configure
■Debianとしてのrootユーザのパスワード設定と、rootログイン
$ sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
$ su
Password:
■DebianのAPTプロキシの設定
Acquire::http::Proxy "http://192.168.152.1:3128/";
APT::Periodic::Update-Package-Lists 1;
■FDやサウンドカード等、不要なデバイスは仮想マシンを電源OFFし削除する。
6.0.9
Linux vyrouter 3.3.8-1-amd64-vyatta
[ 11.945895] end_request: I/O error, dev fd0, sector 0
[ 11.975904] end_request: I/O error, dev fd0, sector 0
[ 11.996035] end_request: I/O error, dev fd0, sector 0
[ 12.025984] end_request: I/O error, dev fd0, sector 0
[ 13.054314] end_request: I/O error, dev fd0, sector 0
exit
$ poweroff
Proceed with poweroff? (Yes/No) [No] Yes
■GUI無しで仮想マシンを起動する。
ESXiなら起動ボタンで起動、
vmplayerならVMware VIXを使ったvmrunコマンド。
$ vmrun -T player start vmware/vyOS/vyOS.vmx nogui
■APTのアップデートは毎日自動で行われる。
$ configure
auto-sync 1
Possible completions:
<0-4294967295>
Update the the repository cache every n days (0 disables auto-update)
1
■ネットワークのステータス等、Vyatta風コマンドが使える。
$ show interfaces ethernet eth0 brief
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address S/L Description
--------- ---------- --- -----------
eth0 192.168.152.222/24 u/u
■設定の確認
$ configure
config-management {
commit-revisions 20
}
console {
device ttyS0 {
speed 9600
}
}
domain-name localdomain
gateway-address 192.168.152.2
host-name vyrouter
login {
user toor {
authentication {
encrypted-password $6$6GWFgJYAct9$mUluqyzekhaIcifgsrQ9y5b5iPRy5bKO6rq3wEaG5ouenvRFOvGvt4WrIYkyqFT3c/2kxWBxDBfCSTgVDjh2P/
plaintext-password ""
}
level admin
}
user vyos {
authentication {
encrypted-password $1$BN4LE240$jaDQRrr/davBjTL7Ab5.W1
}
level admin
}
}
name-server 192.168.152.2
ntp {
server 192.168.152.1 {
}
}
package {
auto-sync 1
repository community {
components main
distribution hydrogen
password ""
url http://packages.vyos.net/vyos
username ""
}
}
syslog {
global {
facility all {
level notice
}
package {
auto-sync 1
repository community {
components main
distribution hydrogen
password ""
url http://packages.vyos.net/vyos
username ""
}
}
syslog {
global {
facility all {
level notice
}
facility protocols {
level debug
}
}
}
time-zone Asia/Tokyo