Child pages
  • CentOS 7 with MariaDB

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
sudo yum -y install firewalld
sudo systemctl enable firewalld
sudo systemctl start firewalld
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --reload


Middleware Installation

Web Server

...

and PHP

Install Apache and PHP.

Code Block
languagetext
sudo yum install -y httpd
sudo systemctl enable httpd
sudo systemctl start httpd
sudo yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
sudo yum makecache
sudo yum install -y --enablerepo=remi-php56 php php-mbstring php-gd php-xml php-mysqlnd

MariaDB and Full Text Search Engine

...

WEKO utilize Groonga and Mroonga for the full text search engine.
Groonga: http://groonga.org/, Mroonga: http://mroonga.org/
Following instruction refers  http://mroonga.org/docs/install/centos.html#centos-7-with-the-official-mariadb-package
MariaDB a superset Mroonga from version 10 as a plugin.

Create /etc/yum.repos.d/mariadb.repo by editor.
Set the MariaDB installation destination.

Code Block
languagetext
sudo yum install -y httpd
sudo systemctl enable httpd
sudo systemctl start httpd# MariaDB 10.1 CentOS repository list - created 2016-07-15 04:53 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Install MariaDB and Mroonga.

Code Block
languagetext
sudo yum makecache
sudo yum install -y mariadbMariaDB-client MariaDB-server
sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo yum install -y http://packages.groonga.org/centos/groonga-release-1.1.0-1.noarch.rpm
sudo yum makecache
sudo yum install -y mariadb-mroonga-5.11
sudo yum install -y groonga-tokenizer-mecab
sudo yum install -y php php-mbstring php-gd php-xml php-mysql
mysql -u root
MariaDB [(none)]> INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so';
MariaDB [(none)]> CREATE FUNCTION last_insert_grn_id RETURNS INTEGER SONAME 'ha_mroonga.so';
MariaDB [(none)]> CREATE FUNCTION mroonga_snippet RETURNS STRING SONAME 'ha_mroonga.so';
MariaDB [(none)]> CREATE FUNCTION mroonga_command RETURNS STRING SONAME 'ha_mroonga.so';
MariaDB [(none)]> CREATE FUNCTION mroonga_escape RETURNS STRING SONAME 'ha_mroonga.so';
MariaDB [(none)]> exit

Other Middleware

Library for extract the text from PDF file.

Code Block
languagetext
sudo yum install -y poppler-utils

Other Middleware

Library for making PDF thumbnail

...

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';

 

exit (mariadbからログアウトする)