Tag Archives: CentOS

CentOS 安裝 ntop


安裝ntop步驟:

  1. 下載ntop [這裡]
  2. 解壓縮
    [root@localhost ~]#tar -zxvf ntop.xx.xx.tar.gz
    [root@localhost ~]# cd ntop.x.xx
  3. 先安裝ntop所需的相關軟體
    [root@localhost ~]# yum -y install gcc gcc-c++ libpcap-devel libpcap  libtool  automake  autoconf  gdbm  gdbm-devel libevent libevent-devel rrdtool rrdtool-devel zlib zlib-devel GeoIP GeoIP-devel
  4. make
  5. make install
  6. 新增user與變更權限
    [root@localhost ~]# useradd -M -s /sbin/nologin -r ntop
    [root@localhost ~]# chown -R ntop:ntop /usr/local/share/ntop
    [root@localhost ~]# chown -R ntop:root /usr/local/var/ntop
  7. 初始化ntop與設定admin密碼:
    [root@localhost ~]# ntop -A
    Fri Aug 31 10:00:37 2012  Initializing gdbm databases
    Fri Aug 31 10:00:37 2012  Setting administrator password…
    ntop startup – waiting for user response!
    Please enter the password for the admin user:
    Please enter the password again:
    Fri Aug 31 10:01:50 2012  Admin user password has been set
    Fri Aug 31 10:01:50 2012  Admin password set…
  8. 啟動ntop
    [root@localhost ~]# /usr/local/bin/ntop -d -L -u ntop -P /usr/local/var/ntop –skip-version-check –use-syslog=daemon
    開啟瀏覽器網址輸入 http://localhost:3000

    成功!
  9. 開機時自動啟動ntop,將/usr/local/bin/ntop -d -L -u ntop -P /usr/local/var/ntop –skip-version-check –use-syslog=daemon 加入到rc.local
    [root@localhost ~]# vi /etc/rc.local

CentOS 6.2 安裝 VNCServer

CentOS 6.2 遠端桌面共用→選用 vnc-server

  1. 先安裝vnc-server套件
    [root@localhost /] # yum -y install vnc-server
  2. 編輯vncserver設定檔
    [root@localhost /] # vi /etc/sysconfig/vncservers 將#號拿掉後變更紅字部分
    # VNCSERVERS=”2:myusername
    # VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -localhost”
    存檔離開
  3. 設定密碼
    [root@localhost /] # vncpasswd
  4. 啟動VNCServer
    [root@localhost /] # vncserver :2
    如果有設定防火牆的話請加入iptables:
    [root@localhost /] # vi /etc/sysconfig/iptables
    -A INPUT -m tcp -p tcp –dport 5900 -j ACCEPT
    -A INPUT -m tcp -p tcp –dport 5800 -j ACCEPT
    -A INPUT -m tcp -p tcp –dport 6000 -j ACCEPT
    -A INPUT -m tcp -p tcp –dport 5901 -j ACCEPT
    -A INPUT -m tcp -p tcp –dport 5801 -j ACCEPT
    -A INPUT -m tcp -p tcp –dport 6001 -j ACCEPT
    -A INPUT -m tcp -p tcp –dport 5902 -j ACCEPT
    -A INPUT -m tcp -p tcp –dport 5802 -j ACCEPT
    -A INPUT -m tcp -p tcp –dport 6002 -j ACCEPT
  5. 開啟VNC Client [下載]

    依畫面提示進行連線輸入,並輸入密碼
  6. 完成遠端桌面控制
  7. 重新開機後自動啟動VNCServer:
    [root@localhost /] # /sbin/chkconfig vncserver on
    請查VNCServer是否運作中
    [root@localhost /] # netstat -tulpan | grep vnc

CentOS 6.2 支援NTFS讀寫

  1. 首先請至 http://packages.sw.be/rpmforge-release/下載最新版本的rpmforge (有區分32位元與64位元作業系統版本),如:[root@localhost]# wget http://packages.sw.be/rpmforge-release/rpmforge-release.rpm
  2. 安裝下載的rpmforge:
    [root@localhost]# rpm -ivh rpmforge-release.rpm
  3. 特過YUM安裝其他套件:
    [root@localhost]# yum –enablerepo=rpmforge install fuse fuse-ntfs-3g dkms dkms-fuse
  4. 設定開機後即掛載NTFS:
    [root@locahost]# vi /etc/fstab ;加入:
    /dev/sdb1 /home/ntfs ntfs defaults 0 0
  5. 完成