子ページ
  • CentOS 6.7 with Vault MySQL 5.1

比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。
コメント: Migrated to Confluence 5.3

目次

OS

Following instruction is based on the CentOS6 installation as Minimal package.

After installing the OS, please change the SELinux setting to be Permissive or Disable.
Configuration file is located at /etc/sysconfig/selinux

コード ブロック
languagetext
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=Permissive
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

The above setting allow you to boot the system as Permissive mode.
 Please also change the current mode to be Permissive.

コード ブロック
languagetext
setenforce Permissive


Network connection is required in the following procedure.  
Edit /etc/sysconfig/network-scripts/ ifcfg-eth0 to be ONBOOT=yes.

...

In order to modify firewall setting for http and https, please install following program for easy to setup.
The dbus setting is required before installing the firewall UI.

コード ブロック
languagetext
sudo yum -y install dbus dbus-python
sudo service messagebus start
sudo yum -y install system-config-firewall-tui

...

Go to "Customize" then check "Secure WWW (HTTPS)" and "WWW (HTTP)"

Middleware Installation

Web Server, MySQL and PHP

There are version dependency between MySQL and Mroonga which will be installed in the next section.
In order to solve the dependency, MySQL have to be installed from the CentOS VaultIf you get the following error when starting the firewall-tui, you need to install dbus.

コード ブロック
languagetext
Tracebacksudo (mostyum recentinstall call last):
  File "/usr/bin/system-config-firewall-tui", line 29, in <module>
    import fw_tui
  File "/usr/share/system-config-firewall/fw_tui.py", line 34, in <module>
    import fw_nm
  File "/usr/share/system-config-firewall/fw_nm.py", line 29, in <module>
    import dbus
ImportError: No module named dbus
コード ブロック
languagetext
sudo yum -y install dbus dbus-python
sudo service messagebus start

Middleware Installation

Web Server and PHP

コード ブロック
languagetext
sudo yum install -y httpd-y httpd
sudo yum remove -y mysql-libs
sudo rpm -ivh http://vault.centos.org/6.5/updates/x86_64/Packages/mysql-libs-5.1.73-3.el6_5.x86_64.rpm
sudo yum install -y perl-DBD-MySQL
sudo rpm -ivh http://vault.centos.org/6.5/updates/x86_64/Packages/mysql-5.1.73-3.el6_5.x86_64.rpm
sudo rpm -ivh http://vault.centos.org/6.5/updates/x86_64/Packages/mysql-server-5.1.73-3.el6_5.x86_64.rpm
sudo yum install -y php php-mbstring php-gd php-xml php-mysql
sudo chkconfig httpd on
sudo chkconfig mysqld on
sudo service httpd start
sudo service mysqld start

At this moment, don't set the root password for MySQL
 

Full Text Search and MySQL

WEKO utilize Groonga and Mroonga for the full text search engine.
Since the MySQL In order to solve the dependency, version of the CentOs 6 is old, this installation uses Oracle MySQL. 
You can find the official information about groonga and mroonga from...
 http://groonga.org/ and http://mroonga.org/groonga  have to be 4.1.0.1.

コード ブロック
languagetext
sudo rpm -ivh http://packages.groonga.org/centos/groonga-release-1.1.0-1.noarch.rpm
sudo yum install -y http://repo.mysql.com/mysql-community-release-el6-7.noarch.rpm
sudo yum makecache
sudo yum install -y groonga-4.1.0-1.el6
sudo yum install -y mysql-community-mroongagroonga-tokenizer-mecab-4.1.0-1.el6
sudo yum install -y phpmysql-mysqlmroonga

Library for extract the text from PDF file.

コード ブロック
languagetext
sudo yum install -y poppler-utils

Other Middleware

Library for making PDF thumbnail

...

コード ブロック
languagetext
sudo yum install -y ffmpeg

Middleware Setup and Configuration

Database

Setup root password
コード ブロック
languagetext
sudo /etc/init.d/mysqld startrestart
/usr/bin/mysqladmin -u root password 'root-no-password'

...

コード ブロック
languagetext
grant all on nc2db.* to nc2user@localhost identified by 'nc2pass';

PHP

Open /etc/php.ini by editor.
Modify memory related configuration. Each size have to have the relationship as follows.
upload_max_filesize < post_max_size < memory_limit
For example,

...

コード ブロック
languagetext
sudo /etc/init.d/httpd restart

NetCommons2

Before Install Preparation

Install wget first.

コード ブロック
languagetext
sudo yum install -y wget

...

コード ブロック
languagetext
sudo /etc/init.d/httpd restart

Installation

Access to the site you will install the NC2 by browser. You can see the installation page like this.
In this page, select English anyway from the pull-down menu.

...

Congratulations! Installation of NetCommons2 has been completed.

If the following warning appear after installing the NetCommons2, please apply the patch as follow.

Image Removed

In order to fix this bug. Please download the patched file from

http://www.netcommons.org/mus26zft3-6669/?action=multidatabase_action_main_filedownload&download_flag=1&upload_id=5486&metadata_id=698

Then replace it to the /var/www/html/nc2/maple/nccore/db/DbObjectAdodb.class.php

 

WEKO

Checkout WEKO module

In order to download the latest WEKO module from the source code repository, install the svn first

...

コード ブロック
languagetext
svn co http://forge.at.nii.ac.jp/svn/nc/repository/trunk repository
sudo cp -rp repository /var/www/html/nc2/webapp/modules/

Install WEKO module

Login to the NC2 and click Control Panel in the header menu.

...

If you can find the word "Succesfully installed." at the end of the install log,  congratulations!
Installation WEKO into the NC2 has been completed.

Customization for Multilingual

Only English, Chinese and Japanese are available by the original NC2. Therefore, we need to apply patch for more multilingual function. First you need to checkout the patch and just copy it to the NC2 application directory.

...

コード ブロック
languagetext
mysql -u nc2user -pnc2pass
mysql> use nc2db
mysql> source AddLanguageForNC2SQL.sql

Completed!

Show WEKO Block

Go to the NC2 top page and click "Setting mode on" link in the header.
After switching to the Setting Mode, you can select WEKO module in the drop down menu.

...

For multilingual, web page for each language have to be prepared by the following procedure.
1. As same as showing the WEKO block, go to Setting Mode and show language and menu module.
2. In the language module, select the language which can to be selected in your page.
3. After selecting an language, create a new page under the public space by using the menu module.
4. In the page created in 2, show WEKO block.
5. Same procedure have to be repeated for other language.