ホーム > アーカイブ > 2009年3月のアーカイブ
2009年3月のアーカイブ
mysql 5.1.3とphp 5.2.9にアップデート
- 2009年3月15日 4:16 AM
- CentOS5.2
CentOS 5.2で、Mysql5.1.3 php5.2.9にアップデートする。
最新版のPHPとついでにMysqlをアップデートするので、リポジトリを追加しておく。
まだ、追加していない場合は下記のリンクを参考にして追加して下さい。
レポジトリを追加したら、php と mysqlのアップデートを実行します。
[root@centos ~]# yum -y -–enablerepo=remi,epel,rpmforge update php* mysql* httpd をリスタート [root@centos ~]# /etc/rc.d/init.d/httpd restart mysql をリスタート [root@centos ~]# /etc/rc.d/init.d/mysqld restart
php バージョン確認
[root@centos ~]# php -v PHP 5.2.9 (cli) (built: Feb 27 2009 14:42:58) mysql バージョン確認 # mysql --version mysql Ver 14.14 Distrib 5.1.32, for redhat-linux-gnu (i686) using readline 5.1
UPS apcupsd 導入
- 2009年3月13日 7:41 PM
- CentOS5.2
apcupsdのインストールと設定UPS(無停電電源管理)
停電対策に、APC社のRS 900(通信ケーブル:USB)を利用しました。
apcupsdをインストールする。
[root@centos ~]# yum install apcupsd
/etc/apcupsd/apcupsd.confを以下のように設定する。
[root@centos ~]# vi /etc/apcupsd/apcupsd.conf # for apcupsd release 3.14.3 (20 January 2008) - redhat UPSCABLE usb UPSTYPE usb #DEVICEはコメントアウトで自動認識 #DEVICE /dev/hiddev0 LOCKFILE /var/lock ONBATTERYDELAY 6 BATTERYLEVEL 5 MINUTES 3 TIMEOUT 1800 ANNOY 300 ANNOYDELAY 60 NOLOGON disable KILLDELAY 0 NETSERVER on NISIP 0.0.0.0 NISPORT 3551 EVENTSFILE /var/log/apcupsd.events EVENTSFILEMAX 10 UPSCLASS standalone UPSMODE disable STATTIME 0 STATFILE /var/log/apcupsd.status LOGSTATS off DATATIME 0
TIMEOUT 1800:バッテリに動作が切り替わってから1800秒後=30分後 にシャットダウン
apcupsdを起動する。
[root@centos ~]# /etc/init.d/apcupsd start [root@centos ~]# chkconfig apcupsd on
remi レポジトリを追加
- 2009年3月12日 4:21 PM
- Linux
Les RPM de Remi リポジトリを追加
GPGキーをインポート
[root@server ~]# rpm –import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
リポジトリファイルを追加
[root@server ~]# cd /etc/yum.repos.d [root@server ~]# wget http://rpms.famillecollet.com/remi-enterprise.repo
remi リポジトリファイルを編集
[root@server ~]# vi /etc/yum.repos.d/remi-enterprise.repo [remi] name=Les RPM de remi pour Enterpise Linux $releasever - $basearch baseurl=http://rpms.famillecollet.com/el$releasever.$basearch/ http://iut-info.univ-reims.fr/remirpms/el$releasever.$basearch/ enabled=0 gpgcheck=1 gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi failovermethod=priority [remi-test] name=Les RPM de remi en test pour Enterpise Linux $releasever - $basearch baseurl=http://remi.collet.free.fr/rpms/test-el$releasever.$basearch/ enabled=0 gpgcheck=1 gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi
デフォルトで常時有効になっているので、
[remi]のenabled=1をenabled=0に変更する。
remi レポジトリを使用するには、
[root@server ~]# yum -–enablerepo=remi update
epel リポジトリを追加
- 3:37 PM
- Linux
EPEL(Extra Packages for Enterprise Linux )epel リポジトリをインストールする
# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
デフォルトで 常時有効設定 enabled=1になっています。
当方の環境では、有効設定で問題ないですが、必要時だけ接続したい場合は epel.repoファイルを編集してenabled=0にする。
epel設定ファイルを編集(/etc/yum.repos.d/epel.repo)
[root@server ~]# vi /etc/yum.repos.d/epel.repo [epel] name=Extra Packages for Enterprise Linux 5 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch failovermethod=priority enabled=0 ←変更 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL [epel-debuginfo] name=Extra Packages for Enterprise Linux 5 - $basearch - Debug #baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debug mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL gpgcheck=1 [epel-source] name=Extra Packages for Enterprise Linux 5 - $basearch - Source #baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL gpgcheck=1
# yum --enablerepo=epel update ← enabled=0の場合これで、epel リポジトリのパッケージを導入できます。
RPMforge リポジトリを追加
- 2009年3月11日 3:19 PM
- Linux
RPMforge リポジトリを追加する
標準リポジトリとRPMforgeリポジトリで、重複するパッケージがあった場合 yum-prioritiesをインストールして、標準リポジトリを優先する。
priority=1 ← 番号が小さいほど優先順位は上
# yum -y install yum-priorities ← yum-priorities インストールする # vi /etc/yum.repos.d/CentOS-Base.repo ← 標準リポジトリの設定ファイルを編集 [base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5 priority=1 ← 追加する #released updates [updates] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5 priority=1 ← 追加する #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5 priority=1 ← 追加する #additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5 priority=1 ← 追加する
# rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt # wget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm # rpm -Uhv rpmforge-release-0.5.2-2.el5.rf.i386.rpmこれで、 # yum updateで、rpmforgeのパッケージも導入される
ホーム > アーカイブ > 2009年3月のアーカイブ
- サイト内検索
- VPS
- domain
- Linux
- 買い物
KENCOM.BIZ- メタ情報
