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


第一步:esxi系統的安裝

  鏡像啟動: 

      回車繼續:

     

      F11 同意  繼續:

    

 

      選擇你的存儲:

    

    選擇鍵盤,默認美式

    

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

    

    F11  開始安裝

    

    安裝完成之后重啟

    重啟之后,按F2開始配置:

    

    系統配置信息:

    

    安裝完成后的一些配置:

    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

  

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM