歡迎你

各類文章如有侵犯智慧財產權請來信告知--------607@dlps.tp.edu.tw

预览模式: 普通 | 列表

設定snmpd.conf

# Here is a commented out example configuration that allows less
# restrictive access.

# YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
# KNOWN AT YOUR SITE.  YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.

##       sec.name  source          community
com2sec local     localhost        public

com2sec mynetwork 192.168.100.0/24      public
# 註﹕請將 192.168.100.0/24 改為您機器目前所在的 network 範圍。

##     group.name sec.model  sec.name
group MyRWGroup  v1        local
group MyROGroup  v2c        mynetwork
#
#group MyRWGroup  any        otherv3user
#...

##           incl/excl subtree                          mask
view all    included  .1                               80

## -or just the mib2 tree-

#view mib2   included  .iso.org.dod.internet.mgmt.mib-2 fc

##                context sec.model sec.level prefix read   write  notif
access MyROGroup ""      any       noauth    exact      all    none   none
access MyRWGroup ""      any       noauth    exact      all    all    none

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 8608

cacti install centos5.2

1.先安裝以下套件
httpd-2.2.3-11、php-5.1.6-15、mysql-5.0.22-2.2

cacti-0.8.7b-2、net-snmp-5.3.1-19、rrdtool-1.2.23-1

rpm -ivh cacti-0.8.7b-2.el5.rf.noarch.rpm

rpm -ivh cacti-docs-0.8.7b-2.el5.rf.noarch.rpm

以上套件用rpm或yum安裝

2.安裝與設定 Cacti
mysqladmin -u root -p create cacti
mysql -u root -p -A cacti < /var/www/html/cacti/cacti.sql

編輯 cacti 設定檔


vi /var/www/cacti/include/config.php

修改以下四行


$database_default = "cacti"; //資料庫名稱
$database_hostname = "localhost"; //資料庫位置
$database_username = "cactiuser"; //資料庫使用者名稱
$database_password = "cactiuser"; //資料庫使用者密碼

設定資料庫
mysql> grant all privileges on cacti.* to cactiuser@localhost identified by ‘cactiuser’;
mysql> flush privileges;
mysql> exit


設定apache
vi /etc/httpd/conf.d/cacti.conf
vi /etc/httpd/conf/http.conf
Alias /cacti/ /var/www/cacti/
<Directory /var/www/cacti/>
    DirectoryIndex index.php
    Options -Indexes
    AllowOverride all
    order deny,allow
    deny from all
    allow from 127.0.0.1
    allow from 192.168 <= 追加
    AddType application/x-httpd-php .php
    php_flag magic_quotes_gpc on
    php_flag track_vars on
</Directory>

cacti定期執行
/etc/cron.d/cacti
*/5 * * * *    cacti    php    /var/www/cacti/poller.ph...

查看更多...

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 10985

錯誤訊息

Compiling ntop resulted in error for me:

1.
checking for pcap_lookupdev in -lpcap... no
             *** FATAL ERROR ***
It looks that you don't have the libpcap distribution installed.
Download, compile and, optionally, install it.
When finished please re-run this program.
You can download the latest source tarball at http://www.tcpdump.org/
configure: error: The LBL Packet Capture Library, libpcap, was not found!
error: Bad exit status from /var/tmp/rpm-tmp.85176 (%build)

ntop安裝用rpm較為簡單,或用YUM
rrdtool

查看更多...

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3260

ntop

1. yum install cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-deve libpcap-devel

2.install  RRDtool
http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.5.tar.gz

3.Install Ntop
cd /usr/local/src/
tar -zxvf ntop-3.3.9.tar.gz
cd ntop-3.3.9
./autogen.sh --prefix=/usr/local/ntop-3.3.9
make
make installuseradd -M -s /sbin/nologin -r ntop
chown -R ntop.ntop /usr/local/ntop-3.3.9/share/ntop
cd /usr/local/
ln -s ntop-3.3.9 ntop

 4.Start Ntop 

簡易版本

查看更多...

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3846

samba

[global]
        dos charset = cp950
        unix charset = utf8
        display charset = utf8
        workgroup = CC1
        server string = Samba  %v
        passdb backend = tdbsam
        log file = /var/log/samba/%m.log
        max log size = 50
        cups options = raw

[homes]
        comment = Home Directories
        valid users = %S
        read only = No
        create mask = 0664
        directory mask = 0775
        browseable = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        browseable = No

[public]
        comment = Public Stuff
        path = /home/public
        valid users = @users
        read only = No
        guest ok = Yes
 

分类:linux | 固定链接 | 禁止评论 | 引用: 0 | 查看次数: 6510

exif

"exiftool(-all).exe" *.jpg

exiftool官方網站網址: http://www.sno.phy.queensu.ca/~phil/exiftool/

php.ini

register_long_arrays = On

Tags: exif

分类:電腦教學 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2841

停電

停電對電腦的傷害是很大的
不知道是否有損害
UPS有些沒有發生功效
電池本來就只能用個二'三年

查看更多...

分类:電腦教學 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3390

使用 PHP

PHP 支援

如果您要使用 PHP,則必須在 httpd.conf 中加入 PHP 的支援,請在 httpd.conf 檔案最後加入下列內容:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps


分类:FreeBSd | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2947

建構複雜的命令

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2636

~/.bashrc

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions
PATH="/bin:/sbin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
PATH="$PATH":/usr/X11R6/bin:/home/dmtsai/bin
LANG=zh_TW.big5
LC_TIME=C
export PATH LC_TIME LANG
umask 022

alias   rm='rm -i'
alias   cp='cp -i'
alias   mv='mv -i'
 

分类:linux | 固定链接 | 禁止评论 | 引用: 0 | 查看次数: 3236