2007/04/13
=================== offen use ====================
who w -u
netstat -a netstat -tl/ -ul |more
ps -aux kill PID
df du -h -m -sm # more /etc/fstab
mkdir -p -m
mv cp -Rv rm -i -rf
find /home -name feng locate whereis
fdisk -l
fg
# mount -t iso9660 /dev/cdrom /mnt/cdrom
# mount -t vfat /dev/fd0 /mnt/floppy
# mount -t ext2 /dev/fd0 /mnt/floppy
# mount -t ext2 /dev/hdc1 /mut/harddisk
# cat /proc/cpuinfo
# chmod 700 my.txt r4 w2 x1
# chown oice my.txt -R
# chown oice:oice my.txt -R
# rpm find: ( -qa |grep xx ) setup:( -ivh -Uvh -Uvh -oldpackage ) unsetup: ( -e -e -nodeps)
# ./configure make && make install
# history -c
# rm -f /var/log/wtmp*
======================================
ntsysv netconfig
# vi /etc/rc.d/rc.local
# route add -net 10.10.0.0 netmask 255.255.0.0 gw 10.10.1.1
route del -net 10.10.0.0 netmask 255.255.248.0 dev eth1
# route add default gw 10.10.1.1 eth1
# route add default gw 192.168.0.1 eth1
# route add default gw 10.10.7.17 eth2
route route -n
# vi /etc/hosts.allow
sshd: 10.10.7.245 in.telnetd: 10.10.7.245
# vi /etc/hosts.deny
all: all
# /etc/rc.d/init.d/network restart
# ifdown eth0
# ifup eth0
# /etc/init.d/ssh restart
================= NET_WORK =====================
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/hosts
/etc/resolv.conf
/etc/hosts
/etc/services
# /etc/rc.d/init.d/network restart
# /etc/rc.d/init.d/xinetd restart
================= ADSL =====================
# /etc/rc.d/linit.d/adsl restart
# /usr/sbin/pppoe-stop
# /usr/sbin/pppoe-start
================= IPTABLES =====================
open
# iptables -t nat -A POSTROUTING -o ppp0 -s 10.10.7.101 -j MASQUERADE
close
# iptables -t nat -D POSTROUTING -o ppp0 -s 10.10.7.101 -j MASQUERADE
# iptables -t nat -L -n
no ping
# iptables -A INPUT -p icmp --icmp-type 8 -j DROP
one can ping
# iptables -I INPUT -i eth0 -p icmp -s 10.10.7.245 -j ACCEPT
port open & close
# iptables -I FORWARD -i eth0 -p tcp -s 10.10.7.245 --sport 444:65535 -j ACCEPT / DROP
# iptables -I FORWARD -i eth0 -p udp -s 10.10.7.245 --sport 444:65535 -j ACCEPT / DROP
# iptables-save > filename
# iptables-restore < filename
================= SAMBA =====================
# /etc/rc.d/init.d/smb restart
# netstat -tlunp | grep ‘:13‘
# testparm
# vi /etc/samba/smb.conf
# rpm -qa |grep samba
================= wuFTP =====================
# vi /etc/xinetd.d/wu-ftpd disable
# /etc/rc.d/init.d/xinetd restart
# netstat -tl
================= telnet =====================
# rpm -qa |grep telnet
# vi /etc/xinetd.d/telnet
# /etc/rc.d/init.d/xinetd reload / restart
# service xinetd restart
# netstat -tlup
=================== lotus notes ====================
close
# /opt/lotus/bin/server -q
open
# cd /nd/notesdata
# /opt/lotus/bin/server notes.ini
=================== APACHE ====================
# /usr/local/apache2/bin/apachectl start
# /usr/local/apache2/bin/apachectl stop
=================== squid ====================
# su -l squid -c "/usr/local/squid/sbin/squid -D" no DNS
# su -l squid -c "/usr/local/squid/bin/RunCache &" in Internet,check DNS
=================== CN_text ====================
# cat /etc/sysconfig/i18n
LANG="en_US"
SUPPORTED="zh_CN.GB2312:zh_CN:zh:zh_TW.Big5:zh_TW:zh:en_US:en"
SYSFONT="lat0-sun16"
SYSFONTACM="iso01"
# vi /etc/inittab
id:5:initdefault: ===>text id:3:initdefault:
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。