子ページ
  • CentOS 7 with MariaDB

比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。

...

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

Library for showing multimedia contents analyzing the search keyword from a external search engine.

コード ブロック
languagetext
sudo yum -y install epel-release
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum install -y install ffmpegmecab

Library for making PDF cover pageshowing multimedia contents.

コード ブロック
languagetext
sudo wget https://copr.fedorainfracloud.org/coprs/robert/gcj/repo/epel-7/robert-gcj-epel-7.repo -P /etc/yum.repos.d
sudo wget https://copr.fedorainfracloud.org/coprs/robert/pdftk/repo/epel-7/robert-pdftk-epel-7.repo -P /etc/yum.repos.d
sudo yum install -y pdftk

Middleware Setup and Configuration

Database

...

 yum install -y ffmpeg

Library for extracting the Word text.

Save as "wv-1.2.4.tar.gz" to get the source code from https://sourceforge.net/projects/wvware/files/wv/1.2.4/.

wv-1.2.4.tar.gz

コード ブロック
languagetext
sudo yum -y install glib2-devel libgsf libgsf-devel gcc gcc-c++ elinks

sudo tar -zxvf wv-1.2.4.tar.gz
cd wv-1.2.4/
sudo ./configure
sudo make
sudo make install

Library for extracting the Excel and Power Point text.

コード ブロック
languagetext
sudo systemctl restart mariadb
/usr/bin/mysqladmin -u root password 'root-no-password'
Delete anonymous user from the initial database.
コード ブロック
languagetext
mysql -u root -proot-no-password
MariaDB [(none)]> use mysql
MariaDB [mysql]> delete from user where user='';
Create database for WEKO(NetCommon) installation
コード ブロック
languagetext
MariaDB [mysql]> create database nc2db default character set UTF8;
wget http://repo.iotti.biz/CentOS/6/x86_64/xlhtml-0.5-17.el6.lux.1.x86_64.rpm
sudo yum -y localinstall xlhtml-0.5-17.el6.lux.1.x86_64.rpm

Library for making PDF cover page.

コード ブロック
languagetext
sudo wget https://copr.fedorainfracloud.org/coprs/robert/gcj/repo/epel-7/robert-gcj-epel-7.repo -P /etc/yum.repos.d
sudo wget https://copr.fedorainfracloud.org/coprs/robert/pdftk/repo/epel-7/robert-pdftk-epel-7.repo -P /etc/yum.repos.d
sudo yum install -y pdftk

Middleware Setup and Configuration

Database

Setup root passwordCreate an database user and assign the privilege to the previously created db.
コード ブロック
languagetext
MariaDB [mysql]> 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
memory_limit = 1024M;
post_max_size = 64M;
upload_max_filesize = 32M;

...

sudo systemctl restart mariadb
/usr/bin/mysqladmin -u root password 'root-no-password'
Delete anonymous user from the initial database.
コード ブロック
languagetext
mysql -u root -proot-no-password
MariaDB [(none)]> use mysql
MariaDB [mysql]> delete from user where user='';
Create database for WEKO(NetCommon) installation
コード ブロック
languagetext
MariaDB [mbstring]
mbstring.language = neutral
mbstring.internal_encoding = UTF-8
mbstring.http_input = auto
mbstring.http_output = pass
mbstring.encoding_translation = Off

...

mysql]> create database nc2db default character set UTF8;
Create an database user and assign the privilege to the previously created db.
コード ブロック
languagetext
MariaDB [Datemysql]
;> Definesgrant theall defaulton timezonenc2db.* usedto bync2user@localhost theidentified date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = "Asia/Tokyo"

NetCommons2

Before Install Preparation

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,Install wget first.

コード ブロック
languagetext
sudomemory_limit yum install -y wget= 1024M;
post_max_size = 64M;
upload_max_filesize = 32M;

Configure for UTF-8 character code Download the latest NetCommons core package (Following command download version 2.4.2.1) .

コード ブロック
languagetext
wget -c "http://www.netcommons.org/%E3%83%80%E3%82%A6%E3%83%B3%E3%83%AD%E3%83%BC%E3%83%89/%E3%82%B3%E3%82%A2%E3%83%91%E3%83%83%E3%82%B1%E3%83%BC%E3%82%B8/?action=cabinet_action_main_download&block_id=93&room_id=1&cabinet_id=1&file_id=2811&upload_id=6210" -O netcommons-2.4.2.1.tar.gz
[mbstring]
mbstring.language = neutral
mbstring.internal_encoding = UTF-8
mbstring.http_input = auto
mbstring.http_output = pass
mbstring.encoding_translation = Off

You also need to specify the timezone in the /etc/php.iniUncompress the downloaded file.

コード ブロック
languagetext
tar zxvf netcommons-2.4.2.1.tar.gz
[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = "Asia/Tokyo"

NetCommons2

Before Install Preparation

Install wget firstCopy it to the web application directory.

コード ブロック
languagetext
sudo yum cpinstall -rpy NetCommons-wget

Download the latest NetCommons core package (Following command download version 2.4.2.1

...

).

コード ブロック

...

コード ブロック
languagetext
sudo chownwget -Rc apache"http:apache /var/www/html/nc2

If you would like to access to NetCommons as a top page, you should modify /etc/httpd/conf/httpd.conf as follows.

コード ブロック
languagetext
DocumentRoot "/var/www/html/nc2/htdocs"

...

.netcommons.org/%E3%83%80%E3%82%A6%E3%83%B3%E3%83%AD%E3%83%BC%E3%83%89/%E3%82%B3%E3%82%A2%E3%83%91%E3%83%83%E3%82%B1%E3%83%BC%E3%82%B8/?action=cabinet_action_main_download&block_id=93&room_id=1&cabinet_id=1&file_id=2811&upload_id=6210" -O netcommons-2.4.2.1.tar.gz

NetCommons-2.4.2.1.tar.gz

Uncompress the downloaded file.

コード ブロック
languagetext
tar zxvf netcommons-2.4.2.1.tar.gz

Copy it to the web application directory.

コード ブロック
languagetext
sudo cp -rp NetCommons-2.4.2.1/html /var/www/html/nc2

Change file owner to be able to access by web server

アンカー
chowntoapache
chowntoapache

コード ブロック
languagetext
sudo chown -R apache:apache /var/www/html/nc2

If you would like to access to NetCommons as a top page, you should modify /etc/httpd/conf/httpd.conf as follows.

コード ブロック
languagetext
DocumentRoot "/var/www/html/nc2/htdocs"

アンカー
allowoverride
allowoverride

This is not a requirement, however, if you add the following expression in the httpd.conf, you can utilize the URL-rewrite option in OAI-PMH Configuration.

Please refer to User Manual (3.2.9.3.3 OAI-PMH Configuration) to know how to utilize this .htaccess configuration.

コード ブロック
languagetext
    <Directory "/var/www/html/nc2/htdocs">
        AllowOverride All
    </Directory>

Then restart the httpd

コード ブロック
languagetext
sudo systemctl restart httpd

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.

Image Added

Press Next button.

Image Added

This step requires to input general configuration parameters like this.

ParamterValue
Site Name"as you want"
Databasemysqli
Database Hostnamelocalhost
Database Usernamenc2user
Database Passwordnc2pass
Database Namenc2db
Table Prefixnc2
No
NetCommons Virtual Path"your server address"

 

Image Added

Just need to confirm your parameters. Press Next if it is OK.

Image Added

Green signal means there is no problem with your installation process so far, then Next.

Image Added

Here is also then press Next.

Image Added

Here is also then press Next.

Image Added

Here is also then press Next.

Image Added

Here is also then press Next.

Image Added

In this page, you will create an administrator account.

Image Added

Press Next button, if there is no problem.

Image Added

Press Next button, if there is no problem.

Image Added

Congratulations! Installation of NetCommons2 has been completed.

Image Added

 

WEKO

Download WEKO module

Download the latest stable WEKO from the code repository.

コード ブロック
languagetext
wget -O weko.tar.gz https://bitbucket.org/niijp/weko/get/master.tar.gz

Download multilingual WEKO from the code repository as well, then copy it to the NC2 module directory.

コード ブロック
languagetext
tar zxvf weko.tar.gz
mv niijp-weko-[commit number] repository
sudo cp -rp repository /var/www/html/nc2/webapp/modules/
sudo chown -R apache:apache /var/www/html/nc2/webapp/modules/repository

Install WEKO module

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

Image Added

Click the "Module Manager" icon, then you can find WEKO in the "Modules not yet installed" tab.
Let's click "Install" link which located right hand side of WEKO module name.

Image Added

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

Image Added

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
wget -O nc2multilang.tar.gz https://bitbucket.org/niijp/nc2-patch-multilanguage/get/master.tar.gz
tar zxvf nc2multilang.tar.gz
cd niijp-nc2-patch-multilanguage-[commit number]

sudo cp -rp webapp /var/www/html/nc2/

MySQL DB also have to be modify for this customization.
In this SQL file database prefix for NC2 is assumed as "nc2" as has been instructed previously.
If you apply different prefix, please modify SQL file appropriately.

コード ブロック
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.

Image Added

Now you paste WEKO module on the top page. Here is the control panel page of WEKO.


Setting up for the External Commands

In the [Management] => [Server Setting] tab, you can find "Server Environment" menu.
Clicking the [Execute]  button automatically search the commands and change signal color to green if the system has.
In order to store the path to the commands, click the [Commit] button after this operation. 

Image Added 

 

Setting up for the Language Selection

...

This is not a requirement, however, if you add the following expression in the httpd.conf, you can utilize the URL-rewrite option in OAI-PMH Configuration.

Please refer to User Manual (3.2.9.3.3 OAI-PMH Configuration) to know how to utilize this .htaccess configuration.

コード ブロック
languagetext
    <Directory "/var/www/html/nc2/htdocs">
        AllowOverride All
    </Directory>

Then restart the httpd

コード ブロック
languagetext
sudo systemctl restart httpd

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.

Image Removed

Press Next button.

Image Removed

This step requires to input general configuration parameters like this.

ParamterValue
Site Name"as you want"
Databasemysqli
Database Hostnamelocalhost
Database Usernamenc2user
Database Passwordnc2pass
Database Namenc2db
Table Prefixnc2
No
NetCommons Virtual Path"your server address"

 

Image Removed

Just need to confirm your parameters. Press Next if it is OK.

Image Removed

Green signal means there is no problem with your installation process so far, then Next.

Image Removed

Here is also then press Next.

Image Removed

Here is also then press Next.

Image Removed

Here is also then press Next.

Image Removed

Here is also then press Next.

Image Removed

In this page, you will create an administrator account.

Image Removed

Press Next button, if there is no problem.

Image Removed

Press Next button, if there is no problem.

Image Removed

Congratulations! Installation of NetCommons2 has been completed.

Image Removed

 

WEKO

Checkout WEKO module

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

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

Checkout multilingual WEKO from the SVN site, then copy it to the NC2 module directory.
The current instruction is to utilize the trunk source code but we will prepare the stable one soon.

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

Install WEKO module

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

Image Removed

Click the "Module Manager" icon, then you can find WEKO in the "Modules not yet installed" tab.
Let's click "Install" link which located right hand side of WEKO module name.

Image Removed

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

Image Removed

 

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.

Image Removed

Now you paste WEKO module on the top page. Here is the control panel page of WEKO.

In order to show the language select function, please click the "management" tab.

...

In the [Managementmanagement] => [Server Settingdisplay setting] tab, you can find "Server Environmentlanguage setting" menu.
Clicking the [Execute]  button automatically search the commands and change signal color to green if the system has.
In order to store the path to the commands, click the [Commit] button after this operation. 

Image Removed 

 
 

 

Library for making PDF cover page.(PDFTK is unavailable for CentOS7, please skip this section. WEKO is looking for alternative method)

 

INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so';

 

CREATE FUNCTION last_insert_grn_id RETURNS INTEGER SONAME 'ha_mroonga.so';

 

CREATE FUNCTION mroonga_snippet RETURNS STRING SONAME 'ha_mroonga.so';

 

CREATE FUNCTION mroonga_command RETURNS STRING SONAME 'ha_mroonga.so';

 

CREATE FUNCTION mroonga_escape RETURNS STRING SONAME 'ha_mroonga.so';

 

...

In this menu, that is, [language setting] => [select language setting], please select "Display" (default is "Hide") from the drop down list.

 Image Added

 

Then click "commit" button at the bottom of the page.

 Image Added

 

You can exit from the control panel by clicking "Quit" link at the right hand side of the WEKO block header.

 Image Added

 

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. 

Finish!