インストール時に、適当に設定されるので人によって違う
[/Library/Preferences/VMware Fusion/vmnet8]$ cat dhcpd.conf
(中略)
subnet 172.16.26.0 netmask 255.255.255.0 {
range 172.16.26.128 172.16.26.254;
option broadcast-address 172.16.26.255;
option domain-name-servers 172.16.26.2;
option domain-name localdomain;
default-lease-time 1800; # default is 30 minutes
max-lease-time 7200; # default is 2 hours
option routers 172.16.26.2;
}
host vmnet8 {
hardware ethernet 00:50:56:C0:00:08;
fixed-address 172.16.26.1;
option domain-name-servers 0.0.0.0;
option domain-name "";
option routers 0.0.0.0;
}
私の場合は、
Network | 172.16.26.0 / 255.255.255.0 |
DHCP割り付け | 172.16.26.128 〜 172.16.26.254 |
Gateway | 172.16.26.2 |
DNS | 172.16.26.2 |
ホスト(Mac) | 172.16.26.1 |
固定IPのサーバをつくる場合には、IP アドレスは 172.16.26.3 〜 172.16.26.127 にすればよい
# yum -y install system-config*
$ su # cd /tmp # tar -xf /media/VMware\ Tools/VMwareTools-8.4.7-416484.tar.gz # cd vmware-tools-distrib/ # ./vmware-install.pl # /usr/bin/vmware-user # shutdown -r now
# usermod -G wheel kagyuu # visudo 95 root ALL=(ALL) ALL 96 97 ## Allows members of the 'sys' group to run networking, software, 98 ## service management apps and more. 99 # %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCES SES, LOCATE, DRIVERS 100 101 ## Allows people in group wheel to run all commands 102 %wheel ALL=(ALL) ALL 103 104 ## Same thing without a password 105 # %wheel ALL=(ALL) NOPASSWD: ALL 106 107 ## Allows members of the users group to mount and unmount the 108 ## cdrom as root 109 # %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
$ cat /etc/hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost 172.16.26.100 app.example.com
[atsushi@app ~]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/atsushi/.ssh/id_rsa): Created directory '/home/atsushi/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/atsushi/.ssh/id_rsa. Your public key has been saved in /home/atsushi/.ssh/id_rsa.pub. The key fingerprint is: 23:c2:50:ac:3f:f4:58:b4:8d:7b:7f:95:4c:c9:70:f7 atsushi@app.example.com The key's randomart image is: +--[ RSA 2048]----+ | .. | | .. . . . .| | .. . + + o.| | .o. + . + E| | oo+..S o . | | +.o... + | | . . . . | | . . | | . | +-----------------+
[atsushi@app ~]$ cd .ssh/ [atsushi@app .ssh]$ ls id_rsa id_rsa.pub [atsushi@app .ssh]$ cat id_rsa.pub >> authorized_keys [atsushi@app .ssh]$ cd .. [atsushi@app ~]$ chmod -R 755 .ssh
$ chmod 600 ~/.ssh/app.example.com $ ssh-add ~/.ssh/app.example.com Enter passphrase for /Users/atsushi/.ssh/app.example.com: Identity added: /Users/atsushi/.ssh/app.example.com (/Users/atsushi/.ssh/app.example.com)
$ ssh -Y atsushi@app.example.comでログインできる