2011年12月21日 星期三
tsm client 備份2台server設定
需建立2個opt檔案,從dsm.opt copy 成 a.opt、b.opt,並分別編輯a.opt為test01、b.opt為test02
dsmsched.log、dsmerror.log也需複製2份
製作2個tsm gui捷徑到桌面上,在捷徑後面加入 -optfile=a.opt另一個加入 -optfile=b.opt即可
EX:"C:\Program Files\Tivoli\TSM\baclient\dsm.exe" -optfile=dsm01.opt
2011年12月4日 星期日
tsm server 撈月報表
2.整個報表程式都會丟在/ADSM/ADSMDBBK
3./ADSM/ADSMDBBK/adsm-report/log 這個底下有每個月底跑的報表的紀錄,如果要撈舊資料都來這邊
4.cat /ADSM/ADSMDBBK/adsm-report/mail.XXX.sh(報表mail格式)
/ADSM/ADSMDBBK/adsm-report/adsm-report.sh nodename email,這就是一般報表結構
5./ADSM/ADSMDBBK/adsm-report/adsm-report.sh nodename email 0~4
後面可以加參數:0代表本月,預設為1代表上個月,最多到4,可以撈四個月以前的資料,所
以如果要撈資料可以key/ADSM/ADSMDBBK/adsm-report/adsm-report.sh nodename email 0
linux系統一些常用的系統信息查看命令
# uname -a # 查看內核/操作系統/CPU信息
# head -n 1 /etc/issue # 查看操作系統版本
# cat /proc/cpuinfo # 查看CPU信息
# hostname # 查看計算機名
# lspci -tv # 列出所有PCI設備
# lsusb -tv # 列出所有USB設備
# lsmod # 列出加載的內核模塊
# env # 查看環境變量資源
# free -m # 查看內存使用量和交換區使用量
# df -h # 查看各分區使用情況
# du -sh <目錄名> # 查看指定目錄的大小
# grep MemTotal /proc/meminfo # 查看內存總量
# grep MemFree /proc/meminfo # 查看空閒內存量
# uptime # 查看系統運行時間、用戶數、負載
# cat /proc/loadavg # 查看系統負載磁盤和分區
# mount | column -t # 查看掛接的分區狀態
# fdisk -l # 查看所有分區
# swapon -s # 查看所有交換分區
# hdparm -i /dev/hda # 查看磁盤參數(僅適用於IDE設備)
# dmesg | grep IDE # 查看啟動時IDE設備檢測狀況網絡
# ifconfig # 查看所有網絡接口的屬性
# iptables -L # 查看防火牆設置
# route -n # 查看路由表
# netstat -lntp # 查看所有監聽端口
# netstat -antp # 查看所有已經建立的連接
# netstat -s # 查看網絡統計信息進程
# ps -ef # 查看所有進程
# top # 實時顯示進程狀態用戶
# w # 查看活動用戶
# id <用戶名> # 查看指定用戶信息
# last # 查看用戶登錄日誌
# cut -d: -f1 /etc/passwd # 查看系統所有用戶
# cut -d: -f1 /etc/group # 查看系統所有組
# crontab -l # 查看當前用戶的計劃任務服務
# chkconfig –list # 列出所有系統服務
# chkconfig –list | grep on # 列出所有啟動的系統服務程序
# rpm -qa # 查看所有安裝的軟件包
cat /proc/cpuinfo :查看CPU相關參數
cat /proc/partitions :查看硬盤和分區
cat /proc/meminfo :查看內存信息
cat /proc/version :查看版本,類似uname -r
cat /proc/ioports :查看設備io端口
cat /proc/interrupts :查看中斷
cat /proc/pci :查看pci設備的信息
cat /proc/swaps :查看所有swap分區的信息
轉自黑客基地
--------------------------------------------------------------------------------------------------------------------------
libz.so.1 : cannot open shared object file no such file or directory.
I did a search on libz.so.1
using
find / -name libz.so.1 找套件位置
it was found in lib64 directory.
/lib64/libz.so.1
yum install zlib.i686 解決方法
--------------------------------------------------------------------------------------------------------------------------
yum provides /lib/libtermcap.so.2 (找需要安裝套件)
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: ftp.nsysu.edu.tw
* extras: ftp.nsysu.edu.tw
* updates: centos.ustc.edu.cn
compat-libtermcap-2.0.8-49.el6.i686 (需要裝套件): A basic system library for accessing the
: termcap database
Repo : base
Matched from:
Filename : /lib/libtermcap.so.2
compat-libtermcap-2.0.8-49.el6.i686 : A basic system library for accessing the
: termcap database
Repo : installed
Matched from:
Other : Provides-match: /lib/libtermcap.so.2
---------------------------------------------------------------------------------------------------------------------------
[root@localhost /]# ll /lib64/libbz2.so.1
lrwxrwxrwx. 1 root root 15 Oct 26 01:05 /lib64/libbz2.so.1 -> libbz2.so.1.0.4
[root@localhost /]# rpm -qf !$
rpm -qf /lib64/libbz2.so.1
bzip2-libs-1.0.5-7.el6_0.x86_64
[root@localhost /]# rpm -qi bzip2-libs-1.0.5-7.el6_0.x86_64
Name : bzip2-libs Relocations: (not relocatable)
Version : 1.0.5 Vendor: CentOS
Release : 7.el6_0 Build Date: Sat 25 Jun 2011 09:45:55 AM CST
Install Date: Fri 26 Oct 2012 01:05:22 AM CST Build Host: c6b4.bsys.dev.centos.org
Group : System Environment/Libraries Source RPM: bzip2-1.0.5-7.el6_0.src.rpm
Size : 67592 License: BSD
Signature : RSA/8, Wed 06 Jul 2011 09:37:18 AM CST, Key ID 0946fca2c105b9de
Packager : CentOS BuildSystem <http://bugs.centos.org>
URL : http://www.bzip.org/
Summary : Libraries for applications using bzip2
Description :
Libraries for applications using the bzip2 compression format.
我們缺少的是32位元的版本,所以安裝
bzip2-libs-1.0.5-7.el6_0.i686
2011年11月9日 星期三
tsm client for ubuntu
errors in it.
I recently built up a linux box using Ubuntu and discovered that it's
not hard to set it up to use the TSM backup client. Assuming you have
a passing familiarity with setting up TSM on RPM-based distributions,
here are the basic steps:
1. Install the "alien" package which lets you (among other things)
install RPM packages on Ubuntu or other Debian-based distros.
$ sudo apt-get install alien
$ sudo apt-get install ksh alien
2. download the TSM client software from IBM using your web browser.
3. untar the TSM RPMs...
4. Use alien to install the appropriate RPMs.
$ sudo alien -i --scripts TIVsm-API.i386.rpm TIVsm-BA.i386.rpm
如果出現缺少libgsk8cms.so,請安裝TSM Client封裝檔內的
$ sudo alien -i --scripts gskcrypt32-8.0.13.3.linux.x86.rpm
$ sudo alien -i --scripts gskssl32-8.0.13.3.linux.x86.rpm
5. Set up the normal TSM configuration (dsm.opt, dsm.sys, inclexcl.dsm).
6. Run a manual backup.
$ sudo dsmc incremental
7. open port 1501 to the backup server in your firewall.
8. Ubuntu uses Upstart instead of inittabs. To add dsm to the
configuration, create a /etc/event.d/dsm-sched file containing:
----------------------- /etc/event.d/dsm-sched -----------------------
# dsm-sched
#
# This service starts the Tivoli Storage Manager "dsmc sched" backup
# process and respawns it as the scheduled backup happens or the
# dsmc process gets killed or dies.
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn
exec /usr/bin/dsmc sched >/dev/null 2>&1
----------------------- end /etc/event.d/dsm-sched ----------------------------
9. Start the dsmc sched process
$ sudo start dsm-sched
10. Check to see if the /var/log/dsmsched.log is correct.
$ tail /var/log/dsmsched.log
06/29/07 13:33:13 --- SCHEDULEREC QUERY END
06/29/07 13:33:13 Next operation scheduled:
06/29/07 13:33:13 ------------------------------------------------------------
06/29/07 13:33:13 Schedule Name: AM0230
06/29/07 13:33:13 Action: Incremental
06/29/07 13:33:13 Objects:
06/29/07 13:33:13 Options:
06/29/07 13:33:13 Server Window Start: 02:30:00 on 06/30/07
06/29/07 13:33:13 ------------------------------------------------------------
06/29/07 13:33:13 Waiting to be contacted by the server.
如果沒有inittab可以建立排程可以先把dsmc在背景執行:
root@hap:~# nohup /usr/bin/dsmc sched 2> /dev/null &
確認dsmc daemon有在執行
root@hap:~# ps -ef | grep dsmc
root 5084 4511 0 10:44 pts/1 00:00:00 /usr/bin/dsmc sched (執行)
root 5088 4511 0 10:44 pts/1 00:00:00 grep --color=auto dsmc
將這個指令寫在/etc/rc.local使其在開機時自動執行
root@hap:~# vi /etc/rc.local
在最後加入一行
nohup /usr/bin/dsmc sched 2> /dev/null &
reboot測試看看。
如果下ps -ef | grep dsmc跟上面一樣有出現
root 5084 4511 0 10:44 pts/1 00:00:00 /usr/bin/dsmc sched
就表示開機會自動執行了。
11. If you wish to use the dsmj GUI, you must also install a Java
runtime environment. There are several of these available, and JREs
are backwards compatible.
$ sudo apt-get install sun-java6-bin
Note that the dsmj seems to want to run with root permissions. To run it, use:
$ sudo dsmj
2011年10月23日 星期日
sendmail 無法啟動
[root@ mail]# service sendmail start
Starting sendmail: 451 4.0.0 /etc/mail/sendmail.cf: line 91: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 570: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
[FAILED]
解决办法:
经查实是与sendmail有关的文件权限设置有误,而非警告中提及的两个文件。
解决办法有两种:一为设置合理权限:
# chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
二为放松文件权限检查:替换/etc/mail/sendmail.cf 中第91行Fw/etc/mail/local-host-names为Fw-o /etc/mail/local-host-names第588行Ft/etc/mail/trusted-users为Ft-o /etc/mail/trusted-users替换/etc/mail/submit.cf中第545行Ft/etc/mail/trusted- users为Ft-o /etc/mail/trusted-users即可顺利启动
2011年8月15日 星期一
hosts.allow hosts.deny
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
ALL: 127.0.0.1, localhost, 192.168.0.1 , 10.0.,
sshd: 10.0.
httpd: ALL
ftp:ALL
hosts.deny
ALL:ALL
關閉遠端使用root帳號,並限制那些帳號才可以ssh
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin yes
PermitRootLogin no
AllowUsers 456@000.000.* root@localhost root@127.0.0.1 lance yalovepin oliwad 123@000.000.*
#StrictModes yes
#MaxAuthTries 6
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication mechanism.
# Depending on your PAM configuration, this may bypass the setting of
# PasswordAuthentication, PermitEmptyPasswords, and
# "PermitRootLogin without-password". If you just want the PAM account and
# session checks to run without PAM authentication, then enable this but set
# ChallengeResponseAuthentication=no
#UsePAM no
UsePAM yes
# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none
# no default banner path
#Banner /some/path
# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
linux 關閉ipv6
1. 停用 IPv6 網路支援
編輯 /etc/sysconfig/network 修改
NETWORKING_IPV6=yes
變更成
NETWORKING_IPV6=no
2. 停用 Kernel 中的 IPv6 通訊協定堆疊
編輯 /etc/modprobe.conf
增加下列兩行設定
alias net-pf-10 off
alias ipv6 off
3. 停用 IPv6 版的防火牆
先執行下列指令停止服務
[www@root ]$ /etc/init.d/ip6tables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading ip6tables modules: [ OK ]調整 IPv6 防火牆服務不要在開機自動啟動
[www@root ]$ chkconfig –level 35 ip6tables off
4. 檢查 localhost 名稱解析
編輯 /etc/hosts 若是 localhost 項目有 IPv6 格式的可以直接移除
::1 localhost.localdomain localhost
不過要確定下列 IPv4 格式的 localhost 項目存在,不然會造成問題
127.0.0.1 localhost.localdomain localhost
ubuntu 關閉ipv6
ipv6有開啟的狀態
$ip a | grep inet6
inet6 ::1/128 scope host
inet6 fe80::e61f:13ff:febc:c348/64 scope link
修改 sysctl.conf,即可關閉ipv6
vi /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1