忍者ブログ

鯖設定とプログラム

メモ。

<< | 2024/05 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | >>

[PR]

×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

PHP5.2.5にアップグレードする RHEL4(RedHat Enterprise Linux ES v4)

PHP5.2.4からPHP5.2.5にローカルサーバをアップグレードする。

前回のPHP5.2.3からPHP5.2.4にアップグレードと同様にインストールしてみる。

# cd /usr/local/src/

# wget http://jp.php.net/get/php-5.2.5.tar.bz2/from/this/mirror
# ls -al
php-5.2.5.tar.bz2

# tar jxvf php-5.2.5.tar.bz2
# cd php-5.2.5

# ./configure --prefix=/usr/local --bindir=/usr/local/bin/ --with-apxs2=/usr/sbin/apxs --with-mysql=/usr --enable-mbstring --enable-mbregex --with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --with-gettext --with-ncurses --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pspell --with-regex --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-discard-path --enable-wddx --without-oci8 --with-pear --with-kerberos=/usr/kerberos --with-ldap=shared --enable-bcmath --enable-shmop --enable-calendar --with-pdo-mysql --with-mcrypt

+--------------------------------------------------------------------+
| License:                                                                                                  |
| This software is subject to the PHP License, available in this                          |
| distribution in the file LICENSE.  By continuing this installation                        |
| process, you are bound by the terms of this license agreement.                        |
| If you do not agree with the terms of this license, you must abort                     |
| the installation process at this point.                                                           |
+--------------------------------------------------------------------+

Thank you for using PHP.

# make

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

アパッチを止める
/etc/init.d/httpd stop
インストール
# make install
アパッチ起動
/etc/init.d/httpd start

これでアップグレードは完了。

# php -v

5.2.5の情報に変わっていた。
公開サーバにも--with-pgsql=/usrを追加しインストールした。

PHPアップグレード履歴
PHP4.3.9からPHP5.1.5にアップグレード
PHP5.1.5からPHP5.2.0にアップグレード
PHP5.2.0からPHP5.2.1にアップグレード
PHP5.2.1からPHP5.2.3にアップグレード
PHP5.2.3からPHP5.2.4にアップグレード
PR

phpMyAdminを2.11.1にアップグレードする。

前回と同様にphpMyAdminをアップグレードする。

phpMyAdmin 2.11.1 UTF-8バージョン

# cd /usr/local/src/
# wget http://jaist.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.11.1-all-languages-utf-8-only.tar.bz2
# cp phpMyAdmin-2.11.1-all-languages-utf-8-only.tar.bz2 /var/www/html/
# cd /var/www/html/
# tar jxvf phpMyAdmin-2.11.1-all-languages-utf-8-only.tar.bz2
# cp phpMyAdmin/config.inc.php config.inc.php
# rm -rf phpMyAdmin
# mv phpMyAdmin-2.11.1-all-languages-utf-8-only phpMyAdmin
# cp config.inc.php phpMyAdmin/config.inc.php

前回の設定ファイルをコピーして保存しておき、フォルダごと削除。
phpMyAdmin-2.11.1-all-languagesフォルダをphpMyAdminに変更。
保存しておいた設定ファイルを新しいphpMyAdminフォルダにコピペ。

http://localhost/phpMyAdmin/ にブラウザからアクセス。
前回のcookieが残っているとログインした状態から始まるので、ログアウト。
ログイン画面が2.11.1になっており、ログイン後にも2.11.1になっていればOK。

これでアップグレードは完了。

phpMyAdminアップグレード履歴
phpMyAdmin2.8.2.4をインストール
phpMyAdmin2.8.2.4からphpMyAdmin 2.9.1.1にアップグレード
phpMyAdmin 2.9.1.1からphpMyAdmin 2.9.2にアップグレード
phpMyAdmin 2.9.2からphpMyAdmin 2.10.0.2にアップグレード
phpMyAdmin 2.10.0.2からphpMyAdmin 2.10.1にアップグレード

PHP5.2.4にアップグレードする RHEL4(RedHat Enterprise Linux ES v4)

PHP5.2.3からPHP5.2.4にローカルサーバをアップグレードする。
その後安定していれば公開サーバにも入れる。

前回のPHP5.2.1からPHP5.2.3にアップグレードと同様にインストールしてみる。

# cd /usr/local/src/

# wget http://jp.php.net/get/php-5.2.4.tar.bz2/from/this/mirror
# ls -al
php-5.2.4.tar.bz2

# tar jxvf php-5.2.4.tar.bz2
# cd php-5.2.4

# ./configure --prefix=/usr/local --bindir=/usr/local/bin/ --with-apxs2=/usr/sbin/apxs --with-mysql=/usr --enable-mbstr-enc-trans --enable-mbstring --enable-mbregex --enable-track-vars --with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --with-gettext --with-ncurses --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-png --with-pspell --with-regex --with-xml --with-expat-dir=/usr --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-discard-path --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --without-oci8 --with-pear --with-kerberos=/usr/kerberos --with-ldap=shared --enable-memory-limit --enable-bcmath --enable-shmop --enable-calendar --enable-dbx --enable-dio --with-pdo-mysql --enable-mcal --with-mcrypt

+--------------------------------------------------------------------+
| License:                                                                                                  |
| This software is subject to the PHP License, available in this                          |
| distribution in the file LICENSE.  By continuing this installation                        |
| process, you are bound by the terms of this license agreement.                        |
| If you do not agree with the terms of this license, you must abort                     |
| the installation process at this point.                                                           |
+--------------------------------------------------------------------+

Thank you for using PHP.

Notice: Following unknown configure options were used:

--enable-mbstr-enc-trans
--enable-track-vars
--with-png
--with-xml
--with-expat-dir=/usr
--enable-track-vars
--enable-trans-sid
--enable-yp
--enable-mbstr-enc-trans
--enable-memory-limit
--enable-dbx
--enable-dio
--enable-mcal

Check './configure --help' for available options

知らないオプションが設定されているとのメッセージが出る。
今までと同じ方法のアップグレードでは出なかったので、Changelogを見てみる。
すると、added check for unknown options passed to configure.とあった。
5.2.4からconfigure時にオプションのチェックが入るようになったので、このメッセージが出た。
今までもこれらのオプションは間違ってたのか・・・。しかもチェックのお陰で同じオプションを設定しているのに気づく。

指摘されたオプションを削除して再チャレンジ。

./configure --prefix=/usr/local --bindir=/usr/local/bin/ --with-apxs2=/usr/sbin/apxs --with-mysql=/usr --enable-mbstring --enable-mbregex --with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --with-gettext --with-ncurses --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pspell --with-regex --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-discard-path --enable-wddx --without-oci8 --with-pear --with-kerberos=/usr/kerberos --with-ldap=shared --enable-bcmath --enable-shmop --enable-calendar --with-pdo-mysql --with-mcrypt

+--------------------------------------------------------------------+
| License:                                                                                                  |
| This software is subject to the PHP License, available in this                          |
| distribution in the file LICENSE.  By continuing this installation                        |
| process, you are bound by the terms of this license agreement.                        |
| If you do not agree with the terms of this license, you must abort                     |
| the installation process at this point.                                                           |
+--------------------------------------------------------------------+

Thank you for using PHP.

今回はチェックにひっかかったオプションはない。

# make

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

アパッチを止める
/etc/init.d/httpd stop
インストール
# make install
アパッチ起動
/etc/init.d/httpd start

これでアップグレードは完了。

# php -v

5.2.4の情報に変わっていた。

PHPアップグレード履歴
PHP4.3.9からPHP5.1.5にアップグレード
PHP5.1.5からPHP5.2.0にアップグレード
PHP5.2.0からPHP5.2.1にアップグレード
PHP5.2.1からPHP5.2.3にアップグレード

LINUXでのWEPキーの設定

# vi /etc/sysconfig/network

下記の一行をpassの部分を書き換えて追加。
KEY=s:pass

phpMyAdminを2.10.1にアップグレードする。

前回と同様にphpMyAdminをアップグレードする。

phpMyAdmin 2.10.1 UTF-8バージョン

# cd /usr/local/src/
# wget http://jaist.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.10.1-all-languages-utf-8-only.tar.bz2
# cp phpMyAdmin-2.10.1-all-languages-utf-8-only.tar.bz2 /var/www/html/
# cd /var/www/html/
# tar jxvf phpMyAdmin-2.10.1-all-languages-utf-8-only.tar.bz2
# cp phpMyAdmin/config.inc.php config.inc.php
# rm -rf phpMyAdmin
# mv phpMyAdmin-2.10.1-all-languages-utf-8-only phpMyAdmin
# cp config.inc.php phpMyAdmin/config.inc.php

前回の設定ファイルをコピーして保存しておき、フォルダごと削除。
phpMyAdmin-2.10.1-all-languagesフォルダをphpMyAdminに変更。
保存しておいた設定ファイルを新しいphpMyAdminフォルダにコピペ。

http://localhost/phpMyAdmin/ にブラウザからアクセス。
前回のcookieが残っているとログインした状態から始まるので、ログアウト。
ログイン画面が2.10.1になっており、ログイン後にも2.10.1になっていればOK。

また、前回出ていた、
mcrypt 拡張をロードできません。PHP の設定を確認してください」というエラーも、
PHPアップグレード時に対応しておいたので出なかった。

これでアップグレードは完了。

phpMyAdminアップグレード履歴
phpMyAdmin2.8.2.4をインストール
phpMyAdmin2.8.2.4からphpMyAdmin 2.9.1.1にアップグレード
phpMyAdmin 2.9.1.1からphpMyAdmin 2.9.2にアップグレード
phpMyAdmin 2.9.2からphpMyAdmin 2.10.0.2にアップグレード

PHP5.2.3にアップグレードする RHEL4(RedHat Enterprise Linux ES v4)

PHP5.2.1からPHP5.2.3にローカルサーバをアップグレードする。
その後安定していれば公開サーバにも入れる。

前回phpMyAdminをアップグレードした時に、
mcrypt 拡張をロードできません。PHP の設定を確認してください」というエラーが出ていたので、
下記にて対応する。

--対応ここから--
libmcrypt-2.5.7-1.2.el4.rf.i386.rpm
libmcrypt-devel-2.5.7-1.2.el4.rf.i386.rpm
を用意しインストールしておく。
# cd /usr/local/src/
# wget http://dag.wieers.com/rpm/packages/libmcrypt/libmcrypt-2.5.7-1.2.el4.rf.i386.rpm
# wget ftp://fr2.rpmfind.net/linux/dag/redhat/el4/en/i386/dag/RPMS/libmcrypt-devel-2.5.7-1.2.el4.rf.i386.rpm
# rpm -ivh libmcrypt-2.5.7-1.2.el4.rf.i386.rpm
# rpm -ivh libmcrypt-devel-2.5.7-1.2.el4.rf.i386.rpm
これで準備完了
configure時に--with-mcryptを追加する
--対応ここまで--

前回のPHP5.2.0からPHP5.2.1にアップグレードと同様に全く問題なしにインストール出来た。

# cd /usr/local/src/

# wget http://jp.php.net/get/php-5.2.3.tar.bz2/from/this/mirror
# ls -al
php-5.2.3.tar.bz2

# tar jxvf php-5.2.3.tar.bz2
# cd php-5.2.3

前回との違いは--with-mcryptを追加している
# ./configure --prefix=/usr/local --bindir=/usr/local/bin/ --with-apxs2=/usr/sbin/apxs --with-mysql=/usr --enable-mbstr-enc-trans --enable-mbstring --enable-mbregex --enable-track-vars --with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --with-gettext --with-ncurses --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-png --with-pspell --with-regex --with-xml --with-expat-dir=/usr --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-discard-path --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --without-oci8 --with-pear --with-kerberos=/usr/kerberos --with-ldap=shared --enable-memory-limit --enable-bcmath --enable-shmop --enable-calendar --enable-dbx --enable-dio --with-pdo-mysql --enable-mcal --with-mcrypt

+--------------------------------------------------------------------+
| License:                                                                                                  |
| This software is subject to the PHP License, available in this                          |
| distribution in the file LICENSE.  By continuing this installation                        |
| process, you are bound by the terms of this license agreement.                        |
| If you do not agree with the terms of this license, you must abort                     |
| the installation process at this point.                                                           |
+--------------------------------------------------------------------+

Thank you for using PHP.

# make

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

アパッチを止める
/etc/init.d/httpd stop
インストール
# make install
アパッチ起動
/etc/init.d/httpd start

これでアップグレードは完了。

# php -v

5.2.3の情報に変わっていればOK。
PHP.iniの設定もそのままなので大丈夫。

PHPアップグレード履歴
PHP4.3.9からPHP5.1.5にアップグレード
PHP5.1.5からPHP5.2.0にアップグレード
PHP5.2.0からPHP5.2.1にアップグレード

WordPress2.2meをインストールする

日本ユーザー向けパッケージ
# cd /usr/local/src/
# wget http://osdn.dl.sourceforge.jp/wordpress/25435/wordpress-me220.zip
# cp wordpress-me220.zip /var/www/html/
# cd /var/www/html/
# unzip wordpress-me220.zip
# cd wordpress

WordPress用のデータベースを作成
# mysql -u root -p
****************

mysql> CREATE DATABASE wordpress;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON wordpress.* TO "WordPress用ユーザー名"@"localhost"
-> IDENTIFIED BY "パスワード";
Query OK, 0 rows affected (0.00 sec)

mysql> EXIT

# mv wp-config-sample.php  wp-config.php
# vi wp-config.php
下記項目を上で決めたものに書き換え

// ** MySQL settings ** //
define('DB_NAME', 'wordpress');    // The name of the database
define('DB_USER', 'WordPress用ユーザー名');     // Your MySQL username
define('DB_PASSWORD', 'パスワード'); // ...and password
define('DB_HOST', 'localhost');    // 99% chance you won't need to change this value

http://example.com/wordpress/wp-admin/install.phpにアクセスし誘導してもらう。

Torをインストールする RHEL4(RedHat Enterprise Linux ES v4)

wgetなどでも使える設定

# cd /usr/local/src/
Torをダウンロード
# wget http://tor.eff.org/dist/rpm/tor-0.1.2.13-tor.0.rh4_4.i386.rpm
libeventをダウンロード
# wget http://dag.wieers.com/rpm/packages/libevent/libevent-1.3b-1.el4.rf.i386.rpm
privoxyをダウンロード
# wget http://jaist.dl.sourceforge.net/sourceforge/ijbswa/privoxy-3.0.3-1.6x.i386.rpm

# rpm -ivh libevent-1.3b-1.el4.rf.i386.rpm
# rpm -ivh tor-0.1.2.13-tor.0.rh4_4.i386.rpm
# rpm -ivh privoxy-3.0.3-1.6x.i386.rpm

privoxyを設定
# vi /etc/privoxy/config

1009行目に
forward-socks4 / localhost:9050 .

262行目、288行目
logfile logfile
jarfile jarfileをコメントアウト

# vi ~/.bashrc

http_proxy=http://127.0.0.1:8118/
HTTP_PROXY=$http_proxy
export http_proxy HTTP_PROXY
上記を追加

# source ~/.bashrc

起動
/etc/init.d/tor start
/etc/init.d/privoxy start

PHP5.2.1にアップグレードする RHEL4(RedHat Enterprise Linux ES v4)

PHP5.2.0からPHP5.2.1にローカルサーバをアップグレードする。
その後安定していれば公開サーバにも入れる。

前回のPHP5.1.5からPHP5.2.0にアップグレードと同様に全く問題なしにインストール出来た。

# cd /usr/local/src/

# wget http://jp.php.net/get/php-5.2.1.tar.bz2/from/this/mirror
# ls -al
php-5.2.1.tar.bz2

# tar jxvf php-5.2.1.tar.bz2
# cd php-5.2.1

# ./configure --prefix=/usr/local --bindir=/usr/local/bin/ --with-apxs2=/usr/sbin/apxs --with-mysql=/usr --enable-mbstr-enc-trans --enable-mbstring --enable-mbregex --enable-track-vars --with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --with-gettext --with-ncurses --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-png --with-pspell --with-regex --with-xml --with-expat-dir=/usr --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-discard-path --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --without-oci8 --with-pear --with-kerberos=/usr/kerberos --with-ldap=shared --enable-memory-limit --enable-bcmath --enable-shmop --enable-calendar --enable-dbx --enable-dio --with-pdo-mysql --enable-mcal

+--------------------------------------------------------------------+
| License:                                                                                                  |
| This software is subject to the PHP License, available in this                          |
| distribution in the file LICENSE.  By continuing this installation                        |
| process, you are bound by the terms of this license agreement.                        |
| If you do not agree with the terms of this license, you must abort                     |
| the installation process at this point.                                                           |
+--------------------------------------------------------------------+

Thank you for using PHP.

# make

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

アパッチを止める
/etc/init.d/httpd stop
インストール
# make install
アパッチ起動
/etc/init.d/httpd start

これでアップグレードは完了。

# php -v

5.2.1の情報に変わっていればOK。
PHP.iniの設定もそのままなので大丈夫。

PHPアップグレード履歴
PHP4.3.9からPHP5.1.5にアップグレード
PHP5.1.5からPHP5.2.0にアップグレード
PHP5.2.0からPHP5.2.1にアップグレード

FTPサーバの時間を合わせる

FTPでのファイルの更新時間が狂っていたので合わせた。

#date
2007年  2月  7日 水曜日 22:24:33 JST

鯖の時間は問題なかったのでFTP鯖の時間を合わせる。

# vi /etc/vsftpd/vsftpd.conf
最後の方に
use_localtime=YES
を追加

vsftpdを再起動
# /sbin/service vsftpd restart
ブログ内検索
カレンダー
04 2024/05 06
S M T W T F S
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
プロフィール
HN:
No Name Ninja
性別:
非公開
自己紹介:
へなちょこサーバ管理者

HPは作れるがプログラムが出来なかったので、PHPを覚えた。

公開サーバ環境:
CPU:Pentium M 740 1.73GHz
Mem:512MB DDR2
HDD1:160GB SATA
HDD2:160GB SATA
OS:RedHat Enterprise Linux ES v4
Apache:httpd-2.0.52-28ent
MySQL:mysql-4.1.20-1
PHP:php-5.2.5
JavaSE:JDK6
Tomcat:apache-tomcat-5.5.20
Apache Tomcat Connector:jk-1.2.19

ローカルサーバ環境:
DELL INSPIRON4000
OS:RedHat Enterprise Linux ES v4
Apache:httpd-2.0.52-28ent
MySQL:mysql-4.1.20-1
PHP:php-5.2.5
JavaSE:JDK6
Tomcat:apache-tomcat-5.5.20
Apache Tomcat Connector:jk-1.2.19

ローカルPC
OS:Windows7
最新コメント
[03/14 mietwagen]
[02/02 Online poker]
[03/13 ほし]
[03/01 へなとこ]
[11/14 ポポ]
アクセス解析
?
カウンター
起動、終了、再起動
Apacheの起動
/etc/init.d/httpd start
Apacheの終了
/etc/init.d/httpd stop
Apacheの再起動
/etc/init.d/httpd restart

Tomcatの起動
/usr/local/tomcat/bin/startup.sh
Toncatの終了
/usr/local/tomcat/bin/shutdown.sh

MySQLの起動
/etc/rc.d/init.d/mysqld start
MySQLの終了
/etc/rc.d/init.d/mysqld stop
MySQLの再起動
/etc/rc.d/init.d/mysqld restart

vsftpdの起動
/etc/init.d/vsftpd start
vsftpdの終了
/etc/init.d/vsftpd stop
vsftpdの再起動
/etc/init.d/vsftpd restart
場所
httpd.conf
/etc/httpd/conf/httpd.conf

AdminControlMenu: AdminMenu | NewEntry | EditComment | EditTrackback

忍者ブログ [PR]