ESXI6.0安裝以及操做(更改主機名,修改SSH端口)

第一步:esxi系統的安裝web

  鏡像啓動: shell

      回車繼續:less

     

      F11 贊成  繼續:ssh

    

 

      選擇你的存儲:tcp

    

    選擇鍵盤,默認美式ui

    

    設置登陸的root密碼,回車繼續:this

    

    F11  開始安裝spa

    

    安裝完成以後重啓3d

    重啓以後,按F2開始配置:rest

    

    系統配置信息:

    

    安裝完成後的一些配置:

    ssh shell修改主機名:

    esxcfg-advcfg -s HOSTNAME  /Misc/HostName

    

 

    修改SSH端口:    

 vi /etc/ssh/sshd_config 

    

    

cp /etc/services /vmfs/volumes/datastore1/

vi /vmfs/volumes/datastore1/services 

    修改此處以下:

    

    編寫防火牆策略

    

vi /vmfs/volumes/datastore1/ssh_62008.xml
  

內容入下:
  

<ConfigRoot>
<service>
<id>SSH 62008</id>
<rule id = '0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>62008</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
</ConfigRoot>

編寫腳本,以便重啓時防火牆生效

 vi /etc/rc.local.d/local.sh

#!/bin/sh # local configuration options # Note: modify at your own risk! If you do/use anything in this # script that is not part of a stable API (relying on files to be in # specific places, specific tools, specific output, etc) there is a # possibility you will end up with a broken system after patching or # upgrading. Changes are not supported unless under direction of # VMware support. #Copy the new firewall rule from vmfs place holder to file system cp /vmfs/volumes/datastore1/ssh_62008.xml /etc/vmware/firewall/ #refresh firewall rules esxcli network firewall refresh #Copy the modified services file from vmfs place holder to file system cp /vmfs/volumes/datastore1/services /etc/services #Restart inetd to get the changes kill -HUP `cat /var/run/inetd.pid` exit 0

 

  重啓SSH服務

/etc/init.d/SSH restart

  重啓系統,以便配置生效

  能夠經過web界面來管理ESXi的虛擬機

    https://IP/ui

相關文章
相關標籤/搜索