◆xoopsサーバ移行 その6
xoopsインストール
[root@host ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.45 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database xoops;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on xoops.* to xoops@localhost identified by 'xxxxxxxx';
Query OK, 0 rows affected (0.01 sec)
mysql> exit
Bye
[root@host ~]# mysql -u xoops -pxxxxxxxx xoops
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.0.45 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> exit
Bye
[root@host ~]# rpm -q php-mysql
パッケージ php-mysql はインストールされていません。
[root@host ~]# yum -y install php-mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
* addons: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.i386 0:5.1.6-23.2.el5_3 set to be updated
--> Processing Dependency: php-pdo for package: php-mysql
--> Running transaction check
---> Package php-pdo.i386 0:5.1.6-23.2.el5_3 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================
Package Arch Version Repository Size
=========================================================================================
Installing:
php-mysql i386 5.1.6-23.2.el5_3 updates 85 k
Installing for dependencies:
php-pdo i386 5.1.6-23.2.el5_3 updates 64 k
Transaction Summary
=========================================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 148 k
Downloading Packages:
(1/2): php-pdo-5.1.6-23.2.el5_3.i386.rpm | 64 kB 00:00
(2/2): php-mysql-5.1.6-23.2.el5_3.i386.rpm | 85 kB 00:00
-----------------------------------------------------------------------------------------
Total 30 kB/s | 148 kB 00:04
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-pdo [1/2]
Installing : php-mysql [2/2]
Installed: php-mysql.i386 0:5.1.6-23.2.el5_3
Dependency Installed: php-pdo.i386 0:5.1.6-23.2.el5_3
Complete!
[root@host ~]# wget http://osdn.dl.sourceforge.jp/xoops/21278/xoops-2.0.16a-JP.tar.gz
--23:55:40-- http://osdn.dl.sourceforge.jp/xoops/21278/xoops-2.0.16a-JP.tar.gz
osdn.dl.sourceforge.jp をDNSに問いあわせています... 202.221.179.23
osdn.dl.sourceforge.jp|202.221.179.23|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 1334051 (1.3M) [application/x-gzip]
Saving to: `xoops-2.0.16a-JP.tar.gz'
100%[================================================>] 1,334,051 343K/s in 3.8s
23:55:44 (347 KB/s) - `xoops-2.0.16a-JP.tar.gz' を保存しました [1334051/1334051]
[root@host ~]# tar zxvf xoops-2.0.16a-JP.tar.gz
~省略~
[root@host ~]# mv xoops-2.0.16a-JP/html/ /var/www/xoops
[root@host ~]# chmod 777 /var/www/xoops/uploads/
[root@host ~]# chmod 777 /var/www/xoops/cache/
[root@host ~]# chmod 777 /var/www/xoops/templates_c/
[root@host ~]# chmod 666 /var/www/xoops/mainfile.php
[root@host ~]# echo "Alias /xoops /var/www/xoops" > /etc/httpd/conf.d/xoops.conf
[root@host ~]# /etc/rc.d/init.d/httpd reload
httpd を再読み込み中: [ OK ]
ブラウザからhttp://サーバ名/xoopsにアクセスし、xoopsのインストールを実施
・基本的に"次へ"をクリック
追加する場所
・データベース、およびパス・URLの設定で
データベースユーザ名、データベースパスワード、データベース名を記入
・サイト管理者のユーザ名、ユーザパスワード、およびメールアドレスを入力してください
というページで入力する
[root@host ~]# rm -rf /var/www/xoops/install/
[root@host ~]# chmod 644 /var/www/xoops/mainfile.php
ブラウザからhttp://サーバ名/xoopsにアクセスすると
xoopsのトップページが開く
あとは、移行元と同じモジュールを適用して準備完了です。
これで移行検証ができます。