您的位置:首页 > 运维架构 > Linux

VmVare的centos虚拟主机琐碎

2016-05-03 10:19 661 查看
安利一篇我翻译的国外大牛的神经网络入门文章

克隆虚拟主机时候需要重新生成网卡的mac地址



启动完成需要修改/etc/udev/rule.d/70-presistent-net.rules将老的网卡(即被克隆之前的网卡)删除,并且需要将新的网卡名称改成老的网卡名称(看一下就知道了)

修改主机名称

修改文件/etc/sysconfig/network

修改虚拟机网络连接中的物理地址



新增硬盘后如何初始化并挂载

假设新增的硬盘为/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,增加如下内容:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息