vi /etc/sysconfig/network-scripts/ifcfg-eth0 TYPE=Ethernet BOOTPROTO=none DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no UUID=XXXX-XXXX-XXXX-XXXX-XXXXXXXXX NAME=eth0 DEVICE=eth0 ONBOOT=yes DNS1=XXX.XXX.XXX.XXX IPADDR=222.222.222.123 NETMASK=255.255.255.0 GATEWAY=222.222.222.1 vi /etc/sysconfig/network-scripts/ifcfg-eth1 HWADDR=XX:XX:XX:XX:XX:0C TYPE=Ethernet BOOTPROTO=none DNS1=114.141.2.92 DNS2=218.234.21.41 DEFROUTE=no IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no NAME=eth1 UUID=XXXX-XXXX-XXXX-XXXX-XXXXXXXXX IPV6_PEERDNS=yes IPV6_PEERROUTES=yes ONBOOT=yes IPADDR=192.168.0.10 PREFIX=24 GATEWAY=192.168.0.1 vi /etc/sysconfig/network ip rule add from 222.222.222.0/24 pref 200 lookup […]
centos 7 : sshfs Hint
on Clinet ssh-keygen -t rsa ssh -p22 root@10.0.0.49 mkdir -p .ssh cat .ssh/id_rsa.pub | ssh -p22 root@10.0.0.49 'cat >> .ssh/authorized_keys' ssh -p22 root@10.0.0.49 sshfs -p 22 root@10.0.0.49:/data1/ /mnt/data1 -o allow_other,IdentityFile=~/.ssh/id_rsa
linux :pci nvme rescan Hint
# echo 1 > /sys/bus/pci/rescan # lspci -tv # partprobe # dmesg # systemctl daemon-reload
centos 7 : umount force Hint
fuser -cu /data9 fuser -ck /data9 umount /data9 umount -f /data9 umount -l /dev/sdk1
Centos 7 : nfs setup hint
on Server yum install nfs-utils rpcbind mkdir /test1 mkdir /test2 systemctl enable rpcbind systemctl enable nfs-server systemctl enable nfs-lock systemctl enable nfs-idmap systemctl start rpcbind systemctl start nfs-server systemctl start nfs-lock systemctl start nfs-idmap systemctl status rpcbind systemctl status nfs-server systemctl status nfs-lock systemctl status nfs-idmap vi /etc/exports /test1 […]
centos 7 : disk monitoring iostat Hint
yum install iostat iotop ioping atopiostat -x 1iotopioping /dev/sdb1 atop 1
oracle : move & relocate dbf datafile Hint
Manual Online SQL> SELECT name FROM v$datafile WHERE name LIKE '%test%'; SQL> ALTER TABLESPACE test OFFLINE NORMAL; SQL> HOST mv /oracle0/test0.dbf /oracle1/test1.dbf SQL> ALTER TABLESPACE test RENAME DATAFILE '/oracle0/test0.dbf' TO '/oracle1/test1.dbf'; SQL> ALTER TABLESPACE test ONLINE; SQL> SELECT name FROM v$datafile; SQL> SHUTDOWN IMMEDIATE Manual Offline SQL> HOST MOVE /oracle0/test0.dbf /oracle1/test1.dbf SQL> STARTUP MOUNT […]
make swap file : mkswap Hint
# fallocate -l 80G /data128GB1/swapfile # chmod 0600 /data128GB1/swapfile # mkswap /data128GB1/swapfile < p class="p1"># swapon /data128GB1/swapfile
centos 7 cacti install Hint
yum --enablerepo=epel -y install cacti net-snmp net-snmp-utils php-mysql php-snmp rrdtool vi /etc/snmp/snmpd.conf com2sec notConfigUser default public com2sec local localhost testServer com2sec mynetwork 192.168.0.0/24 testServer group MyRWGroup v2c local group MyROGroup v2c mynetwork view […]
mac : allow download app Hint : spctl --master-disable
spctl --master-disable