VmVare的centos虛擬主機瑣碎

安利一篇我翻譯的國外大牛的神經網絡入門文章

克隆虛擬主機時候需要重新生成網卡的mac地址

點擊"生成"重新生成mac地址"
啓動完成需要修改/etc/udev/rule.d/70-presistent-net.rules將老的網卡(即被克隆之前的網卡)刪除,並且需要將新的網卡名稱改成老的網卡名稱(看一下就知道了)

修改主機名稱

修改文件/etc/sysconfig/network

修改虛擬機網絡連接中的物理地址

修改mac地址爲前面新生成的mac地址

新增硬盤後如何初始化並掛載

假設新增的硬盤爲/dev/sdb
則開機後root執行下面的命令

[root@centos66-2 liujinliu]# fdisk /dev/sdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): n  ----選擇新建分區
Command action
   e   extended
   p   primary partition (1-4)
p ---選擇新建主分區

分區建好後需要格式化並掛載

mkfs.ext4 /dev/sdb1
mkdir /srv/docker_reg_disk
mount /dev/sdb1 /srv/docker_reg_disk

爲了讓開機時自動掛載需要修改文件/etc/fstab,增加如下內容:
這裏寫圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章