Last active
August 29, 2015 14:18
-
-
Save nikushi/acc807136df9ac722d16 to your computer and use it in GitHub Desktop.
smokepingをインストールする。perlbrew + Alien::RRDtool + fpingバイナリ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smokepingをインストールする。 | |
* perlはperlbrewを使いたい | |
* rrdtool rrdtool-devel rrdtool-perl をシステムパッケージで入れたくない | |
* つまりAlien::RRDtoolを使う | |
* fpingがCentOSのrpmで提供されていないのでソースからコンパイルする | |
* fpingのバイナリだけあればいいので、buildサーバでコンパイルしたfpingバイナリだけ使う | |
* SmokePingはバージョン固定のためgitで管理 | |
=============== | |
smokeping perl | |
=============== | |
sudo yum groupinstall -y "Development tools" | |
sudo yum -y install openssl openssl-devel readline-devel readline compat-readline5 libxml2-devel libxslt-devel libyaml-devel | |
su - smokeping | |
perlbrewをインストール | |
perl_version=5.20.2 | |
perl_name=smokeping | |
export PERLBREW_ROOT=$HOME/perl5/perlbrew | |
perlbrew install $perl_version --as $perl_name -j 4 -v | |
cd ~/perl5/perlbrew/perls/$perl_name | |
git init . | |
git commit -m 'init' | |
perlbrew use $perl_name | |
# cpanm | |
curl -L http://cpanmin.us/ | perl - App::cpanminus | |
本件ではcartonは不要 | |
arch=$(uname -i) | |
cd ~/perl5/perlbrew/perls/$perl_name | |
git remote add origin ... | |
git push -u origin master | |
==================== | |
Install perl modules | |
==================== | |
cpanm Alien::RRDtool FCGI CGI CGI::Fast Config::Grammar Digest::HMAC_MD5 Net::Telnet Net::OpenSSH Net::SNMP Net::LDAP Net::DNS IO::Pty LWP | |
git commit -m 'perl modules for smokeping' | |
cd ~/perl5/perlbrew/perls/$perl_name | |
==================== | |
Install SmokePing | |
==================== | |
sudo mkdir -p /var/app/SmokePing | |
sudo chown smokeping:smokeping | |
PERL=`which perl` | |
PERL=`ls $PERL` ./configure --prefix=/var/app/SmokePing --enable-pkgonly | |
make | |
/usr/bin/gmake install | |
cd /var/app/Smokeping | |
git init . | |
git commit -m 'initial' | |
git remote add ........ | |
git push -u origin master | |
==================== | |
Build fping binary | |
==================== | |
cd /var/tmp | |
wget http://fping.org/dist/fping-3.10.tar.gz | |
tar zxvf ... | |
cd fping-3.10 | |
./configure | |
make | |
cp src/fping /var/app/SmokePing/bin | |
chmod u+s /var/app/SmokePing/bin/fping | |
cd /var/app/SmokePing/ | |
git add -A | |
git commit -m 'Add fping binary' # x86_64 archだとたぶん動く | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment