081Q: 在sun的机器上能否不接键盘和鼠标
但当我把鼠标和键盘拿下来的时候,系统会死掉,然后重新启动还是不行,只有在有键盘鼠标的情况下才能正常启动,这里有什么窍门吗?
A:
Change "/etc/default/kbd"
# abort sequences:
KEYBOARD_ABORT=disable
这个好像是禁止STOP+A的
SUN的机器有/etc/default/kdmconfig吗
估计得修改OK变量,忘了哪个了,把本地输出禁止掉。
082Q: 在/home 下mkdir不能用
cd /home
mkdir abd
提示信息为:
mkdir: Failed to make directory "ccx"; Operation not applicable
大家看看是怎么会事?用户为root,在其它目示里面没有问题,只是在/home里面不行
A:
/home 已被automount用了,所以不能在这里建目录,如果非要使用/home,把/etc/auto_master文件的
/home auto_home 这一行注释掉。
083Q: 安装ORACLE环境是否设置正确
A:
这两个我都设了
/etc/system下
set shmsys:shminfo_shmmax=268435456
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set semsys:seminfo_semmns=200
set semsys:seminfo_semmni=70
oracle下的.profile
ORACLE_HOME=/usr/local/u01/oracle/app
ORACLE_BASE=/usr/local/u01/oracle
ORACLE_SID=ora1
LD_LIBRARY_PATH=/usr/local/u01/oarcle/app/lib:/usr/lib
DISPLAY=192.168.1.156:0.0
PATH=/usr/local/u01/oracle/app/bin:/usr/bin
umask 022
然后把以上东东都export
084Q: 如何修改syslog.conf文件,使每天产生一个新的messages?
我想修改syslog.conf文件,使系统产生的消息写到不同文件名的messages中,我按下列修改,但不成功:
*.err;kern.debug;daemon.notice /var/adm/messages.`date +"%y%m%d"`
请教错在哪里? 有其他什么办法?
A:
跑一个CRON JOB, 每天定时
# mv /var/adm/messages /var/adm/messages.`date +"%y%m%d"`
# touch /var/adm/messges
第二步可能都不用,系统应当自动产生
085Q: /usr满了,新增了一块硬盘接下来怎么办?
原来的系统中/usr与 / 在同一个硬盘分区上,由于安装了许多软件,此分区已满 ,现在系统增加了硬盘,如何将/usr 目录挪到新的硬盘上?
A:
1.在新的硬盘上将文件系统建好,
2.mv /usr /usr.bak
3.mkdir /usr
4.mount newdriverpath /usr
5.cp -r /usr.bak /usr
6.修改/etc/vfstab 文件.
086Q: 如何改变文件系统的大小?
现在的机器情况如下:
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t1d0s6 6050182 5296231 693450 89% /data
/dev/dsk/c0t0d0s7 192807 9 173518 1% /export/home
/dev/dsk/c0t1d0s5 6050182 5640570 349111 95% /program
……
因项目安装需求,想增加/program的空间,如何操作?
A:
一种最安全的办法是增加一个硬盘,先做backup /program然后再把它mount到另一个硬盘上!!!
另一种就是从c0t1d0s6里挤出一部分空间先要做backup /data和/program
还有一种办法就是从c0t0d0s7里挤出空间。
在比较大的空间系统中用mkfsck /dev/rdsk/c0txdx
tar -cvf backup.tar /program
umount /program
mount /dev/dsk/c0txdx /program
tar xvf backup.tar
呵呵,做link算了,这个办法是不能真正增加文件系统大小的。
是把文件存在其他文件系统上,然后在/program上用ln命令做链接。这样用户在访问文件时,可以从/program/linkfile访问。
087Q: 如何增加空间大小
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0d0s0 72719 65449 0 100% /
/dev/dsk/c0d0s6 951030 353612 540357 40% /usr
/dev/dsk/c0d0p0:boot 10484 1623 8861 16% /boot
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c0d0s3 64135 7329 50393 13% /var
swap 380404 0 380404 0% /var/run
swap 380696 292 380404 1% /tmp
/dev/dsk/c0d0s5 53535 1222 46960 3% /opt
/dev/dsk/c0d0s1 592438 250108 283087 47% /usr/openwin
#
以上是我的机器的空间使用情况。我要pkgadd,结果发现空间不够了。请问怎么增加。我看了以前的一些方法。 有这样的一个方法,请帮我解释一下,怎么做第一点,第三点里面metainit的参数,还有具体怎么改vfstab。谢谢。
通过创建一个串联来扩大文件系统
1。首先从一个比较大的分区中划分出一部分空间出来,这个比较简单,就不多说了
2。卸载要扩大的文件系统 比如/docs (c0t1d0s2)
3.将划分出来的新分区(c0t2d0s7)和 c0t1d0s2串联起来
#metainit d24 2 1 c0t1d0s2 1 c0t2dos7
注意先后顺序非常重要
4。然后编辑vfstab
A:
你干吗不用图形界面直接做呢??
088Q: SOLARIS 分区分错了,不重装还有其他什么办法吗?
A:
可以在线扩展,可是非常复杂!
你要有其他没用的硬盘,然后通过disksuite的在线扩展文件系统的功能来完成.
Expanding a File System on the Fly By Joseph Gan
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use.
However, not all UNIX file systems (UFS) can be expanded this way. The concatenation is good only for small random I/O and for even I/O distribution. On the other hand, striping is advantageous for large sequential I/O and for uneven I/O distribution, because striping will increase performance by accessing data in parallel.
Note: If you wish to expand a file system to be a single striped metadevice, you can't do it on the fly. You have to dismount the file system, then copy or "move" over to a new partition.
How to Expand a File System With a Single Stripe, On the Fly
First, the file system has to be created and mounted as a one-way mirror metadevice; as in this example, with d80 mounted by /opt:
# metastat d80
d80: Mirror
Submirror 0: d81
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 10261520 blocks
d81: Submirror of d80
State: Okay
Size: 10261520 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase State Hot Spare
c1t12d0s0 0 No Okay
c1t13d0s0 1520 No Okay
c1t14d0s0 1520 No Okay
c1t15d0s0 1520 No Okay
Next, use the metattach command to dynamically concatenate a new slice, /dev/dsk/c0t1d0s1, to the end of the existing submirror of d80, d81:
# metattach d81 c0t1d0s1
# metastat d80
d80: Mirror
Submirror 0: d81
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 10261520 blocks
d81: Submirror of d80
State: Okay
Size: 10261520 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase State Hot Spare
c1t12d0s0 0 No Okay
c1t13d0s0 1520 No Okay
c1t14d0s0 1520 No Okay
c1t15d0s0 1520 No Okay
Stripe 1:
Device Start Block Dbase State Hot Spare
c0t1d0s1 0 No Okay
Then, use the growfs command to expand the mounted file system ( /opt) onto the raw metadevice /dev/md/rdsk/d80:
# growfs -M /opt /dev/md/rdsk/d80
/dev/md/rdsk/d80: 12336320 sectors in 8116 cylinders of 19 tracks,
80 sectors
6023.6MB in 129 cyl groups (63 c/g, 46.76MB/g, 5888 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 95872, 191712, 287552, 383392, 479232, 575072, 670912, 766752, 862592,
958432, 1054272, 1150112, 1245952, 1341792, 1437632, 1533472, 1629312,
1725152, 1820992, 1916832, 2012672, 2108512, 2204352, 2300192, 2396032,
2491872, 2587712, 2683552, 2779392, 2875232, 2971072, 3064352, 3160192,
3256032, 3351872, 3447712, 3543552, 3639392, 3735232, 3831072, 3926912,
4022752, 4118592, 4214432, 4310272, 4406112, 4501952, 4597792, 4693632,
4789472, 4885312, 4981152, 5076992, 5172832, 5268672, 5364512, 5460352,
5556192, 5652032, 5747872, 5843712, 5939552, 6035392, 6128672, 6224512,
6320352, 6416192, 6512032, 6607872, 6703712, 6799552, 6895392, 6991232,
7087072, 7182912, 7278752, 7374592, 7470432, 7566272, 7662112, 7757952,
7853792, 7949632, 8045472, 8141312, 8237152, 8332992, 8428832, 8524672,
8620512, 8716352, 8812192, 8908032, 9003872, 9099712, 9192992, 9288832,
9384672, 9480512, 9576352, 9672192, 9768032, 9863872, 9959712, 10055552,
10151392, 10247232, 10343072, 10438912, 10534752, 10630592, 10726432,
10822272, 10918112, 11013952, 11109792, 11205632, 11301472, 11397312,
11493152, 11588992, 11684832, 11780672, 11876512, 11972352, 12068192,
12164032, 12257312,
Now the file system (/opt) has been expanded dynamically, but it contains two stripes: stripe 0, which is the original one, and stripe 1, which is the expanded one.
The next step is to create a single stripe metadevice d82, which is the same size as the submirror d81.
In the following example, we create a stripe with three 2.1-Gbyte disks:
# metainit d82 1 3 c0t11d0s2 c0t12d0s2 c0t13d0s2
d82: Concat/Stripe is setup
# metastat d82
d82: Concat/Stripe
Size: 12457920 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase
c0t11d0s2 0 No
c0t12d0s2 1520 No
c0t13d0s2 1520 No
Then, add the metadevice d82 as the second submirror to d80, and resync will automatically take place:
# metattach d80 d82
d80: submirror d82 is attached
# metastat d80
d80: Mirror
Submirror 0: d81
State: Okay
Submirror 1: d82
State: Resyncing
Resync in progress: 20 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 12336320 blocks
......
After the resync is complete, we have the following two-way mirrors:
# metastat d80
d80: Mirror
Submirror 0: d81
State: Okay
Submirror 1: d82
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 12336320 blocks
d81: Submirror of d80
State: Okay
Size: 12336320 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase State Hot Spare
c1t12d0s0 0 No Okay
c1t13d0s0 1520 No Okay
c1t14d0s0 1520 No Okay
c1t15d0s0 1520 No Okay
Stripe 1:
Device Start Block Dbase State Hot Spare
c0t1d0s1 0 No Okay
d82: Submirror of d80
State: Okay
Size: 12336320 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase State Hot Spare
c0t11d0s2 0 No Okay
c0t12d0s2 1520 No Okay
c0t13d0s2 1520 No Okay
Finally, you can detach the submirror d81 from d80, and remove it completely:
# metadetach d80 d81
# metaclear d81
# metastat d80
d80: Mirror
Submirror 1: d82
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 12336320 blocks
d82: Submirror of d80
State: Okay
Size: 12336320 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase State Hot Spare
c0t11d0s2 0 No Okay
c0t12d0s2 1520 No Okay
c0t13d0s2 1520 No Okay
Now, you have dynamically expanded the file system (/opt) with a single stripe metadevice.
--------------------------------------------------------------------------------
Please note: This procedure must be done during a quiet period, or the file system must be locked, in order to avoid possible changes to the file system during the sync. You can use the fuser -u command to check that no one is using the file system. If users are logged on overnight in their logging directory, the system admin could write-lock the file system if it is possible. In that case, users can still read files in the directory. As long as no one creates files during the sync, everything will be fine.
089Q: solaris的抓图工具?
我需要编写在solaris安装sybase的说明书,最后能把安装界面图形放在说明书上,但是,如何才能像windows print screen一样copysolaris的图形界面呢? 有什么工具吗?
A:
Solaris自带呀!右键里面就有。
一个很笨的办法
你有X-manager吗? 在你的windows平台上就有办法了!
090Q: md5.txt文件有甚麼作用?
我下載了多個文件?也從來沒用到過這個文件嘛。
A:
md5拿来做校验的,因为下载大文件容易出错。 下载完后在本地做一次md5,把结果跟服务器上公布的md5比较一下,如果相同,就表示下载的文件正确,没有误码。
对于压缩文件,因为压缩时已经保存了校验信息,如果下载有误码,将无法解压。所以,压缩文件可以不必做md5。
win下可以用WinMD5.exe或者是md5sum.exe或md5.exe,自己下一个就好了
我常在FreeBSD下做,一个命令就ok: md5 filename