顯示具有 MIS 標籤的文章。 顯示所有文章
顯示具有 MIS 標籤的文章。 顯示所有文章

2016/05/14

Cacti Plugin Realtime 安裝方法

個人筆記:Cacti 0.8.7e插件成功安裝之:realtime
源自:楊志剛博客 (
http://yangzhigang.cublog.cn
)

前言:
繼《個人筆記:Cacti 0.8.7e插件成功安裝之:monitor、thold、settings》
http://blog.chinaunix.net/u2/71257/showart_2093517.html
一文之後,本文來記錄我成功安裝基本的插件(realtime)的步驟步驟.

小介紹:
Realtime,provides a method to view cacti graphs with a resolution of upto 5 seconds.

//下載、解壓realtime插件包
(在
http://docs.cacti.net/plugins
中下載最新的插件包)
[root@centos53 ~]# cd /usr/local/src
[root@centos53 src]# wget
http://docs.cacti.net/_media/plugin:realtime-0.4.0-1.tar.gz
[/url]
[root@centos53 src]# tar zxvf realtime-0.4.0-1.tar.gz

[url=http://docs.cacti.net/_media/plugin:settings-latest.tgz]

//MV 插件包到 cacti/plugins/下
[root@centos53 src]# mv realtime /var/www/cacti/plugins/

//install、enable plugins:realtime
登錄Cacti,進入[Console]-[configuration]-[Plugin Management],對plugin:realtime進行Install 和 Enable。

//給admin用戶授權
登錄Cacti,進行[Console]-[Utilities]-[User Management],點admin用戶,在[Realm Permissions]中我,勾選“Plugin->Realtime”。

//第一次驗證
此時,到[Graphs]中,找一個圖,可以發現在其右側已經出現“Realtime”的一個小Logo,但當點此logo進行realtime查看時,會發現彈出的窗口中顯示“The Image Cache Directory directory does not exist. Please first create it and set permissions and then attempt to open another realtime graph.”,提示出沒有Cache目錄以及權限等。

//設置Cache目錄及權限
在realtime插件包中的README中寫到:Create a folder somewhere on your system that is accessible to the apache user for writing.
在官網的文檔中對於Installation中也寫到:You need to also create a folder somewhere on you system that is accessible to the apache user for writing.This folder should bo different than other transient folders used by plugins as it will b periodically pruned by this plugin.
所以,還要做如下操作。
-----------原文修正後------------------
# mkdir /var/www/cacti/cache
# chmod 755 -R /var/www/cacti/cache/
# chcon -u system_u -t usr_t /var/www/cacti/cache
# chown apache:apache /var/www/cacti/cache

PS:權限控管要注意
---------------------------------------------

之後,還要login cacti,進入[console]-[configuration]-[settings]-[Misc],設置“Cache Diredtiory”為“​​/var/www/cacti/cache/”

//最終驗證
按上面“第一次驗證”的方法,驗證一下,我成功了,你呢?


2012/02/06

webmin及openwebmail安裝

以下都是透過yum方式安裝,rpm及tarball方式請自行google。
一、安裝webmin
        參考:http://webmin.com/rpm.html

Using the Webmin YUM repository

If you like to install and update Webmin via RPM, create the/etc/yum.repos.d/webmin.repo file containing :[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
You should also fetch and install my GPG key with which the packages are signed, with the commands :wget http://www.webmin.com/jcameron-key.asc
rpm --import jcameron-key.asc
You will now be able to install with the command :yum install webminAll dependencies should be resolved automatically.


二、安裝openwebmail


How to install openwebmail from yum repository
==============================================
Thomas Chung <tchung@openwebmail.org>
2008.05.29
UPDATE 2010.05.24
Install perl-Text-Iconv from rpmforge for your arch if you're running RHEL or CentOS:
http://dag.wieers.com/rpm/packages/perl-Text-Iconv/
$ su -
# cd /etc/yum.repos.d
# lftpget http://openwebmail.org/openwebmail/download/redhat/rpm/release/openwebmail.repo
# yum install openwebmail
fedora 100% |=========================| 2.1 kB 00:00
openwebmail 100% |=========================| 951 B 00:00
updates 100% |=========================| 2.3 kB 00:00
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package openwebmail.i386 0:2.53-1 set to be updated
--> Processing Dependency: openwebmail-data = 2.53-1 for package: openwebmail
--> Processing Dependency: perl-suidperl for package: openwebmail
--> Processing Dependency: perl-Text-Iconv for package: openwebmail
--> Running transaction check
---> Package openwebmail-data.i386 0:2.53-1 set to be updated
---> Package perl-suidperl.i386 4:5.8.8-32.fc8 set to be updated
---> Package perl-Text-Iconv.i386 0:1.5-1.fc8 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing for dependencies:
openwebmail i386 2.53-1 openwebmail 2.3 M
openwebmail-data i386 2.53-1 openwebmail 7.0 M
perl-Text-Iconv i386 1.5-1.fc8 fedora 20 k
perl-suidperl i386 4:5.8.8-32.fc8 updates 60 k
Transaction Summary
=============================================================================
Install 4 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 9.4 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): perl-Text-Iconv-1. 100% |=========================| 20 kB 00:00
(2/4): openwebmail-2.53-1 100% |=========================| 2.3 MB 00:03
(3/4): perl-suidperl-5.8. 100% |=========================| 60 kB 00:00
(4/4): openwebmail-data-2 100% |=========================| 7.0 MB 00:10
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID cfb164d8
Importing GPG key 0xCFB164D8 "Thomas Chung <tchung@openwebmail.org>" from http://openwebmail.org/.../RPM-GPG-KEY-openwebmail
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: perl-Text-Iconv ######################### [1/4]
Installing: perl-suidperl ######################### [2/4]
Installing: openwebmail ######################### [3/4]
Permission and Ownership for openwebmail files have been fixed!
Please execute following tool first as a root:
/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init
After restarting httpd service, login with non-root account from
http://localhost.localdomain/cgi-bin/openwebmail/openwebmail.pl
or http://localhost.localdomain/webmail
If SELinux enabled, you may need to set it 'permissive' in
/etc/sysconfig/selinux or system-config-selinux
Installing: openwebmail-data ######################### [4/4]
Dependency Installed: openwebmail.i386 0:2.53-1 openwebmail-data.i386 0:2.53-1 perl-Text-Iconv.i386 0:1.5-1.fc8 perl-suidperl.i386 4:5.8.8-32.fc8
Complete!
三、 openwebmail安裝好後的設定
        修改/var/log/openwebmail.log的 selinux設定
參考:http://j796160836.pixnet.net/blog/post/21882397-%5B%E7%AD%86%E8%A8%98%5D%5B%E6%A5%B5%E9%87%8D%E8%A6%81%5Dopenwebmail%E7%9A%84%E9%97%9C%E9%8D%B5%E8%A8%AD%E5%AE%9A%EF%BC%8C%E8%A8%AD%E5%AE%9Aselinu



2011/02/16

CentOS Yum Repo

CentOS預設安裝的Yum有蠻多東西都沒有的。
所以下面是幾個目前常用的repo及安裝方式。

1.remi

wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

2.rpmforge

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.i386.rpm

3.IUS

wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-8.ius.el5.noarch.rpm
rpm -Uvh ius-release*.rpm


PS:請注意上面是i386版本,若是64bit版的,必須把i386的字串改為x86_64。
PS2:RHEL已經有6版了,但不建議在系統不是6版的狀況下裝6版的repo。
2012/07/02 redhar的域名修正

2011/02/15

Wireshark的cli版 tshark

TShark 1.0.15
Dump and analyze network traffic.
See http://www.wireshark.org for more information.

Copyright 1998-2010 Gerald Combs and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Usage: tshark [options] ...

Capture interface:
-i name or idx of interface (def: first non-loopback)
-f packet filter in libpcap filter syntax
-s packet snapshot length (def: 65535)
-p don't capture in promiscuous mode
-y link layer type (def: first appropriate)
-D print list of interfaces and exit
-L print list of link-layer types of iface and exit

Capture stop conditions:
-c stop after n packets (def: infinite)
-a ... duration:NUM - stop after NUM seconds
在幾秒後停止
filesize:NUM - stop this file after NUM KB
在檔案大小為幾KB後停止
files:NUM - stop after NUM files
在幾個檔案後停止
Capture output:
-b ... duration:NUM - switch to next file after NUM secs
在幾秒後換新檔案
filesize:NUM - switch to next file after NUM KB
在檔案大小為幾KB後換新檔案
files:NUM - ringbuffer: replace after NUM files
在幾次後後換覆蓋檔案(類似logrotate的功能)
Input file:
-r set the filename to read from (no pipes or stdin!)

Processing:
-R packet filter in Wireshark display filter syntax
-n disable all name resolutions (def: all enabled)
-N enable specific name resolution(s): "mntC"
-d ==, ...
"Decode As", see the man page for details
Example: tcp.port==8888,http
Output:
-w set the output filename (or '-' for stdout)
將抓到的資料存放到 (或輸入 '-' 來輸出到stdout也就是顯示在螢幕上)
-C start with specified configuration profile
-F set the output file type, default is libpcap
an empty "-F" option will list the file types
-V add output of packet tree (Packet Details)
-S display packets even when writing to a file
-x add output of hex and ASCII dump (Packet Bytes)
-T pdml|ps|psml|text|fields
format of text output (def: text)
-e field to print if -Tfields selected (e.g. tcp.port);
this option can be repeated to print multiple fields
-E= set options for output when -Tfields selected:
header=y|n switch headers on and off
separator=/t|/s| select tab, space, printable character as separator
quote=d|s|n select double, single, no quotes for values
-t ad|a|r|d|dd|e output format of time stamps (def: r: rel. to first)
-l flush standard output after each packet
-q be more quiet on stdout (e.g. when using statistics)
-X : eXtension options, see the man page for details
-z various statistics, see the man page for details

Miscellaneous:
-h display this help and exit
-v display version info and exit
-o : ... override preference setting

2010/11/14

Payeasy的ssl憑證過期

剛無聊去逛payeasy的網站,意外發現他的ssl憑證過期了,雖說剛過期沒不到兩週,不過很明顯的應該是嚴重的管理疏失。
這幾天要是有人因此有所損失的話,該怎麼處理呢?
寄件者 Blogger 圖片