virshでnic追加/削除
つけるとき
virsh attach-interface --type bridge --source br106 --model e1000 vmname
はずすとき
virsh detach-interface --type bridge --mac 52:54:00:34:38:33 vmname
参考
http://builder.virt-tools.org/artifacts/libvirt-virshcmdref/html/sect-attach-interface.html
2013年2月15日金曜日
2013年2月8日金曜日
証明書の中身がみたいとき
openssl s_client -connect www.com:443 -showcerts
-----BEGIN CERTIFICATE-----
から
-----END CERTIFICATE-----
を適当なファイルに保存して
openssl x509 -in test -text
とか
-----BEGIN CERTIFICATE-----
から
-----END CERTIFICATE-----
を適当なファイルに保存して
openssl x509 -in test -text
とか
2013年1月9日水曜日
2012年12月17日月曜日
CentOS6.3にSmokePingをインストールしたときのメモ
SmokePing
http://oss.oetiker.ch/smokeping/
yumでインストール
rpmforgeを使えるようにしておく
yum install mod_fcgid httpd httpd-devel rrdtool fping wget curl bind-utils gcc make
yum 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-RRD-Simple perl-CGI-SpeedCGI perl-ExtUtils-MakeMaker
yum install perl-CGI-SpeedyCGI perl-CGI-SpeedCGI
chkconfig httpd on
/etc/httpd/conf.d/smokeping.conf
<Directory "/var/www/html/smokeping">
Options +ExecCGI
AllowOverride all
order deny,allow
deny from all
allow from アクセスを許可するIP
</Directory>
service httpd start
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.8.tar.gz
tar -zxvf smokeping-2.6.8.tar.gz -C /opt/
mkdir /opt/smokeping
cd /opt/smokeping-2.6.8/setup
./build-perl-modules.sh
cp -r ../thirdparty /opt/smokeping/
cd ..
./configure –prefix=/opt/smokeping
make
make install
cd /opt/smokeping
mkdir data
mkdir var
wget http://static.wedebugyou.com/smokeping_start_stop.txt
mv smokeping_start_stop.txt /etc/init.d/smokeping
chmod 755 /etc/init.d/smokeping
cd /opt/smokeping/etc/
for foo in *.dist; do cp $foo `basename $foo .dist`; done
chmod 600 /opt/smokeping/etc/smokeping_secrets.dist
/opt/smokeping/etc/config
監視対象を追記する
+ Ping
menu = 名前
title = SmokePingで監視
++ test-server1
menu = test-server1
title = test-server1
host = 192.168.1.1
++ test-switch1
menu = test-switch1
title = test-switch1
host = 192.168.101.1
cp -r /opt/smokeping/htdocs/cropper /var/www/cgi-bin/
cp /opt/smokeping/htdocs/smokeping.fcgi.dist /var/www/cgi-bin/smokeping.fcgi
cd /var/www/html/
mkdir cache
chown apache cache
ln -s /var/www/html/cache /opt/smokeping/cache
service httpd restart
service smokeping start
http:///serveraddress/smokeping/
http://oss.oetiker.ch/smokeping/
yumでインストール
- 準備
rpmforgeを使えるようにしておく
- 必要なパッケージ
yum install mod_fcgid httpd httpd-devel rrdtool fping wget curl bind-utils gcc make
- perlのモジュール
yum 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-RRD-Simple perl-CGI-SpeedCGI perl-ExtUtils-MakeMaker
- 追加
yum install perl-CGI-SpeedyCGI perl-CGI-SpeedCGI
- apacheの設定
chkconfig httpd on
/etc/httpd/conf.d/smokeping.conf
<Directory "/var/www/html/smokeping">
Options +ExecCGI
AllowOverride all
order deny,allow
deny from all
allow from アクセスを許可するIP
</Directory>
service httpd start
- smokepingのインストール
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.8.tar.gz
tar -zxvf smokeping-2.6.8.tar.gz -C /opt/
mkdir /opt/smokeping
cd /opt/smokeping-2.6.8/setup
./build-perl-modules.sh
cp -r ../thirdparty /opt/smokeping/
cd ..
./configure –prefix=/opt/smokeping
make
make install
- SmokePing用ディレクトリ作成
cd /opt/smokeping
mkdir data
mkdir var
- initスクリプトのダウンロード
wget http://static.wedebugyou.com/smokeping_start_stop.txt
mv smokeping_start_stop.txt /etc/init.d/smokeping
chmod 755 /etc/init.d/smokeping
- configの作成
cd /opt/smokeping/etc/
for foo in *.dist; do cp $foo `basename $foo .dist`; done
chmod 600 /opt/smokeping/etc/smokeping_secrets.dist
/opt/smokeping/etc/config
監視対象を追記する
+ Ping
menu = 名前
title = SmokePingで監視
++ test-server1
menu = test-server1
title = test-server1
host = 192.168.1.1
++ test-switch1
menu = test-switch1
title = test-switch1
host = 192.168.101.1
- SmokePingをapacheから見れるように、の設定
cp -r /opt/smokeping/htdocs/cropper /var/www/cgi-bin/
cp /opt/smokeping/htdocs/smokeping.fcgi.dist /var/www/cgi-bin/smokeping.fcgi
cd /var/www/html/
mkdir cache
chown apache cache
ln -s /var/www/html/cache /opt/smokeping/cache
- smokepingスタート
service httpd restart
service smokeping start
- アクセスして確認
http:///serveraddress/smokeping/
2012年11月28日水曜日
mkfs.ext4でエラー
# mkfs.ext4 /dev/sdb1
mke2fs 1.42.3 (14-May-2012)
/dev/sdb1 is apparently in use by the system; will not make a filesystem here!
こんなエラーが出てファイルシステムが作成できなかった。
multipathdを止めたら作成できた。
# service multipathd stop
# dmsetup remove_all
# systemctl disable multipathd.service
# mkfs.ext4 /dev/sdb1
2012年10月31日水曜日
CDを焼く(Linux)
linuxでcdを焼くときのコマンド
# cdrecord -scanbus
これでデバイスを探して
scsibus9:
9,0,0 900) 'Optiarc ' 'DVD RW AD-7585H ' 'KB02' Removable CD-ROM
9,1,0 901) *
9,2,0 902) *
9,3,0 903) *
9,4,0 904) *
9,5,0 905) *
9,6,0 906) *
9,7,0 907) *
# cdrecord dev=9,0,0 driveropts=burnfree -eject -dao ovirt-node-iso-2.5.5-0.1.fc17.iso
こんな感じで。
書き込みテストするときは、-dummyをつける
# cdrecord -scanbus
これでデバイスを探して
scsibus9:
9,0,0 900) 'Optiarc ' 'DVD RW AD-7585H ' 'KB02' Removable CD-ROM
9,1,0 901) *
9,2,0 902) *
9,3,0 903) *
9,4,0 904) *
9,5,0 905) *
9,6,0 906) *
9,7,0 907) *
# cdrecord dev=9,0,0 driveropts=burnfree -eject -dao ovirt-node-iso-2.5.5-0.1.fc17.iso
こんな感じで。
書き込みテストするときは、-dummyをつける
2012年10月22日月曜日
登録:
投稿 (Atom)