MANUAIS PÚBLICOS

METODOLOGIA CLÁSSICA

METODOLOGIA CLÁSSICA

SciELO Methodology installation on Centos 7

Linux installation

REQUIREMENTS

Hardware Configuration:

8GB RAM minimum

8 vCPU 

150GB HD

CentOS release 7.9

Apache 2.2.34 

PHP 5.2.10 or 5.2.17 (required)

PHP Modules

Installing build subsystem

yum install -y perl make wget gcc libxml2-devel openssl openssl-devel openssl-libs curl libcurl-devel libjpeg-turbo-devel libpng-devel freetype-devel libxslt libxslt-devel expat-devel patch wget glibc.i686 zlib-devel curl-devel

Installing EPEL Repository to install mcrypt

# yum install epel-release
# yum install libmcrypt-devel

Installing Apache 2.2.34 from source

Getting source code

wget -O /usr/src/httpd-2.2.34.tar.gz  https://archive.apache.org/dist/httpd/httpd-2.2.34.tar.gz

Uncompress

# cd /usr/src
# tar -zxvf httpd-2.2.34.tar.gz

Configure

cd httpd-2.2.34
./configure --prefix=/usr --enable-layout=RedHat --enable-mods-shared=all 

Compile and install

make
make install

Installing PHP 5.2.17 from source

It is very important to use this version because php 5.2.17 doesn't work with nealy versions.

Getting source code

wget -O /usr/src/php-5.2.17.tar.gz http://museum.php.net/php5/php-5.2.17.tar.gz

Uncompress 

# cd /usr/src
# tar -zxvf php-5.2.17.tar.gz 
# cd php-5.2.17

Patching                                                            

https://stackoverflow.com/questions/28211039/phpbrew-5-3-10-build-error-dereferencing-pointer-to-incomplete-type/34107461

curl -s https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt | patch -p0
Result:
patching file ext/dom/node.c
Hunk #1 succeeded at 1950 (offset 55 lines).
patching file ext/dom/documenttype.c
Hunk #1 succeeded at 215 (offset 10 lines).
patching file ext/simplexml/simplexml.c
Hunk #1 succeeded at 1343 (offset -74 lines).

 

Configure

./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib64 --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-pic --disable-rpath --without-pear --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-iconv --with-jpeg-dir=/usr --without-openssl --with-zlib --with-layout=Redhat --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-wddx  --without-mime-magic --without-sqlite --with-libxml-dir=/usr --with-apxs2=/usr/sbin/apxs --without-mysql --disable-dom --disable-dba --without-unixODBC --disable-pdo --disable-xmlreader --disable-xmlwriter --disable-json -with-xsl --enable-dom

Compile and install

make
make install

Copie o arquivo php.ini-recommended para /etc/php.ini

# cp php.ini-recommended /etc/php.ini

Ajuste o arquivo, modificando e depois reinicie o Apache:

# vi /etc/php.ini
display_errors = Off
short_open_tag = On

Creating a symbolic link for modules

# ln -s /lib /etc/httpd/lib

Configure Apache

$ echo '
<FilesMatch "\.php$">
  SetHandler application/x-httpd-php
</FilesMatch>
' >> /etc/httpd/conf/httpd.conf

Creating a system unit 

# vi /etc/systemd/system/httpd.service
[Unit]
Description=Apache Web Server
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/run/httpd.pid
ExecStart=/usr/sbin/apachectl start
ExecStop=/usr/sbin/apachectl graceful-stop
ExecReload=/usr/sbin/apachectl graceful
PrivateTmp=true
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target

Save the file and run the follow commands

# systemctl daemon-reload
# systemctl enable --now httpd

Installation of the SciELO Methodology

Following 

http://docs.scielo.org/projects/scielo-site/en/latest/howtoinstall.html

The process below corresponds to Portugal's branch. If you are from another country it is very important to choose yours. It is important to read the link above to understand what is necessary to change.

For version control we use GitHub, where Tags correspond to the versions of the site.

Check the TAGs here: SciELO’s GitHub

Screenshot at Aug 05 10-36-40.png

Check the branch of the current version by region and country. See the table at the link below:

Branch name for each collection

Screenshot at Aug 05 10-38-13.png

Example:

If there is no branch for your collection, we ask that you let us know.

Download the specific version of the SciELO methodology

There are two ways to download: one through the tarball file and the other through the zip file.

ZIP File

Download:

wget https://github.com/scieloorg/Web/zipball/<versão_da_tag>

Example:

wget https://github.com/scieloorg/Web/archive/master.zip

After extracting the files, a directory will be created with the name Web-master

Web-master

Enter the directory and move the content extracted to "/var/www/scielo”:

Installation of the CISIS package

wget ftp://produtos-scielo:produtos%40scielo@ftp.scielo.br/cisis-product/cisis.zip

Extract the contents in the directory:

cd /var/www/scielo/proc/
unzip cisis.zip

The CISIS directory will look like this:

Delete the downloaded .zip file

To test operation:

mx what

Result:

Installation of the WWWISIS package

cd /var/www/scielo/cgi-bin
wget ftp://produtos-scielo:produtos%40scielo@ftp.scielo.br/cisis-product/wxis.exe

To test:

./wxis.exe hello

Configuring the httpd.conf file

Edit the file:

vi /etc/httpd/conf/httpd.conf

In the end of the file add the line:

# Virtual hosts

Include /etc/httpd/conf.d/vhosts

Enter the directory indicated below:

mkdir /etc/httpd/conf.d/vhosts

Enter the directory indicated below and create the file below:

cd /etc/httpd/conf.d/vhosts

vi vhosts.conf


add the follow content:


NameVirtualHost <server ip>:80


It is important to replace <server ip> to the real ip from machine

In the same directory create another file. The name is related to your instance. For instance, if you are from Bolivia the name will be scielo-org-bo.conf. I will use this name as template:

# vi scielo-org-bo.conf


<VirtualHost *:80>

    ServerName  vm.scielo.br

    Alias /pdf/ /var/www/scielo/bases/pdf/

    Alias /img/fbpe/ /var/www/scielo/htdocs/img/revistas/

    Alias /img/scimago/ /var/www/scielo/bases/scimago/images/

    LimitRequestFieldSize 9000

    LimitRequestLine 9000

    DocumentRoot /var/www/scielo/htdocs

    DirectoryIndex scielo.php index.php index.html index.htm

    <Directory /var/www/scielo/htdocs>

        Options  FollowSymLinks MultiViews

        Order deny,allow

         AcceptPathInfo On

        Allow from all

    </Directory>

    <Directory /var/www/scielo/bases/pdf/>

        Options  FollowSymLinks MultiViews

        Order deny,allow 

         AcceptPathInfo On

        Allow from all

    </Directory>

    <Directory /var/www/scielo/bases/scimago/images/>

        Options  FollowSymLinks MultiViews

        Order deny,allow

         AcceptPathInfo On

        Allow from all

    </Directory>

    <FilesMatch "\.(def)$">

       Order allow,deny

       Allow from all

       Satisfy All

    </FilesMatch>

    ScriptAlias /cgi-bin/ /var/www/scielo/cgi-bin/

    <Directory /var/www/scielo/cgi-bin/>

        AddDefaultCharset ISO-8859-1

        Options  FollowSymLinks MultiViews ExecCGI

         AcceptPathInfo On

        Order deny,allow

        Allow from all

    </Directory>


    ErrorLog "|/usr/sbin/rotatelogs -l /var/www/apache/%Y-%m-%d+scielo-br-error.log 5M"

    CustomLog "| /usr/sbin/rotatelogs -l /var/www/apache/%Y-%m-%d+scielo-br-access.log 5M" combined

</VirtualHost>

Some fields you have to replace:

ServerName - corresponding to the domain name. Example: www.scielo.org.bo

ErrorLog - corresponding to the  log file error. Replace from this template scielo-br to the name of you instance. Example: scielo-org-bo

CustomLog - corresponding to the log file acess. Replace from this template scielo-br to the name of you instance. Example: scielo-org-bo


NOTES: You have to create the directory /var/www/apache to save the files created. Run the command:

mkdir /var/www/apache

Mandatory settings

Configuring the scielo.def.php file

Below we will show the mandatory configurations for the SciELO Methodology to work.
Copy the template file "scielo.def.php.template" to your configuration file "scielo.def.php".

Enter the directory:

cd /var/www/scielo/htdocs/

Copy:

cp scielo.def.php.template  scielo.def.php

Edit the file as shown in the following example:

vi scielo.def.php

This file is separated into blocks [BLOCK_NAME], and by default the configured paths point to “/home/scielo”. It is necessary to replace /home/scielo to /var/www/scielo.

ESC :%s/\/home\/scielo/\/var\/www\/scielo/g

Site identification settings

[SITE_INFO]

SITE_NAME=SciELO - Scientific Electronic Library Online

SHORT_NAME=Scielo Brazil

SITE_AUTHOR=FAPESP - CNPq - FapUNIFESP - BIREME

ADDRESS_1=R. Dr. Diogo de Faria, 1087 cj.810

ADDRESS_2=04037-003 - Sao Paulo/SP

COUNTRY=Brasil

PHONE_NUMBER=+55 11 3369-4080/4085

#FAX_NUMBER=+55 11 5575-8868

E_MAIL=scielo@bireme.br

STANDARD_LANG=en

APP_NAME=scielo

ANALYTICS_CODE=scl

APP_NAME and ANALYTICS_CODE, are parameters provided by the SciELO team.

[SCIELO]

SERVER_SCIELO=vm.scielo.br


[FULLTEXT_SERVICES]

access="http://vm.scielo.br/applications/scielo-org/pages/services/articleRequestGraphicPage.php?pid=PARAM_PID&caller=PARAM_SERVER"

cited_SciELO="http://vm.scielo.br/scieloOrg/php/citedScielo.php?pid=PARAM_PID"

send_mail="http://vm.scielo.br/applications/scielo-org/pages/services/sendMail.php?pid=PARAM_PID&caller=PARAM_SERVER"

Now we will point the block [PATH] to the path of the application, as stated earlier

[PATH]


PATH_DATA=/

PATH_CGI-BIN=/cgi-bin/

PATH_SCRIPTS=ScieloXML/

PATH_GENIMG=/img/

PATH_SERIMG=/img/revistas/

PATH_SERIAL_HTML=/revistas/

PATH_XSL=/var/www/scielo/htdocs/xsl/

PATH_DATABASE=/var/www/scielo/bases/

PATH_SETTINGS=

PATH_PDF=/var/www/scielo/bases/pdf

PATH_TRANSLATION=/var/www/scielo/bases/translation/

PATH_HTDOCS=/var/www/scielo/htdocs/

PATH_OAI=/var/www/scielo/htdocs/oai/

PATH_PROC=/var/www/scielo/proc/

Configuring the iah.def file

Copy the template file “iah.def.php.template” to your configuration file “iah.def.php”.

Enter the directory:

/var/www/scielo/htdocs/iah

Copy:

cp iah.def.php.template iah.def.php

Edit the file as shown in the following example:

iah.def.php

This file is separated into blocks [BLOCK_NAME], and by default the configured paths point to “/home/scielo”. We will make the move to the location where the application “/var/www/scielo” is, see the examples separated by blocks:

The blocks that must be changed are:

[PATH]

[IAH]

[HEADER]

For instance:

[PATH]

PATH_DATA=/iah/

PATH_CGI-BIN=/var/www/scielo/cgi-bin/iah/

PATH_DATABASE=/var/www/scielo/bases/


[APPEARANCE]

BODY BACKGROUND COLOR=white

BODY BACKGROUND IMAGE=

BODY TEXT COLOR=black

BODY LINK COLOR=blue

BODY VLINK COLOR=blue

BAR BACKGROUND COLOR=#B0C2D5

BAR TEXT COLOR=black

ERROR TEXT COLOR=

WARNING TEXT COLOR=


[HEADER]

LOGO IMAGE=scielog.gif

LOGO TEXT COLOR=

LOGO BACKGROUND COLOR=

LOGO URL=www.scielo.br

HEADER IMAGE=^ponlinep.gif^eonlinee.gif^ionlinei.gif

HEADER TEXT COLOR=

HEADER BACKGROUND COLOR=

HEADER URL=www.scielo.br


[IAH]

MANAGER E-MAIL=scielo@bireme.br

MAINTENANCE=OFF

REVERSE MODE=ON

MULTI-LANGUAGE=ON

LOG_DATABASE=/var/www/scielo/bases/logdia/iahlog



Configuring the article.def file

Copy the template file "article.def.php.template" to your configuration file "article.def.php".

Enter the directory:

/var/www/scielo/htdocs/iah

Copy as directed:

article.def.php.template to article.def.php

Edit the file as shown in the following example:

article.def.php

This file is separated into blocks [BLOCK_NAME], and by default the configured paths point to “/home/scielo”. We will make the move to the location where the application “/var/www/scielo” is, see the examples separated by blocks:

The blocks that must be changed are:

[FILE_LOCATION]

[VARIABLES]


Exemplo:


[FILE_LOCATION]


FILE HEADER.IAH=/var/www/scielo/cgi-bin/iah-styles/header.pft

FILE QUERY.IAH=/var/www/scielo/cgi-bin/iah-styles/query.pft

FILE LIST6003.PFT=/var/www/scielo/cgi-bin/iah-styles/list6003.pft

FILE PROC.PFT=/var/www/scielo/htdocs/pfts/proc_split_mst.pft

FILE iso.pft=/var/www/scielo/cgi-bin/iah-styles/fbiso.pft

FILE abn.pft=/var/www/scielo/cgi-bin/iah-styles/fbabn.pft

FILE van.pft=/var/www/scielo/cgi-bin/iah-styles/fbvan.pft

FILE places.pft=/var/www/scielo/cgi-bin/iah-styles/place-generico.pft

FILE month1.pft=/var/www/scielo/cgi-bin/iah-styles/month1.pft

FILE month2.pft=/var/www/scielo/cgi-bin/iah-styles/month2.pft

FILE scistyle.pft=/var/www/scielo/cgi-bin/iah-styles/scistyle.pft

FILE AHBTOP.HTM=/var/www/scielo/cgi-bin/iah-styles/%lang%/ahbtop.htm

FILE AHLIST.PFT=/var/www/scielo/cgi-bin/iah-styles/%lang%/ahlist.pft

FILE ahlist.pft=/var/www/scielo/cgi-bin/iah-styles/%lang%/ahlist.pft

FILE LATTES.*=%path_database%lattes/lattes.*

FILE citation.xml=/var/www/scielo/cgi-bin/iah-styles/fbisoXML.pft


[VARIABLES]

VARIABLE APP_PATH=/var/www/scielo/

VARIABLE APP_REVISTAS_PATH=/var/www/scielo/htdocs/revistas/

VARIABLE APP_REVISTAS_RELPATH=/revistas/

VARIABLE APP_IMG_REVISTAS_RELPATH=/img/revistas/

VARIABLE APP_IMG_RELPATH=/img/

Configuring the title.def file

Copy the “title.def.php.template” template file to your “title.def.php” configuration file.

Enter the directory:

/var/www/scielo/htdocs/iah

Copy as directed:

title.def.php.template to title.def.php

Edit the file as shown in the following example:

title.def.php

This file is separated into blocks [BLOCK_NAME], and by default the configured paths point to “/ home / scielo”. We will make the move to the location where the application “/var/www/scielo” is, see the examples separated by blocks:

The blocks that must be changed are:


[FILE_LOCATION]

[VARIABLES]


[FILE_LOCATION]


FILE DATABASE.*=%path_database%title/title.*

FILE FULINV.*=%path_database%title/titsrc.*

FILE PREINV.*=%path_database%title/titsrcp.*


FILE HEADER.IAH=/var/www/scielo/cgi-bin/iah-styles/header.pft


FILE scistyle.pft=/var/www/scielo/cgi-bin/iah-styles/scistyle.pft

FILE places.pft=/var/www/scielo/cgi-bin/iah-styles/place-generico.pft

FILE iso.pft=/var/www/scielo/cgi-bin/iah-styles/fbsrc1.pft

FILE van.pft=/var/www/scielo/cgi-bin/iah-styles/fbsrc1.pft

FILE abn.pft=/var/www/scielo/cgi-bin/iah-styles/fbsrc1.pft

FILE issue.*=%path_database%issue/issue.*

FILE facic.*=%path_database%issue/facic.*

FILE artigo.*=%path_database%artigo/artigo.*

FILE author.*=%path_database%artigo/author.*

FILE title.*=%path_database%title/title.*


[VARIABLES]

VARIABLE APP_PATH=/var/www/scielo/

VARIABLE APP_REVISTAS_PATH=/var/www/scielo/htdocs/revistas/

VARIABLE APP_REVISTAS_RELPATH=/revistas/

VARIABLE APP_IMG_REVISTAS_RELPATH=/img/revistas/

VARIABLE APP_IMG_RELPATH=/img/

Configuring php.ini

The php.ini file is located in the standard PHP installation directory, as shown below.

vi /etc/php.ini

When opening the file with an editor, search for the word short_open_tag, it is defined according to the model:

short_open_tag = Off

Change to:

short_open_tag = On

Save the file and restart apache.

Configuration of "hosts" and "Vhost"

Check the IP of the Server that is installing the methodology:

Edit the "hosts" file of the Server and or make the correct notes on your DNS server:

vi /etc/hosts

Add the following line:

<ip_do_servidor>        vm.scielo.br

To test the functioning of wwwisis in the web environment, type in your browser:

http://vm.scielo.br/cgi-bin/wxis.exe?hello

Access the site

vm.scielo.br/scielo.php

Screenshot at Aug 05 10-43-18.png

Gera Padrao Script

Edit the gerapadrão.bat file:

vi /var/www/scielo/proc/GeraPadrao.bat

Changing the following parameters:

Before:

call notepad \scielo\serial\scilista.lst

After:

call notepad \var\www\scielo\serial\scilista.lst

Before:

md \scielo\web\bases-work

After:

md \var\www\scielo\web\bases-work

Before:

call GeraScielo.bat \scielo \scielo\web log\GeraPadrao.log adiciona

After:

call GeraScielo.bat .. .. log\GeraPadrao.log adiciona

Rename the directory:

cd /var/www/scielo

mv serial-modelo serial

Creating user scielo and set permission

This user will be used to update files and processing databases.

# useradd -c "SciELO User Admin" scielo

Set permission to scielo user

I am considering Apache Root Dir is /var/www/scielo

# chown -R scielo. /var/www/scielo/

Fixing Directory and File permissions

# find /var/www/scielo/ -type d -exec chmod 755 {} \;

# find /var/www/scielo/ -type f -exec chmod 644 {} \;

# cd /var/www/scielo/

# find proc/ -name *.bat -exec chmod 755 {} \;

# find proc/ -name *.sh -exec chmod 755 {} \;

# find cgi-bin/ -name *.bat -exec chmod 755 {} \;

# find cgi-bin/ -name *.sh -exec chmod 755 {} \;

# find cgi-bin/ -name *.exe -exec chmod 755 {} \;

# cd proc

# chmod 755  cisis/*

# chmod 755 call

# chmod 755 rem

Possible errors

The error below is common, to fix it we have to change the php.ini file