Feltételezzük, hogy a VMWare (ESXi) szerverben felvettünk egy új gépet, minimum javasolt rendszer:
- 1CPU
- 2GB RAM
- 50GB HDD
- Ethernet
Töltsük le a megfelelő netinstall telepítőt valamely mirrorról, (javasolt a 64bites!) pl:
- http://hammurabi.acc.umu.se/debian-cd/6.0.1a/amd64/iso-cd/debian-6.0.1a-amd64-netinst.iso
- http://cdimage.debian.org/debian-cd/6.0.1a/i386/iso-cd/debian-6.0.1a-i386-netinst.iso
Nyelvezet, hostname, domainname, particionálás, ethernet (IP címek), felhasználó / jelszavak, stb után javasolt a minimális telepítést választani, s majd később a szükséges csomagokat telepíteni, hogy a rengeteg alapértelmezett program ne foglalja gépünket. Telepítendő csomagok:
- SSH Server
- Standard system utilities
A többi kérdésre ki-ki a maga módján válaszoljon, s indítsuk útjára (újra) a gépet amikor végeztünk.
Még VMWare (ESXi) consol ablakban jelentkezzünk be root-al, az első teendőnk, mielött bejelentkezünk ssh-val (vagy putty-al):
Állítgatunk az SSH server-en, kikapcsoljuk a root login lehetőségét, meghatározzuk (a már telepítéskor felvett) saját felhasználónkat, mint engedélyezett SSH login-t, átállíthatjuk a port-ot alapértelmezett (22) ről egyedire (pl: 22334), a user home mappában levő sshprivát-publikus kulcspárt lehetővé tesszük, illetve mindenki a maga szükségének megfelelően állítson/szigorítson, amit szeretne:
# Package generated configuration file # See the sshd_config(5) manpage for details # What ports, IPs and protocols we listen for Port 22334 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key #Privilege Separation is turned on for security UsePrivilegeSeparation yes # Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 768 # Logging SyslogFacility AUTH LogLevel INFO # Authentication: LoginGraceTime 120 PermitRootLogin no StrictModes yes AllowUsers ittanevem RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile %h/.ssh/authorized_keys
Ha ezekkel megvagyunk, indítsuk újra az SSH szolgáltatást:
/etc/init.d/ssh restart
Nézzük meg, hogy hiba nélkül elindult-e, s ha igen, akkor próbálkozzunk a saját gépünkről ssh / putty -val belépni. Figyeljünk a megfelelő port számra, amit az előzőekben megadtunk! Itt már csak a saját felhasználónkkal sikerülhet loginolni! Utána az egyszerűbb munkavégzés miatt lépjünk su-val root-ba, majd futtassunk pár telepítőt:
apt-get install mc sudo vim-nox ntp ntpdate rkhunter binutils gcc make linux-headers-$(uname -r)
Ezután mountoljuk a vmware-tools lemezt (amit előbb a vSphere, vagy VMware consol-ban betöltöttünk), majd indítsuk a telepítőt:
mount /media/cdrom cd tar -xzf /media/cdrom/VMwareTools-8.3.2-257589.tar.gz /root/vmware-tools-distrib/vmware-install.pl
Kövessük végig a telepítés folyamatát (hagyhatunk mindent alapértelmezetten) Enter -ekkel
Creating a new VMware Tools installer database using the tar4 format. Installing VMware Tools. In which directory do you want to install the binary files? [/usr/bin] What is the directory that contains the init directories (rc0.d/ to rc6.d/)? [/etc] What is the directory that contains the init scripts? [/etc/init.d] In which directory do you want to install the daemon files? [/usr/sbin] In which directory do you want to install the library files? [/usr/lib/vmware-tools] The path "/usr/lib/vmware-tools" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] In which directory do you want to install the documentation files? [/usr/share/doc/vmware-tools] The path "/usr/share/doc/vmware-tools" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] The installation of VMware Tools 8.3.2 build-257589 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl". Before running VMware Tools for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want this program to invoke the command for you now? [yes] Initializing... . . . You can now run VMware Tools by invoking the following command: "/usr/bin/vmware-toolbox" during an X server session. To enable advanced X features (e.g., guest resolution fit, drag and drop, and file and text copy/paste), you will need to do one (or more) of the following: 1. Manually start /usr/bin/vmware-user 2. Log out and log back into your desktop session; and, 3. Restart your X session. Enjoy, --the VMware team Found VMware Tools CDROM mounted at /media/cdrom0. Ejecting device /dev/sr0 ...
Ezzel kész is vagyunk.
Hozzászólások