アイビスヘッダー

IBS
ラベル Linux の投稿を表示しています。 すべての投稿を表示
ラベル Linux の投稿を表示しています。 すべての投稿を表示

2013年6月5日水曜日

RHEL6.2(x86_64)でepelを利用してのmunin-nodeインストールが失敗する

RHEL6.2(x86_64)を利用していて、epelレポジトリを利用して、munin-nodeのインストールを行うと以下のエラーで失敗する。

Error: Package: munin-node-2.0.14-1.el6.noarch (epel)
           Requires: perl(Net::IP)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

CentOS6.4(x86_64)のCDから、perl-Net-IP-1.25-13.el6.noarch.rpmを取り出して、インストールした後、再度munin-nodeのインストールを行うと成功しました。

2012年9月22日土曜日

RHEL6(x86_64)でepelを利用してのmuninインストールが失敗する

RHEL6.3(x86_64)を利用していて、epelレポジトリを利用して、muninのインストールを行うと以下のエラーで失敗する。

Error: Package: munin-1.4.7-5.el6.noarch (epel)
           Requires: perl(RRDs)
Error: Package: perl-Log-Log4perl-1.30-1.el6.noarch (epel)
           Requires: perl(RRDs)

yum search で探してみても、それらしいパッケージは見つからない。


試しに、CentOS6用の以下パッケージをダウンロードしてインストールしてみると、あっさり成功!
rpm -ivh rrdtool-perl-1.3.8-6.el6.x86_64.rpm

これでいいのか?
とりあえず設定を進めてみる。

2012年1月6日金曜日

CentOS5.7(x86_64)に VMware-vSphere-CLI-4.0.0 の導入メモ

以下のURLからダウンロードします。
自動化ツールおよびSDKを展開→VMware vSphere CLI 4.0 をダウンロード

導入開始

# tar xvfz VMware-vSphere-CLI-4.0.0-161974.x86_64.tar.gz
# cd vmware-vsphere-cli-distrib/
# ./vmware-install.pl 
Creating a new vSphere CLI installer database using the tar4 format.

Installing vSphere CLI.

Installing version 161974 of vSphere CLI


You must read and accept the vSphere CLI End User License Agreement to 
continue.
Press enter to display it.  

VMware(r) End User License Agreement

VMware, Inc. ("VMware") provides the vSphere Command-Line Interface (vSphere
CLI) and/or vSphere Software Development Kit for Perl (vSphere SDK for Perl)
(collectively the "Software") to you subject to the following terms and
conditions.  If you disagree with any of the following terms, then do not
use the Software.

1.  The Software contains a variety of materials, interface definitions,
documentation, sample utility applications and sample code regarding
programming interfaces to one or more VMware products as referenced in such
materials ("VMware Products").  This Software is intended to be used to
execute supplied commands and utility applications and to create scripts
that interact with the VMware Products. 

2.  Use Rights:  Subject to the restrictions below, you may download and
make a reasonable number of copies of the Software contents for your use
solely for the purpose of creating software that communicates with VMware
Products ("Developer Software").  For vSphere SDK for Perl, some code may be
designated as "distributable code" and/or "modifiable code" at
http://www.vmware.com/go/vsdkperl-redistribution-info.  For vSphere CLI,
some code may be designated as "distributable code" and/ or "modifiable
code" at http://www.vmware.com/go/vcli-redistribution-info.  You may use and
merge all or portions of the "distributable code" with your Developer
Software.  Any merged portion of any "distributable code" is subject to this
Agreement.  Additionally, you may modify or create derivative works of all
or portions of the "modifiable code."  You are permitted to re-distribute
the "distributable code" and the modified or derivative works of the
"modifiable code" only as part of your Developer Software for non-commercial
or commercial use.  Open source software components provided with the
Software are licensed to you under the terms of the applicable license
agreements included with such open source software components.  The open
source software licenses can be found in the open_source_licenses.txt file,
other materials accompanying the Software, the documentation or
corresponding source files available at http://www.vmware.com/download/vi/open_source.html.

3.  Restrictions:  You agree that you will not (1) use the Software to
create, design or develop anything other than Developer Software; (2) make
any more copies of the Software than are reasonably necessary for the
authorized use and backup and archival purposes; (3) modify, create
derivative works of, reverse engineer, reverse compile, or disassemble the
Software, except as expressly permitted in Section 2; (4) distribute, sell,
lease, rent, lend, or sublicense any part of the Software to any third party
except as expressly permitted in Section 2 or; (5) use the Software to (a)
create, design or develop software or service to circumvent, enable, modify
or provide access, permissions or rights which would violate the technical

Do you accept? (yes/no) yes

Thank you.

ld: cannot find -lcrypto
Unable to link the Crypt::SSLeay Perl module.  Secured connections will be 
unavailable until you install the Crypt::SSLeay module.

In which directory do you want to install the executable files? 
[/usr/bin] 

Please wait while copying vSphere CLI files...

The installation of vSphere CLI 4.0.0 build-161974 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: 
"/usr/bin/vmware-uninstall-vSphere-CLI.pl".

This installer has successfully installed both vSphere CLI and the vSphere SDK 
for Perl.

Enjoy,

--the VMware team

Crypt::SSLeay perlモジュールが無いと表示されたが、そのまま導入


vmware-cmdで確認してもエラーが発生している

# vmware-cmd --version
Can't locate URI.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at (eval 2) line 3.
Compilation failed in require at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/HTTP/Request.pm line 5.
Compilation failed in require at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/LWP/UserAgent.pm line 12.
BEGIN failed--compilation aborted at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/LWP/UserAgent.pm line 12.
Compilation failed in require at /usr/lib/perl5/5.8.8/VMware/VICommon.pm line 12.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.8/VMware/VICommon.pm line 12.
Compilation failed in require at /usr/lib/perl5/5.8.8/VMware/VIRuntime.pm line 15.
Compilation failed in require at /usr/bin/vmware-cmd line 8.
BEGIN failed--compilation aborted at /usr/bin/vmware-cmd line 8.

不足しているperlモジュールの導入
# yum install perl-URI
# yum install perl-Crypt-SSLeay

エラーもなくなったので完了

2011年12月5日月曜日

CentOS 4 のサポート終了

CentOS4 のサポートが、2012/2/29 で終了します。
これ以降は、パッチなどが提供されませんので、特にインターネットに公開しているサーバ等については、CentOS5 もしくは CentOS6 へのアップデートが必要です。

ちなみに、他リリースのサポート終了は、CentOS5は 2014/3/31 、CentOS6は 2017/11/30になっています。


CentOS ML の内容は以下になります。
==========================================================================
All,

The CentOS-4 distribution (current version 4.9) will be at End of Life

on February 29, 2012.  That means there is only 3 months left in the
life cycle.

This coincides with the date that the upstream provider stops releasing

updates for their EL4 products.

Users who still need the EL4 platform can contact Red Hat for their

Extended Lifecycle Support (ELS) product:

http://www.redhat.com/rhel/server/extended_lifecycle_support/


Be advised that the upstream provider does NOT release their ELS source

code publicly and therefore after February 29, 2012 they will no longer
release security updates for their EL4 product line.

Soon after 1 March 2012, the CentOS-4.9 tree will be moved off the main

CentOS mirrors and placed on http://vault.centos.org/ where it will be
available for reference.

All users currently using CentOS-4 are advised to begin planning the

upgrade to CentOS-5 (EOL Date: March 31, 2014) or CentOS-6 (EOL Date:
November 30, 2017) ... or a move to the upstream ELS program for EL4.

This will be the 3rd enterprise Linux distribution that the CentOS

Project has taken to EOL, with CentOS-4.9 joining CentOS-3.9 and
CentOS-2.1 in the vault.

If you have any questions, please use one of the getting help methods

from the CentOS Wiki:

http://wiki.centos.org/Documentation?action=show


Thanks,

Johnny Hughes
==========================================================================

2011年8月12日金曜日

CentOS5.6 x86_64 に ffmpeg0.8.2 とsegmenter を導入する

CentOS5.6(x86_64) に ffmpeg0.8.2 と segmenter の導入に成功したので公開します。


■必須パッケージの導入

zlib
# yum install zlib-devel

glib2
# yum install glib2-devel

gcc
# yum install gcc
# yum install gcc-c++

git(epel)
# yum install git

yasm(epel)
x264、WebMで必要。SSE高速化。
# yum install yasm
# yum install yasm-devel


■ソースからの導入

faac
# wget http://sourceforge.net/projects/faac/files/faac-src/faac-1.28/faac-1.28.tar.gz/download
# tar xvfz faac-1.28.tar.gz
# cd faac-1.28
# ./configure
# make
# make install

faad
# wget http://sourceforge.net/projects/faac/files/faad2-src/faad2-2.7/faad2-2.7.tar.gz/download
# tar xvfz faad2-2.7.tar.gz
# cd faad2-2.7
# ./configure
# make
# make install

lame mp3
# wget http://sourceforge.net/projects/lame/files/lame/3.98.4/lame-3.98.4.tar.gz/download
# tar xvfz lame-3.98.4.tar.gz
# cd lame-3.98.4
# ./configure
# make
# make install

ogg
# wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
# tar xvfz libogg-1.3.0.tar.gz
# cd libogg-1.3.0
# ./configure
# make
# make install

libogg有効化
# vi /etc/ld.so.conf
/usr/local/lib 追記
# /sbin/ldconfig

theora
# wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
# tar xvfz libtheora-1.1.1.tar.gz
# cd libtheora-1.1.1
# ./configure
# make
# make install

vorbis
# wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz
# tar xvfz libvorbis-1.3.2.tar.gz
# cd libvorbis-1.3.2
# ./configure
# make
# make install

xvid
# wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz
# tar xvfz xvidcore-1.2.2.tar.gz
# cd xvidcore
# cd build
# cd generic
# ./configure
# make
# make install

gpac
# wget http://downloads.sourceforge.net/gpac/gpac-0.4.5.tar.gz
# wget http://downloads.sourceforge.net/gpac/gpac_extra_libs-0.4.5.tar.gz
# tar xvfz gpac-0.4.5.tar.gz
# tar xvfz gpac_extra_libs-0.4.5.tar.gz
# cd gpac
# cp -r ../gpac_extra_libs/* extra_lib/
# chmod 755 configure
# ./configure
# make lib
# make apps
# make install-lib
# make install

x264
# git clone git://git.videolan.org/x264.git x264
# cd x264
# ./configure --enable-shared
# make
# make install

webm
# wget http://webm.googlecode.com/files/libvpx-v0.9.7.tar.bz2
# tar jxvf libvpx-v0.9.7.tar.bz2
# cd libvpx-v0.9.7
# ./configure --enable-pic
# make
# make install

ffmpeg
# wget http://www.ffmpeg.org/releases/ffmpeg-0.8.2.tar.gz
# tar xvfz ffmpeg-0.8.2.tar.gz
# cd ffmpeg-0.8.2
# ./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-shared --enable-libx264 --enable-libvpx --enable-libxvid --enable-libtheora --enable-libvorbis --enable-postproc
# make
# make install
警告が多数表示されますが、エラーがなければOKです。

segmenter
# mkdir segmenter
# cd segmenter
# wget http://svn.assembla.com/svn/legend/segmenter/Makefile
# wget http://svn.assembla.com/svn/legend/segmenter/segmenter.c
# vi segmenter.c
53行目 case CODEC_TYPE_AUDIO: → case AVMEDIA_TYPE_AUDIO:
65行目 case CODEC_TYPE_VIDEO: → case AVMEDIA_TYPE_VIDEO:
242行目 ofmt = guess_format("mpegts", NULL, NULL); → ofmt = av_guess_format("mpegts", NULL, NULL);
260行目 case CODEC_TYPE_VIDEO: → case AVMEDIA_TYPE_VIDEO:
265行目 case CODEC_TYPE_AUDIO: → case AVMEDIA_TYPE_AUDIO:
320行目 if (packet.stream_index == video_index && (packet.flags & PKT_FLAG_KEY)) { → if (packet.stream_index == video_index && (packet.flags & AV_PKT_FLAG_KEY)) {

# make
# make install


2011年7月28日木曜日

RedHat Enterprise Linux 5.6 x86_64 に nrpe(epel) を導入する時に必要なパッケージ

nagios-common-2.12-10.el5.x86_64.rpm
nagios-plugins-1.4.15-2.el5.x86_64.rpm
nagios-plugins-disk-1.4.15-2.el5.x86_64.rpm
nagios-plugins-load-1.4.15-2.el5.x86_64.rpm
nagios-plugins-mailq-1.4.15-2.el5.x86_64.rpm
nagios-plugins-perl-1.4.15-2.el5.x86_64.rpm
nagios-plugins-procs-1.4.15-2.el5.x86_64.rpm
nagios-plugins-users-1.4.15-2.el5.x86_64.rpm
nrpe-2.12-16.el5.x86_64.rpm

RedHat Enterprise Linux 5.6 x86_64 に net-snmp を導入する際に必要なパッケージ

libsysfs-2.0.0-6.i386.rpm
libsysfs-2.0.0-6.x86_64.rpm
lm_sensors-2.10.7-9.el5.i386.rpm
lm_sensors-2.10.7-9.el5_5.1.x86_64.rpm
sysfsutils-2.0.0-6.x86_64.rpm

RedHat Enterprise Linux 5.6 x86_64 にpuppet(epel)を導入する時に必要なパッケージ

epelで配布しているパッケージと混在しています。

augeas-libs-0.8.1-2.el5.i386.rpm
augeas-libs-0.8.1-2.el5.x86_64.rpm
facter-1.5.9-1.el5.noarch.rpm
libselinux-ruby-1.33.4-5.7.el5.x86_64.rpm
puppet-0.25.5-1.el5.noarch.rpm
ruby-augeas-0.4.1-1.el5.x86_64.rpm
ruby-libs-1.8.5-5.el5_4.8.i386.rpm
ruby-libs-1.8.5-5.el5_4.8.x86_64.rpm
ruby-shadow-1.4.1-7.el5.x86_64.rpm

2011年3月31日木曜日

iPhone - Apache でSSLクライアント認証ができなくなりました

ハードウェアリプレイスに伴い、CentOS4.8を導入し、ApacheはRPMで導入し、SSL関連のファイルも全てコピー&設定して、iPhoneから接続すると、SSLクライアント認証が失敗しました。

IEなどのブラウザからは問題なくアクセスできました。

旧ハードウェアのOSは、CentOS4.4です。
httpdのバージョンは、2.0.52-28から2.0.52-47になっています。

Apacheの ssl_error_log には見たことがないログが表示されています。

[Wed Mar 30 21:06:17 2011] [error] Re-negotiation request failed
[Wed Mar 30 21:06:17 2011] [error] SSL Library Error: 336068931 error:14080143:SSL routines:SSL3_ACCEPT:unsafe legacy renegotiation disabled


調査の結果、アップデートでセキュリティ関連の変更があったみたいです。

Apacheの ssl.confに
SSLInsecureRenegotiation on
の設定を追加すると、クライアント認証が通りました。


自動アップデート設定されている方は注意が必要ですね。

2011年2月21日月曜日

RSA鍵を使っての認証に失敗する

ホームディレクトリ(例:/home/ibs)の権限(例:771)を変更すると、RSA鍵を使ってのログインが出来なくなりました。

ログ(/var/log/secure)にエラーが表示されています。
Authentication refused: bad ownership or modes for directory /home/ibs


調査してみると、/etc/ssh/ssd_configの設定に、「StrictModes no」を追加することでログイン可能になりました。

/homeディレクトリの権限をチェックしているので、無効にする必要があります。

2011年2月17日木曜日

Oracle 10g フラッシュリカバリエリアの監視

フラッシュリカバリエリアが一杯になって、サービスが停止になる状態を引き起こした事はありませんか?

弊社は、お客様からアウトソーシングされている、Oracle 10g で引き起こしてしまい、大変迷惑をおかけしたことがあります。

この様な事態を二度と引き起こさないようにするために、空き容量を監視し、空き容量が少なくなった場合にはメール送信できないか調査してみました。

調査してみると、Oracleにもその機能をもっているが、利用するためには、EnterpriseEditionにして、さらに Database Diagnostics Pack を購入する必要がありそうでした。
※実際に購入したことはありません。

Flash Recovery Area を監視するだけのために、この提案は気が引けます。


結局自分で作ることにしたところ、簡単に出来ましたので紹介します。
シェルとswatchを利用しているので、Linux限定になります。

Oracleにアクセスして、容量をログに出力するシェルを作成しました。
#!/bin/bash
export LOGFILE=/var/log/ibs/oracle_flash_area_check.log

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=${ORACLE_BASE}/product/10.2.0/db_1
export ORA_CRS_HOME=/u01/app/oracrs/crs102
export ORACLE_SID=orcl
export PATH=${ORACLE_HOME}/bin:${ORA_CRS_HOME}/bin:${PATH}
export NLS_LANG=Japanese_Japan.AL32UTF8
export LD_LIBRARY_PATH=${ORACLE_HOME}/lib:${LD_LIBRARY_PATH}

# しきい値は50GBにしているので変更する場合は下記SQLの
# SIGN(USE-50)を変更する。

sqlplus -s system/パスワード@orcl << EOF > /dev/null
set pagesize 1000
set linesize 150
set feedback off
set heading off
spool ${LOGFILE} append
select dt||' サーバ名(${ORACLE_SID}) PATH:'||name||
' space_used:'||space_used||' space_limit:'||space_limit||' use:'||USE||'% result:'||
DECODE(SIGN(USE-50), 1, 'SPACE_NG', 0, 'SPACE_OK', -1, 'SPACE_OK')
from (
select name,
to_char(sysdate,'yyyy/mm/dd hh24:mi:ss') as dt
,trunc(space_used/space_limit * 100) as USE
,trunc(space_limit/1024/1024/1024)||'GB' as space_limit
,trunc(space_used/1024/1024/1024)||'GB' as space_used
from v\$recovery_file_dest);
spool off
exit
EOF

ログディレクトリを作成します。
[root@oracle ~]# mkdir /var/log/ibs

ログディレクトリには下記が出力されます。
2011/02/16 15:10:01 サーバ名(orcl) PATH:+DG1 space_used:0GB space_limit:97GB use:0% result:SPACE_OK
もししきい値を超えると、「SPACE_OK」が「SPACE_NG」になりますので、「SPACE_NG」を swatch で設定します。

swatch設定
watchfor /SPACE_NG/
mail addresses=送信先メールアドレス,subject=oracle_flash_area_check_ng\(サーバ名\) Warning

以上で完成です。
もし警告が発生したら、計画停止で容量を増加させます。

2011年1月26日水曜日

Asterisk1.8のインストール(CentOS5.5 x86_64)

AsteriskはオープンソースのIP-PBXになります。Asteriskについての詳しい説明は省略します。


CentOS5.5(x86_64)に、Asteriskを導入しIP-PBXを構築します。
RedHat EL 6 のEPELレポジトリには、asteriskが登場していますがCentOS5にはありません。なので今回はASTERISKのYUMレポジトリからインストールしてみます。

今回の目標到達点は、2台のPCにソフトフォンを導入し、内線電話で話せるところまでです。

最終目標としては、社内のPBXを置き換えることができるかどうか判断したいと思います。
もし置き換えることができれば、電話関係の作業は全て社内でできるようになります。



■CentOSをインストールした後、パッケージを最新の状態にしておきます。
[root@asterisk ~]# yum -y update



■ASTERISKのYUMレポジトリを追加する。
[root@asterisk ~]# vi /etc/yum.repos.d/centos-asterisk.repo


[asterisk-tested]
name=CentOS-$releasever - Asterisk - Tested
baseurl=http://packages.asterisk.org/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium

[asterisk-current]
name=CentOS-$releasever - Asterisk - Current
baseurl=http://packages.asterisk.org/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium



[root@asterisk ~]# vi /etc/yum.repos.d/centos-digium.repo


[digium-tested]
name=CentOS-$releasever - Digium - Tested
baseurl=http://packages.digium.com/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium

[digium-current]
name=CentOS-$releasever - Digium - Current
baseurl=http://packages.digium.com/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium



■インストールするパッケージを確認します。
[root@asterisk ~]# yum info asterisk18
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: ftp.oss.eznetsols.org
 * base: ftp.oss.eznetsols.org
 * extras: ftp.oss.eznetsols.org
 * updates: ftp.iij.ad.jp
Available Packages
Name       : asterisk18
Arch       : x86_64
Version    : 1.8.2.2
Release    : 1_centos5
Size       : 3.1 k
Repo       : asterisk-current
Summary    : Asterisk, The Open Source PBX
URL        : http://www.asterisk.org
License    : GPL
Description: Asterisk is an open source PBX and telephony development platform.  Asterisk
           : can both replace a conventional PBX and act as a platform for the
           : development of custom telephony applications for the delivery of dynamic
           : content over a telephone; similar to how one can deliver dynamic content
           : through a web browser using CGI and a web server.
           :
           : Asterisk supports a variety of telephony hardware including BRI, PRI, POTS,
           : and IP telephony clients using the Inter-Asterisk eXchange (IAX) protocol
           : (e.g. gnophone or miniphone).  For more information and a current list of
           : supported hardware, see http://www.asterisk.org



■asterisk18をインストールします。
[root@asterisk ~]# yum -y asterisk18

Installed:

  asterisk18.x86_64 0:1.8.2.2-1_centos5

Dependency Installed:
  asterisk-sounds-core-en-gsm.noarch 0:1.4.20-1_centos5
  asterisk18-core.x86_64 0:1.8.2.2-1_centos5
  asterisk18-dahdi.x86_64 0:1.8.2.2-1_centos5
  asterisk18-doc.x86_64 0:1.8.2.2-1_centos5
  asterisk18-voicemail.x86_64 0:1.8.2.2-1_centos5
  dahdi-firmware.noarch 0:2.0.2-1_centos5
  dahdi-firmware-hx8.noarch 0:2.06-1_centos5
  dahdi-firmware-oct6114-064.noarch 0:1.05.01-1_centos5
  dahdi-firmware-oct6114-128.noarch 0:1.05.01-1_centos5
  dahdi-firmware-tc400m.noarch 0:MR6.12-1_centos5
  dahdi-linux.x86_64 0:2.4.0-1_centos5
  kmod-dahdi-linux.x86_64 0:2.4.0-1_centos5.2.6.18_194.32.1.el5
  kmod-dahdi-linux-fwload-vpmadt032.x86_64 0:2.4.0-1_centos5.2.6.18_194.32.1.el5
  libopenr2.x86_64 0:1.2.0-1_centos5
  libpri.x86_64 0:1.4.11.5-1_centos5
  libss7.x86_64 0:1.0.2-1_centos5
  libtonezone.x86_64 0:2.4.0-2_centos5
  yum-kmod.noarch 0:1.1.16-14.el5.centos.1

Complete!


■configファイルをインストールします。
[root@asterisk ~]# yum -y install asterisk18-configs

Installed:
  asterisk18-configs.x86_64 0:1.8.2.2-1_centos5

Complete!


■asteriskを起動します。
[root@asterisk ~]# service asterisk start
Starting asterisk:                                         [  OK  ]


■起動を確認します。
[root@asterisk ~]# netstat -an -udp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
udp        0      0 0.0.0.0:5000                0.0.0.0:*                               7316/asterisk
udp        0      0 0.0.0.0:4520                0.0.0.0:*                               7316/asterisk
udp        0      0 0.0.0.0:5060                0.0.0.0:*                               7316/asterisk
udp        0      0 0.0.0.0:4569                0.0.0.0:*                               7316/asterisk
asterisk関係が動作してればOK

[root@asterisk ~]# asterisk -vvvr
Verbosity is at least 3
asterisk*CLI> quit
コンソールが利用できればOK


■asterisk 内線の設定
[root@asterisk ~]# vi /etc/asterisk/sip.conf
[2000]
type=friend
username=test1
secret=password
canreinvite=no
host=dynamic

[2001]
type=friend
username=test2
secret=password
canreinvite=no
host=dynamic


■asterisk 内線のダイヤルプラン設定
[root@asterisk ~]# vi /etc/asterisk/extensions.conf
[default]
exten => 2000,1,Dial(SIP/2000,30)
exten => 2000,2,Congestion
exten => 2000,102,Busy

exten => 2001,1,Dial(SIP/2000,30)
exten => 2001,2,Congestion
exten => 2001,102,Busy

■asterisk再起動
[root@asterisk ~]# /etc/init.d/asterisk restart
Stopping safe_asterisk:                                    [  OK  ]
Shutting down asterisk:                                    [  OK  ]
Starting asterisk:                                         [  OK  ]


上記までで、asteriskの設定は終わりです。
次は、ソフトフォンをセットアップ&設定します。
ソフトウェアは、X-Lite4 を使用しました。

導入後に設定します。
PC1
UserID:2000
Domain:asteriskサーバIPアドレス
Password:password
Diplay name:test1
Authorizaton name:2000

PC2
UserID:2001
Domain:asteriskサーバIPアドレス
Password:password
Diplay name:test2
Authorizaton name:2001

これで設定完了し、無事に通話までできました!

2011年1月18日火曜日

swatch導入時に必要なパッケージ(RedHat EL 5.4 x86_64)

swatchをRedHat Enterprise Linux 5.4 x86_64に導入する際に必要なパッケージをまとめます。

perl-Bit-Vector-6.4-2.2.2.1.x86_64.rpm(メディア)
perl-Carp-Clan-5.3-1.2.1.noarch.rpm(メディア)
perl-Date-Calc-5.4-1.2.2.1.x86_64.rpm(メディア)
perl-DateManip-5.44-1.2.1.noarch.rpm(メディア)
perl-File-Tail-0.99.3-5.el5.1.noarch.rpm(epel)
perl-Mail-Sendmail-0.79-9.el5.1.noarch.rpm(epel)
perl-TimeDate-1.16-5.el5.noarch.rpm(メディア)

*(メディア)はインストールメディアです。
*(epel)は、http://ftp.riken.jp/Linux/fedora/epel/5/x86_64/ からです。
*標準で入っているパッケージで必須パッケージがある場合は、上記以外にもパッケージが必要になるかも知れません。


これで、自分は swatch-3.2.3.tar.gz がインストールできました。

swatch3.2.3は、sourceforgeからダウンロードしました。


☆簡単ですがインストール方法です。

# rpm -Uvh perl-*
警告: perl-Bit-Vector-6.4-2.2.2.1.x86_64.rpm: ヘッダ V3 DSA signature: NOKEY, key ID 37017186
警告: perl-File-Tail-0.99.3-5.el5.1.noarch.rpm: ヘッダ V3 DSA signature: NOKEY, key ID 217521f6
準備中...                ########################################### [100%]
   1:perl-Carp-Clan         ########################################### [ 14%]
   2:perl-Bit-Vector        ########################################### [ 29%]
   3:perl-Date-Calc         ########################################### [ 43%]
   4:perl-DateManip         ########################################### [ 57%]
   5:perl-File-Tail         ########################################### [ 71%]
   6:perl-Mail-Sendmail     ########################################### [ 86%]
   7:perl-TimeDate          ########################################### [100%]

# tar xvfz swatch-3.2.3.tar.gz


# cd swatch-3.2.3



# perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for swatch
*パッケージが不足していた場合などの問題があればここで表示されるらしいです。

# make
cp lib/Swatch/Threshold.pm blib/lib/Swatch/Threshold.pm
cp lib/Swatch/Throttle.pm blib/lib/Swatch/Throttle.pm
cp lib/Swatch/Actions.pm blib/lib/Swatch/Actions.pm
AutoSplitting blib/lib/Swatch/Actions.pm (blib/lib/auto/Swatch/Actions)
cp swatch blib/script/swatch
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/swatch
Manifying blib/man1/swatch.1
Manifying blib/man3/Swatch::Threshold.3pm
Manifying blib/man3/Swatch::Throttle.3pm
Manifying blib/man3/Swatch::Actions.3pm

# make install
Installing /usr/lib/perl5/site_perl/5.8.8/auto/Swatch/Actions/autosplit.ix
Installing /usr/lib/perl5/site_perl/5.8.8/Swatch/Threshold.pm
Installing /usr/lib/perl5/site_perl/5.8.8/Swatch/Throttle.pm
Installing /usr/lib/perl5/site_perl/5.8.8/Swatch/Actions.pm
Installing /usr/share/man/man1/swatch.1
Installing /usr/share/man/man3/Swatch::Throttle.3pm
Installing /usr/share/man/man3/Swatch::Actions.3pm
Installing /usr/share/man/man3/Swatch::Threshold.3pm
Installing /usr/bin/swatch
Writing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/swatch/.packlist
Appending installation info to /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod