linux
linux常用的命令
vncserver 設置(redhat)
摘要: 1. 安裝vnc
rpm -ivh vnc-server-4.1.2-14.el5_3.1.i386.rpm
rpm -ivh vnc-4.1.2-14.el5_3.1.i386.rpm
3. 設置vnc server的訪問密碼
[ann@ecdev1 ~]# vncpasswd
3. 執行vncserver,第一次執行后會生產一些配置文件
4. 修改/home/ann/.vnc/xstart(如果無此文件,就運行vncserver)
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xsta
閱讀全文
posted @
2010-05-19 09:49 冰是沒有未來的,因為它的永恒|
編輯
apt-get proxy 設置
摘要: Well, there's second places I set the proxy on a new Linux install.
1) in /etc/profile:
code:
export http_proxy="http://user:pass@xxx.xxx.xxx.xxx:port/"
export ftp_proxy="http://user:pass@xxx.xxx.xxx.xxx:port/"
2) in /etc/apt/apt.conf
code:
Acquire::http::Proxy "http://user:pass@xxx.xxx.xxx.xxx:port/";
Acquire::ftp::Proxy "http://user:pass@xxx.xxx.xxx.xxx:port/";
閱讀全文
posted @
2010-02-02 15:16 冰是沒有未來的,因為它的永恒|
編輯
E: Dynamic MMap ran out of room(ap-get install)
摘要: Add the following line to either /etc/apt/apt.conf or /etc/apt/apt.conf.d/70debconf
code:
APT::Cache-Limit 50000000;
閱讀全文
posted @
2010-02-02 15:13 冰是沒有未來的,因為它的永恒|
編輯
Iptables使用介紹
摘要: 原理簡介
安裝運行
特殊介紹
1.iptables的3個表:
filter: 顧名思義,用于過濾的時候
nat: 顧名思義,用于做NAT 的時候
manager:見下
2.iptables的5條鏈
INPUT: 匹配目的IP 是本機的數據包
OUPUT: 匹配源IP是本機的數據包
FORWARD: 匹配穿過本機的數據包
PREROUTING: 用于修改目的地址(DNAT)
POSTROUTING:用于修改源地址(SNAT)
3.manager簡介
這個表主要用來mangle數據包。我們可以改變不同的包及包頭的內容,比如 TTL,TOS或MARK。 注意MARK并沒有真正地改動數據包,
它只是在內核空間為包設了一個標記。防火墻內的其他的規則或程序(如tc)可以使用這種標記對包進行過濾或高級路由。這個表有五
閱讀全文
posted @
2009-12-04 13:42 冰是沒有未來的,因為它的永恒|
編輯
linux iptables 設置
摘要: 1. 限制 client 每秒訪問次數
限制連 80 port 的次數 = 60 秒 2次 , 超過就 drop
iptables -I INPUT -p tcp –dport 80 -i eth0 -m state –state NEW -m recent –set
iptables -I INPUT -p tcp –dport 80 -i eth0 -m state –state NEW -m recent –update –seconds 60 –hitcount 2 -j DROP
2. 控制client訪問特定的port
只允許114.80.192.18 和 127.0.0.1 訪問8080-8099的端口
iptables -A INPUT -p tcp -s 114.80.192.18 --dport 8080:8099 -j ACCEPT
iptables -A INPUT -p tcp -s ! 127.0.0.1 --dport 808
閱讀全文
posted @
2009-12-04 11:52 冰是沒有未來的,因為它的永恒|
編輯
linux 收藏
摘要: http://www.pixelbeat.org/cmdline_zh_CN.html
http://www.linuxfromscratch.org/blfs/edguide/chapter03.html
基于SSH密鑰對的自動登錄
xiao@xiao .ssh]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/xiao/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/xiao/.ssh/id_rsa.
Your public key has been saved in /home/xiao/.ssh/id_rsa.pub.
The
閱讀全文
posted @
2009-07-07 09:54 冰是沒有未來的,因為它的永恒|
編輯
linux script配置
摘要: Manipulating the start and stop order of Linux servicesThis document (7002295) is provided subject to the disclaimer at the end of this document.
Environment
Novell SUSE Linux
Novell SUSE Linux Enterprise Server 9
Novell SUSE Linux Enterprise Server 10
Novell SUSE Linux Enterprise Desktop 10
Situation
In some circumstances, the start and stop order of a service needs to be manipulated.
How to add start and stop orders to a custom service
Resolu
閱讀全文
posted @
2009-06-30 17:05 冰是沒有未來的,因為它的永恒|
編輯
建立link
摘要: ln -s /data/tomcat /opt/tomcat
閱讀全文
posted @
2009-06-17 14:21 冰是沒有未來的,因為它的永恒|
編輯
linux清空文件內容
摘要: :> domains/domain1/logs/server.log
閱讀全文
posted @
2009-06-17 13:59 冰是沒有未來的,因為它的永恒|
編輯
linux查看磁盤剩余空間
摘要: df -hl 查看磁盤剩余空間
du -sm 文件夾
返回該文件夾總M數
閱讀全文
posted @
2009-06-17 11:26 冰是沒有未來的,因為它的永恒|
編輯
Full linux Archive