Posts

Showing posts from April, 2012

VMware change IP

Modify /etc/hosts (ip) Modify /etc/sysconfig/network (IP & gateway Modify /etc/sysconfig/network-scripts/ifcfg-vswif[number]. By default, it should be 0 Or you can change it on fly: ifconfig ifcfg-vswif0 inet netmask broadcast up Useful tips (http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1000266): To delete and recreate a virtual switch and Service Console from the command line: Note: On your system the vswif, vmnic, vSwitch numbers and network settings are different. 1. Run the following command to list the name of the vswif adapter: # esxcfg-vswif -l 2. Run the following command to delete the vswif adapter: # esxcfg-vswif --del vswif0 3. Run the following command to list the name of the vSwitch: # esxcfg-vswitch -l 4. Run the following command to delete the vSwitch: # esxcfg-vswitch -d vSwitch0 5. Run the following command to create the vSwitch: # esxcfg-vswitch -a vSwitch0 6. Run the following commands to create de

ftp MLSD Connection timed out

Here is the error message: Command: MLSD Error: Connection timed out Error: Failed to retrieve directory listing Check the firewall. It happens to me that I have to open inbound and outbound traffic. Disable the firewall first and try if it works.

Linux iptables firewall

If you could not access the local computer, please check the firewall. By the default, the firewall allows all on Lo interface for the incoming package How about outbound? You need to open the outbound traffic for Lo interface, too iptables -L -nv --line-numbers iptables -v -I OUTPUT 1 -i LO -j ACCEPT

SFTP

The latest version OpenSSH (5.9p1) supports SFTP chroot 1> download OpenSHH & OpenSSL (which might need zlib -- yum install zlib-devel) 2> run the following commands: ./configure, make & make install 3> Modify the /etc/init.d/sshd to point to new SSH location 4> restart the sshd to make sure it works 5> modify sshd_config Match Group sftponly ChrootDirectory /home/%u ForceCommand internal-sftp AllowTcpForwarding no OR Match user USRT_ID useradd -s /bin/flase USER_NAME chown -R UID:GID /home/User_name chown root:root /home/User_name chmod 755 /home/User_name

Liunx Firewall

/sbin/iptables [-A|-I|-D] [OUTPUT|INPUT|FORWARD] [LINE_NUMBE] -p [protocol] --[dports|sport] PORT_NUMBER -J [DROP/EJECT/ACCEPT] Firewall log 1> Log file kern.warning /var/log/iptables.log >> /etc/syslog.conf 2> restart syslog daemon service syslogd restart Useful tip: /etc/init.d/iptables save (save to /etc/sysconfig/iptables) Save/restore the rules iptables-save > /root/iptables-save.out iptables-restore -c /root/iptables-save.out Firewall Code: # with a maximum of 15 log entries per minute /sbin/iptables -A INPUT -m limit --limit 15/minute -j LOG \ --log-level 7 --log-prefix "Dropped by firewall: " /sbin/iptables -A OUTPUT -m limit --limit 15/minute -j LOG \ --log-level 7 --log-prefix "Dropped by firewall: " # Reject any packets that do not meet the specified criteria /sbin/iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset /sbin/iptables -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable iptables -A INPUT -s 64.55.11.2 -m

Load Oracle on NFS remote FS

No soft option due to lock a file Must Hard

HPUX

HPUX, HPUX 11V2, by default, did start NFS lockd. To endbale: cd etc/rc.config.d/nfsconf LOCKD_RESV_PORT=1 LOCKD_AUTHSYS_CRED=1

NFS mount size

mount -f NFS -o rsize=32K,wsize=32K remotehost:/home /newhome NFS v.2 is limit of 8K blocks, regardless of any configurations you may try to force. NFS v.3 can handle up to 64K blocks. If you've set an rsize or wsize that's too large, you're likely to see incomplete file listings. If you get read errors but no error messages, that's a dead giveaway your block size is too large.

Solaris Crash dump anylysis

1> If the format is vmdump, please run the command to convert to: savecore -vf /var/crash/ /vmdump.0 $ mdb unix.1 vmcore.1 Loading modules: [ unix krtld genunix ip nfs ipc ] > ::status debugging crash dump vmcore.1 (32-bit) from testsystem operating system: 5.10 Generic (sun4u) panic message: forced crash dump initiated at user request > $C 000002a10668cab1 vpanic(109e658, 70009bb6c80, 0, 1, 0, 30042b6d4b0) 000002a10668cb61 page_vpsub+0x70(30042b6d4f8, 70009bb6c80, 109e400, 5a40, 1, 0) 000002a10668cc11 hat_page_setattr+0xc0(1881788, 1, 70009bb6c80, 1, 0, 30042b6d4b0) 000002a10668ccc1 segvn_faultpage+0x684(0, 30042b6d4b0, 3000000000, 18000, 10000, 0) 000002a10668cdf1 segvn_fault+0xc04(3000002000, 300363803f0, 2, 1096568, 0, 0) 000002a10668cfc1 as_fault+0x4c8(300363803f0, 300292a45a0, 3000000000, 30022932320, 189fbc0, 0) 000002a10668d0d1 pagefault+0x68(3000000000, 0, 2, 0, 3001c953208, 300229322a8) 000002a10668d191 trap+0xd50(2a10668db90, 10000, 0, 2, 10008aacc, 0) 000002a10668d