운영 도구 의 smokeping 배치

최근 에 회사 의 새 기계실 이 이전 되 었 습 니 다. 새 기계실 과 각 지역 기계실 간 의 네트워크 성능 을 테스트 해 야 합 니 다. smokeping 이라는 네트워크 성능 테스트 도 구 를 선 택 했 습 니 다. 배치 할 때 인터넷 의 많은 글 을 참고 하여 현재 배치 절 차 를 다음 과 같이 기록 합 니 다.
1. 다른 소스 설치
rpm -Uvh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

2. rrdtool 과 의존 라 이브 러 리 설치
yum -y install perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-RadiusPerl perl-IO-Socket-SSL perl-Socket6 perl-CGI-SpeedyCGI perl-FCGI perl-CGI-SpeedCGI perl-Time-HiRes perl-ExtUtils-MakeMaker perl-RRD-Simple rrdtool rrdtool-perl curl fping echoping  httpd httpd-devel gcc make  wget libxml2-devel libpng-devel glib pango pango-devel freetype freetype-devel fontconfig cairo cairo-devel libart_lgpl libart_lgpl-devel mod_fastcgi

3. smokeping 다운로드 및 설치
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.8.tar.gz
tar zxvf smokeping-2.6.8.tar.gz
cd smokeping-2.6.8
./configure --prefix=/usr/local/smokeping
      perl   ,        
./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty
./configure --prefix=/usr/local/smokeping
 /usr/bin/gmake install
   ,smokeping    。

4. smokeping 설정
4.1 cache, data, var 디 렉 터 리 생 성
cd /usr/local/smokepingmkdir cache data var

4.2. 로그 만 들 기
touch /var/log/smokeping.log

4.3 권한 부여
chown apache:apache cache data varchown apache:apache /var/log/smokeping.log

4.4. 프로필 수정
cd /usr/local/smokeping/htdocs/
mv smokeping.fcgi.dist smokeping.fcgi
cd /usr/local/smokeping/etc
mv config.dist config
vim config
cgiurl = http://some.url/smokeping.cgi( some.url     ip    )
*** Database ***
step     = 300 (    ,  step, 300  60)

4.5. 설정 완료 후 암호 파일 권한 수정
chmod600 /usr/local/smokeping/etc/smokeping_secrets.dist

4.6. apache 설정 수정
vim /etc/httpd/conf/httpd.conf

다음 과 같이 추가
Alias /cache "/usr/local/smokeping/cache/"
Alias /cropper "/usr/local/smokeping/htdocs/cropper/"
Alias /smokeping "/usr/local/smokeping/htdocs/smokeping.fcgi"AllowOverride None
Options All
AddHandler cgi-script .fcgi .cgi
Order allow,deny
Allow from all
DirectoryIndex smokeping.fcgi

f. 시동 설정
echo "/usr/local/smokeping/bin/smokeping --logfile=/var/log/smokeping.log 2>&1 &" >> /etc/rc.local

g. http 와 smokeping 시작
/etc/init.d/httpd start/usr/local/smokeping/bin/smokeping --logfile=/var/log/smokeping.log 2>&1 &

    

    500  ,       selinux   ,          。

5.     :    。
   /etc/httpd/conf/httpd.con    

AllowOverride None
Options All
AddHandler cgi-script .fcgi .cgi
AllowOverride AuthConfigOrder allow,deny
Allow from allAuthName "Smokeping"AuthType Basic
AuthUserFile /usr/local/smokeping/htdocs/htpasswd
Require valid-userDirectoryIndex smokeping.fcgi

      httpd.conf           
    cd /usr/local/smokeping/htdocs  ,         
htpasswd -c /usr/local/smokeping/htdocs/htpasswd admin
    httpd           。

6.    
6.1      ,
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ntpdate 210.72.145.44。
6.2       
            ,  /usr/local/smokeping/etc config  
*** Presentation ***
charset = utf-8 
   menu titile     ,    

7.    
       ,     。

좋은 웹페이지 즐겨찾기