Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2385068
  • 博文数量: 328
  • 博客积分: 4302
  • 博客等级: 上校
  • 技术积分: 5486
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-01 11:14
个人简介

悲剧,绝对的悲剧,悲剧中的悲剧。

文章分类

全部博文(328)

文章存档

2017年(6)

2016年(18)

2015年(28)

2014年(73)

2013年(62)

2012年(58)

2011年(55)

2010年(28)

分类: 系统运维

2011-10-25 11:19:39

Zone的创建
创建Zone存放的目录,该目录的权限必须为700
mkdir /export/zone
chmod 700 /export/zone
mkdir /opt/sfw

使用zonecfg命令配置Zone
bash-2.05b# zonecfg -z zone
zone: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zone> create                              
zonecfg:zone> set zonepath = /export/zone
zonecfg:zone> set autoboot = true
zonecfg:zone> add inherit-pkg-dir       
          
zonecfg:zone:inherit-pkg-dir> set dir=/opt/sfw
zonecfg:zone:inherit-pkg-dir> end

zonecfg:zone> add net
zonecfg:zone:net> set physical = elxl0
zonecfg:zone:net> set address = 173.21.73.121
zonecfg:zone:net> end

zonecfg:zone> info
zonepath: /export/zone
autoboot: true
pool:
inherit-pkg-dir:
        dir: /lib
inherit-pkg-dir:
        dir: /platform
inherit-pkg-dir:
        dir: /sbin
inherit-pkg-dir:
        dir: /usr
inherit-pkg-dir:
        dir: /opt/sfw
net:
        address: 173.21.73.121
        physical: elxl0

zonecfg:zone> verify
zonecfg:zone> commit
zonecfg:zone> exit

inherit-pkg-dir 表示zone共享Global Zone的软件包,默认共享四个目录:/lib /platform /sbin /usr,zone对这四个目录的权限是read only。

安装配置完成的zone
bash-2.05b# zoneadm -z zone install
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying <2436> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <888> packages on the zone.
大约等待二十分钟左右
Initialized <888> packages on zone.                               
Zone is initialized.
Installation of these packages generated warnings:
The file contains a log of the zone installation.

bash-2.05b# zoneadm list -vc
  ID NAME             STATUS         PATH                         
   0 global           running        /                            
   - zone             installed      /export/zone                 
Zone已经安装完成。

启动zone
zoneadm -z zone boot

登陆zone console进行配置,配置跟solaris安装时一样,需要配置地区、时区、主机名、root密码等。
# zlogin -C zone

关闭zone
zoneadm -z zone halt

转载自:http://huasheng.itpub.net/post/1210/11437
更多信息:
阅读(2088) | 评论(0) | 转发(0) |
0

上一篇:zoneadm 命令

下一篇:crontab 定时

给主人留下些什么吧!~~