NETWORK ENGINEER BLOG

Tips and Reviews for Engineers

XOOPS インストール(CentOS-5.6)

コミュニティポータル構築用のオープンソースアプリケーション"XOOPS"のインストール手順例です。

HTTPD インストール

[root@xoops ~]# yum -y install httpd

PHP インストール

[root@xoops ~]# yum -y install php
[root@xoops ~]# yum -y install php-mbstring
[root@xoops ~]# yum -y install php-mysql

HTTPD 起動/起動設定

[root@xoops ~]# /etc/rc.d/init.d/httpd restart
[root@xoops ~]# chkconfig httpd on

Xoops のインストール

[root@xoops ~]# wget http://nchc.dl.sourceforge.net/sourceforge/xoopscube/Package_Legacy_2_1_5.zip
[root@xoops ~]# unzip Package_Legacy_2_1_5.zip
[root@xoops ~]# cp -R Package_Legacy_2_1_5/html/ /var/www/xoops
[root@xoops ~]# chmod 777 /var/www/xoops/uploads/
[root@xoops ~]# chmod 777 /var/www/xoops/cache/
[root@xoops ~]# chmod 777 /var/www/xoops/templates_c/
[root@xoops ~]# chmod 777 /var/www/xoops/mainfile.php
[root@xoops ~]# rm -rf Package_Legacy_2_1_5
[root@xoops ~]# rm -f Package_Legacy_2_1_5.zip
[root@xoops ~]# echo Alias /xoops /var/www/xoops > /etc/httpd/conf.d/xoops.conf
[root@xoops ~]# /etc/rc.d/init.d/httpd reload

Xoops インストールディレクトリの削除 *XOOPS インストール後

[root@xoops ~]# rm -rf /var/www/xoops/install/
[root@xoops ~]# chmod 644 /var/www/xoops/mainfile.php

MYSQL インストール

[root@xoops ~]# yum -y install mysql-server
[root@xoops ~]# /etc/rc.d/init.d/mysqld start

Mysql-server 起動設定

[root@xoops ~]# chkconfig mysqld on</fieldset>

Mysql-server 初期設定

[root@xoops ~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQLSERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the currentpassword for the root user. If you've just installed MySQL, andyou haven't set the root password yet, the password will be blank,so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n]
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
<...sinp...>
Thanks for using MySQL!

Mysql Server へログイン

[root@xoops ~]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

データーベース(xoops)の作成

mysql> create database xoops;
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on xoops.* to xoops@localhost identified by 'xoops';
Query OK, 0 rows affected (0.00 sec)

mysql>  flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on xoops.* to admin@xxx.xxx.xxx.xxx identified by 'xxxx';
mysql>  flush privileges;
Query OK, 0 rows affected (0.00 sec)