投げ銭

★当サイトへの投げ銭(PayPal)★

LINK


(無償、寄付歓迎) logo
世界中で使われるISO標準オフィスソフト(MSオフィス互換)

★LibreOfficeの導入事例★
詳細について

人気の投稿(1ヶ月間)

Ad

Ad

投げ銭

★当サイトへの投げ銭(PayPal)★

2009年11月8日日曜日

【Linux CentOS5.3】ASTERISKをYUMリポジトリからインストールする

これは古い情報です。
新しい方法は、リンク先をご覧ください。
http://akira-arets.blogspot.jp/2014/05/centos65asterisk11yum.html



■ASTERISKのためのリポジトリを二箇所、追加する


<1つ目>
# 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

<二つ目>
# 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



■追加したリポジトリからのインストール


インストールするパッケージを確認する
# yum info asterisk16
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: www.ftp.ne.jp
 * base: www.ftp.ne.jp
 * epel: ftp.kddilabs.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Available Packages
Name       : asterisk16
Arch       : i386
Version    : 1.6.0.17
Release    : 1_centos5
Size       : 4.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

対象のパッケージをインストールする
# yum install asterisk16
------------------------------------------------------------------------------------------
Total                                                     421 kB/s |  19 MB     00:47
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : asterisk16-core                                                   1/17
  Installing     : kmod-dahdi-linux                                                  2/17
  Installing     : asterisk16-doc                                                    3/17
  Installing     : dahdi-firmware-tc400m                                             4/17
  Installing     : asterisk-sounds-core-en-gsm                                       5/17
  Installing     : dahdi-firmware-oct6114-064                                        6/17
  Installing     : yum-kmod                                                          7/17
  Installing     : kmod-dahdi-linux-fwload-vpmadt032                                 8/17
  Installing     : dahdi-firmware-oct6114-128                                        9/17
  Installing     : asterisk16-voicemail                                             10/17
  Installing     : libtonezone                                                      11/17
  Installing     : libss7                                                           12/17
  Installing     : libpri                                                           13/17
  Installing     : dahdi-firmware                                                   14/17
  Installing     : dahdi-linux                                                      15/17
  Installing     : asterisk16-dahdi                                                 16/17
  Installing     : asterisk16                                                       17/17

Installed:
  asterisk16.i386 0:1.6.0.17-1_centos5

Dependency Installed:
  asterisk-sounds-core-en-gsm.noarch 0:1.4.15-1_centos5
  asterisk16-core.i386 0:1.6.0.17-1_centos5
  asterisk16-dahdi.i386 0:1.6.0.17-1_centos5
  asterisk16-doc.i386 0:1.6.0.17-1_centos5
  asterisk16-voicemail.i386 0:1.6.0.17-1_centos5
  dahdi-firmware.noarch 0:2.0.1-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.i386 0:2.2.0.2-1_centos5
  kmod-dahdi-linux.i686 0:2.2.0.2-1_centos5.2.6.18_164.6.1.el5
  kmod-dahdi-linux-fwload-vpmadt032.i686 0:2.2.0.2-1_centos5.2.6.18_164.6.1.el5
  libpri.i386 0:1.4.10.2-1_centos5
  libss7.i386 0:1.0.2-1_centos5
  libtonezone.i386 0:2.2.0-1_centos5
  yum-kmod.noarch 0:1.1.16-13.el5.centos

Complete!

これでASTERISK ver1.6といくつかの関連パッケージがインストールされた。


■サンプルCONFIGファイルをインストールする
Name       : asterisk16-configs
Arch       : i386
Version    : 1.6.0.17
Release    : 1_centos5
Size       : 138 k
Repo       : asterisk-current
Summary    : Basic configuration files for Asterisk
URL        : http://www.asterisk.org
License    : GPL
Description: The sample configuration files for Asterisk
 このようなサンプル設定ファイルがある。これをインストールすることで、
設定ファイルをどのディレクトリに置くべきか、そしてどう記述するべきかがわかる。

# yum install asterisk16-configs
Running Transaction
  Installing     : asterisk16-configs                                                 1/1

Installed:
  asterisk16-configs.i386 0:1.6.0.17-1_centos5

Complete!

■chkconfigでサービスをスタートできるように設定する

インストール後には/etc/init.d/asterisk start で、サービスをスタートさせられるようになっている。
しかし、システム起動時に自動的にasteriskが起動するように、chkconfigに登録しておく。

#chkconfig --add asterisk

次のようにして起動させられるが、その前に、設定ファイルを確認し準備しておく。
#service asterisk restart


(参考)http://www.asterisk.org/downloads/yum

【CentOS5.3】リポジトリEPELを使用する

■Red Hat Enterprise Linux の拡張パッケージ集、EPELをリポジトリとして使用する

# rpm -ivh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

これで、完了。

2009年11月6日金曜日

【Linux CentOS5.4】 SSDを長持ちさせる設定

■アクセスタイムスタンプ更新機能を止める

以下のようにfstab設定ファイルを編集しnoatimeオプションを設定する。
これによって、ファイルへのアクセスの度にアクセスタイムスタンプが更新されずに済む。

 # vi /etc/fstab
/dev/VolGroup00/LogVol00 /                       ext3    defaults,noatime        1 1
LABEL=/boot             /boot                   ext3    defaults,noatime        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
再起動させる
 #reboot


■osがswapを使用しないように設定するる

次の行を追記設定することで、ディスクへアクセスを減らす。
スワップを使用しない設定と、キャッシュのディスクへの書き込み頻度を下げる(15秒ごとに変更)

# vi /etc/sysctl.conf
vm.swappiness = 0
vm.dirty_writeback_centisecs = 1500

 再起動させる
 #reboot


■mlocateを、毎日ではなく、毎週実行するように変更する

# mv /etc/cron.daily/mlocate.cron /etc/cron.weekly/


(参考)
おいぬま日報 Ubuntu LinuxでSSDの寿命を延ばすための設定
< http://tech.lampetty.net/tech/index.php/archives/299 >

(参考)
 Linux Tips「ハードディスク」 < http://www.itmedia.co.jp/help/tips/linux/l0298.html >

【CentOS5.3】poweroffコマンドで自動的に電源が切れない場合の対処法

acpi=forceをカーネルパラメータに設定する

grub.confを以下のように編集し、再起動させる
# vi /boot/grub/grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-128.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet acpi=force
        initrd /initrd-2.6.18-128.el5.img

再起動させる
#reboot

【Linux CentOS5.3】yum-updatesdで自動更新

■yum-updatesdを利用して、自動更新できるようにする


yum-updatesdがインストールされていなければ、yumでインストールしておく
#yum install yum-updatesd


yum-updatesdの設定ファイルを下記のように編集する
# vi /etc/yum/yum-updatesd.conf

[main]
# how often to check for new updates (in seconds)
run_interval = 3600
# how often to allow checking on request (in seconds)
updaterefresh = 600
# how to send notifications (valid: dbus, email, syslog)
emit_via = syslog  ←syslogに変更
# should we listen via dbus to give out update information/check for
# new updates
#dbus_listener = yes ←コメントアウト

# automatically install updates
do_update = yes ←はい
# automatically download updates
do_download = yes ←はい
# automatically download deps of updates
do_download_deps = yes ←はい

サービスが自動的に起動するように設定する
#chkconfig yum-updatesd on


サービスをスタートさせる
#service yum-updatesd restart


■動作確認
topコマンドではyum-updatesdがアップデート作業を行っている時に以下のプロセスを確認できた。

19888 root      34  19 76220  60m 8056 D  1.7  6.4   2:20.39 yum-updatesd-he


投げ銭

★当サイトへの投げ銭(PayPal)★

Ad

Ad