# MANUAIS PÚBLICOS

# METODOLOGIA CLÁSSICA

# SciELO Methodology installation on Centos 7

# <span style="font-weight: 400;">Linux installation</span>

## <span style="font-weight: 400;">REQUIREMENTS</span>

<span style="font-weight: 400;">Hardware Configuration:</span>

<span style="font-weight: 400;">8GB RAM minimum</span>

<span style="font-weight: 400;">8 vCPU </span>

<span style="font-weight: 400;">150GB HD</span>

**CentOS release 7.9**

**Apache 2.2.34**

**PHP 5.2.10 or 5.2.17 (required)**

**PHP Modules**

- <span style="font-weight: 400;">libpng</span>
- <span style="font-weight: 400;">soap</span>
- <span style="font-weight: 400;">zlib</span>
- <span style="font-weight: 400;">XSL</span>
- <span style="font-weight: 400;">XML</span>

### <span style="font-weight: 400;">Installing build subsystem</span>

```shell
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
```

### <span style="font-weight: 400;">Installing EPEL Repository to install mcrypt</span>

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

### <span style="font-weight: 400;">Installing Apache 2.2.34 from source</span>

**Getting source code**

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

<span style="font-weight: 400;">Uncompress</span>

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

**Configure**

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

**Compile and install**

```shell
make
make install
```

### <span style="font-weight: 400;">Installing PHP 5.2.17 from source</span>

<span style="font-weight: 400;">It is very important to use this version because php 5.2.17 doesn't work with nealy versions.</span>

**Getting source code**

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

**Uncompress**<span style="font-weight: 400;"> </span>

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

**Patching** <span style="font-weight: 400;"> </span>

[<span style="font-weight: 400;">https://stackoverflow.com/questions/28211039/phpbrew-5-3-10-build-error-dereferencing-pointer-to-incomplete-type/34107461</span>](https://stackoverflow.com/questions/28211039/phpbrew-5-3-10-build-error-dereferencing-pointer-to-incomplete-type/34107461)

```shell
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**

```shell
./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**

```shell
make
make install
```

<span style="font-weight: 400;">Copie o arquivo php.ini-recommended para /etc/php.ini</span>

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

<span style="font-weight: 400;">Ajuste o arquivo, modificando e depois reinicie o Apache:</span>

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

**Creating a symbolic link for modules**

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

**Configure Apache**

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

**Creating a system unit**

```shell
# 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
```

# <span style="font-weight: 400;">Installation of the SciELO Methodology</span>

<span style="font-weight: 400;">Following </span>

[<span style="font-weight: 400;">http://docs.scielo.org/projects/scielo-site/en/latest/howtoinstall.html</span>](http://docs.scielo.org/projects/scielo-site/en/latest/howtoinstall.html)

<span style="font-weight: 400;">In the link above, there is instruccion to download the respective branch from your collection. If you are a new collection and you don't have a branch, you can clone the master.</span>

<span style="font-weight: 400;">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.</span>

<span style="font-weight: 400;">For version control we use GitHub, where Tags correspond to the versions of the site.</span>

<span style="font-weight: 400;">Check the TAGs here: </span>[<span style="font-weight: 400;">SciELO’s GitHub</span>](https://github.com/scieloorg/Web/tags)

[![Screenshot at Aug 05 10-36-40.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-36-40.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-36-40.png)

<span style="font-weight: 400;">Check the branch of the current version by region and country. See the table at the link below:</span>

[<span style="font-weight: 400;">Branch name for each collection</span>](http://docs.scielo.org/projects/scielo-site/en/latest/network.html)

<span style="font-weight: 400;">[![Screenshot at Aug 05 10-38-13.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-38-13.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-38-13.png)</span>

<span style="font-weight: 400;">Example:</span>

<span style="font-weight: 400;">If there is no branch for your collection, we ask that you let us know.</span>

## <span style="font-weight: 400;">Download the specific version of the SciELO methodology</span>

<span style="font-weight: 400;">There are two ways to download: one through the tarball file and the other through the zip file.</span>

### <span style="font-weight: 400;">ZIP File</span>

<span style="font-weight: 400;">Download:</span>

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

<span style="font-weight: 400;">Example:</span>

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

<span style="font-weight: 400;">After extracting the files, a directory will be created with the name Web-master</span>

```shell
Web-master
```

<span style="font-weight: 400;">Enter the directory and move the content extracted to "</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">”:</span>

## <span style="font-weight: 400;">Installation of the CISIS package</span>

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

<span style="font-weight: 400;">Extract the contents in the directory:</span>

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

<span style="font-weight: 400;">The CISIS directory will look like this:</span>

<span style="font-weight: 400;">Delete the downloaded .zip file</span>

<span style="font-weight: 400;">To test operation:</span>

```shell
mx what
```

<span style="font-weight: 400;">Result:</span>

## <span style="font-weight: 400;">Installation of the WWWISIS package</span>

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

# <span style="font-weight: 400;">To test:</span>

```shell
./wxis.exe hello
```

# <span style="font-weight: 400;">Configuring the httpd.conf file</span>

<span style="font-weight: 400;">Edit the file:</span>

```shell
vi /etc/httpd/conf/httpd.conf
```

<span style="font-weight: 400;">In the end of the file add the line:</span>

<table id="bkmrk-%23-virtual-hosts-incl"><tbody><tr><td>*<span style="font-weight: 400;">\# Virtual hosts</span>*

*<span style="font-weight: 400;">Include /etc/httpd/conf.d/vhosts</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Enter the directory indicated below:</span>

<table id="bkmrk-mkdir-%2Fetc%2Fhttpd%2Fcon"><tbody><tr><td>*<span style="font-weight: 400;">mkdir /etc/httpd/conf.d/vhosts</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Enter the directory indicated below and create the file below:</span>

<table id="bkmrk-cd-%2Fetc%2Fhttpd%2Fconf.d"><tbody><tr><td>*<span style="font-weight: 400;">cd /etc/httpd/conf.d/vhosts</span>*

*<span style="font-weight: 400;">vi </span><span style="font-weight: 400;">vhosts.conf</span>*

  
***add the follow content:***

  
*<span style="font-weight: 400;">NameVirtualHost &lt;server ip&gt;:80</span>*

  
***It is important to replace &lt;server ip&gt; to the real ip from machine***

</td></tr></tbody></table>

<span style="font-weight: 400;">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:</span>

<table id="bkmrk-%23-vi-scielo-org-bo.c"><tbody><tr><td><span style="font-weight: 400;">\# vi scielo-org-bo.conf</span>

  
<span style="font-weight: 400;">&lt;VirtualHost \*:80&gt;</span>

<span style="font-weight: 400;"> ServerName vm.scielo.br</span>

<span style="font-weight: 400;"> Alias /pdf/ /var/www/scielo/bases/pdf/</span>

<span style="font-weight: 400;"> Alias /img/fbpe/ /var/www/scielo/htdocs/img/revistas/</span>

<span style="font-weight: 400;"> Alias /img/scimago/ /var/www/scielo/bases/scimago/images/</span>

<span style="font-weight: 400;"> LimitRequestFieldSize 9000</span>

<span style="font-weight: 400;"> LimitRequestLine 9000</span>

<span style="font-weight: 400;"> DocumentRoot /var/www/scielo/htdocs</span>

<span style="font-weight: 400;"> DirectoryIndex scielo.php index.php index.html index.htm</span>

<span style="font-weight: 400;"> &lt;Directory /var/www/scielo/htdocs&gt;</span>

<span style="font-weight: 400;"> Options FollowSymLinks MultiViews</span>

<span style="font-weight: 400;"> Order deny,allow</span>

<span style="font-weight: 400;"> AcceptPathInfo On</span>

<span style="font-weight: 400;"> Allow from all</span>

<span style="font-weight: 400;"> &lt;/Directory&gt;</span>

<span style="font-weight: 400;"> &lt;Directory /var/www/scielo/bases/pdf/&gt;</span>

<span style="font-weight: 400;"> Options FollowSymLinks MultiViews</span>

<span style="font-weight: 400;"> Order deny,allow </span>

<span style="font-weight: 400;"> AcceptPathInfo On</span>

<span style="font-weight: 400;"> Allow from all</span>

<span style="font-weight: 400;"> &lt;/Directory&gt;</span>

<span style="font-weight: 400;"> &lt;Directory /var/www/scielo/bases/scimago/images/&gt;</span>

<span style="font-weight: 400;"> Options FollowSymLinks MultiViews</span>

<span style="font-weight: 400;"> Order deny,allow</span>

<span style="font-weight: 400;"> AcceptPathInfo On</span>

<span style="font-weight: 400;"> Allow from all</span>

<span style="font-weight: 400;"> &lt;/Directory&gt;</span>

<span style="font-weight: 400;"> &lt;FilesMatch "\\.(def)$"&gt;</span>

<span style="font-weight: 400;"> Order allow,deny</span>

<span style="font-weight: 400;"> Allow from all</span>

<span style="font-weight: 400;"> Satisfy All</span>

<span style="font-weight: 400;"> &lt;/FilesMatch&gt;</span>

<span style="font-weight: 400;"> ScriptAlias /cgi-bin/ /var/www/scielo/cgi-bin/</span>

<span style="font-weight: 400;"> &lt;Directory /var/www/scielo/cgi-bin/&gt;</span>

<span style="font-weight: 400;"> AddDefaultCharset ISO-8859-1</span>

<span style="font-weight: 400;"> Options FollowSymLinks MultiViews ExecCGI</span>

<span style="font-weight: 400;"> AcceptPathInfo On</span>

<span style="font-weight: 400;"> Order deny,allow</span>

<span style="font-weight: 400;"> Allow from all</span>

<span style="font-weight: 400;"> &lt;/Directory&gt;</span>

  
<span style="font-weight: 400;"> ErrorLog "|/usr/sbin/rotatelogs -l /var/www/apache/%Y-%m-%d+scielo-br-error.log 5M"</span>

<span style="font-weight: 400;"> CustomLog "| /usr/sbin/rotatelogs -l /var/www/apache/%Y-%m-%d+scielo-br-access.log 5M" combined</span>

<span style="font-weight: 400;">&lt;/VirtualHost&gt;</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">Some fields you have to replace:</span>

<table id="bkmrk-servername---corresp"><tbody><tr><td>**ServerName**<span style="font-weight: 400;"> - corresponding to the domain name. Example: </span>[<span style="font-weight: 400;">www.scielo.org.bo</span>](http://www.scielo.org.bo)

**ErrorLog**<span style="font-weight: 400;"> - corresponding to the log file error. Replace from this template scielo-br to the name of you instance. Example: scielo-org-bo</span>

**CustomLog**<span style="font-weight: 400;"> - corresponding to the log file acess. Replace from this template scielo-br to the name of you instance. Example: scielo-org-bo</span>

  
<span style="font-weight: 400;">NOTES: You have to create the directory /var/www/apache to save the files created. Run the command:</span>

<span style="font-weight: 400;">mkdir /var/www/apache</span>

</td></tr></tbody></table>

# <span style="font-weight: 400;">Mandatory settings</span>

## <span style="font-weight: 400;">Configuring the scielo.def.php file</span>

<span style="font-weight: 400;">Below we will show the mandatory configurations for the SciELO Methodology to work.</span><span style="font-weight: 400;">  
</span><span style="font-weight: 400;">Copy the template file "scielo.def.php.template" to your configuration file "scielo.def.php".</span>

<span style="font-weight: 400;">Enter the directory:</span>

<table id="bkmrk-cd-%2Fvar%2Fwww%2Fscielo%2Fh"><tbody><tr><td>*<span style="font-weight: 400;">cd /var/www/scielo/htdocs/</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Copy:</span>

<table id="bkmrk-cp-scielo.def.php.te"><tbody><tr><td><span style="font-weight: 400;">cp </span>**scielo.def.php.template**<span style="font-weight: 400;"> </span><span style="font-weight: 400;">scielo.def.php</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">Edit the file as shown in the following example:</span>

<table id="bkmrk-vi-scielo.def.php"><tbody><tr><td>*<span style="font-weight: 400;">vi scielo.def.php</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">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.</span>

<table id="bkmrk-esc-%3A%25s%2F%5C%2Fhome%5C%2Fscie"><tbody><tr><td><span style="font-weight: 400;">ESC :%s/\\/home\\/scielo/\\/var\\/www\\/scielo/g</span>

</td></tr></tbody></table>

**Site identification settings**

<table id="bkmrk-%5Bsite_info%5D-site_nam"><tbody><tr><td>*<span style="font-weight: 400;">\[SITE\_INFO\]</span>*

*<span style="font-weight: 400;">SITE\_NAME=SciELO - Scientific Electronic Library Online</span>*

*<span style="font-weight: 400;">SHORT\_NAME=Scielo Brazil</span>*

*<span style="font-weight: 400;">SITE\_AUTHOR=FAPESP - CNPq - FapUNIFESP - BIREME</span>*

*<span style="font-weight: 400;">ADDRESS\_1=R. Dr. Diogo de Faria, 1087 cj.810</span>*

*<span style="font-weight: 400;">ADDRESS\_2=04037-003 - Sao Paulo/SP</span>*

*<span style="font-weight: 400;">COUNTRY=Brasil</span>*

*<span style="font-weight: 400;">PHONE\_NUMBER=+55 11 3369-4080/4085</span>*

*<span style="font-weight: 400;">\#FAX\_NUMBER=+55 11 5575-8868</span>*

*<span style="font-weight: 400;">E\_MAIL=scielo@bireme.br</span>*

*<span style="font-weight: 400;">STANDARD\_LANG=en</span>*

*<span style="font-weight: 400;">APP\_NAME=scielo</span>*

*<span style="font-weight: 400;">ANALYTICS\_CODE=scl</span>*

</td></tr></tbody></table>

**APP\_NAME and ANALYTICS\_CODE, are parameters provided by the SciELO team.**

<table id="bkmrk-%5Bscielo%5D-server_scie"><tbody><tr><td>*<span style="font-weight: 400;">\[SCIELO\]</span>*

*<span style="font-weight: 400;">SERVER\_SCIELO=vm.scielo.br</span>*

  
*<span style="font-weight: 400;">\[FULLTEXT\_SERVICES\]</span>*

*<span style="font-weight: 400;">access="http://vm.scielo.br/applications/scielo-org/pages/services/articleRequestGraphicPage.php?pid=PARAM\_PID&amp;caller=PARAM\_SERVER"</span>*

*<span style="font-weight: 400;">cited\_SciELO="http://vm.scielo.br/scieloOrg/php/citedScielo.php?pid=PARAM\_PID"</span>*

*<span style="font-weight: 400;">send\_mail="http://vm.scielo.br/applications/scielo-org/pages/services/sendMail.php?pid=PARAM\_PID&amp;caller=PARAM\_SERVER"</span>*

</td></tr></tbody></table>

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

<table id="bkmrk-%5Bpath%5D-path_data%3D%2F-p"><tbody><tr><td>*<span style="font-weight: 400;">\[PATH\]</span>*

  
*<span style="font-weight: 400;">PATH\_DATA=/</span>*

*<span style="font-weight: 400;">PATH\_CGI-BIN=/cgi-bin/</span>*

*<span style="font-weight: 400;">PATH\_SCRIPTS=ScieloXML/</span>*

*<span style="font-weight: 400;">PATH\_GENIMG=/img/</span>*

*<span style="font-weight: 400;">PATH\_SERIMG=/img/revistas/</span>*

*<span style="font-weight: 400;">PATH\_SERIAL\_HTML=/revistas/</span>*

*<span style="font-weight: 400;">PATH\_XSL=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/htdocs/xsl/</span>*

*<span style="font-weight: 400;">PATH\_DATABASE=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/bases/</span>*

*<span style="font-weight: 400;">PATH\_SETTINGS=</span>*

*<span style="font-weight: 400;">PATH\_PDF=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/bases/pdf</span>*

*<span style="font-weight: 400;">PATH\_TRANSLATION=</span><span style="font-weight: 400;">/var/www/scielo/</span><span style="font-weight: 400;">bases/translation/</span>*

*<span style="font-weight: 400;">PATH\_HTDOCS=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/htdocs/</span>*

*<span style="font-weight: 400;">PATH\_OAI=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/htdocs/oai/</span>*

*<span style="font-weight: 400;">PATH\_PROC=</span><span style="font-weight: 400;">/var/www/scielo/</span><span style="font-weight: 400;">proc/</span>*

</td></tr></tbody></table>

## <span style="font-weight: 400;">Configuring the iah.def file</span>

<span style="font-weight: 400;">Copy the template file “iah.def.php.template” to your configuration file “iah.def.php”.</span>

<span style="font-weight: 400;">Enter the directory:</span>

<table id="bkmrk-%2Fvar%2Fwww%2Fscielo%2Fhtdo"><tbody><tr><td>*<span style="font-weight: 400;">/var/www/scielo/htdocs/iah</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Copy:</span>

<table id="bkmrk-cp-iah.def.php.templ"><tbody><tr><td>**cp iah.def.php.template** <span style="font-weight: 400;">iah.def.php</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">Edit the file as shown in the following example:</span>

<table id="bkmrk-iah.def.php"><tbody><tr><td>*<span style="font-weight: 400;">iah.def.php</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">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:</span>

<span style="font-weight: 400;">The blocks that must be changed are:</span>

<span style="font-weight: 400;">\[PATH\]</span>

<span style="font-weight: 400;">\[IAH\]</span>

<span style="font-weight: 400;">\[HEADER\]</span>

<span style="font-weight: 400;">For instance:</span>

<table id="bkmrk-%5Bpath%5D-path_data%3D%2Fia"><tbody><tr><td>*<span style="font-weight: 400;">\[PATH\]</span>*

*<span style="font-weight: 400;">PATH\_DATA=/iah/</span>*

*<span style="font-weight: 400;">PATH\_CGI-BIN=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah/</span>*

*<span style="font-weight: 400;">PATH\_DATABASE=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/bases/</span>*

  
*<span style="font-weight: 400;">\[APPEARANCE\]</span>*

*<span style="font-weight: 400;">BODY BACKGROUND COLOR=white</span>*

*<span style="font-weight: 400;">BODY BACKGROUND IMAGE=</span>*

*<span style="font-weight: 400;">BODY TEXT COLOR=black</span>*

*<span style="font-weight: 400;">BODY LINK COLOR=blue</span>*

*<span style="font-weight: 400;">BODY VLINK COLOR=blue</span>*

*<span style="font-weight: 400;">BAR BACKGROUND COLOR=#B0C2D5</span>*

*<span style="font-weight: 400;">BAR TEXT COLOR=black</span>*

*<span style="font-weight: 400;">ERROR TEXT COLOR=</span>*

*<span style="font-weight: 400;">WARNING TEXT COLOR=</span>*

  
*<span style="font-weight: 400;">\[HEADER\]</span>*

*<span style="font-weight: 400;">LOGO IMAGE=scielog.gif</span>*

*<span style="font-weight: 400;">LOGO TEXT COLOR=</span>*

*<span style="font-weight: 400;">LOGO BACKGROUND COLOR=</span>*

*<span style="font-weight: 400;">LOGO URL=www.scielo.br</span>*

*<span style="font-weight: 400;">HEADER IMAGE=^ponlinep.gif^eonlinee.gif^ionlinei.gif</span>*

*<span style="font-weight: 400;">HEADER TEXT COLOR=</span>*

*<span style="font-weight: 400;">HEADER BACKGROUND COLOR=</span>*

*<span style="font-weight: 400;">HEADER URL=</span><span style="font-weight: 400;">www.scielo.br</span>*

  
*<span style="font-weight: 400;">\[IAH\]</span>*

*<span style="font-weight: 400;">MANAGER E-MAIL=</span><span style="font-weight: 400;">scielo@bireme.br</span>*

*<span style="font-weight: 400;">MAINTENANCE=OFF</span>*

*<span style="font-weight: 400;">REVERSE MODE=ON</span>*

*<span style="font-weight: 400;">MULTI-LANGUAGE=ON</span>*

*<span style="font-weight: 400;">LOG\_DATABASE=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/bases/logdia/iahlog</span>*

  
  
</td></tr></tbody></table>

## <span style="font-weight: 400;">Configuring the article.def file</span>

<span style="font-weight: 400;">Copy the template file "article.def.php.template" to your configuration file "article.def.php".</span>

<span style="font-weight: 400;">Enter the directory:</span>

<table id="bkmrk-%2Fvar%2Fwww%2Fscielo%2Fhtdo-0"><tbody><tr><td>*<span style="font-weight: 400;">/var/www/scielo/htdocs/iah</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Copy as directed:</span>

<table id="bkmrk-article.def.php.temp"><tbody><tr><td>**article.def.php.template** *<span style="font-weight: 400;">to</span>* <span style="font-weight: 400;">article.def.php</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">Edit the file as shown in the following example:</span>

<table id="bkmrk-article.def.php"><tbody><tr><td>*<span style="font-weight: 400;">article.def.php</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">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:</span>

<span style="font-weight: 400;">The blocks that must be changed are:</span>

<table id="bkmrk-%5Bfile_location%5D-%5Bvar"><tbody><tr><td>*<span style="font-weight: 400;">\[FILE\_LOCATION\]</span>*

*<span style="font-weight: 400;">\[VARIABLES\]</span>*

  
*<span style="font-weight: 400;">Exemplo:</span>*

  
*<span style="font-weight: 400;">\[FILE\_LOCATION\]</span>*

  
*<span style="font-weight: 400;">FILE HEADER.IAH=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/header.pft</span>*

*<span style="font-weight: 400;">FILE QUERY.IAH=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/query.pft</span>*

*<span style="font-weight: 400;">FILE LIST6003.PFT=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/list6003.pft</span>*

*<span style="font-weight: 400;">FILE PROC.PFT=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/htdocs/pfts/proc\_split\_mst.pft</span>*

*<span style="font-weight: 400;">FILE iso.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbiso.pft</span>*

*<span style="font-weight: 400;">FILE abn.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbabn.pft</span>*

*<span style="font-weight: 400;">FILE van.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbvan.pft</span>*

*<span style="font-weight: 400;">FILE places.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/place-generico.pft</span>*

*<span style="font-weight: 400;">FILE month1.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/month1.pft</span>*

*<span style="font-weight: 400;">FILE month2.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/month2.pft</span>*

*<span style="font-weight: 400;">FILE scistyle.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/scistyle.pft</span>*

*<span style="font-weight: 400;">FILE AHBTOP.HTM=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/%lang%/ahbtop.htm</span>*

*<span style="font-weight: 400;">FILE AHLIST.PFT=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/%lang%/ahlist.pft</span>*

*<span style="font-weight: 400;">FILE ahlist.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/%lang%/ahlist.pft</span>*

*<span style="font-weight: 400;">FILE LATTES.\*=%path\_database%lattes/lattes.\*</span>*

*<span style="font-weight: 400;">FILE citation.xml=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbisoXML.pft</span>*

  
*<span style="font-weight: 400;">\[VARIABLES\]</span>*

*<span style="font-weight: 400;">VARIABLE APP\_PATH=</span><span style="font-weight: 400;">/var/www/scielo/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_REVISTAS\_PATH=</span><span style="font-weight: 400;">/var/www/scielo/htdocs</span><span style="font-weight: 400;">/revistas/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_REVISTAS\_RELPATH=/revistas/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_IMG\_REVISTAS\_RELPATH=/img/revistas/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_IMG\_RELPATH=/img/</span>*

</td></tr></tbody></table>

## <span style="font-weight: 400;">Configuring the title.def file</span>

<span style="font-weight: 400;">Copy the “title.def.php.template” template file to your “title.def.php” configuration file.</span>

<span style="font-weight: 400;">Enter the directory:</span>

<table id="bkmrk-%2Fvar%2Fwww%2Fscielo%2Fhtdo-1"><tbody><tr><td>*<span style="font-weight: 400;">/var/www/scielo/htdocs/iah</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Copy as directed:</span>

<table id="bkmrk-title.def.php.templa"><tbody><tr><td>**title.def.php.template** *<span style="font-weight: 400;">to</span>* <span style="font-weight: 400;">title.def.php</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">Edit the file as shown in the following example:</span>

<table id="bkmrk-title.def.php"><tbody><tr><td>*<span style="font-weight: 400;">title.def.php</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">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:</span>

<span style="font-weight: 400;">The blocks that must be changed are:</span>

<table id="bkmrk-%5Bfile_location%5D-%5Bvar-0"><tbody><tr><td>  
*<span style="font-weight: 400;">\[FILE\_LOCATION\]</span>*

*<span style="font-weight: 400;">\[VARIABLES\]</span>*

  
*<span style="font-weight: 400;">\[FILE\_LOCATION\]</span>*

  
*<span style="font-weight: 400;">FILE DATABASE.\*=%path\_database%title/title.\*</span>*

*<span style="font-weight: 400;">FILE FULINV.\*=%path\_database%title/titsrc.\*</span>*

*<span style="font-weight: 400;">FILE PREINV.\*=%path\_database%title/titsrcp.\*</span>*

  
*<span style="font-weight: 400;">FILE HEADER.IAH=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/header.pft</span>*

  
*<span style="font-weight: 400;">FILE scistyle.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/scistyle.pft</span>*

*<span style="font-weight: 400;">FILE places.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/place-generico.pft</span>*

*<span style="font-weight: 400;">FILE iso.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbsrc1.pft</span>*

*<span style="font-weight: 400;">FILE van.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbsrc1.pft</span>*

*<span style="font-weight: 400;">FILE abn.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbsrc1.pft</span>*

*<span style="font-weight: 400;">FILE issue.\*=%path\_database%issue/issue.\*</span>*

*<span style="font-weight: 400;">FILE facic.\*=%path\_database%issue/facic.\*</span>*

*<span style="font-weight: 400;">FILE artigo.\*=%path\_database%artigo/artigo.\*</span>*

*<span style="font-weight: 400;">FILE author.\*=%path\_database%artigo/author.\*</span>*

*<span style="font-weight: 400;">FILE title.\*=%path\_database%title/title.\*</span>*

  
*<span style="font-weight: 400;">\[VARIABLES\]</span>*

*<span style="font-weight: 400;">VARIABLE APP\_PATH=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_REVISTAS\_PATH=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/htdocs/revistas/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_REVISTAS\_RELPATH=/revistas/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_IMG\_REVISTAS\_RELPATH=/img/revistas/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_IMG\_RELPATH=/img/</span>*

</td></tr></tbody></table>

# <span style="font-weight: 400;">Configuring php.ini</span>

<span style="font-weight: 400;">The php.ini file is located in the standard PHP installation directory, as shown below.</span>

<table id="bkmrk-vi-%2Fetc%2Fphp.ini"><tbody><tr><td>*<span style="font-weight: 400;">vi /etc/php.ini</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">When opening the file with an editor, search for the word short\_open\_tag, it is defined according to the model:</span>

<table id="bkmrk-short_open_tag-%3D-off"><tbody><tr><td>*<span style="font-weight: 400;">short\_open\_tag = Off</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Change to:</span>

<table id="bkmrk-short_open_tag-%3D-on"><tbody><tr><td>*<span style="font-weight: 400;">short\_open\_tag = On</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Save the file and restart apache.</span>

# <span style="font-weight: 400;">Configuration of "hosts" and "Vhost"</span>

<span style="font-weight: 400;">Check the IP of the Server that is installing the methodology:</span>

<span style="font-weight: 400;">Edit the "hosts" file of the Server and or make the correct notes on your DNS server:</span>

<table id="bkmrk-vi-%2Fetc%2Fhosts"><tbody><tr><td>*<span style="font-weight: 400;">vi /etc/hosts</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Add the following line:</span>

<table id="bkmrk-%3Cip_do_servidor%3E-%C2%A0%C2%A0%C2%A0"><tbody><tr><td>*<span style="font-weight: 400;">&lt;ip\_do\_servidor&gt; </span><span style="font-weight: 400;"> vm.scielo.br</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">To test the functioning of wwwisis in the web environment, type in your browser:</span>

[<span style="font-weight: 400;">http://vm.scielo.br/cgi-bin/wxis.exe?hello</span>](http://vm.scielo.br/cgi-bin/wxis.exe?hello)

# <span style="font-weight: 400;">Access the site</span>

<span style="font-weight: 400;">vm.scielo.br/scielo.php</span>

[![Screenshot at Aug 05 10-43-18.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-43-18.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-43-18.png)

# <span style="font-weight: 400;">Gera Padrao Script</span>

<span style="font-weight: 400;">Edit the gerapadrão.bat file:</span>

<table id="bkmrk-vi-%2Fvar%2Fwww%2Fscielo%2Fp"><tbody><tr><td>*<span style="font-weight: 400;">vi /var/www/scielo/proc/GeraPadrao.bat</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Changing the following parameters:</span>

<span style="font-weight: 400;">Before:</span>

<table id="bkmrk-call-notepad-%5Cscielo"><tbody><tr><td>*<span style="font-weight: 400;">call notepad \\scielo\\serial\\scilista.lst</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">After:</span>

<table id="bkmrk-call-notepad-%5Cvar%5Cww"><tbody><tr><td>*<span style="font-weight: 400;">call notepad </span><span style="font-weight: 400;">\\var\\www</span><span style="font-weight: 400;">\\scielo\\serial\\scilista.lst</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Before:</span>

<table id="bkmrk-md-%5Cscielo%5Cweb%5Cbases"><tbody><tr><td>*<span style="font-weight: 400;">md \\scielo\\web\\bases-work</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">After:</span>

<table id="bkmrk-md-%5Cvar%5Cwww%5Cscielo%5Cw"><tbody><tr><td>*<span style="font-weight: 400;">md </span><span style="font-weight: 400;">\\var\\www</span><span style="font-weight: 400;">\\scielo\\web\\bases-work</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Before:</span>

<table id="bkmrk-call-gerascielo.bat-"><tbody><tr><td>*<span style="font-weight: 400;">call GeraScielo.bat \\scielo \\scielo\\web log\\GeraPadrao.log adiciona</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">After:</span>

<table id="bkmrk-call-gerascielo.bat--0"><tbody><tr><td>*<span style="font-weight: 400;">call GeraScielo.bat .. .. log\\GeraPadrao.log adiciona</span>*

</td></tr></tbody></table>

# <span style="font-weight: 400;">Rename the directory:</span>

<table id="bkmrk-cd-%2Fvar%2Fwww%2Fscielo-m"><tbody><tr><td>*<span style="font-weight: 400;">cd /var/www/scielo</span>*

**mv serial-modelo** <span style="font-weight: 400;">serial</span>

</td></tr></tbody></table>

## <span style="font-weight: 400;">Creating user scielo and set permission</span>

<span style="font-weight: 400;">This user will be used to update files and processing databases.</span>

<table id="bkmrk-%23-useradd--c-%22scielo"><tbody><tr><td><span style="font-weight: 400;">\# useradd -c "SciELO User Admin" scielo</span>

</td></tr></tbody></table>

### <span style="font-weight: 400;">Set permission to scielo user</span>

<span style="font-weight: 400;">I am considering Apache Root Dir is /var/www/scielo</span>

<table id="bkmrk-%23-chown--r-scielo.-%2F"><tbody><tr><td><span style="font-weight: 400;">\# chown -R scielo. /var/www/scielo/</span>

</td></tr></tbody></table>

### <span style="font-weight: 400;">Fixing Directory and File permissions</span>

<table id="bkmrk-%23-find-%2Fvar%2Fwww%2Fscie"><tbody><tr><td><span style="font-weight: 400;">\# find /var/www/scielo/ -type d -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">\# find /var/www/scielo/ -type f -exec chmod 644 {} \\;</span>

<span style="font-weight: 400;">\# cd /var/www/scielo/</span>

<span style="font-weight: 400;">\# find proc/ -name \*.bat -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">\# find proc/ -name \*.sh -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">\# find cgi-bin/ -name \*.bat -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">\# find cgi-bin/ -name \*.sh -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">\# find cgi-bin/ -name \*.exe -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">\# cd proc</span>

<span style="font-weight: 400;">\# chmod 755 cisis/\*</span>

<span style="font-weight: 400;">\# chmod 755 call</span>

<span style="font-weight: 400;">\# chmod 755 rem</span>

</td></tr></tbody></table>

# <span style="font-weight: 400;">Possible errors</span>

<span style="font-weight: 400;">The error below is common, to fix it we have to change the php.ini file</span>

[![Screenshot at Aug 05 10-44-14.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-44-14.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-44-14.png)

<span style="font-weight: 400;">The php.ini file is located in the standard PHP installation directory, as shown below.</span>

<table id="bkmrk-vi-%2Fetc%2Fphp.ini-0"><tbody><tr><td>*<span style="font-weight: 400;">vi /etc/php.ini</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">When opening the file with an editor, search for the word short\_open\_tag, it is defined according to the model:</span>

<table id="bkmrk-short_open_tag-%3D-off-0"><tbody><tr><td>*<span style="font-weight: 400;">short\_open\_tag = Off</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Change to:</span>

<table id="bkmrk-short_open_tag-%3D-on-0"><tbody><tr><td>*<span style="font-weight: 400;">short\_open\_tag = On</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Save the file and restart apache.</span>

# <span style="font-weight: 400;">Paperboy installation</span>

[<span style="font-weight: 400;">GitHub PaperBoy Repository</span>](https://github.com/scieloorg/paperboy)

# <span style="font-weight: 400;">What is PaperBoy?</span>

<span style="font-weight: 400;">PaperBoy is a utility for sending SciELO data from local website servers for processing and also from servers in a collection for network processing. The utility allows sending bases for processing, images, pdfs, translations and XML's.</span>

- <span style="font-weight: 400;">Windows Local Server - Installed and configured the PaperBoy utility on the Windows Local server to send databases to the homologation site methodology server.</span>
- <span style="font-weight: 400;">Methodology Linux Server - Installed and configured the PaperBoy utility on the new methodology server, for sending server bases to the SciELO FTP server, to process the data and add it to the SciELO Analytics website.</span>

## <span style="font-weight: 400;">Prerequisites for the functioning of PaperBoy - Linux</span>

<span style="font-weight: 400;">NOTE: The following configuration is for sending bases from the Linux server Production application methodology to the SciELO FTP server.</span>

<span style="font-weight: 400;">As described at the beginning of the PaperBoy topic, the installation and configuration of the paperboy on the new server Methodology is necessary for sending bases to the SciELO FTP server, the data sent will go through a normalization process and inserted on the Analytics SciELO website, the data are used as collection metrics.</span>

- <span style="font-weight: 400;">Metrics data from the Bolivia collection that are on the Analytics site :.</span>

<span style="font-weight: 400;">For the operation of the PaperBoy utility on linux it is important to note that it is not necessary to install prerequisites. By default Python is already included in the Linux distribution, in which case we have the distribution is Centos.</span>

<span style="font-weight: 400;">To find the version of the distribution used, run the following command :.</span>

<table id="bkmrk-centos-linux-release"><tbody><tr><td><span style="font-weight: 400;">CentOS Linux release 7.7.1908 (Core)</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">As stated earlier, it is not necessary to install Python since it is installed in the distribution.</span>

<span style="font-weight: 400;">To find the version of python installed, run the following command :.</span>

<table id="bkmrk-python---version"><tbody><tr><td><span style="font-weight: 400;">python --version</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">NOTE:The commands must be executed at the server terminal.</span>

<span style="font-weight: 400;">In linux distributions as python is native, the modules are already pre-installed, so we don't need to install the paramiko and pycrypto modules, as we did on windows.</span>

### <span style="font-weight: 400;">Configuring PaperBoy - Linux</span>

<span style="font-weight: 400;">In the Methodology server, the use of the PaperBoy utility will be in Docker, as stated above, we do not need to install Python or the modules since python is native to linux distributions.</span>

<span style="font-weight: 400;">We need to follow some steps to create the container :.</span>

- <span style="font-weight: 400;">Step 1:. Create the directory to store the paperboy configuration file :.</span>
- <span style="font-weight: 400;">mkdir -m 775 /var/www/scielo/scripts/paperboy</span>


- <span style="font-weight: 400;">Step 2: Go to the newly created directory :.</span>
- <span style="font-weight: 400;">cd /var/www/scielo/scripts/paperboy</span>


- <span style="font-weight: 400;">Step 3: Create paperboy configuration file :.</span>
- <span style="font-weight: 400;">touch config.ini</span>


- <span style="font-weight: 400;">Step 4: Open the configuration file we just created :.</span>
- <span style="font-weight: 400;">vim config.ini</span>


### <span style="font-weight: 400;">Configuring PaperBoy for sending bases - Linux</span>

- <span style="font-weight: 400;">Step 1:. Make a copy of the paperboy configuration data to the configuration file we created in the previous topic Configuring PaperBoy - Linux</span>
- <span style="font-weight: 400;">Observation: In the github paperboy repository it is possible to make a copy of the data that we are going to use in the configuration file.</span>
- <span style="font-weight: 400;">Step 2: Now with the data copied to the config.ini file we will edit and add the credentials for collecting and sending data to FTP ScIELO.</span>
- <span style="font-weight: 400;">Step 3: See the config.ini file below without changes.</span>

<table border="1" id="bkmrk-%23diret%C3%B3rio-de-origem" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;"><span style="font-weight: 400;">\#Diretório de origem de coleta dos dados de bases</span>

<span style="font-weight: 400;">source\_dir=/var/www/scielo</span>

<span style="font-weight: 400;">\#Diretório do Cisis </span>

<span style="font-weight: 400;">cisis\_dir=/var/www/scielo/proc/cisis</span>

<span style="font-weight: 400;">\#Diretório onde fica o arquivo da scilista.lst</span>

<span style="font-weight: 400;">scilista=/var/www/scielo/serial/scilista.lst</span>

<span style="font-weight: 400;">\#Diretório de destino dos dados enviados</span>

<span style="font-weight: 400;">destiny\_dir=</span>

<span style="font-weight: 400;">\#Dados do servidor FTP </span>

<span style="font-weight: 400;">\#Servidor FTP usado</span>

<span style="font-weight: 400;">server=</span>

<span style="font-weight: 400;">tipo de servidor ftp</span>

<span style="font-weight: 400;">server\_type=sftp</span>

<span style="font-weight: 400;">\#Porta de conexão com o servidor FTP</span>

<span style="font-weight: 400;">port=22</span>

<span style="font-weight: 400;">\#Usuário FTP</span>

<span style="font-weight: 400;">user=</span>

<span style="font-weight: 400;">\#Senha de acesso</span>

<span style="font-weight: 400;">password=</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">NOTE:I removed comments from the config.ini file for explanation purposes.</span>

<span style="font-weight: 400;">Below we have the config.ini file already configured with all the necessary parameters for sending the bases.</span>

<table border="1" id="bkmrk-%23diret%C3%B3rio-de-origem-0" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;"><span style="font-weight: 400;">\#Diretório de origem de coleta dos dados de bases</span>

<span style="font-weight: 400;">source\_dir=/var/www/scielo</span>

<span style="font-weight: 400;">\#Diretório do Cisis </span>

<span style="font-weight: 400;">cisis\_dir=/var/www/scielo/proc/cisis</span>

<span style="font-weight: 400;">\#Diretório onde fica o arquivo da scilista.lst</span>

<span style="font-weight: 400;">scilista=/var/www/scielo/serial/scilista.lst</span>

<span style="font-weight: 400;">\#Diretório de destino dos dados enviados</span>

<span style="font-weight: 400;">destiny\_dir=</span>

<span style="font-weight: 400;">Observação:. Não configuramos o destino dos dados uma vez que o usuário de ftp já possui o acesso ao diretório da coleção.</span>

<span style="font-weight: 400;">\#Dados do servidor FTP </span>

<span style="font-weight: 400;">server=ftp.scielo.br</span>

<span style="font-weight: 400;">server\_type=ftp</span>

<span style="font-weight: 400;">port=21</span>

<span style="font-weight: 400;">user=scielo.bo</span>

<span style="font-weight: 400;">password=blabla</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">NOTE:I removed comments from the config.ini file for explanation purposes.</span>

# <span style="font-weight: 400;">How to upgrade SciELO Methodology</span>

<span style="font-weight: 400;">To upgrade SciELO Methodology you have to download the latest code from our </span>[<span style="font-weight: 400;">GitHub Repository</span>](https://github.com/scieloorg/web)<span style="font-weight: 400;">. Before updating, check what version is your website. For instance, we are going to check the version from SciELO ZA: </span><a>http://www.scielo.org.za/versionOverview.txt</a>

<span style="font-weight: 400;">[![Screenshot at Aug 05 10-49-44.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-49-44.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-49-44.png)</span>

<span style="font-weight: 400;">The first line that shows is the version. Click here to check which version SciELO Methodology is: </span>[<span style="font-weight: 400;">https://github.com/scieloorg/Web/tags</span>](https://github.com/scieloorg/Web/tags)

[![Screenshot at Aug 05 10-50-14.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-50-14.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-50-14.png)

<span style="font-weight: 400;">From this moment, SciELO code is in 5.44.1 and SciELO ZA is in 5.37. To upgrade we have to download the branch from SciELO ZA. Each collection has its own branch. To check yours, click in the bottom master and select the branch scielo\_&lt;acron from your collection&gt;. In this example we selecting the scielo\_sza</span>

<span style="font-weight: 400;">[![Screenshot at Aug 05 10-50-50.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-50-50.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-50-50.png)</span>

<span style="font-weight: 400;">After selecting the branch click in the bottom right corner code and select Download ZIP:</span>

<span style="font-weight: 400;">[![Screenshot at Aug 05 10-51-31.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-51-31.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-51-31.png)</span>

<span style="font-weight: 400;">After downloading the zip package you have to send it to the Linux Server. You can use WinSCP to send it.</span>

<span style="font-weight: 400;">The other alternative is download it directly from the link </span>[<span style="font-weight: 400;">https://github.com/scieloorg/Web/archive/refs/heads/scielo\_sza.zip</span>](https://github.com/scieloorg/Web/archive/refs/heads/scielo_sza.zip)<span style="font-weight: 400;"> using wget command. If your collection isn't sza you have to change the acronym from this link.</span>

<table id="bkmrk-%24-cd-%2Ftmp-%24-wget-htt"><tbody><tr><td><span style="font-weight: 400;">$ cd /tmp</span>

<span style="font-weight: 400;">$ wget https://github.com/scieloorg/Web/archive/refs/heads/scielo\_sza.zip</span>

<span style="font-weight: 400;">$ unzip scielo\_sza.zip</span>

<span style="font-weight: 400;">$ rsync -Cravp /tmp/</span><span style="font-weight: 400;">Web-scielo\_sza/htdocs/ /var/www/scielo/htdocs/</span>

<span style="font-weight: 400;">$ rsync -Cravp /tmp/</span><span style="font-weight: 400;">Web-scielo\_sza/cgi-bin/ /var/www/scielo/cgi-bin/</span>

<span style="font-weight: 400;">$ rsync -Cravp /tmp/</span><span style="font-weight: 400;">Web-scielo\_sza/proc/ /var/www/scielo/proc/</span>

</td></tr></tbody></table>

## <span style="font-weight: 400;">Fixing permissions </span>

<span style="font-weight: 400;">Once you have upgrade the directories you have to fix the permissions.</span>

<table id="bkmrk-find-%2Fvar%2Fwww%2Fscielo"><tbody><tr><td><span style="font-weight: 400;">find /var/www/scielo/ -type d -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">find /var/www/scielo/ -type f -exec chmod 644 {} \\;</span>

<span style="font-weight: 400;">cd /var/www/scielo/</span>

<span style="font-weight: 400;">find proc/ -name \*.bat -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">find proc/ -name \*.sh -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">find cgi-bin/ -name \*.bat -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">find cgi-bin/ -name \*.sh -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">find cgi-bin/ -name \*.exe -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">cd proc</span>

<span style="font-weight: 400;">chmod 755 cisis/\*</span>

<span style="font-weight: 400;">chmod 755 call</span>

<span style="font-weight: 400;">chmod 755 rem</span>

</td></tr></tbody></table>

# <span style="font-weight: 400;">References</span>

<span style="font-weight: 400;">The following descriptions were based on the existing document:</span>

[<span style="font-weight: 400;">http://docs.scielo.org/projects/scielo-site/en/latest/howtoinstall.html</span>](http://docs.scielo.org/projects/scielo-site/en/latest/howtoinstall.html)

# SciELO Web (Português)

[english](https://documentacao.scielo.org/books/manuais-publicos/page/scielo-web-english) | [español](https://documentacao.scielo.org/books/manuais-publicos/page/scielo-web-espanol)

SciELO Web é a aplicação web da [Metodologia SciELO](https://github.com/scieloorg/Web/wiki/Scielomethodology-pt).

[SciELO PC Programs](https://github.com/scieloorg/PC-Programs/wiki/Home-pt) fazem parte desta metodologia.

## Guias de instalação

### Pré requisitos

Manual de instalação dos pré-requisitos do aplicativo. [ver](https://github.com/scieloorg/Web/wiki/prerequisitos_pt)

### Instalação

Manual de instalação do aplicativo. [ver](https://github.com/scieloorg/Web/wiki/instalacao_pt)

Configurações Especiais (XML Google, DOAJ, Crossref DOI, SCIMAGO, etc). [ver](https://github.com/scieloorg/Web/wiki/configespec_pt)

### Atualização

Manual de atualização do site SciELO. [ver](https://github.com/scieloorg/Web/wiki/actualizacion_pt)

### Mailing List

#### SciELO-Dev

Essa é a lista de discussão da equipe de Tecnologia do SciELO. Nessa lista você poderá fazer perguntas, discutir sobre ocorrências, problemas, sugestões e melhorias para os produtos SciELO. Todos profissionais de TI do projeto SciELO devem se inscrever nessa lista.

[http://groups.google.com/group/scielo-dev](http://groups.google.com/group/scielo-dev)

**Como se inscrever:**

Para inscrever envie um email sem conteúdo para: **scielo-dev+subscribe@googlegroups.com**

**Como cancelar a incrição:**

Para cancelar a inscrição envie um email sem conteúdo para: **scielo-dev+unsubscribe@googlegroups.com**

**Como enviar emails para a lista:**

Para enviar emails utilizar o seguinte email: **scielo-dev@googlegroups.com**

O conteúdo dessa lista pode ser consultado na web, e fortemente recomendada a pesquisa no conteúdo da lista antes de enviar emails com dúvidas pois tais dúvidas já podem ter sido esclarecidas

# SciELO Web (Español)

[english](https://documentacao.scielo.org/books/manuais-publicos/page/scielo-web-english) | [português](https://documentacao.scielo.org/books/manuais-publicos/page/scielo-web-portugues)

Es la aplicación web de la [Metodología SciELO](https://github.com/scieloorg/Web/wiki/Scielomethodology-es).

También relacionados:

- [SciELO PC Programs](https://github.com/scieloorg/PC-Programs/wiki/Home-es)
- [Web para Windows](https://github.com/scieloorg/Web-Windows/wiki/Home-es)

## Guias de instalación

### Prérequisitos

Manual de instalación de los prerequisitos del aplicativo. [ver](https://github.com/scieloorg/Web/wiki/prerequisitos_es)

### Instalación

Manual de instalación del aplicativo. [ver](https://github.com/scieloorg/Web/wiki/Instalacao_es)

Configuraciones Especiales (XML Google, DOAJ, Crossref DOI, SCIMAGO, etc). [ver](https://github.com/scieloorg/Web/wiki/configespec_es)

Troubleshootings [ver](https://github.com/scieloorg/Web/wiki/troubleshootings_es)

### Actualización

Manual de actualización del aplicativo. [ver](https://github.com/scieloorg/Web/wiki/actualizacion_es)

### Mailing Lists

#### SciELO-Dev

This is the list where the SciELO IT Team can use to discuss about questions and issues, problems and suggestions of enhancements for the SciELO products. This includes current and future features, release schedules, and simply developer discussion of various related topics. All SciELO IT Managers should be subscribed to this list.

[http://groups.google.com/group/scielo-dev](http://groups.google.com/group/scielo-dev)

**How to subscribe:**

To subscribe, send an e-mail to this list: **scielo-dev+subscribe@googlegroups.com**

**How to unsubscribe:**

To unsubscribe, send an e-mail to this list: **scielo-dev+unsubscribe@googlegroups.com**

**How to send a e-mail do SciELO Dev:**

To send an e-mail to this list: **scielo-dev@googlegroups.com**

The archives for this list can also be browsed online.

# Procesamiento y actualización de sitios Venezuela (Español)

#####   


##### **Visión geral**

O objetivo deste documento é explicar de forma simples os procedimentos necessários para a submissão de bases, processamento do site de homologação e atualização do site de produção.

##### **Objetivo**

- Envio de bases a través de PaperBoy
- Acceso remoto al servidor
- Recoger bases para procesamiento
- Procesamiento y validación en el sitio de homologación
- Actualización del sitio de producción

##### **Envio de bases a través de PaperBoy**

En el servidor local de Windows, Paperboy ya está instalado y configurado para enviar bases y activos digitales, llamado "paperboy.bat"

[![image-1631274707285.33.02.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631274707285-33-02.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631274707285-33-02.png)

Simplemente haciendo doble clic en el acceso directo comenzará a enviar las bases.

El atajo "paperboy.bat" ejecuta una serie de comandos:

El siguiente comando establece la variable con la configuración del "Paperboy"

<table border="1" id="bkmrk-set-paperboy_setting" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;"><span style="color: #3366ff;">set PAPERBOY\_SETTINGS\_FILE=config.ini</span></td></tr></tbody></table>

[![image-1631275655145.33.31.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631275655145-33-31.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631275655145-33-31.png)

A continuación tenemos el comando para enviar las bases, el log de ejecución se dirige a un archivo:

<table border="1" id="bkmrk-paperboy_delivery_to" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">paperboy\_delivery\_to\_server -m &gt; paperboy.log 2&gt;&amp;1</td></tr></tbody></table>

[![image-1631275690290.34.51.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631275690290-34-51.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631275690290-34-51.png)

##### **Procesamiento y validación en el sitio de homologación**

Para comenzar a procesar tenemos que estar en el directorio correcto:

```
cd cd /var/www/hml_ve_scielo_org/proc
./GeraPadrao.bat
```

Después del procesamiento, podemos consultar el registro y validar si el sitio ha sido actualizado:

```
cd /var/www/hml_scielo/proc/log
```

Una forma de buscar posibles errores que ocurrieron durante el procesamiento es ejecutar el siguiente comando:

En el directorio proc, ejecute el siguiente comando:

```
cat GeraPadrao.log |grep ERRO
```

Si el resultado del comando está vacío es una señal de que no tuvimos errores de procesamiento, ahora tenemos que validar si el sitio fue actualizado.

Verifique la actualización en el sitio web de homologación de la colección

<table border="1" id="bkmrk-homolog-ve.scielo.or" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">[homolog-ve.scielo.org](http://homolog-ve.scielo.org/ "homolog-ve.scielo.org")</td></tr></tbody></table>

[![image-1631387449048.10.04.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631387449048-10-04.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631387449048-10-04.png)

Antes del procesamiento, el sitio solo tenía las bases del modelo:

[![image-1631387295943.37.54.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631387295943-37-54.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631387295943-37-54.png)

Después de procesar el sitio se actualizó:

[![image-1631387428179.09.32.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631387428179-09-32.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631387428179-09-32.png)

##### **Actualización del sitio web de producción**

Para actualizar el sitio de producción, usaremos un script que copia las bases del sitio de aprobación.

#####   


##### **Informaciones importantes**

El script de actualización del sitio se encuentra en el directorio:

```
/var/www/ve_scielo_org/scripts
```

Tenemos un directorio separado para almacenar los registros de actualización y reversión del sitio:

```
/var/www/ve_scielo_org/logs-update-sitio/
```

[![Screen Shot 2021-11-03 at 08.32.10.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-03-at-08-32-10.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-03-at-08-32-10.png)

Empecemos la actualización accediendo de forma remota al servidor, (se puede consultar en "Acceso remoto al servidor")

Una vez en el servidor, vayamos al directorio donde se encuentra el script update\_bases.sh

```
cd /var/www/scripts/
```

Para actualizar el sitio, usemos el siguiente comando a continuación:

```
nohup sh -x update_bases.sh update &>/var/www/ve_scielo_org/logs-update-sitio/update_bases_03112021.log &
```

##### **Nota importante**

<span style="color: #ff0000;">En el comando anterior informamos la ruta donde se almacena el log y el nombre con la fecha del log, para cada actualización debemos informar la fecha, esta práctica es importante cuando es necesario analizar logs, en un posible error que puede ocurrir en una actualización, a continuación daré algunos ejemplos:</span>

Tenemos una actualización del sitio web el 4 de noviembre de 2021

```
nohup sh -x update_bases.sh update &>/var/www/ve_scielo_org/logs-update-sitio/update_bases_04112021.log &
```

Tenemos otra actualización del sitio, pero ahora el 10 de enero de 2022

```
nohup sh -x update_bases.sh update &>/var/www/ve_scielo_org/logs-update-sitio/update_bases_10012022.log &
```

##### **Consulta de registros durante la actualización**

Podemos seguir los registros usando el siguiente comando:

```
tail -f /var/www/ve_scielo_org/logs-update-sitio/update_bases_03112021.log &
```

##### **Explicando el comando del sitio de actualización**

```
nohup sh -x update_bases.sh update &>/var/www/ve_scielo_org/logs-update-sitio/update_bases_03112021.log &
```

<table border="1" id="bkmrk-nohup-par%C3%A1metro-para" style="border-collapse: collapse; width: 100%; height: 260px;"><tbody><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">nohup</td><td style="width: 66.1728%; height: 29px;">Parámetro para insertar el comando en segundo plano</td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">sh -x</td><td style="width: 66.1728%; height: 29px;">Parámetro utilizado para la ejecución del script </td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">update\_bases</td><td style="width: 66.1728%; height: 29px;">Script que usaremos para actualizar el sitio web</td></tr><tr style="height: 28px;"><td style="width: 33.8272%; height: 28px;">update</td><td style="width: 66.1728%; height: 28px;">Parámetros para actualizar el sitio web</td></tr><tr><td style="width: 33.8272%;">rollback</td><td style="width: 66.1728%;">Parámetros para revertir la actualización</td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">&amp;</td><td style="width: 66.1728%; height: 29px;">carácter utilizado en la formación del comando para ejecutar el script en segundo plano.</td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">&gt;</td><td style="width: 66.1728%; height: 29px;">Parámetro que indica hacia dónde vamos a dirigir la salida de ejecución del registro</td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">/var/www/scielove/logs-update-sitio/</td><td style="width: 66.1728%; height: 29px;">directorio donde se almacenan los registros de actualización</td></tr><tr><td style="width: 33.8272%;">update\_bases\_03112021.log</td><td style="width: 66.1728%;">archivo de actualización del sitio web</td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">rollback\_bases\_03112021.log</td><td style="width: 66.1728%; height: 29px;">archivo de rollback del sitio web</td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">&amp;</td><td style="width: 66.1728%; height: 29px;">carácter utilizado en la formación del comando para ejecutar el script en segundo plano.</td></tr></tbody></table>

<p class="callout info"><span style="color: #000000;">**Enlace esencial donde tenemos el script[ update\_bases.sh](https://gist.github.com/anderson-attilio/0d9628fcd5e75f832134a94c195a9668 "update_bases.sh") a analizar**</span></p>

registro de actualización

[![Screen Shot 2021-11-09 at 19.43.07.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-09-at-19-43-07.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-09-at-19-43-07.png)

Fin de actualización

[![Screen Shot 2021-11-09 at 19.47.43.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-09-at-19-47-43.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-09-at-19-47-43.png)

[![Screen Shot 2021-11-09 at 19.36.43.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-09-at-19-36-43.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-09-at-19-36-43.png)

Si es necesario, pudimos revertir la actualización de la siguiente manera:

```
nohup sh -x update_bases.sh rollback &>/var/www/ve_scielo_org/logs-update-sitio/rollback_bases_03112021.log &
```

[![Screen Shot 2021-11-09 at 20.02.50.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-09-at-20-02-50.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-09-at-20-02-50.png)

Este procedimiento revertirá las bases del sitio antes del proceso de actualización descrito en **Consulta de registros durante la actualización.**

# SciELO Web (English)

[português](https://documentacao.scielo.org/books/manuais-publicos/page/scielo-web-portugues) | [español](https://documentacao.scielo.org/books/manuais-publicos/page/scielo-web-espanol)

SciELO Web is the web application of [SciELO Methodology](https://github.com/scieloorg/Web/wiki/Scielomethodology-en).

[SciELO PC Programs](https://github.com/scieloorg/PC-Programs/wiki/home) are also part of this methodology.

## Install Guide

### Requirements

Requirements installation guide. [read](https://github.com/scieloorg/Web/wiki/prerequisitos_en)

### Install

SciELO Web Installation guide. [read](https://github.com/scieloorg/Web/wiki/instalacao_en)

Special Configs (XML Google, DOAJ, Crossref DOI, SCIMAGO, etc). [read](https://github.com/scieloorg/Web/wiki/configespec_en)

### Update

Update Guide from SciELO Web Site. [read](https://github.com/scieloorg/Web/wiki/actualizacion_en)

### Mailing List

#### SciELO-Dev

This is the list where the SciELO IT Team can use to discuss about questions and issues, problems and suggestions of enhancements for the SciELO products. This includes current and future features, release schedules, and simply developer discussion of various related topics. All SciELO IT Managers should be subscribed to this list.

[http://groups.google.com/group/scielo-dev](http://groups.google.com/group/scielo-dev)

**How to subscribe:**

To subscribe, send an e-mail to this list: **scielo-dev+subscribe@googlegroups.com**

**How to unsubscribe:**

To unsubscribe, send an e-mail to this list: **scielo-dev+unsubscribe@googlegroups.com**

**How to send a e-mail do SciELO Dev:**

To send an e-mail to this list: **scielo-dev@googlegroups.com**

The archives for this list can also be browsed online.

# Classic SciELO Website with Docker

### HOW TO CONFIGURE LINUX SERVER WITH DOCKER

Installing [docker-compose](https://docs.docker.com/compose/install/)

```shell
 sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
 sudo chmod +x /usr/local/bin/docker-compose
 sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
 docker-compose --version
```

Installing [Docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-rocky-linux-9)

O pacote de instalação do Docker disponível no repositório oficial do Rocky Linux 9 pode não ser a versão mais recente.   
Para obter a versão mais recente e melhor, instale o Docker do repositório oficial do Docker.   
Esta seção mostra como fazer exatamente isso.

Mas primeiro, vamos atualizar o banco de dados de pacotes:

```shell
sudo dnf check-update
```

Em seguida, adicione o repositório oficial do Docker:

```shell
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
```

Embora não haja um repositório específico do Rocky Linux do Docker, o Rocky Linux é baseado no CentOS e pode usar o mesmo repositório. Com o repositório adicionado, instale o Docker, que é composto de três pacotes:

```shell
sudo dnf install docker-ce docker-ce-cli containerd.io
```

Após a conclusão da instalação, inicie o daemon do Docker:

```shell
sudo systemctl start docker
```

Verifique se está em execução:

```shell
sudo systemctl status docker
```

A saída deve ser semelhante à seguinte, mostrando que o serviço está ativo e em execução:

<div class="secondary-code-label" id="bkmrk-output" title="Output">Output</div>```
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: <mark>active (running)</mark> since Sun 2016-05-01 06:53:52 CDT; 1 weeks 3 days ago
     Docs: https://docs.docker.com
 Main PID: 749 (docker)
```

Creating the file docker-compose.yml

```YAML
version: '2'

services:
  metodologia:
    image: infrascielo/classic-site:latest
    environment:
      INSTANCE_NAME: scielo_br
      USER_SUPERVISOR: root
      PASS_SUPERVISOR: toor
      SITE_NAME: www.scielo.br
      USER_FTP: usuario ftp
      PASSWD_FTP: clave del usuario ftp
      USER_PASS: scielo123
      GIT_BRANCH_NAME: scielo_scl
    volumes:
      - /var/www/scielo:/var/www/scielo
      - /var/www/apache:/var/www/apache
      - /etc/localtime:/etc/localtime
    ports:
      - "80:80"
      - "2222:22"
    restart: always

```

##### Necessaries changes:

Please change the variables bellow:

**INSTANCE\_NAME**: This field must be change to the website's domain with undescore. For instance: scielo.org.ve muste be scielo\_org\_ve

**PASS\_SUPERVISOR**: You have to choose a new password. The default is toor. Never leave the default value.

**SITE\_NAME**: This field corresponding to your website.

**USER\_FTP**: This field must be filled up with the user created by SciELO Brasil. If you don't have, you have to request to SciELO Brasil.

**PASSWD\_FTP**: This field must be filled up with the password from ftp user create by SciELO Brasil.

**USER\_PASS**: This field is the password from the user scielo used to do ssh

**GIT\_BRANCH\_NAME**: Each SciELO Collection has its own branch. If you don't have, please use the default scielo\_scl or request your. If you don't know yours, please visit [GitHub SciELO](https://github.com/scieloorg/web)

Required variables: **INSTANCE\_NAME, SITE\_NAME** and **GIT\_BRANCH\_NAME**

##### Volumes changes:

The path /var/www/scielo is the source of your installation.

\- /var/www/scielo:/var/www/scielo

The path /var/www/apache is where will be stored the Apache Logs  
\- /var/www/apache:/var/www/apache

The path /etc/localtime is the file to keep the clock equal from the server.  
\- /etc/localtime:/etc/localtime

##### How to start the container

```shell
docker-compose up -d
```

##### how to stop the container

```shell
docker-compose down
```

##### How to list all containers running

```shell
docker-compose ps
```

### How to upgrade databases, Images and PDFs from SciELO Methodology

<span style="font-weight: 400;">En el Servidor Windows ejecute el programa CMD entre en la carpeta C:\\var\\www\\scielo\\proc digite:</span>

<span style="font-weight: 400;">GeraPadrao.bat</span>

<span style="font-weight: 400;">Espere hasta que termine. Para analizar la generación de las bases hay una carpeta en C:\\var\\www\\scielo\\proc\\log Busque el archivo log GeraPadrao.log</span>

<span style="font-weight: 400;">Obs.: La generación de las bases está condicionada a la existencia de las bases en la carpeta C:\\var\\www\\scielo\\serial y un fichero C:\\var\\www\\scielo\\serial\\scilista.lst. El fichero scilista.lst sigue el padrón: Acrónimo volumen y número </span>

<span style="font-weight: 400;">Ejemplo: </span>

```shell
maskay v6n1
sophia  n22
```

<span style="font-weight: 400;">Una vez que se ve en el navegador el resultado del procesamiento ya es posible enviar las bases, imágenes y pdfs para el servidor de desarrollo. Para enviar los ficheros necesarios usamos el script C:\\PAPERBOY\\paperboy.bat. El resultado del envío es salvo en C:\\PAPERBOY\\logs\\paperboy-scielo.log</span>

<span style="font-weight: 400;">Una vez que enviamos bases, imágenes y pdfs para el servidor de desarrollo tenemos que procesar las bases en el formato linux.</span>

<span style="font-weight: 400;">Sigue los pasos:</span>

- <span style="font-weight: 400;">Acceda al servidor de desarrollo;</span>
- <span style="font-weight: 400;">Ejecute </span>*<span style="font-weight: 400;">docker ps</span>*<span style="font-weight: 400;"> para verificar cuales contenedor está en ejecución;</span>
- <span style="font-weight: 400;">Identificando el CONTAINER ID del contenedor metodología, accedemos a el con el comando: </span>*<span style="font-weight: 400;">docker exec -ti &lt;CONTAINER ID&gt; bash. </span>*<span style="font-weight: 400;">Cambie CONTAINER ID por la secuencia numérica</span>
- <span style="font-weight: 400;">Una vez que estamos dentro del bash del contenedor entre en la carpeta</span>

```shell
$ cd /var/www/scielo/proc/
Ejecute:
$./GeraPadrao.bat
```

<span style="font-weight: 400;">Cuando finalize verifique se el sitio </span>[http://your.domain.scielo](http://your.domain.scielo "http://your.domain.scielo")<span style="font-weight: 400;"> este actualizado</span>

<span style="font-weight: 400;">Si sí vamos enviar las bases procesadas desde este contenedor.</span>

<span style="font-weight: 400;">Ejecute el comando exit para salir desde el contenedor</span>

```shell
$exit
```

<span style="font-weight: 400;">Es importante que la instrucción ahora sea hecha usando el usuário scielo, pues no funciona con el usuario root</span>

```shell
#su - scielo
```

#### Scripts para actualización

atualiza-bases-scielo.sh

```shell
#!/bin/bash
# Script: function.sh - Criação das funções que será utilizado pelo script update_bases.sh
#         para atualizar os arquivos da instância SciELO processada.
# Mantenedor: Rondineli Saad e Fábio Batalha
# Criado em: 08/05/2019
# Versão: 11
# Funcao para atualizar bases:-->
#                               |->$1 Coleção
#                               |->$2 Diretório em /rancher/scielo_ve_data/
#
DIR_INSTANCIA_ORIG="/var/www/scielo"
DIR_INSTANCIA_DEST="/var/www/scielo"
DIR_BASES="artigo areasgeo issue title related cited iah scimago img lattes medline newissue translation"
DATA_ATUAL=`date  +"%d-%m-%Y-%H_%m_%S"`
IP_SERVER="192.168.2.19"

update(){
        echo "Update ScieLO Data"

if [ -e update_bases_scielo-novo.log ]
        then
                mv update_bases_scielo-novo.log update_bases_scielo-novo-${DATA_ATUAL}.log
fi

for j in $DIR_BASES
do
        echo "RSYNC - BASES"
        echo "$j"
        ssh ${IP_SERVER} mkdir ${DIR_INSTANCIA_DEST}/bases-new/${j}
        rsync  -Cravp -e 'ssh' ${DIR_INSTANCIA_OIRG}/bases/${j}/  ${IP_SERVER}:${DIR_INSTANCIA_DEST}/bases-new/${j}/ 2>> update_bases_scielo_br-novo.log
done

echo "Atualizando os pdfs"
rsync  -Cravp -e 'ssh' ${DIR_INSTANCIA_ORIG}/bases/pdf/  ${IP_SERVER}:${DIR_INSTANCIA_DEST}/bases/pdf/ 2>> update_bases_scielo-novo.log


echo "Copiando Páginas Secundárias"
rsync -Cravp -e 'ssh' ${DIR_INSTANCIA_ORIG}/htdocs/img/revistas/  ${IP_SERVER}:${DIR_INSTANCIA_DEST}/htdocs/img/revistas/ 2>> update_bases_scielo-novo.log
rsync -Cravp -e 'ssh' ${DIR_INSTANCIA_ORIG}/htdocs/revistas/      ${IP_SERVER}:${DIR_INSTANCIA_DEST}/htdocs/revistas/ 2>> update_bases_scielo_br.log

#echo "--->Execução do Script de Distribuição da base e Movimentação das bases"
ssh ${IP_SERVER} sh /var/www/educa_fcc_org_br/scripts/data-scielo.sh update  2>> update_bases_scielo-novo.log

echo "-----> FIM: Termino do envio da Bases, PDF, Páginas Secundária e execução do updateScielo-data-MOVE.sh" 2>> update_bases_scielo-novo.log
}

rollback(){
ssh ${IP_SERVER} sh /var/www/scielo/scripts/data-scielo.sh rollback  2>> update_bases_scielo-novo.log
}

case "$1" in
        update)
                update
                ;;
        rollback)
                rollback
                ;;
        *)
                echo "Option not valid: update, rollback"
                ;;
esac
```

data-scielo.sh

```shell
#!/bin/sh
update(){
  rm -rf /var/www/scielo/bases-old/*
  cd /var/www/scielo/bases
  mv areasgeo artigo  cited  iah  img  issue  lattes  medline  newissue related  title translation scimago /var/www/scielo/bases-old/
  mv /var/www/scielo/bases-new/* /var/www/scielo/bases/
  echo "---->FIM: SciELO Atualizado com êxito\!" 
}

rollback(){
  rm -rf /var/www/scielo/bases-failed/*
  cd /var/www/scielo/bases
  mv areasgeo artigo  cited  iah  img  issue  lattes  medline  newissue related  title translation scimago /var/www/scielo/bases-failed
  cd /var/www/scielo/bases-old/
  mv areasgeo artigo  cited  iah  img  issue  lattes  medline  newissue related  title translation scimago /var/www/scielo/bases
}

case "$1" in
        update)
                update
                ;;
        rollback)
                rollback
                ;;
        *)
                echo "Option not valid: update, rollback"
                ;;
esac
```

<span style="font-weight: 400;">Para actualizar el servidor de producción con las nuevas bases procesadas haga:</span>

```shell
Ejecute:
$./atualiza-bases-scielo.sh update
Si en el sitio no aparece ninguna revista o si quieres volver a la base antigua, ejecute:
$./atualiza-bases-scielo.sh rollback
```

#### <span style="font-weight: 400;">Como comprimir los Logs Apaches del servidor de producción y enviar para el servidor FTP de SciELO</span>

##### <span style="font-weight: 400;">Cómo ejecutar el script de compactación de logs:</span>

```shell
Manualmente: 
/usr/bin/docker exec -ti root_metodologia_1 /bin/bash /scripts/compacta_log.sh
```

##### <span style="font-weight: 400;">Cómo crear el servicio systemd para enviar los logs de Apache automáticamente</span>

<span style="font-weight: 400;">Descargue el fichero modelo en el servidor de producción usando el usuário root:</span>

```shell
#cd /etc/systemd/system/
#wget https://gist.githubusercontent.com/rondinelisaad/f0eca737640b60b88138ddc686afaa2d/raw/0348b32b5338fff3c1d1610821768c31f637fc2c/compacta.service
```

<span style="font-weight: 400;">Sigue el contenido del fichero /etc/systemd/system/compacta.service</span>

```shell
[Unit]
Description=Compactación de los LOGs Apaches
Documentation=
After=docker.service
Requires=docker.service

[Service]
TimeoutSec=0

ExecStart=/bin/sh -c '\
   /usr/bin/docker exec -ti metodologia_metodologia_1 /bin/bash /scripts/compacta_log.sh'

[Install]
WantedBy=multi-user.target 
```

<span style="font-weight: 400;">Descargue el segundo fichero:</span>

```shell
#cd /etc/systemd/system/
# wget https://gist.githubusercontent.com/rondinelisaad/743813e0be3315220bcdf35acf971157/raw/6b8cac576126ed366120f3c536a3d27da4003926/compacta.timer
```

<span style="font-weight: 400;">Sigue el contenido del fichero /etc/systemd/system/compacta.timer:</span>

```shell
[Unit]
Description=Execute backup every day at midnight

[Timer]
OnCalendar=*-*-* 00:00:00
Unit=compacta.service

[Install]
WantedBy=multi-user.target
```

<span style="font-weight: 400;">Iniciar los servicios:</span>

```shell
#systemctl enable compacta.timer
#systemctl start compacta.timer
```

<span style="font-weight: 400;">Valide si el script está agendado:</span>

```shell
# systemctl is-enabled compacta.timer
```

<span style="font-weight: 400;">Ejecute manualmente el servicio:</span>

```shell
# systemctl start compacta
```

#### <span style="font-weight: 400;">Configurando el paperboy para enviar una vez por semana las bases iso</span>

<span style="font-weight: 400;">Es importante que configure una vez por semana y siempre después del procesamiento de las bases.</span>

<span style="font-weight: 400;">Descargue el fichero config.ini en el servidor de desarrollo</span>

```shell
#cd /root
#wget https://raw.githubusercontent.com/scieloorg/paperboy/master/config.ini-TEMPLATE
# mv config.ini-TEMPLATE config.ini
```

<span style="font-weight: 400;">Configure el fichero con las credenciales del servidor ftp.scielo.br. Sigue con deberia configurarlo:  
</span>

```shell
[app:main]

## Full path to the source directory where the SciELO site is installed. It must 
## contains the directories proc, bases, htdocs, cgi-bin, serial.
source_dir=/var/www/scielo

## Full path to the CISIS utilitaries. It is usually installed on the directory
## proc/cisis of the SciELO Site.
cisis_dir=/var/www/scielo/proc/cisis

## Full path to the scilista.lst file. It is usually available at the directory
## and file serial/scilista.lst
scilista=/var/www/scielo/serial/scilista.lst

## Full path to the destiny folder in the server side. It is usually the path
## to the SciELO Site in the server. When sending data to SciELO is must be 
## commented or empty on the FTP will login the user to the correct path.
#destiny_dir=

## FTP or SFTP credentials
## The protocol will be defined by the server_type ['ftp', 'sftp']
server=ftp.scielo.br
server_type=ftp
port=21
user=usuario ftp
password=clave

```

<span style="font-weight: 400;">Manualmente ejecute:</span>

```shell
docker run --rm -v /var/www/scielo:/var/www/scielo -v ~/config.ini:/app/config.ini scieloorg/paperboy:stable paperboy_delivery_to_scielo
```

<span style="font-weight: 400;">Configurando systemd</span>

```shell
#cd /etc/systemd/system
#wget https://gist.githubusercontent.com/rondinelisaad/a4c25bd876de186b43938dd2148f9a7c/raw/53418856574f9b3fe1910951b6c94376e0769f9d/paperboy.service
#wget https://gist.githubusercontent.com/rondinelisaad/154aa2249f6bfb2b992a207f25f357c4/raw/b319904234abd11fd46721a3b8a9d83eece3ff32/paperboy.timer
#systemctl enable paperboy.timer
#systemctl start paperboy.timer
#systemctl is-enabled paperboy.timer 
#systemctl list-timers
```

#### <span style="font-weight: 400;">Como actualizar la versión del código de la metodologia SciELO</span>

<span style="font-weight: 400;">Accender al nuestro repositório Git ([https://github.com/scieloorg/web](https://github.com/scieloorg/web))</span>

<span style="font-weight: 400;">Cambiar al Branch de vuestra collección  
</span>

[![image-1630350810792.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/image-1630350810792.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/image-1630350810792.png)

[![image-1630350824882.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/image-1630350824882.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/image-1630350824882.png)

<span style="font-weight: 400;">Haga download del fichero ZIP</span>

[![image-1630350858065.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/image-1630350858065.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/image-1630350858065.png)

<span style="font-weight: 400;">En el servidor Linux, baje el fichero zip </span><span style="font-weight: 400;"> en una carpeta temporária y ejecute los comandos abajo:</span>

<span style="font-weight: 400;">Ojos: Para el ejemplo abajo usamos el branch scielo\_ecu. O sea, se vuestra collección no es de Ecuador no la use. Busque por la tuya.</span>

```shell
cd /tmp
wget https://github.com/scieloorg/Web/archive/scielo_ecu.zip
unzip scielo_ecu.zip
La carpeta Web-scielo_ecu fue creada
cd Web-scielo_ecu
rsync -Cravp cgi-bin/ /var/www/scielo/cgi-bin/
rsync -Cravp proc/ /var/www/scielo/proc/
rsync -Cravp htdocs/ /var/www/scielo/htdocs/
```

<span style="font-weight: 400;">Una vez actualizado valide la versión. Ojo: Para el ejemplo abajo usamos el sitio del Ecuador. O sea, replaze por lo tuyo.  
</span>

[<span style="font-weight: 400;">http://scielo.senescyt.gob.ec/versionOverview.txt</span>](http://scielo.senescyt.gob.ec/versionOverview.txt)

<span style="font-weight: 400;">Ojo: La versión deberá ser igual a la que está em </span>[<span style="font-weight: 400;">https://github.com/scieloorg/Web/blob/ecu/htdocs/versionOverview.txt</span>](https://github.com/scieloorg/Web/blob/ecu/htdocs/versionOverview.txt)

<span style="font-weight: 400;">No es necesario reiniciar el Docker.</span>

#### Enlaces de Referencias:

[<span style="font-weight: 400;">https://www.certdepot.net/rhel7-use-systemd-timers/</span>](https://www.certdepot.net/rhel7-use-systemd-timers/)

# SciELO Methodology installation on Rocky 8

# <span style="font-weight: 400;">Linux installation</span>

## <span style="font-weight: 400;">REQUIREMENTS</span>

<span style="font-weight: 400;">Hardware Configuration:</span>

<span style="font-weight: 400;">8GB RAM minimum</span>

<span style="font-weight: 400;">8 vCPU </span>

<span style="font-weight: 400;">150GB HD</span>

<span class="s1">Rocky Linux release 8.4 (Green Obsidian)</span>

**Apache 2.2.34**

**PHP 5.2.10 or 5.2.17 (required)**

**PHP Modules**

- <span style="font-weight: 400;">libpng</span>
- <span style="font-weight: 400;">soap</span>
- <span style="font-weight: 400;">zlib</span>
- <span style="font-weight: 400;">XSL</span>
- <span style="font-weight: 400;">XML</span>

### <span style="font-weight: 400;">Installing build subsystem</span>

```shell
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
```

### <span style="font-weight: 400;">Installing EPEL Repository to install mcrypt</span>

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

### <span style="font-weight: 400;">Installing Apache 2.2.34 from source</span>

**Getting source code**

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

<span style="font-weight: 400;">Uncompress</span>

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

**Configure**

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

**Compile and install**

```shell
make
make install
```

### <span style="font-weight: 400;">Installing PHP 5.2.17 from source</span>

<span style="font-weight: 400;">It is very important to use this version because php 5.2.17 doesn't work with nealy versions.</span>

**Getting source code**

```shell
wget -O /usr/src/php-5.2.17.tar.gz http://museum.php.net/php5/php-5.2.17.tar.gz --no-check-certificate
```

**Uncompress**<span style="font-weight: 400;"> </span>

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

**Patching** <span style="font-weight: 400;"> </span>

[<span style="font-weight: 400;">https://stackoverflow.com/questions/28211039/phpbrew-5-3-10-build-error-dereferencing-pointer-to-incomplete-type/34107461</span>](https://stackoverflow.com/questions/28211039/phpbrew-5-3-10-build-error-dereferencing-pointer-to-incomplete-type/34107461)

```shell
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**

```shell
./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**

```shell
make
make install
```

<span style="font-weight: 400;">Copie o arquivo php.ini-recommended para /etc/php.ini</span>

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

<span style="font-weight: 400;">Ajuste o arquivo, modificando e depois reinicie o Apache:</span>

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

**Creating a symbolic link for modules**

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

**Configure Apache**

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

**Creating a system unit**

```shell
# 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
```

# <span style="font-weight: 400;">Installation of the SciELO Methodology</span>

<span style="font-weight: 400;">Following </span>

[<span style="font-weight: 400;">http://docs.scielo.org/projects/scielo-site/en/latest/howtoinstall.html</span>](http://docs.scielo.org/projects/scielo-site/en/latest/howtoinstall.html)

<span style="font-weight: 400;">In the link above, there is instruccion to download the respective branch from your collection. If you are a new collection and you don't have a branch, you can clone the master.</span>

<span style="font-weight: 400;">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.</span>

<span style="font-weight: 400;">For version control we use GitHub, where Tags correspond to the versions of the site.</span>

<span style="font-weight: 400;">Check the TAGs here: </span>[<span style="font-weight: 400;">SciELO’s GitHub</span>](https://github.com/scieloorg/Web/tags)

[![Screenshot at Aug 05 10-36-40.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-36-40.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-36-40.png)

<span style="font-weight: 400;">Check the branch of the current version by region and country. See the table at the link below:</span>

[<span style="font-weight: 400;">Branch name for each collection</span>](http://docs.scielo.org/projects/scielo-site/en/latest/network.html)

<span style="font-weight: 400;">[![Screenshot at Aug 05 10-38-13.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-38-13.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-38-13.png)</span>

<span style="font-weight: 400;">Example:</span>

<span style="font-weight: 400;">If there is no branch for your collection, we ask that you let us know.</span>

## <span style="font-weight: 400;">Download the specific version of the SciELO methodology</span>

<span style="font-weight: 400;">There are two ways to download: one through the tarball file and the other through the zip file.</span>

### <span style="font-weight: 400;">ZIP File</span>

<span style="font-weight: 400;">Download:</span>

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

<span style="font-weight: 400;">Example:</span>

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

<span style="font-weight: 400;">After extracting the files, a directory will be created with the name Web-master</span>

```shell
Web-master
```

<span style="font-weight: 400;">Enter the directory and move the content extracted to "</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">”:</span>

## <span style="font-weight: 400;">Installation of the CISIS package</span>

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

<span style="font-weight: 400;">Extract the contents in the directory:</span>

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

<span style="font-weight: 400;">The CISIS directory will look like this:</span>

<span style="font-weight: 400;">Delete the downloaded .zip file</span>

<span style="font-weight: 400;">To test operation:</span>

```shell
mx what
```

<span style="font-weight: 400;">Result:</span>

## <span style="font-weight: 400;">Installation of the WWWISIS package</span>

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

# <span style="font-weight: 400;">To test:</span>

```shell
./wxis.exe hello
```

# <span style="font-weight: 400;">Configuring the httpd.conf file</span>

<span style="font-weight: 400;">Edit the file:</span>

```shell
vi /etc/httpd/conf/httpd.conf
```

<span style="font-weight: 400;">In the end of the file add the line:</span>

<table id="bkmrk-%23-virtual-hosts-incl"><tbody><tr><td>*<span style="font-weight: 400;">\# Virtual hosts</span>*

*<span style="font-weight: 400;">Include /etc/httpd/conf.d/vhosts</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Enter the directory indicated below:</span>

<table id="bkmrk-mkdir-%2Fetc%2Fhttpd%2Fcon"><tbody><tr><td>*<span style="font-weight: 400;">mkdir /etc/httpd/conf.d/vhosts</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Enter the directory indicated below and create the file below:</span>

<table id="bkmrk-cd-%2Fetc%2Fhttpd%2Fconf.d"><tbody><tr><td>*<span style="font-weight: 400;">cd /etc/httpd/conf.d/vhosts</span>*

*<span style="font-weight: 400;">vi </span><span style="font-weight: 400;">vhosts.conf</span>*

  
***add the follow content:***

  
*<span style="font-weight: 400;">NameVirtualHost &lt;server ip&gt;:80</span>*

  
***It is important to replace &lt;server ip&gt; to the real ip from machine***

</td></tr></tbody></table>

<span style="font-weight: 400;">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:</span>

<table id="bkmrk-%23-vi-scielo-org-bo.c"><tbody><tr><td><span style="font-weight: 400;">\# vi scielo-org-bo.conf</span>

  
<span style="font-weight: 400;">&lt;VirtualHost \*:80&gt;</span>

<span style="font-weight: 400;"> ServerName vm.scielo.br</span>

<span style="font-weight: 400;"> Alias /pdf/ /var/www/scielo/bases/pdf/</span>

<span style="font-weight: 400;"> Alias /img/fbpe/ /var/www/scielo/htdocs/img/revistas/</span>

<span style="font-weight: 400;"> Alias /img/scimago/ /var/www/scielo/bases/scimago/images/</span>

<span style="font-weight: 400;"> LimitRequestFieldSize 9000</span>

<span style="font-weight: 400;"> LimitRequestLine 9000</span>

<span style="font-weight: 400;"> DocumentRoot /var/www/scielo/htdocs</span>

<span style="font-weight: 400;"> DirectoryIndex scielo.php index.php index.html index.htm</span>

<span style="font-weight: 400;"> &lt;Directory /var/www/scielo/htdocs&gt;</span>

<span style="font-weight: 400;"> Options FollowSymLinks MultiViews</span>

<span style="font-weight: 400;"> Order deny,allow</span>

<span style="font-weight: 400;"> AcceptPathInfo On</span>

<span style="font-weight: 400;"> Allow from all</span>

<span style="font-weight: 400;"> &lt;/Directory&gt;</span>

<span style="font-weight: 400;"> &lt;Directory /var/www/scielo/bases/pdf/&gt;</span>

<span style="font-weight: 400;"> Options FollowSymLinks MultiViews</span>

<span style="font-weight: 400;"> Order deny,allow </span>

<span style="font-weight: 400;"> AcceptPathInfo On</span>

<span style="font-weight: 400;"> Allow from all</span>

<span style="font-weight: 400;"> &lt;/Directory&gt;</span>

<span style="font-weight: 400;"> &lt;Directory /var/www/scielo/bases/scimago/images/&gt;</span>

<span style="font-weight: 400;"> Options FollowSymLinks MultiViews</span>

<span style="font-weight: 400;"> Order deny,allow</span>

<span style="font-weight: 400;"> AcceptPathInfo On</span>

<span style="font-weight: 400;"> Allow from all</span>

<span style="font-weight: 400;"> &lt;/Directory&gt;</span>

<span style="font-weight: 400;"> &lt;FilesMatch "\\.(def)$"&gt;</span>

<span style="font-weight: 400;"> Order allow,deny</span>

<span style="font-weight: 400;"> Allow from all</span>

<span style="font-weight: 400;"> Satisfy All</span>

<span style="font-weight: 400;"> &lt;/FilesMatch&gt;</span>

<span style="font-weight: 400;"> ScriptAlias /cgi-bin/ /var/www/scielo/cgi-bin/</span>

<span style="font-weight: 400;"> &lt;Directory /var/www/scielo/cgi-bin/&gt;</span>

<span style="font-weight: 400;"> AddDefaultCharset ISO-8859-1</span>

<span style="font-weight: 400;"> Options FollowSymLinks MultiViews ExecCGI</span>

<span style="font-weight: 400;"> AcceptPathInfo On</span>

<span style="font-weight: 400;"> Order deny,allow</span>

<span style="font-weight: 400;"> Allow from all</span>

<span style="font-weight: 400;"> &lt;/Directory&gt;</span>

  
<span style="font-weight: 400;"> ErrorLog "|/usr/sbin/rotatelogs -l /var/www/apache/%Y-%m-%d+scielo-br-error.log 5M"</span>

<span style="font-weight: 400;"> CustomLog "| /usr/sbin/rotatelogs -l /var/www/apache/%Y-%m-%d+scielo-br-access.log 5M" combined</span>

<span style="font-weight: 400;">&lt;/VirtualHost&gt;</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">Some fields you have to replace:</span>

<table id="bkmrk-servername---corresp"><tbody><tr><td>**ServerName**<span style="font-weight: 400;"> - corresponding to the domain name. Example: </span>[<span style="font-weight: 400;">www.scielo.org.bo</span>](http://www.scielo.org.bo)

**ErrorLog**<span style="font-weight: 400;"> - corresponding to the log file error. Replace from this template scielo-br to the name of you instance. Example: scielo-org-bo</span>

**CustomLog**<span style="font-weight: 400;"> - corresponding to the log file acess. Replace from this template scielo-br to the name of you instance. Example: scielo-org-bo</span>

  
<span style="font-weight: 400;">NOTES: You have to create the directory /var/www/apache to save the files created. Run the command:</span>

<span style="font-weight: 400;">mkdir /var/www/apache</span>

</td></tr></tbody></table>

# <span style="font-weight: 400;">Mandatory settings</span>

## <span style="font-weight: 400;">Configuring the scielo.def.php file</span>

<span style="font-weight: 400;">Below we will show the mandatory configurations for the SciELO Methodology to work.</span><span style="font-weight: 400;">  
</span><span style="font-weight: 400;">Copy the template file "scielo.def.php.template" to your configuration file "scielo.def.php".</span>

<span style="font-weight: 400;">Enter the directory:</span>

<table id="bkmrk-cd-%2Fvar%2Fwww%2Fscielo%2Fh"><tbody><tr><td>*<span style="font-weight: 400;">cd /var/www/scielo/htdocs/</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Copy:</span>

<table id="bkmrk-cp-scielo.def.php.te"><tbody><tr><td><span style="font-weight: 400;">cp </span>**scielo.def.php.template**<span style="font-weight: 400;"> </span><span style="font-weight: 400;">scielo.def.php</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">Edit the file as shown in the following example:</span>

<table id="bkmrk-vi-scielo.def.php"><tbody><tr><td>*<span style="font-weight: 400;">vi scielo.def.php</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">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.</span>

<table id="bkmrk-esc-%3A%25s%2F%5C%2Fhome%5C%2Fscie"><tbody><tr><td><span style="font-weight: 400;">ESC :%s/\\/home\\/scielo/\\/var\\/www\\/scielo/g</span>

</td></tr></tbody></table>

**Site identification settings**

<table id="bkmrk-%5Bsite_info%5D-site_nam"><tbody><tr><td>*<span style="font-weight: 400;">\[SITE\_INFO\]</span>*

*<span style="font-weight: 400;">SITE\_NAME=SciELO - Scientific Electronic Library Online</span>*

*<span style="font-weight: 400;">SHORT\_NAME=Scielo Brazil</span>*

*<span style="font-weight: 400;">SITE\_AUTHOR=FAPESP - CNPq - FapUNIFESP - BIREME</span>*

*<span style="font-weight: 400;">ADDRESS\_1=R. Dr. Diogo de Faria, 1087 cj.810</span>*

*<span style="font-weight: 400;">ADDRESS\_2=04037-003 - Sao Paulo/SP</span>*

*<span style="font-weight: 400;">COUNTRY=Brasil</span>*

*<span style="font-weight: 400;">PHONE\_NUMBER=+55 11 3369-4080/4085</span>*

*<span style="font-weight: 400;">\#FAX\_NUMBER=+55 11 5575-8868</span>*

*<span style="font-weight: 400;">E\_MAIL=scielo@bireme.br</span>*

*<span style="font-weight: 400;">STANDARD\_LANG=en</span>*

*<span style="font-weight: 400;">APP\_NAME=scielo</span>*

*<span style="font-weight: 400;">ANALYTICS\_CODE=scl</span>*

</td></tr></tbody></table>

**APP\_NAME and ANALYTICS\_CODE, are parameters provided by the SciELO team.**

<table id="bkmrk-%5Bscielo%5D-server_scie"><tbody><tr><td>*<span style="font-weight: 400;">\[SCIELO\]</span>*

*<span style="font-weight: 400;">SERVER\_SCIELO=vm.scielo.br</span>*

  
*<span style="font-weight: 400;">\[FULLTEXT\_SERVICES\]</span>*

*<span style="font-weight: 400;">access="http://vm.scielo.br/applications/scielo-org/pages/services/articleRequestGraphicPage.php?pid=PARAM\_PID&amp;caller=PARAM\_SERVER"</span>*

*<span style="font-weight: 400;">cited\_SciELO="http://vm.scielo.br/scieloOrg/php/citedScielo.php?pid=PARAM\_PID"</span>*

*<span style="font-weight: 400;">send\_mail="http://vm.scielo.br/applications/scielo-org/pages/services/sendMail.php?pid=PARAM\_PID&amp;caller=PARAM\_SERVER"</span>*

</td></tr></tbody></table>

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

<table id="bkmrk-%5Bpath%5D-path_data%3D%2F-p"><tbody><tr><td>*<span style="font-weight: 400;">\[PATH\]</span>*

  
*<span style="font-weight: 400;">PATH\_DATA=/</span>*

*<span style="font-weight: 400;">PATH\_CGI-BIN=/cgi-bin/</span>*

*<span style="font-weight: 400;">PATH\_SCRIPTS=ScieloXML/</span>*

*<span style="font-weight: 400;">PATH\_GENIMG=/img/</span>*

*<span style="font-weight: 400;">PATH\_SERIMG=/img/revistas/</span>*

*<span style="font-weight: 400;">PATH\_SERIAL\_HTML=/revistas/</span>*

*<span style="font-weight: 400;">PATH\_XSL=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/htdocs/xsl/</span>*

*<span style="font-weight: 400;">PATH\_DATABASE=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/bases/</span>*

*<span style="font-weight: 400;">PATH\_SETTINGS=</span>*

*<span style="font-weight: 400;">PATH\_PDF=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/bases/pdf</span>*

*<span style="font-weight: 400;">PATH\_TRANSLATION=</span><span style="font-weight: 400;">/var/www/scielo/</span><span style="font-weight: 400;">bases/translation/</span>*

*<span style="font-weight: 400;">PATH\_HTDOCS=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/htdocs/</span>*

*<span style="font-weight: 400;">PATH\_OAI=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/htdocs/oai/</span>*

*<span style="font-weight: 400;">PATH\_PROC=</span><span style="font-weight: 400;">/var/www/scielo/</span><span style="font-weight: 400;">proc/</span>*

</td></tr></tbody></table>

## <span style="font-weight: 400;">Configuring the iah.def file</span>

<span style="font-weight: 400;">Copy the template file “iah.def.php.template” to your configuration file “iah.def.php”.</span>

<span style="font-weight: 400;">Enter the directory:</span>

<table id="bkmrk-%2Fvar%2Fwww%2Fscielo%2Fhtdo"><tbody><tr><td>*<span style="font-weight: 400;">/var/www/scielo/htdocs/iah</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Copy:</span>

<table id="bkmrk-cp-iah.def.php.templ"><tbody><tr><td>**cp iah.def.php.template** <span style="font-weight: 400;">iah.def.php</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">Edit the file as shown in the following example:</span>

<table id="bkmrk-iah.def.php"><tbody><tr><td>*<span style="font-weight: 400;">iah.def.php</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">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:</span>

<span style="font-weight: 400;">The blocks that must be changed are:</span>

<span style="font-weight: 400;">\[PATH\]</span>

<span style="font-weight: 400;">\[IAH\]</span>

<span style="font-weight: 400;">\[HEADER\]</span>

<span style="font-weight: 400;">For instance:</span>

<table id="bkmrk-%5Bpath%5D-path_data%3D%2Fia"><tbody><tr><td>*<span style="font-weight: 400;">\[PATH\]</span>*

*<span style="font-weight: 400;">PATH\_DATA=/iah/</span>*

*<span style="font-weight: 400;">PATH\_CGI-BIN=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah/</span>*

*<span style="font-weight: 400;">PATH\_DATABASE=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/bases/</span>*

  
*<span style="font-weight: 400;">\[APPEARANCE\]</span>*

*<span style="font-weight: 400;">BODY BACKGROUND COLOR=white</span>*

*<span style="font-weight: 400;">BODY BACKGROUND IMAGE=</span>*

*<span style="font-weight: 400;">BODY TEXT COLOR=black</span>*

*<span style="font-weight: 400;">BODY LINK COLOR=blue</span>*

*<span style="font-weight: 400;">BODY VLINK COLOR=blue</span>*

*<span style="font-weight: 400;">BAR BACKGROUND COLOR=#B0C2D5</span>*

*<span style="font-weight: 400;">BAR TEXT COLOR=black</span>*

*<span style="font-weight: 400;">ERROR TEXT COLOR=</span>*

*<span style="font-weight: 400;">WARNING TEXT COLOR=</span>*

  
*<span style="font-weight: 400;">\[HEADER\]</span>*

*<span style="font-weight: 400;">LOGO IMAGE=scielog.gif</span>*

*<span style="font-weight: 400;">LOGO TEXT COLOR=</span>*

*<span style="font-weight: 400;">LOGO BACKGROUND COLOR=</span>*

*<span style="font-weight: 400;">LOGO URL=www.scielo.br</span>*

*<span style="font-weight: 400;">HEADER IMAGE=^ponlinep.gif^eonlinee.gif^ionlinei.gif</span>*

*<span style="font-weight: 400;">HEADER TEXT COLOR=</span>*

*<span style="font-weight: 400;">HEADER BACKGROUND COLOR=</span>*

*<span style="font-weight: 400;">HEADER URL=</span><span style="font-weight: 400;">www.scielo.br</span>*

  
*<span style="font-weight: 400;">\[IAH\]</span>*

*<span style="font-weight: 400;">MANAGER E-MAIL=</span><span style="font-weight: 400;">scielo@bireme.br</span>*

*<span style="font-weight: 400;">MAINTENANCE=OFF</span>*

*<span style="font-weight: 400;">REVERSE MODE=ON</span>*

*<span style="font-weight: 400;">MULTI-LANGUAGE=ON</span>*

*<span style="font-weight: 400;">LOG\_DATABASE=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/bases/logdia/iahlog</span>*

  
  
</td></tr></tbody></table>

## <span style="font-weight: 400;">Configuring the article.def file</span>

<span style="font-weight: 400;">Copy the template file "article.def.php.template" to your configuration file "article.def.php".</span>

<span style="font-weight: 400;">Enter the directory:</span>

<table id="bkmrk-%2Fvar%2Fwww%2Fscielo%2Fhtdo-0"><tbody><tr><td>*<span style="font-weight: 400;">/var/www/scielo/htdocs/iah</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Copy as directed:</span>

<table id="bkmrk-article.def.php.temp"><tbody><tr><td>**article.def.php.template** *<span style="font-weight: 400;">to</span>* <span style="font-weight: 400;">article.def.php</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">Edit the file as shown in the following example:</span>

<table id="bkmrk-article.def.php"><tbody><tr><td>*<span style="font-weight: 400;">article.def.php</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">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:</span>

<span style="font-weight: 400;">The blocks that must be changed are:</span>

<table id="bkmrk-%5Bfile_location%5D-%5Bvar"><tbody><tr><td>*<span style="font-weight: 400;">\[FILE\_LOCATION\]</span>*

*<span style="font-weight: 400;">\[VARIABLES\]</span>*

  
*<span style="font-weight: 400;">Exemplo:</span>*

  
*<span style="font-weight: 400;">\[FILE\_LOCATION\]</span>*

  
*<span style="font-weight: 400;">FILE HEADER.IAH=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/header.pft</span>*

*<span style="font-weight: 400;">FILE QUERY.IAH=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/query.pft</span>*

*<span style="font-weight: 400;">FILE LIST6003.PFT=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/list6003.pft</span>*

*<span style="font-weight: 400;">FILE PROC.PFT=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/htdocs/pfts/proc\_split\_mst.pft</span>*

*<span style="font-weight: 400;">FILE iso.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbiso.pft</span>*

*<span style="font-weight: 400;">FILE abn.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbabn.pft</span>*

*<span style="font-weight: 400;">FILE van.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbvan.pft</span>*

*<span style="font-weight: 400;">FILE places.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/place-generico.pft</span>*

*<span style="font-weight: 400;">FILE month1.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/month1.pft</span>*

*<span style="font-weight: 400;">FILE month2.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/month2.pft</span>*

*<span style="font-weight: 400;">FILE scistyle.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/scistyle.pft</span>*

*<span style="font-weight: 400;">FILE AHBTOP.HTM=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/%lang%/ahbtop.htm</span>*

*<span style="font-weight: 400;">FILE AHLIST.PFT=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/%lang%/ahlist.pft</span>*

*<span style="font-weight: 400;">FILE ahlist.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/%lang%/ahlist.pft</span>*

*<span style="font-weight: 400;">FILE LATTES.\*=%path\_database%lattes/lattes.\*</span>*

*<span style="font-weight: 400;">FILE citation.xml=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbisoXML.pft</span>*

  
*<span style="font-weight: 400;">\[VARIABLES\]</span>*

*<span style="font-weight: 400;">VARIABLE APP\_PATH=</span><span style="font-weight: 400;">/var/www/scielo/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_REVISTAS\_PATH=</span><span style="font-weight: 400;">/var/www/scielo/htdocs</span><span style="font-weight: 400;">/revistas/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_REVISTAS\_RELPATH=/revistas/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_IMG\_REVISTAS\_RELPATH=/img/revistas/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_IMG\_RELPATH=/img/</span>*

</td></tr></tbody></table>

## <span style="font-weight: 400;">Configuring the title.def file</span>

<span style="font-weight: 400;">Copy the “title.def.php.template” template file to your “title.def.php” configuration file.</span>

<span style="font-weight: 400;">Enter the directory:</span>

<table id="bkmrk-%2Fvar%2Fwww%2Fscielo%2Fhtdo-1"><tbody><tr><td>*<span style="font-weight: 400;">/var/www/scielo/htdocs/iah</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Copy as directed:</span>

<table id="bkmrk-title.def.php.templa"><tbody><tr><td>**title.def.php.template** *<span style="font-weight: 400;">to</span>* <span style="font-weight: 400;">title.def.php</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">Edit the file as shown in the following example:</span>

<table id="bkmrk-title.def.php"><tbody><tr><td>*<span style="font-weight: 400;">title.def.php</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">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:</span>

<span style="font-weight: 400;">The blocks that must be changed are:</span>

<table id="bkmrk-%5Bfile_location%5D-%5Bvar-0"><tbody><tr><td>  
*<span style="font-weight: 400;">\[FILE\_LOCATION\]</span>*

*<span style="font-weight: 400;">\[VARIABLES\]</span>*

  
*<span style="font-weight: 400;">\[FILE\_LOCATION\]</span>*

  
*<span style="font-weight: 400;">FILE DATABASE.\*=%path\_database%title/title.\*</span>*

*<span style="font-weight: 400;">FILE FULINV.\*=%path\_database%title/titsrc.\*</span>*

*<span style="font-weight: 400;">FILE PREINV.\*=%path\_database%title/titsrcp.\*</span>*

  
*<span style="font-weight: 400;">FILE HEADER.IAH=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/header.pft</span>*

  
*<span style="font-weight: 400;">FILE scistyle.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/scistyle.pft</span>*

*<span style="font-weight: 400;">FILE places.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/place-generico.pft</span>*

*<span style="font-weight: 400;">FILE iso.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbsrc1.pft</span>*

*<span style="font-weight: 400;">FILE van.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbsrc1.pft</span>*

*<span style="font-weight: 400;">FILE abn.pft=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/cgi-bin/iah-styles/fbsrc1.pft</span>*

*<span style="font-weight: 400;">FILE issue.\*=%path\_database%issue/issue.\*</span>*

*<span style="font-weight: 400;">FILE facic.\*=%path\_database%issue/facic.\*</span>*

*<span style="font-weight: 400;">FILE artigo.\*=%path\_database%artigo/artigo.\*</span>*

*<span style="font-weight: 400;">FILE author.\*=%path\_database%artigo/author.\*</span>*

*<span style="font-weight: 400;">FILE title.\*=%path\_database%title/title.\*</span>*

  
*<span style="font-weight: 400;">\[VARIABLES\]</span>*

*<span style="font-weight: 400;">VARIABLE APP\_PATH=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_REVISTAS\_PATH=</span><span style="font-weight: 400;">/var/www/scielo</span><span style="font-weight: 400;">/htdocs/revistas/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_REVISTAS\_RELPATH=/revistas/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_IMG\_REVISTAS\_RELPATH=/img/revistas/</span>*

*<span style="font-weight: 400;">VARIABLE APP\_IMG\_RELPATH=/img/</span>*

</td></tr></tbody></table>

# <span style="font-weight: 400;">Configuring php.ini</span>

<span style="font-weight: 400;">The php.ini file is located in the standard PHP installation directory, as shown below.</span>

<table id="bkmrk-vi-%2Fetc%2Fphp.ini"><tbody><tr><td>*<span style="font-weight: 400;">vi /etc/php.ini</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">When opening the file with an editor, search for the word short\_open\_tag, it is defined according to the model:</span>

<table id="bkmrk-short_open_tag-%3D-off"><tbody><tr><td>*<span style="font-weight: 400;">short\_open\_tag = Off</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Change to:</span>

<table id="bkmrk-short_open_tag-%3D-on"><tbody><tr><td>*<span style="font-weight: 400;">short\_open\_tag = On</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Save the file and restart apache.</span>

# <span style="font-weight: 400;">Configuration of "hosts" and "Vhost"</span>

<span style="font-weight: 400;">Check the IP of the Server that is installing the methodology:</span>

<span style="font-weight: 400;">Edit the "hosts" file of the Server and or make the correct notes on your DNS server:</span>

<table id="bkmrk-vi-%2Fetc%2Fhosts"><tbody><tr><td>*<span style="font-weight: 400;">vi /etc/hosts</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Add the following line:</span>

<table id="bkmrk-%3Cip_do_servidor%3E-%C2%A0%C2%A0%C2%A0"><tbody><tr><td>*<span style="font-weight: 400;">&lt;ip\_do\_servidor&gt; </span><span style="font-weight: 400;"> vm.scielo.br</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">To test the functioning of wwwisis in the web environment, type in your browser:</span>

[<span style="font-weight: 400;">http://vm.scielo.br/cgi-bin/wxis.exe?hello</span>](http://vm.scielo.br/cgi-bin/wxis.exe?hello)

# <span style="font-weight: 400;">Access the site</span>

<span style="font-weight: 400;">vm.scielo.br/scielo.php</span>

[![Screenshot at Aug 05 10-43-18.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-43-18.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-43-18.png)

# <span style="font-weight: 400;">Gera Padrao Script</span>

<span style="font-weight: 400;">Edit the gerapadrão.bat file:</span>

<table id="bkmrk-vi-%2Fvar%2Fwww%2Fscielo%2Fp"><tbody><tr><td>*<span style="font-weight: 400;">vi /var/www/scielo/proc/GeraPadrao.bat</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Changing the following parameters:</span>

<span style="font-weight: 400;">Before:</span>

<table id="bkmrk-call-notepad-%5Cscielo"><tbody><tr><td>*<span style="font-weight: 400;">call notepad \\scielo\\serial\\scilista.lst</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">After:</span>

<table id="bkmrk-call-notepad-%5Cvar%5Cww"><tbody><tr><td>*<span style="font-weight: 400;">call notepad </span><span style="font-weight: 400;">\\var\\www</span><span style="font-weight: 400;">\\scielo\\serial\\scilista.lst</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Before:</span>

<table id="bkmrk-md-%5Cscielo%5Cweb%5Cbases"><tbody><tr><td>*<span style="font-weight: 400;">md \\scielo\\web\\bases-work</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">After:</span>

<table id="bkmrk-md-%5Cvar%5Cwww%5Cscielo%5Cw"><tbody><tr><td>*<span style="font-weight: 400;">md </span><span style="font-weight: 400;">\\var\\www</span><span style="font-weight: 400;">\\scielo\\web\\bases-work</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Before:</span>

<table id="bkmrk-call-gerascielo.bat-"><tbody><tr><td>*<span style="font-weight: 400;">call GeraScielo.bat \\scielo \\scielo\\web log\\GeraPadrao.log adiciona</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">After:</span>

<table id="bkmrk-call-gerascielo.bat--0"><tbody><tr><td>*<span style="font-weight: 400;">call GeraScielo.bat .. .. log\\GeraPadrao.log adiciona</span>*

</td></tr></tbody></table>

# <span style="font-weight: 400;">Rename the directory:</span>

<table id="bkmrk-cd-%2Fvar%2Fwww%2Fscielo-m"><tbody><tr><td>*<span style="font-weight: 400;">cd /var/www/scielo</span>*

**mv serial-modelo** <span style="font-weight: 400;">serial</span>

</td></tr></tbody></table>

## <span style="font-weight: 400;">Creating user scielo and set permission</span>

<span style="font-weight: 400;">This user will be used to update files and processing databases.</span>

<table id="bkmrk-%23-useradd--c-%22scielo"><tbody><tr><td><span style="font-weight: 400;">\# useradd -c "SciELO User Admin" scielo</span>

</td></tr></tbody></table>

### <span style="font-weight: 400;">Set permission to scielo user</span>

<span style="font-weight: 400;">I am considering Apache Root Dir is /var/www/scielo</span>

<table id="bkmrk-%23-chown--r-scielo.-%2F"><tbody><tr><td><span style="font-weight: 400;">\# chown -R scielo. /var/www/scielo/</span>

</td></tr></tbody></table>

### <span style="font-weight: 400;">Fixing Directory and File permissions</span>

<table id="bkmrk-%23-find-%2Fvar%2Fwww%2Fscie"><tbody><tr><td><span style="font-weight: 400;">\# find /var/www/scielo/ -type d -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">\# find /var/www/scielo/ -type f -exec chmod 644 {} \\;</span>

<span style="font-weight: 400;">\# cd /var/www/scielo/</span>

<span style="font-weight: 400;">\# find proc/ -name \*.bat -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">\# find proc/ -name \*.sh -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">\# find cgi-bin/ -name \*.bat -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">\# find cgi-bin/ -name \*.sh -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">\# find cgi-bin/ -name \*.exe -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">\# cd proc</span>

<span style="font-weight: 400;">\# chmod 755 cisis/\*</span>

<span style="font-weight: 400;">\# chmod 755 call</span>

<span style="font-weight: 400;">\# chmod 755 rem</span>

</td></tr></tbody></table>

# <span style="font-weight: 400;">Possible errors</span>

<span style="font-weight: 400;">The error below is common, to fix it we have to change the php.ini file</span>

[![Screenshot at Aug 05 10-44-14.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-44-14.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-44-14.png)

<span style="font-weight: 400;">The php.ini file is located in the standard PHP installation directory, as shown below.</span>

<table id="bkmrk-vi-%2Fetc%2Fphp.ini-0"><tbody><tr><td>*<span style="font-weight: 400;">vi /etc/php.ini</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">When opening the file with an editor, search for the word short\_open\_tag, it is defined according to the model:</span>

<table id="bkmrk-short_open_tag-%3D-off-0"><tbody><tr><td>*<span style="font-weight: 400;">short\_open\_tag = Off</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Change to:</span>

<table id="bkmrk-short_open_tag-%3D-on-0"><tbody><tr><td>*<span style="font-weight: 400;">short\_open\_tag = On</span>*

</td></tr></tbody></table>

<span style="font-weight: 400;">Save the file and restart apache.</span>

# <span style="font-weight: 400;">Paperboy installation</span>

[<span style="font-weight: 400;">GitHub PaperBoy Repository</span>](https://github.com/scieloorg/paperboy)

# <span style="font-weight: 400;">What is PaperBoy?</span>

<span style="font-weight: 400;">PaperBoy is a utility for sending SciELO data from local website servers for processing and also from servers in a collection for network processing. The utility allows sending bases for processing, images, pdfs, translations and XML's.</span>

- <span style="font-weight: 400;">Windows Local Server - Installed and configured the PaperBoy utility on the Windows Local server to send databases to the homologation site methodology server.</span>
- <span style="font-weight: 400;">Methodology Linux Server - Installed and configured the PaperBoy utility on the new methodology server, for sending server bases to the SciELO FTP server, to process the data and add it to the SciELO Analytics website.</span>

## <span style="font-weight: 400;">Prerequisites for the functioning of PaperBoy - Linux</span>

<span style="font-weight: 400;">NOTE: The following configuration is for sending bases from the Linux server Production application methodology to the SciELO FTP server.</span>

<span style="font-weight: 400;">As described at the beginning of the PaperBoy topic, the installation and configuration of the paperboy on the new server Methodology is necessary for sending bases to the SciELO FTP server, the data sent will go through a normalization process and inserted on the Analytics SciELO website, the data are used as collection metrics.</span>

- <span style="font-weight: 400;">Metrics data from the Bolivia collection that are on the Analytics site :.</span>

<span style="font-weight: 400;">For the operation of the PaperBoy utility on linux it is important to note that it is not necessary to install prerequisites. By default Python is already included in the Linux distribution, in which case we have the distribution is Centos.</span>

<span style="font-weight: 400;">To find the version of the distribution used, run the following command :.</span>

<table id="bkmrk-centos-linux-release"><tbody><tr><td><span style="font-weight: 400;">CentOS Linux release 7.7.1908 (Core)</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">As stated earlier, it is not necessary to install Python since it is installed in the distribution.</span>

<span style="font-weight: 400;">To find the version of python installed, run the following command :.</span>

<table id="bkmrk-python---version"><tbody><tr><td><span style="font-weight: 400;">python --version</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">NOTE:The commands must be executed at the server terminal.</span>

<span style="font-weight: 400;">In linux distributions as python is native, the modules are already pre-installed, so we don't need to install the paramiko and pycrypto modules, as we did on windows.</span>

### <span style="font-weight: 400;">Configuring PaperBoy - Linux</span>

<span style="font-weight: 400;">In the Methodology server, the use of the PaperBoy utility will be in Docker, as stated above, we do not need to install Python or the modules since python is native to linux distributions.</span>

<span style="font-weight: 400;">We need to follow some steps to create the container :.</span>

- <span style="font-weight: 400;">Step 1:. Create the directory to store the paperboy configuration file :.</span>
- <span style="font-weight: 400;">mkdir -m 775 /var/www/scielo/scripts/paperboy</span>


- <span style="font-weight: 400;">Step 2: Go to the newly created directory :.</span>
- <span style="font-weight: 400;">cd /var/www/scielo/scripts/paperboy</span>


- <span style="font-weight: 400;">Step 3: Create paperboy configuration file :.</span>
- <span style="font-weight: 400;">touch config.ini</span>


- <span style="font-weight: 400;">Step 4: Open the configuration file we just created :.</span>
- <span style="font-weight: 400;">vim config.ini</span>


### <span style="font-weight: 400;">Configuring PaperBoy for sending bases - Linux</span>

- <span style="font-weight: 400;">Step 1:. Make a copy of the paperboy configuration data to the configuration file we created in the previous topic Configuring PaperBoy - Linux</span>
- <span style="font-weight: 400;">Observation: In the github paperboy repository it is possible to make a copy of the data that we are going to use in the configuration file.</span>
- <span style="font-weight: 400;">Step 2: Now with the data copied to the config.ini file we will edit and add the credentials for collecting and sending data to FTP ScIELO.</span>
- <span style="font-weight: 400;">Step 3: See the config.ini file below without changes.</span>

<table border="1" id="bkmrk-%23diret%C3%B3rio-de-origem" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;"><span style="font-weight: 400;">\#Diretório de origem de coleta dos dados de bases</span>

<span style="font-weight: 400;">source\_dir=/var/www/scielo</span>

<span style="font-weight: 400;">\#Diretório do Cisis </span>

<span style="font-weight: 400;">cisis\_dir=/var/www/scielo/proc/cisis</span>

<span style="font-weight: 400;">\#Diretório onde fica o arquivo da scilista.lst</span>

<span style="font-weight: 400;">scilista=/var/www/scielo/serial/scilista.lst</span>

<span style="font-weight: 400;">\#Diretório de destino dos dados enviados</span>

<span style="font-weight: 400;">destiny\_dir=</span>

<span style="font-weight: 400;">\#Dados do servidor FTP </span>

<span style="font-weight: 400;">\#Servidor FTP usado</span>

<span style="font-weight: 400;">server=</span>

<span style="font-weight: 400;">tipo de servidor ftp</span>

<span style="font-weight: 400;">server\_type=sftp</span>

<span style="font-weight: 400;">\#Porta de conexão com o servidor FTP</span>

<span style="font-weight: 400;">port=22</span>

<span style="font-weight: 400;">\#Usuário FTP</span>

<span style="font-weight: 400;">user=</span>

<span style="font-weight: 400;">\#Senha de acesso</span>

<span style="font-weight: 400;">password=</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">NOTE:I removed comments from the config.ini file for explanation purposes.</span>

<span style="font-weight: 400;">Below we have the config.ini file already configured with all the necessary parameters for sending the bases.</span>

<table border="1" id="bkmrk-%23diret%C3%B3rio-de-origem-0" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;"><span style="font-weight: 400;">\#Diretório de origem de coleta dos dados de bases</span>

<span style="font-weight: 400;">source\_dir=/var/www/scielo</span>

<span style="font-weight: 400;">\#Diretório do Cisis </span>

<span style="font-weight: 400;">cisis\_dir=/var/www/scielo/proc/cisis</span>

<span style="font-weight: 400;">\#Diretório onde fica o arquivo da scilista.lst</span>

<span style="font-weight: 400;">scilista=/var/www/scielo/serial/scilista.lst</span>

<span style="font-weight: 400;">\#Diretório de destino dos dados enviados</span>

<span style="font-weight: 400;">destiny\_dir=</span>

<span style="font-weight: 400;">Observação:. Não configuramos o destino dos dados uma vez que o usuário de ftp já possui o acesso ao diretório da coleção.</span>

<span style="font-weight: 400;">\#Dados do servidor FTP </span>

<span style="font-weight: 400;">server=ftp.scielo.br</span>

<span style="font-weight: 400;">server\_type=ftp</span>

<span style="font-weight: 400;">port=21</span>

<span style="font-weight: 400;">user=scielo.bo</span>

<span style="font-weight: 400;">password=blabla</span>

</td></tr></tbody></table>

<span style="font-weight: 400;">NOTE:I removed comments from the config.ini file for explanation purposes.</span>

# <span style="font-weight: 400;">How to upgrade SciELO Methodology</span>

<span style="font-weight: 400;">To upgrade SciELO Methodology you have to download the latest code from our </span>[<span style="font-weight: 400;">GitHub Repository</span>](https://github.com/scieloorg/web)<span style="font-weight: 400;">. Before updating, check what version is your website. For instance, we are going to check the version from SciELO ZA: </span><a>http://www.scielo.org.za/versionOverview.txt</a>

<span style="font-weight: 400;">[![Screenshot at Aug 05 10-49-44.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-49-44.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-49-44.png)</span>

<span style="font-weight: 400;">The first line that shows is the version. Click here to check which version SciELO Methodology is: </span>[<span style="font-weight: 400;">https://github.com/scieloorg/Web/tags</span>](https://github.com/scieloorg/Web/tags)

[![Screenshot at Aug 05 10-50-14.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-50-14.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-50-14.png)

<span style="font-weight: 400;">From this moment, SciELO code is in 5.44.1 and SciELO ZA is in 5.37. To upgrade we have to download the branch from SciELO ZA. Each collection has its own branch. To check yours, click in the bottom master and select the branch scielo\_&lt;acron from your collection&gt;. In this example we selecting the scielo\_sza</span>

<span style="font-weight: 400;">[![Screenshot at Aug 05 10-50-50.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-50-50.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-50-50.png)</span>

<span style="font-weight: 400;">After selecting the branch click in the bottom right corner code and select Download ZIP:</span>

<span style="font-weight: 400;">[![Screenshot at Aug 05 10-51-31.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/screenshot-at-aug-05-10-51-31.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/screenshot-at-aug-05-10-51-31.png)</span>

<span style="font-weight: 400;">After downloading the zip package you have to send it to the Linux Server. You can use WinSCP to send it.</span>

<span style="font-weight: 400;">The other alternative is download it directly from the link </span>[<span style="font-weight: 400;">https://github.com/scieloorg/Web/archive/refs/heads/scielo\_sza.zip</span>](https://github.com/scieloorg/Web/archive/refs/heads/scielo_sza.zip)<span style="font-weight: 400;"> using wget command. If your collection isn't sza you have to change the acronym from this link.</span>

<table id="bkmrk-%24-cd-%2Ftmp-%24-wget-htt"><tbody><tr><td><span style="font-weight: 400;">$ cd /tmp</span>

<span style="font-weight: 400;">$ wget https://github.com/scieloorg/Web/archive/refs/heads/scielo\_sza.zip</span>

<span style="font-weight: 400;">$ unzip scielo\_sza.zip</span>

<span style="font-weight: 400;">$ rsync -Cravp /tmp/</span><span style="font-weight: 400;">Web-scielo\_sza/htdocs/ /var/www/scielo/htdocs/</span>

<span style="font-weight: 400;">$ rsync -Cravp /tmp/</span><span style="font-weight: 400;">Web-scielo\_sza/cgi-bin/ /var/www/scielo/cgi-bin/</span>

<span style="font-weight: 400;">$ rsync -Cravp /tmp/</span><span style="font-weight: 400;">Web-scielo\_sza/proc/ /var/www/scielo/proc/</span>

</td></tr></tbody></table>

## <span style="font-weight: 400;">Fixing permissions </span>

<span style="font-weight: 400;">Once you have upgrade the directories you have to fix the permissions.</span>

<table id="bkmrk-find-%2Fvar%2Fwww%2Fscielo"><tbody><tr><td><span style="font-weight: 400;">find /var/www/scielo/ -type d -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">find /var/www/scielo/ -type f -exec chmod 644 {} \\;</span>

<span style="font-weight: 400;">cd /var/www/scielo/</span>

<span style="font-weight: 400;">find proc/ -name \*.bat -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">find proc/ -name \*.sh -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">find cgi-bin/ -name \*.bat -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">find cgi-bin/ -name \*.sh -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">find cgi-bin/ -name \*.exe -exec chmod 755 {} \\;</span>

<span style="font-weight: 400;">cd proc</span>

<span style="font-weight: 400;">chmod 755 cisis/\*</span>

<span style="font-weight: 400;">chmod 755 call</span>

<span style="font-weight: 400;">chmod 755 rem</span>

</td></tr></tbody></table>

# <span style="font-weight: 400;">References</span>

<span style="font-weight: 400;">The following descriptions were based on the existing document:</span>

[<span style="font-weight: 400;">http://docs.scielo.org/projects/scielo-site/en/latest/howtoinstall.html</span>](http://docs.scielo.org/projects/scielo-site/en/latest/howtoinstall.html)

# INSTALAR ROCKY LINUX NO VMWARE

#### AJUSTE NECESSÁRIO NA PROPRIEDADE DA VM

Em VM Options &gt; Boot Options &gt; Desmaque o Enabled do Secure Boot

[![image-1636747396835.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747396835.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747396835.png)

[![image-1636747535960.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747535960.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747535960.png)

[![image-1636747621662.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747621662.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747621662.png)

[![image-1636747659237.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747659237.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747659237.png)

Clique em Network &amp; Host Name

[![image-1636747693658.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747693658.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747693658.png)

Clique no botão ON para pegar IP automaticamente e em Host Name adicione o nome FQDN da VM

[![image-1636747789440.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747789440.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747789440.png)

Clique no botão Configure para atribuir um IP fixo:

[![image-1636747927369.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636747927369.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636747927369.png)

[![image-1636748003742.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748003742.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748003742.png)

[![image-1636748029972.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748029972.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748029972.png)

Clique no botão DONE

[![image-1636748062431.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748062431.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748062431.png)

Clique em Time &amp; Date e selecione a cidade igual a imagem abaixo. Por fim clique em Done

[![image-1636748095301.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748095301.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748095301.png)

[![image-1636748137526.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748137526.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748137526.png)

Clique em Installation Destination

[![image-1636748182582.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748182582.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748182582.png)

Clique em Custom e no botão Done

[![image-1636748224477.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748224477.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748224477.png)

Aparecerá a tela abaixo:

[![image-1636748250935.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748250935.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748250935.png)

Clique no link "Click here to create them automatically"

[![image-1636748293562.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748293562.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748293562.png)

Agora precisamos fazer os ajustes nos volumes existentes. Iremos seguir a prática do CIS Benckmarks Red Hat Enterprise 8. Segundo o CIS é importante que os volumes abaixo seja criado como partições separadas:

/home

/var/tmp

/var/log

/var/log/audit

/tmp

Levando em consideração que temos um disco de 100GB o espaço ficará distribuído da seguinte forma:

/home -&gt; 5 GB

/var -&gt; 20 GB

/var/tmp -&gt; 5 GB

/var/log -&gt; 20 GB

/var/log/audit -&gt; 5GB

/tmp - 10GB

/ -&gt; 30 GB

Como adicionar uma partição? Clique em "**+**":

[![image-1636748738289.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748738289.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748738289.png)

Clique em Add mount point. Repita isso para todas as partições definidas.

A estrutura ficou assim:

[![image-1636748946583.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636748946583.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636748946583.png)

Cliqu em Done

[![image-1636749001486.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749001486.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749001486.png)

Clique em Accept Changes

[![image-1636749040086.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749040086.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749040086.png)

Clique em Software Selection

[![image-1636749079463.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749079463.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749079463.png)

Selecione Minimal Install e marque os itens como está na imagem:

[![image-1636749137752.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749137752.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749137752.png)

Clique em Done

[![image-1636749164872.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749164872.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749164872.png)

Selecione Root Password

[![image-1636749208730.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749208730.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749208730.png)

Clique em Done

[![image-1636749232382.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749232382.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749232382.png)

Clique em User Creation

[![image-1636749281486.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749281486.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749281486.png)

Clique em Done

[![image-1636749340471.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749340471.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749340471.png)

Clique em Begin Installation

[![image-1636749377028.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749377028.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749377028.png)

E por fim, clique em Reboot System

[![image-1636749880340.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636749880340.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636749880340.png)

Agora login via ssh e execute o update

```shell
[root@old ~]# yum update -y
```

Desative o selinux

```shell
[root@old ~]# vi /etc/selinux/config
Altere de:
SELINUX=enforcing
Para
SELINUX=permissive
```

#### INSTALAR O VMWARE TOOLS

Clique em Install VMware Tools

[![image-1636750468191.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636750468191.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636750468191.png)

Clique em MOUNT

[![image-1636750517729.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636750517729.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636750517729.png)

Agora via ssh execute

```shell
[root@old vmware-tools-distrib]# yum install policycoreutils-python-utils -y
[root@old ~]# mount -t iso9660 /dev/cdrom /mnt
[root@old ~]# cd /mnt
[root@old mnt]# cp VMwareTools-10.3.23-17030940.tar.gz /tmp
[root@old mnt]# cd /tmp/
[root@old tmp]# tar -zxvf VMwareTools-10.3.23-17030940.tar.gz 
[root@old tmp]# cd vmware-tools-distrib/
[root@old vmware-tools-distrib]# ./vmware-install.pl 
A previous installation of VMware Tools has been detected.

The previous installation was made by the tar installer (version 4).

Keeping the tar4 installer database format.

You have a version of VMware Tools installed.  Continuing this install will 
first uninstall the currently installed version.  Do you wish to continue? 
(yes/no) [yes] 

INPUT: [yes]  default

Uninstalling the tar installation of VMware Tools.


ValueError: O contexto de arquivo para /usr/sbin/vmtoolsd não está definido
semanageFcontext: unable to set SELinux fcontext - command: "semanage fcontext 
-d /usr/sbin/vmtoolsd"
There was an error configuring the SELinux security context for VMware Tools.  
Please make certain that SELinux is configured correctly.

Stopping services for VMware Tools

Parando vmware-tools (via systemctl):                      [  OK  ]

The removal of VMware Tools 10.3.23 build-17030940 for Linux completed 
successfully.

Installing VMware Tools.

In which directory do you want to install the binary files? 
[/usr/bin] 
INPUT: [/usr/bin]  default

What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 
[/etc/rc.d] 

INPUT: [/etc/rc.d]  default

What is the directory that contains the init scripts? 
[/etc/rc.d/init.d] 

INPUT: [/etc/rc.d/init.d]  default

In which directory do you want to install the daemon files? 
[/usr/sbin] 

INPUT: [/usr/sbin]  default

In which directory do you want to install the library files? 
[/usr/lib/vmware-tools] 

INPUT: [/usr/lib/vmware-tools]  default

The path "/usr/lib/vmware-tools" does not exist currently. This program is 
going to create it, including needed parent directories. Is this what you want?
[yes] 

INPUT: [yes]  default

In which directory do you want to install the documentation files? 
[/usr/share/doc/vmware-tools] 

INPUT: [/usr/share/doc/vmware-tools]  default

The path "/usr/share/doc/vmware-tools" does not exist currently. This program 
is going to create it, including needed parent directories. Is this what you 
want? [yes] 

INPUT: [yes]  default

The installation of VMware Tools 10.3.23 build-17030940 for Linux completed 
successfully. You can decide to remove this software from your system at any 
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by 
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want 
this program to invoke the command for you now? [yes] 

INPUT: [yes]  default

Initializing...


Making sure services for VMware Tools are stopped.

Parando vmware-tools (via systemctl):                      [  OK  ]


The module vmci has already been installed on this system by another installer 
or package and will not be modified by this installer.

The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.

The module vmxnet3 has already been installed on this system by another 
installer or package and will not be modified by this installer.

The module pvscsi has already been installed on this system by another 
installer or package and will not be modified by this installer.

The module vmmemctl has already been installed on this system by another 
installer or package and will not be modified by this installer.

The VMware Host-Guest Filesystem allows for shared folders between the host OS 
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish 
to enable this feature? [no] 

INPUT: [no]  default

The vmxnet driver is no longer supported on kernels 3.3 and greater. Please 
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)

The vmblock enables dragging or copying files between host and guest in a 
Fusion or Workstation virtual environment.  Do you wish to enable this feature?
[no] 

INPUT: [no]  default


Skipping configuring automatic kernel modules as no drivers were installed by 
this installer.

Do you want to enable Guest Authentication (vgauth)? [yes] 

INPUT: [yes]  default

No X install found.


Skipping rebuilding initrd boot image for kernel as no drivers to be included 
in boot image were installed by this installer.

The configuration of VMware Tools 10.3.23 build-17030940 for Linux for this 
running kernel completed successfully.

You must restart your X session before any mouse or graphics changes take 
effect.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and 
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session
3. Restart your X session.

Warning no default label for /tmp/vmware-block-restore-68272.0/tmp_file
Enjoy,

--the VMware team
```

# Procesamiento y actualización de sitios Venezuela - Nuevo(Español)

#####   


##### **Visión geral**

O objetivo deste documento é explicar de forma simples os procedimentos necessários para a submissão de bases, processamento do site de homologação e atualização do site de produção.

##### **Objetivo**

- Envio de bases a través de PaperBoy
- Acceso remoto al servidor
- Recoger bases para procesamiento
- Procesamiento y validación en el sitio de homologación
- Actualización del sitio de producción

##### **Envio de bases a través de PaperBoy**

En el servidor local de Windows, Paperboy ya está instalado y configurado para enviar bases y activos digitales, llamado "paperboy.bat"

[![image-1631274707285.33.02.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631274707285-33-02.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631274707285-33-02.png)

Simplemente haciendo doble clic en el acceso directo comenzará a enviar las bases.

El atajo "paperboy.bat" ejecuta una serie de comandos:

El siguiente comando establece la variable con la configuración del "Paperboy"

<table border="1" id="bkmrk-set-paperboy_setting" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;"><span style="color: #3366ff;">set PAPERBOY\_SETTINGS\_FILE=config.ini</span></td></tr></tbody></table>

[![image-1631275655145.33.31.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631275655145-33-31.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631275655145-33-31.png)

A continuación tenemos el comando para enviar las bases, el log de ejecución se dirige a un archivo:

<table border="1" id="bkmrk-paperboy_delivery_to" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">paperboy\_delivery\_to\_server -m &gt; paperboy.log 2&gt;&amp;1</td></tr></tbody></table>

[![image-1631275690290.34.51.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631275690290-34-51.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631275690290-34-51.png)

##### **Acceso remoto al servidor**

[![image.png](https://documentacao.scielo.org/uploads/images/gallery/2024-09/scaled-1680-/LYhimage.png)](https://documentacao.scielo.org/uploads/images/gallery/2024-09/LYhimage.png)

[![image.png](https://documentacao.scielo.org/uploads/images/gallery/2024-09/scaled-1680-/1Sdimage.png)](https://documentacao.scielo.org/uploads/images/gallery/2024-09/1Sdimage.png)

##### **Procesamiento y validación en el sitio de homologación**

El primer paso es acceder al contenedor del sitio de homologación:

<table border="1" id="bkmrk-docker-exec--it-hml-" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;"><span style="color: #3366ff;">docker exec -it hml-ve-scielo-org bash</span></td></tr></tbody></table>

[![image-1631287077111.17.42.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631287077111-17-42.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631287077111-17-42.png)

Para comenzar a procesar tenemos que estar en el directorio correcto:

<table border="1" id="bkmrk-cd-%2Fvar%2Fwww%2Fscielo%2Fp" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;"><span style="color: #3366ff;">cd /var/www/scielo/proc</span></td></tr></tbody></table>

[![image-1631288116604.35.04.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631288116604-35-04.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631288116604-35-04.png)

El procesamiento se realiza ejecutando el siguiente comando:

<table border="1" id="bkmrk-.%2Fgerapadrao.bat" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;"><span style="color: #3366ff;">./GeraPadrao.bat</span>

</td></tr></tbody></table>

[![image-1631291601936.33.03.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631291601936-33-03.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631291601936-33-03.png)

Después del procesamiento, podemos consultar el registro y validar si el sitio ha sido actualizado:

<table border="1" id="bkmrk-gerapadra.log" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;"><span style="color: #3366ff;">[GeraPadra.log](https://gist.github.com/anderson-attilio/8731ab601f95e7c3a0ce971aef560cd5 "GeraPadra.log")</span></td></tr></tbody></table>

Pudimos consultar el log en:

<table border="1" id="bkmrk-%2Fvar%2Fwww%2Fhml_scielo%2F" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;"><span style="color: #3366ff;">/var/www/hml\_scielo/proc/log</span></td></tr></tbody></table>

Una forma de buscar posibles errores que ocurrieron durante el procesamiento es ejecutar el siguiente comando:

En el directorio proc, ejecute el siguiente comando:

<table border="1" id="bkmrk-cat-log%2Fgerapadrao.l" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;"><span style="color: #3366ff;">cat log/GeraPadrao.log |grep ERRO</span></td></tr></tbody></table>

Si el resultado del comando está vacío es una señal de que no tuvimos errores de procesamiento, ahora tenemos que validar si el sitio fue actualizado.

Verifique la actualización en el sitio web de homologación de la colección

<table border="1" id="bkmrk-homolog-ve.scielo.or" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">[homolog-ve.scielo.org](http://homolog-ve.scielo.org/ "homolog-ve.scielo.org")</td></tr></tbody></table>

[![image-1631387449048.10.04.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631387449048-10-04.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631387449048-10-04.png)

Antes del procesamiento, el sitio solo tenía las bases del modelo:

[![image-1631387295943.37.54.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631387295943-37-54.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631387295943-37-54.png)

Después de procesar el sitio se actualizó:

[![image-1631387428179.09.32.png](https://documentacao.scielo.org/uploads/images/gallery/2021-09/scaled-1680-/image-1631387428179-09-32.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-09/image-1631387428179-09-32.png)

##### **Actualización del sitio web de producción**

Para actualizar el sitio de producción, usaremos un script que copia las bases del sitio de aprobación.

##### **Informaciones importantes**

El script de actualización del sitio se encuentra en el directorio:

<table border="1" id="bkmrk-%2Fvar%2Fwww%2Fscielove%2Fsc" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">/var/www/scripts</td></tr></tbody></table>

Tenemos un directorio separado para almacenar los registros de actualización y reversión del sitio:

<table border="1" id="bkmrk-%2Fvar%2Fwww%2Fscielove%2Flo" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">/var/www/scripts/logs-update-sitio/</td></tr></tbody></table>

[![Screen Shot 2021-11-03 at 08.32.10.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-03-at-08-32-10.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-03-at-08-32-10.png)

Empecemos la actualización accediendo de forma remota al servidor, (se puede consultar en "Acceso remoto al servidor")

Una vez en el servidor, vayamos al directorio donde se encuentra el script update\_bases.sh

<table border="1" id="bkmrk-cd-scripts%2F" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">cd /var/www/scripts/</td></tr></tbody></table>

[![Screen Shot 2021-11-03 at 08.31.21.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-03-at-08-31-21.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-03-at-08-31-21.png)

Para actualizar el sitio, usemos el siguiente comando a continuación:

<table border="1" id="bkmrk-nohup-sh--x-update_b" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">nohup sh -x update\_bases.sh update &amp;&gt;/var/www/scripts/logs-update-sitio/update\_bases\_03112021.log &amp;</td></tr></tbody></table>

[![Screen Shot 2021-11-03 at 08.41.42.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-03-at-08-41-42.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-03-at-08-41-42.png)

##### **Nota importante**

<span style="color: #ff0000;">En el comando anterior informamos la ruta donde se almacena el log y el nombre con la fecha del log, para cada actualización debemos informar la fecha, esta práctica es importante cuando es necesario analizar logs, en un posible error que puede ocurrir en una actualización, a continuación daré algunos ejemplos:</span>

Tenemos una actualización del sitio web el 4 de noviembre de 2021

<table border="1" id="bkmrk-nohup-sh--x-update_b-0" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">nohup sh -x update\_bases.sh update &amp;&gt;/var/www/ve\_scielo\_org/logs-update-sitio/update\_bases\_04112021.log &amp;</td></tr></tbody></table>

Tenemos otra actualización del sitio, pero ahora el 10 de enero de 2022

<table border="1" id="bkmrk-nohup-sh--x-update_b-1" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">nohup sh -x update\_bases.sh update &amp;&gt;//var/www/ve\_scielo\_org/logs-update-sitio/update\_bases\_10012022.log &amp;</td></tr></tbody></table>

#####   


##### **Consulta de registros durante la actualización**

Podemos seguir los registros usando el siguiente comando:

<table border="1" id="bkmrk-tail--f-%2Fvar%2Fwww%2Fsci" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">tail -f /var/www/ve\_scielo\_org/logs-update-sitio/update\_bases\_03112021.log &amp;</td></tr></tbody></table>

[![Screen Shot 2021-11-03 at 08.43.02.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-03-at-08-43-02.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-03-at-08-43-02.png)

[![Screen Shot 2021-11-03 at 09.19.04.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-03-at-09-19-04.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-03-at-09-19-04.png)

##### **Explicando el comando del sitio de actualización**

<table border="1" id="bkmrk-nohup-sh--x-update_b-2" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">nohup sh -x update\_bases.sh update &amp;&gt;/var/www/scielove/logs-update-sitio/update\_bases\_03112021.log &amp;</td></tr></tbody></table>

<table border="1" id="bkmrk-nohup-par%C3%A1metro-para" style="border-collapse: collapse; width: 100%; height: 260px;"><tbody><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">nohup</td><td style="width: 66.1728%; height: 29px;">Parámetro para insertar el comando en segundo plano</td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">sh -x</td><td style="width: 66.1728%; height: 29px;">Parámetro utilizado para la ejecución del script </td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">update\_bases</td><td style="width: 66.1728%; height: 29px;">Script que usaremos para actualizar el sitio web</td></tr><tr style="height: 28px;"><td style="width: 33.8272%; height: 28px;">update</td><td style="width: 66.1728%; height: 28px;">Parámetros para actualizar el sitio web</td></tr><tr><td style="width: 33.8272%;">rollback</td><td style="width: 66.1728%;">Parámetros para revertir la actualización</td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">&amp;</td><td style="width: 66.1728%; height: 29px;">carácter utilizado en la formación del comando para ejecutar el script en segundo plano.</td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">&gt;</td><td style="width: 66.1728%; height: 29px;">Parámetro que indica hacia dónde vamos a dirigir la salida de ejecución del registro</td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">/var/www/scielove/logs-update-sitio/</td><td style="width: 66.1728%; height: 29px;">directorio donde se almacenan los registros de actualización</td></tr><tr><td style="width: 33.8272%;">update\_bases\_03112021.log</td><td style="width: 66.1728%;">archivo de actualización del sitio web</td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">rollback\_bases\_03112021.log</td><td style="width: 66.1728%; height: 29px;">archivo de rollback del sitio web</td></tr><tr style="height: 29px;"><td style="width: 33.8272%; height: 29px;">&amp;</td><td style="width: 66.1728%; height: 29px;">carácter utilizado en la formación del comando para ejecutar el script en segundo plano.</td></tr></tbody></table>

<p class="callout info"><span style="color: #000000;">**Enlace esencial donde tenemos el script[ update\_bases.sh](https://gist.github.com/anderson-attilio/0d9628fcd5e75f832134a94c195a9668 "update_bases.sh") a analizar**</span></p>

registro de actualización

[![Screen Shot 2021-11-09 at 19.43.07.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-09-at-19-43-07.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-09-at-19-43-07.png)

Fin de actualización

[![Screen Shot 2021-11-09 at 19.47.43.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-09-at-19-47-43.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-09-at-19-47-43.png)

[![Screen Shot 2021-11-09 at 19.36.43.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-09-at-19-36-43.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-09-at-19-36-43.png)

Si es necesario, pudimos revertir la actualización de la siguiente manera:

<table border="1" id="bkmrk-nohup-sh--x-update_b-3" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">nohup sh -x update\_bases.sh rollback &amp;&gt;/var/www/scielove/logs-update-sitio/rollback\_bases\_03112021.log &amp;</td></tr></tbody></table>

[![Screen Shot 2021-11-09 at 20.02.50.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/screen-shot-2021-11-09-at-20-02-50.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/screen-shot-2021-11-09-at-20-02-50.png)

Este procedimiento revertirá las bases del sitio antes del proceso de actualización descrito en **Consulta de registros durante la actualización.**

# Atualização Apache 2.2.22 África do Sul

###  

###  

### Visão Geral

Este documento tem como finalidade descrever, de forma técnica e objetiva, os procedimentos executados para a atualização do servidor web <span class="s1">**Apache**</span> utilizado na instância da <span class="s1">**SciELO África do Sul**</span>.

### Objetivo

Realizar a atualização do <span class="s1">**Apache HTTP Server**</span> da versão <span class="s1">**2.2.22**</span> para uma versão mais recente, garantindo maior estabilidade, segurança e compatibilidade com o ambiente operacional.

### Informações Técnicas

O processo de atualização será executado em três etapas principais:

1. <span class="s1">**Backup da estrutura de dados**</span> – Cópia completa dos arquivos de configuração e diretórios do Apache para garantir a possibilidade de rollback em caso de falhas.
2. <span class="s1">**Atualização do Apache**</span> – Instalação e configuração da nova versão do <span class="s1">**Apache HTTP Server**</span>, preservando as personalizações existentes.
3. <span class="s1">**Validação do serviço**</span> – Verificação do correto funcionamento do serviço após a atualização.

### Observações

Atualmente, o servidor executa o <span class="s1">**Apache 2.2.22 (Win32)**</span> em conjunto com o <span class="s1">**PHP 5.2.17**</span>.

[![Screenshot at Oct 28 10-18-45.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/fOHlqWs3F0I2neAJ-screenshot-at-oct-28-10-18-45.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/fOHlqWs3F0I2neAJ-screenshot-at-oct-28-10-18-45.png)

A nova versão a ser instalada será o <span class="s1">**Apache 2.2.34**</span>, uma vez que o <span class="s1">**PHP 5.2.17**</span> utiliza o módulo <span class="s1">**php5apache2\_2.dll**</span>, desenvolvido especificamente para a série <span class="s1">**Apache 2.2.x**</span>.

Isso significa que:

- Apache 2.4 **não é compatível** com esse módulo.
- Para que o <span class="s1">**PHP 5.2.17**</span> funcione no <span class="s1">**Apache 2.4**</span>, seria necessário recompilar o PHP com suporte ao módulo <span class="s1">**php5apache2\_4.dll**</span>, o qual <span class="s1">**não possui suporte oficial**</span>.

<table id="bkmrk-apache-vers%C3%A3o-compat" style="width: 100.833%;"><thead><tr><th class="align-center" style="width: 22.5806%;">Apache versão</th><th class="align-center" style="width: 25.0896%;">Compatível com PHP 5.2.17?</th><th class="align-center" style="width: 52.3297%;">Observação</th></tr></thead><tbody><tr><td class="align-center" style="width: 22.5806%;">**2.2.x (até 2.2.34)**</td><td class="align-center" style="width: 25.0896%;">✅ Sim</td><td class="align-center" style="width: 52.3297%;">Última versão compatível (lançada em 2017)</td></tr><tr><td class="align-center" style="width: 22.5806%;">**2.4.x (qualquer)**</td><td class="align-center" style="width: 25.0896%;">❌ Não</td><td class="align-center" style="width: 52.3297%;">Quebra o carregamento do módulo `php5apache2_2.dll`</td></tr></tbody></table>

#### Pré-requisitos

**Pacotes que fiz o download**

- **Apache 2.2.34 (Win32 VC10)**  
    👉 [https://www.apachelounge.com/download/win32/](https://www.apachelounge.com/download/win32/)

[![image.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/5BWgp0aiXFoArCkr-image.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/5BWgp0aiXFoArCkr-image.png)

- **Visual C++ 2010 SP1 Redistributable (x86)**  
    👉 [https://www.microsoft.com/en-za/download/details.aspx?id=26999](https://www.microsoft.com/en-za/download/details.aspx?id=26999)

[![image.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/99xfIkvefJnZahir-image.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/99xfIkvefJnZahir-image.png)

Ao clicar em download selecione o arquivo **vcredist\_x86.exe;**

[![Screenshot at Oct 28 12-01-35.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/iPcB7nPpmnZqvGC2-screenshot-at-oct-28-12-01-35.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/iPcB7nPpmnZqvGC2-screenshot-at-oct-28-12-01-35.png)

Instale o pacote **Visual C++ 2010 SP1 Redistributable (x86)**

[![Screenshot at Oct 28 12-06-48.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/3YdnQXRfRvPvrq8j-screenshot-at-oct-28-12-06-48.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/3YdnQXRfRvPvrq8j-screenshot-at-oct-28-12-06-48.png)

[![Screenshot at Oct 28 12-09-59.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/pViorOwprKwuvor1-screenshot-at-oct-28-12-09-59.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/pViorOwprKwuvor1-screenshot-at-oct-28-12-09-59.png)

Pacote já instalado

[![Screenshot at Oct 28 12-10-55.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/4Fs3e3X1GbLQTbll-screenshot-at-oct-28-12-10-55.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/4Fs3e3X1GbLQTbll-screenshot-at-oct-28-12-10-55.png)

Uma breve explicação do porque foi necessário instalar o **Visual C++ 2010 SP1 Redistributable (x86).**

Cada build do Apache é compilado com um “Visual C++” específico

Quando um software Windows é compilado em C/C++, ele depende de um **runtime** (bibliotecas compartilhadas `.dll`) que pertencem à versão do **Visual Studio** usada na compilação.

No caso do **Apache 2.2.34**, ele foi compilado com: **Microsoft Visual Studio 2010 SP1 (VC10).** Portanto, o binário `httpd.exe` **precisa das DLLs dessa versão do compilador** para funcionar.

Essas DLLs incluem:

<table border="1" id="bkmrk-msvcr100.dll-msvcp10" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.881%;"></col></colgroup><tbody><tr><td>msvcr100.dll  
</td></tr><tr><td>msvcp100.dll</td></tr></tbody></table>

Esses arquivos fazem parte do **Visual C++ 2010 SP1 Redistributable (x86)**.

##### Resumo prático:

Foi necessário instalar o ****Visual C++ 2010 SP1 Redistributable (x86)**** porque o Apache 2.2.34 foi compilado com o Visual Studio 2010, e sem esse runtime o Windows não consegue executar o binário nem carregar seus módulos.

### <span class="s1">Backup da estrutura de dados</span>

<span class="s1">Atualmente a instalação do Apache 2.2.22 está instalada no diretório:</span>

<table border="1" id="bkmrk-c%3A%5Cprogram-files-%28x8" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.881%;"></col></colgroup><tbody><tr><td>C:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2</td></tr></tbody></table>

<span class="s1">O backup será da estrutura completa, foi criado em:</span>

<table border="1" id="bkmrk-c%3A%5Cprogram-files-%28x8-1" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.881%;"></col></colgroup><tbody><tr><td>C:\\Program Files (x86)\\BKP28102025-Apache2\_22</td></tr></tbody></table>

<span class="s1">Comparação da estrutura de dados do backup, com o diretório do Apache.</span>

[![Screenshot at Oct 28 13-05-27.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/gJmkTTWFPTbiMBEx-screenshot-at-oct-28-13-05-27.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/gJmkTTWFPTbiMBEx-screenshot-at-oct-28-13-05-27.png)

### <span class="s1">Atualização do Apache</span> 

O primeiro passo foi descompactar o download do **Apache 2.2.34 (Win32 VC10)** realizado na sessão de pré requisitos.

[![Screenshot at Oct 28 14-21-15.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/lwqOVH0nUtziq63Y-screenshot-at-oct-28-14-21-15.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/lwqOVH0nUtziq63Y-screenshot-at-oct-28-14-21-15.png)

[![Screenshot at Oct 28 14-22-33.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/QmO3bN01KsWIUeXz-screenshot-at-oct-28-14-22-33.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/QmO3bN01KsWIUeXz-screenshot-at-oct-28-14-22-33.png)

O diretório descompactado Apache2 foi renomeado e movido:

<table border="1" id="bkmrk-c%3A%5Cprogram-files-%28x8-2" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.881%;"></col></colgroup><tbody><tr><td>C:\\Program Files (x86)\\Apache Software Foundation</td></tr></tbody></table>

[![Screenshot at Oct 28 14-27-38.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/yiCFb5E8AMZiEfOY-screenshot-at-oct-28-14-27-38.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/yiCFb5E8AMZiEfOY-screenshot-at-oct-28-14-27-38.png)

 Agora com o diretório renomeado para Apache2.2.34 movido para diretório \\Apache Software Foundation.

Agora o segundo passo é utilizar alguns comandos para copiar as estruturas dos diretórios de conf, htdocs e modules do Apache 2.2.22 em funcionamento, para o Apache 2.2.34 recém-instalado.

Os comandos abaixo foram executados no CMD no modo administrador.

```python
xcopy "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf" "C:\Program Files (x86)\Apache Software Foundation\Apache2.2.34\conf" /E /I /H /K /Y
```

[![Screenshot at Oct 28 14-38-22.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/kneufv06Lsdx5lmL-screenshot-at-oct-28-14-38-22.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/kneufv06Lsdx5lmL-screenshot-at-oct-28-14-38-22.png)

[![Screenshot at Oct 28 14-38-49.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/CDo6hIAmdB3SXppE-screenshot-at-oct-28-14-38-49.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/CDo6hIAmdB3SXppE-screenshot-at-oct-28-14-38-49.png)

```python
xcopy "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs" "C:\Program Files (x86)\Apache Software Foundation\Apache2.2.34\htdocs" /E /I /H /K /Y
```

[![Screenshot at Oct 28 14-39-14.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/i7vskRkuUaLnJrit-screenshot-at-oct-28-14-39-14.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/i7vskRkuUaLnJrit-screenshot-at-oct-28-14-39-14.png)

```python
xcopy "C:\Program Files (x86)\Apache Software Foundation\Apache2.2\modules" "C:\Program Files (x86)\Apache Software Foundation\Apache2.2.34\modules" /E /I /H /K /Y
```

[![Screenshot at Oct 28 14-39-46.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/lvEvwK4hI7S9qOkT-screenshot-at-oct-28-14-39-46.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/lvEvwK4hI7S9qOkT-screenshot-at-oct-28-14-39-46.png)

[![Screenshot at Oct 28 14-40-08.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/CkvgNzDbrsy7vcj0-screenshot-at-oct-28-14-40-08.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/CkvgNzDbrsy7vcj0-screenshot-at-oct-28-14-40-08.png)


##### <span class="s1">Observação: </span>O que cada parâmetro faz:

/E → copia todas as subpastas (inclusive vazias)

/I → assume destino como diretório (mesmo se não existir)

/H → copia arquivos ocultos e de sistema

/K → mantém atributos originais (datas, permissões)

/Y → suprime perguntas de confirmação de sobrescrita

<span class="s1">Para validar o funcionamento do Apache 2.2.34, acesse o CMD, acesse o caminho abaixo:</span>

```python
cd "C:\Program Files (x86)\Apache Software Foundation\Apache2.2.34\bin"
```

<span class="s1">Execute o comando abaixo:</span>

```python
httpd.exe -t
```

[![Screenshot at Oct 28 14-44-53.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/IjiF4gRJ4ynuVNKj-screenshot-at-oct-28-14-44-53.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/IjiF4gRJ4ynuVNKj-screenshot-at-oct-28-14-44-53.png)

Uma vez que validamos que o serviço está funcionando, vamos registrar o serviço, ainda no diretório da aplicação, execute o comando abaixo:

```python
httpd.exe -k install -n "Apache2.2.34"
```

[![Screenshot at Oct 28 14-58-34.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/RgkM648BPxpRTseN-screenshot-at-oct-28-14-58-34.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/RgkM648BPxpRTseN-screenshot-at-oct-28-14-58-34.png)

Aqui validamos que o serviço foi adicionado no Apache Service Monitor

[![Screenshot at Oct 28 14-59-40.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/BjNyDeyFhsO91TiK-screenshot-at-oct-28-14-59-40.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/BjNyDeyFhsO91TiK-screenshot-at-oct-28-14-59-40.png)

Podemos ver que no windows service também foi adicionado.

[![Screenshot at Oct 28 15-00-28.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/SvIsryjkxhTEBoaI-screenshot-at-oct-28-15-00-28.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/SvIsryjkxhTEBoaI-screenshot-at-oct-28-15-00-28.png)

### <span class="s1">Validação do serviço</span> 

Com o serviço já configurado, removi apenas a **entrada de serviço do Windows** `Apache2.2`, mantendo o diretório anterior do Apache 2.2.22.

```python
sc delete "Apache2.2"
```

[![Screenshot at Oct 28 15-09-58.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/8CXOUs9K1PfXE0YV-screenshot-at-oct-28-15-09-58.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/8CXOUs9K1PfXE0YV-screenshot-at-oct-28-15-09-58.png)

Com isso o registro do serviço anterior foi removido, permanecendo apenas o apache recém-instalado.

[![Screenshot at Oct 28 15-10-19.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/Sv7ku1m9ahGHQa0j-screenshot-at-oct-28-15-10-19.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/Sv7ku1m9ahGHQa0j-screenshot-at-oct-28-15-10-19.png)

[![Screenshot at Oct 28 15-10-51.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/JTSB3MWMZfEoCcTZ-screenshot-at-oct-28-15-10-51.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/JTSB3MWMZfEoCcTZ-screenshot-at-oct-28-15-10-51.png)

[![Screenshot at Oct 28 15-11-44.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/vt3gGtIH3osp30ru-screenshot-at-oct-28-15-11-44.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/vt3gGtIH3osp30ru-screenshot-at-oct-28-15-11-44.png)

Aqui iniciei o serviço, para testar o funcionamento.

[![Screenshot at Oct 28 15-03-17.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/59qHTkwIfJ2R0YvL-screenshot-at-oct-28-15-03-17.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/59qHTkwIfJ2R0YvL-screenshot-at-oct-28-15-03-17.png)

Aqui o acesso ao site local da unidade

[![Screenshot at Oct 28 15-05-21.png](https://documentacao.scielo.org/uploads/images/gallery/2025-10/scaled-1680-/Ol0hNMEB6sAEzG1X-screenshot-at-oct-28-15-05-21.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-10/Ol0hNMEB6sAEzG1X-screenshot-at-oct-28-15-05-21.png)

### Conclusão

<span class="s1">**Backup da estrutura de dados**</span> – Realizada

<span class="s1">**Atualização do Apache**</span> – Instalação e configuração finalizada com sucesso

<span class="s1">**Validação do serviço**</span> – Verificação do serviço Apache 2.2.34 realizado, site validado.

# MANUAL DE USO DA DOCUMENTAÇÃO

## Introdução

Os princípios de armazenamento de informações no Documentação SciELO baseiam-se nas ideias de uma prateleira de livros. Assim como os livros normais, os livros no nosso site de documentação podem conter capítulos e páginas. Você começa criando um livro que atua como o nível mais alto de categorização. O ideal é que você tenha livros separados para tópicos diferentes.

Em um livro, você pode criar páginas diretamente ou pode primeiro criar capítulos. Os capítulos fornecem um nível adicional de agrupamento de páginas para manter as páginas organizadas, mas são opcionais. Todas as informações que você escreve são mantidas dentro de páginas. Embora livros e capítulos não contenham informações, eles podem receber uma breve descrição para auxiliar na pesquisa e visibilidade.

Depois de começar a empilhar livros, você pode começar a usar as estantes de livros para organizá-los. As estantes de livros podem conter vários livros e um único livro pode ser colocado em várias estantes.

Estantes, livros, capítulos e páginas possuem um código de cores definido para garantir que sejam facilmente identificáveis. Os exemplos abaixo mostram o esquema de cores padrão. Observe que isso pode ser substituído pelo administrador.

[![image-1628192024795.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/image-1628192024795.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/image-1628192024795.png)

## Começando

Você pode organizar as coisas de duas maneiras; Você pode planejar a estrutura de seu livro / capítulo / página ou pode deixar as coisas crescerem naturalmente com o tempo. Se você conhece ou já tem o conteúdo que será documentado, então provavelmente é melhor planejar com antecedência, caso contrário, se você está começando do zero, você vai querer deixar tudo encontrar seu próprio lugar.

Se você decidir crescer naturalmente, provavelmente começará com um livro para cada categoria principal e adicionará páginas diretamente a esses livros. À medida que você começar a obter muitas páginas em cada livro, começará a usar capítulos para agrupar essas páginas. Quando um capítulo fica muito grande, pode ser melhor dividi-lo em seu próprio livro. No site Documentação SciELO, você pode mover facilmente capítulos e páginas entre livros e capítulos para que não se preocupe em ter que mover coisas no futuro.

## Cadastrando no site

Apenas usuários pertencentes ao SciELO conseguirão acessar a área de login do sistema. Uma vez cadastrado o usuário deverá solicitar permissão de Editor para que consigam adicionar conteúdos.

Digite no navegado [https://documentacao.scielo.org/login](https://documentacao.scielo.org/login)

[![image-1628194832034.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/image-1628194832034.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/image-1628194832034.png)

Preencha com seu usuário e senha da rede.

[![image-1628194898320.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/image-1628194898320.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/image-1628194898320.png)

Ao clicar em ENTRAR um e-mail deverá ser enviado para sua caixa de mensagem. Siga as instruções de validação.

## Organizando o conteúdo

Assim que seu conteúdo começar a crescer, você descobrirá que pode querer reorganizá-los. Existem duas opções para mover o conteúdo; Você pode mover páginas e capítulos individualmente ou pode classificar livros inteiros.

Observe que para mover o conteúdo, você precisará ter permissão de "edição" tanto para o conteúdo que está sendo movido quanto para o pai para o qual está sendo movido.

### Movendo páginas únicas ou capítulos

As páginas e capítulos podem ser movidos diretamente para um novo capítulo ou livro. Para mover um capítulo ou página desta forma, vá para uma página ou capítulo e selecione ‘Mover’ na lista de ações:

[![image-1628192362869.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/image-1628192362869.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/image-1628192362869.png)

Clicar na ação ‘Mover’ levará você a uma tela onde poderá selecionar um novo local para seu capítulo ou página. Aqui você pode pesquisar um livro ou capítulo específico usando a barra de pesquisa na parte superior da tela de seleção. Depois de selecionar um novo pai para seu capítulo ou página, pressione ‘Mover página’ ou ‘Mover capítulo’ e seu capítulo ou página será movido para o novo capítulo ou livro. Se você mover um capítulo, todas as páginas filho permanecerão naquele capítulo e qualquer atividade relacionada aparecerá agora no novo livro pai.

### Classificando os livros

A interface de ‘Classificação de livros’ permite que você mova várias páginas e capítulos com facilidade em uma interface simples de arrastar e soltar. Para classificar o conteúdo de um livro, abra o livro e encontre a opção “Classificar” na lista de ações.

[![image-1628192613582.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/image-1628192613582.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/image-1628192613582.png)

Inicialmente, apenas o livro de onde você veio aparecerá à esquerda. Você pode adicionar livros extras na interface de classificação, selecionando-os à direita. Aqui você pode simplesmente arrastar e soltar capítulos e páginas ao redor e também entre diferentes livros. Depois de organizar seu conteúdo, pressione "Salvar" e todos os livros incluídos serão reorganizados.

### Definir permissões

Por padrão as permissões para visualizar pratelheiras, livros e capítulos é dado apenas aos usuários logados. Contudo, permissões especiais podem ser dadas para tornar aquele documento público. Ou seja, o sistema é bem granular para dar permissões.

Vamos imaginas que você queira dar permissão pública a uma pratelheira. Ao entrar na pratelheira ao lado direito clique em Permission

[![image-1628194430981.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/image-1628194430981.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/image-1628194430981.png)

Ao clicar em Permissions, vai abrir no centro a tela abaixo. Clique no botão "Enable Custom Permission".

[![image-1628194450776.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/image-1628194450776.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/image-1628194450776.png)

Perceba que abaixo apareceu uma lista com permissões que podem ser atribuidas. Para deixar a pratelheira pública marque a opção View da Role Public e em seguida no botão SAVE PERMISSIONS.

[![image-1628194470065.png](https://documentacao.scielo.org/uploads/images/gallery/2021-08/scaled-1680-/image-1628194470065.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-08/image-1628194470065.png)

# SciELO Publishing Framework

# HOW TO INSTALL MINIO ON ROCKY LINUX 8

## Prerequisites

- An Rocky Linux system.
- A user with root or sudo privileges. This user will be used for installing new packages and make changes system-wide.

## Downloading MinIO on Rocky Linux

<span style="color: #24292f; font-family: -apple-system, 'system-ui', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Use the following command to download a standalone MinIO server on Linux hosts running 64-bit Intel/AMD architectures. Replace </span>`/data`<span style="color: #24292f; font-family: -apple-system, 'system-ui', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"> with the path to the drive or directory in which you want MinIO to store data.</span>

```command
dnf -y install wget
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
mkdir /data
mv minio /usr/local/bin
```

## Create default configuration

- This file serves as input to MinIO systemd service. Use this file to add `MINIO_VOLUMES` with the correct paths, `MINIO_OPTS` to add MinIO server options like `certs-dir`, `address`. MinIO credentials can be `MINIO_ROOT_USER` and `MINIO_ROOT_PASSWORD` in this file as well.
- Run the command bellow to create the file with minio parameters.

```command
cat <<EOT >> /etc/default/minio
# Volume to be used for MinIO server.
MINIO_VOLUMES="/data"
# Use if you want to run MinIO on a custom port.
MINIO_OPTS="--address :9199"
# Root user for the server.
MINIO_ROOT_USER=spf-user
# Root secret for the server.
MINIO_ROOT_PASSWORD=spf-Password
# setting access key to access the interface web
MINIO_ACCESS_KEY="minio"
# setting secret key. Avoid using the value default from this tutorial.
MINIO_SECRET_KEY="miniostorage"

EOT
```

## Creating minio user to run the systemd

- creating the user with no shell login and change binary and data directory ownership

```command
useradd -r minio-user -s /sbin/nologin
chown minio-user:minio-user /usr/local/bin/minio
chown minio-user:minio-user /data
```

## Systemd service MinIO on Rocky Linux

- Systemd script is configured to run the binary from /usr/local/bin
- Create minio.service in /etc/systemd/system/

```command
[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio

[Service]
WorkingDirectory=/usr/local/

User=minio-user
Group=minio-user

EnvironmentFile=/etc/default/minio
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi"

ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES

# Let systemd restart this service always
Restart=always

# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536

# Disable timeout logic and wait until process is stopped
TimeoutStopSec=infinity
SendSIGKILL=no

[Install]
WantedBy=multi-user.target

# Built for ${project.name}-${project.version} (${project.name})
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"> Enable startup on boot  
</span>

```command
systemctl daemon-reload
systemctl enable minio
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Starting minio</span>

```command
systemctl start minio
```

[![image-1636415567865.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636415567865.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636415567865.png)

## Interface Web

[![image-1636416514806.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636416514806.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636416514806.png)

[![image-1636416589909.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636416589909.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636416589909.png)

## Reference link

[https://www.digitalocean.com/community/tutorials/how-to-set-up-an-object-storage-server-using-minio-on-ubuntu-18-04-pt](https://www.digitalocean.com/community/tutorials/how-to-set-up-an-object-storage-server-using-minio-on-ubuntu-18-04-pt)

[https://github.com/minio/minio](https://github.com/minio/minio)

# HOW TO INSTALL ROCKY LINUX 8



# HOW TO INSTALL MONGODB ON ROCKY LINUX

## Prerequisites

- A fresh server running Rocky Linux 8 with a minimum of 10 GB of free disk space
- A non-root user with sudo privileges configured on the server

## Update the System

Login to the system using root or sudo user depending on your privilege configuration, and update the system using the following command.

```command
sudo dnf update -y
```

## Installing MongoDB

The MongoDB package is not included in the default repositories for Rocky Linux 8 because it is not considered part of the "base" system. Thus, you need to add the repository containing the package before installing MongoDB.

MongoDB comes in two editions the community edition and the enterprise edition. The community edition is free while the enterprise edition offers additional features. This guide is for the community edition.

Run the following command to add the MongoDB Repository on your system.

```
cat > /etc/yum.repos.d/mongodb.repo << 'EOL'
[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
EOL
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Once the repository is enabled, run the following command to install the mongoDB community edition.</span>

```command
dnf update
dnf install -y mongodb-org
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Once the installation is complete, verify the version installed as follows.</span>

```command
mongod --version
```

[![image-1636410940818.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636410940818.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636410940818.png)

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">The MongoDB service doesn't start automatically after installation. You can verify this by running the command as follows.</span>

```command
systemctl status mongod
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">The output should be similar to that below:</span>

[![image-1636411003039.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636411003039.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636411003039.png)

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Since the service has not started, start it manually by running the following command.</span>

```command
systemctl start mongod
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">To enable MongoDB to automatically start on boot time, run the following command.</span>

```command
systemctl enable mongod
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">At this point, MongoDB has been installed and configured on the server. Verify the status of MongoDB service as follows.</span>

```command
systemctl status mongod
```

[![image-1636411097194.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636411097194.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636411097194.png)

# HOW TO INSTALL POSTGRESQL ON ROCKY LINUX

## Prerequisites

- An Rocky Linux system.
- A user with root or sudo privileges. This user will be used for installing new packages and make changes system-wide.

## Installing PostgreSQL on Rocky Linux

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">List out the available streams for the `postgresql` module using the `dnf` command:</span>

```
dnf module list postgresql
```

```
Output

[root@node02-postgresql ~]# dnf module list postgresql
Last metadata expiration check: 0:16:48 ago on Fri 07 Jun 2024 10:51:45 AM -03.
Rocky Linux 8 - AppStream
Name                           Stream                     Profiles                               Summary                                               
postgresql                     9.6                        client, server [d]                     PostgreSQL server and client module                   
postgresql                     10 [d]                     client, server [d]                     PostgreSQL server and client module                   
postgresql                     12                         client, server [d]                     PostgreSQL server and client module                   
postgresql                     13                         client, server [d]                     PostgreSQL server and client module                   
postgresql                     15                         client, server [d]                     PostgreSQL server and client module                   
postgresql                     16                         client, server [d]                     PostgreSQL server and client module                   

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
```

You can see in this output that there are four versions of PostgreSQL available from the **AppStream** repository: `9.6`, `10`, `12`, and `13`. The stream that provides Postgres version 10 is the default, as indicated by the `[d]` following it. To install that version, you could just run `sudo dnf install postgresql-server` and move on to the next step. However, even though version 10 is still maintained, this tutorial will install Postgres version 16.

To install PostgreSQL version 16, you must enable that version’s module stream. When you enable a module stream, you override the default stream and make all of the packages related to the enabled stream available on the system. Note that only one stream of any given module can be enabled on a system at the same time.

To enable the module stream for Postgres version 16, run the following command:

```
sudo dnf module enable postgresql:16
```

When prompted, press `y` and then `ENTER` to confirm that you want to enable the stream:

```
Output

[root@node02-postgresql ~]# dnf module enable postgresql:16
Last metadata expiration check: 0:16:59 ago on Fri 07 Jun 2024 10:51:45 AM -03.
Dependencies resolved.
=======================================================================================================================================================
 Package                             Architecture                       Version                              Repository                           Size
=======================================================================================================================================================
Enabling module streams:
 postgresql                                                             16                                                                            

Transaction Summary
=======================================================================================================================================================

Is this ok [y/N]: y
Complete!
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"> Install the latest version of PostgreSQL from the repository using the dnf command below.</span>

```command
dnf install postgresql-server.x86_64
```

[![image-1636411419853.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636411419853.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636411419853.png)

## PostgreSQL Database Initialization

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Next, after the PostgreSQL installation is complete, you must initialize the PostgreSQL configuration and then start and enable the PostgreSQL service.</span>

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">1. Execute the following command to initialize the PostgreSQL database configuration.</span>

```command
postgresql-setup --initdb --unit postgresql
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">2. After that, start and enable the PostgreSQL service using the command below.</span>

```command
sudo systemctl enable postgresql
sudo systemctl start postgresql
```

Now the PostgreSQL service is active and running, and it will run automatically on every boot.

3\. Now execute the command below to verify the PostgreSQL service.

```command
systemctl status postgresql
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">If your PostgreSQL service is running, you will see the green output such as </span>**"active(running)"**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"> as below. Otherwise, you will see the red output such as "</span>**failed**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">" following by the error message logs.</span>

[![image-1636411733930.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636411733930.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636411733930.png)

## Securing PostgreSQL Deployment

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">During the installation, PostgreSQL will create a new system user and database user name as "</span>**postgres**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">". And for this stage, you will be setting up a new password for the "</span>**postgres**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">" user, both for the </span>**system user**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"> and </span>**database user**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">.</span>  
  
<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">1. Change the password for default system user "</span>*postgres*<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">" using the following command.</span>

```command
passwd postgres
```

Now type the new password for the system user "*postgres*".

2\. Next, to change the password for the "*postgres*" database user, you must log in to the PostgreSQL shell.

First, log in as a system user "*postgres*" using the following command.

```command
su - postgres
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Now login to the PostgreSQL shell using the psql command below.</span>

```command
psql
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Execute the following query to create a new password for the default "</span>*postgres*<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">" database user.</span>

```command
ALTER USER postgres WITH PASSWORD 'strongpostgrespassword';
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Change the string 'strongpostgrespassword' to your own password. Now type exit and press "</span>**Ctrl+d**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">" to exit and log out from the '</span>*postgres*<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">' user shell.</span>

[![image-1636412051559.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636412051559.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636412051559.png)

## Change Authentication Method

By default, local PostgreSQL users will connect to the PostgreSQL shell using the 'peer' method. The peer authentication method will work only for local connections. In the development environment, you can use this type of authentication, but for production, consider using the password-based authentication method.

For this stage, you will learn how to change the default peer authentication method to password authentication using '**md5**'.<span class="ezoic-adpicker-ad" id="bkmrk--9"></span>

1\. First, log in to the PostgreSQL shell using the following command.

```command
sudo -u postgres psql
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Now execute the following query to check the location of the PostgreSQL configuration '</span>**pg\_hba.conf**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">'.</span>

```command
SHOW hba_file;
SHOW password_encryption;
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">You will see the output as below.</span>

[![image-1636412188727.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636412188727.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636412188727.png)

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">You will notice the PostgreSQL configuration "pg\_hba.conf" are located at the '</span>**/var/lib/pgsql/data**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">' directory, and the default password encryption for PostgreSQL on RHEL based operating system is '</span>**md5**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">'.</span>

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Now type '\\q' to exit and quit the PostgreSQL shell.</span>

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">2. Next, change the working directory to '**/var/lib/pgsql/data**' and edit the configuration '**pg\_hba.conf**' using nano editor.</span>

```command
cd /var/lib/pgsql/data/
vi pg_hba.conf
```

[![image-1636412445157.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636412445157.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636412445157.png)

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">At the bottom of the line, change the local authentication method to '</span>**md5**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">' as below.</span>

[![image-1636412520423.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636412520423.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636412520423.png)

Now press '**ESC**', type '**:wq**', and press "**Enter**" to save and exit.

Using this configuration, you will be prompted for the password to log in to the PostgreSQL shell.<span class="ezoic-adpicker-ad" id="bkmrk--10"></span>

3\. Next, apply the new configuration by restarting the PostgreSQL service using the following command.

```command
systemctl restart postgresql
```

Now every time you want to access the PostgreSQL shell, you must type the password for authentication.

4\. To make sure of the password authentication configuration, log in to the PostgreSQL shell using the following command.

```command
su - postgres
psql
```

Now you will be asked for a password for the default user '*postgres*'.

Type the password for the '*postgres*' database user and press '**Enter**'. If your password is correct, you will see the PostgreSQL shell as follows. Otherwise, you will see the '**FATAL**' error because the password is incorrect.

[![image-1636412705058.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636412705058.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636412705058.png)

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Additionally, you can use the one-line command to log in to the PostgreSQL shell as below.</span>

```command
# Log in as default "postgres" user
sudo -u postgres psql

# Log in as another user
sudo -u postgres psql -U username
```

## Creating New User and Database for your Application

At this stage, you will learn how to create a new user and database on PostgreSQL.

1\. Log in to the PostgreSQL shell by executing the command below.

```command
sudo -u postgres psql
```

Now type the password for PostgreSQL user '**postgres**'.

2\. Run the PostgreSQL query below to create a new user 'johndoe' with the password 'johndoestrongpassword' and give the user privileges for creating a new database and role.

```command
CREATE USER spf WITH 
CREATEDB
CREATEROLE
PASSWORD 'spfstrongpassword';
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">After that, verify the new user using the following query.</span>

```command
\du
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Now you will see the new user 'spf' with the list of roles '</span>**Create role**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">' and '</span>**Create DB**<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">' as below.</span>

[![image-1636412942826.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636412942826.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636412942826.png)

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">3. Next, to create a new user database on PostgreSQL, run the following query.</span>

```command
CREATE DATABASE spf OWNER spf;
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Now verify the new database using the following query.</span>

```command
\l
```

<span style="color: #474b51; font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">And you will see the new database 'spf' with the owner 'spf' as the screenshot below.</span>

[![image-1636413026643.png](https://documentacao.scielo.org/uploads/images/gallery/2021-11/scaled-1680-/image-1636413026643.png)](https://documentacao.scielo.org/uploads/images/gallery/2021-11/image-1636413026643.png)

## Reference link

[https://www.howtoforge.com/how-to-install-postgresql-on-rocky-linux/](https://www.howtoforge.com/how-to-install-postgresql-on-rocky-linux/)

[https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-rocky-linux-8](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-rocky-linux-8)

# HOW TO INSTALL SCIELO OPAC ON ROCKY LINUX

## Prerequisites

- An Rocky Linux system.
- A user with root or sudo privileges. This user will be used for installing new packages and make changes system-wide.
- Python 3.x (earlier version) and git command

## Getting the last version

- Dowloading the [newest release,](https://github.com/scieloorg/opac/releases) uncompress and move to the directory /usr/local/opac

```command
wget https://github.com/scieloorg/opac/archive/refs/tags/v3.4.51.tar.gz
tar -zxvf v3.4.51.tar.gz 
mv opac-3.4.51 /usr/local/opac
```

## Installing OPAC

- Create python environment and install using pip

```command
# Installing git command
dnf install git

cd /usr/local/opac
# Creating the environment
python3 -m venv .venv

# Activating the environment
source .venv/bin/activate

# Installing
pip install -U pip & pip install -r requirements.txt
```

## Configuring OPAC

- Copy the variable file default.py to local\_settings.py

```command
cd /usr/local/opac
cp opac/webapp/config/default.py  opac/webapp/config/local_settings.py
```

<table id="bkmrk-variable-de-entorno-"><tbody><tr><td style="width: 201px;">**Variable de entorno**

</td><td style="width: 375px;">**Descripción**

</td><td style="width: 233px;">**Valor predeterminado**

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_DEBUG\_MODE</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Habilita/deshabilita el modo DEBUG</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">False</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_CONFIG</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Archivo de configuración de la aplicación (consulte las instrucciones a continuación)</span>

</td><td style="width: 233px;"> </td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_COLLECTION</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Acrónimo de la colección</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">mex</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_MONGODB\_NAME</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Nombre de la base de datos MongoDB</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">opac</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_MONGODB\_HOST</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Host do MongoDB</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">localhost</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_MONGODB\_PORT</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Puerto de host MongoDB</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">27017</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_DATABASE\_DIR</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Directorio de almacenamiento base de SQLite</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">/tmp</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_DATABASE\_FILE</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Nombre de archivo SQLite</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">Opac.sqlite</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_DATABASE\_URI</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">URI da base SQLite</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">sqlite:////tmp/opac.sqlite</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_MEDIA\_ROOT</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Ruta absoluta de la carpeta que almacenará las imágenes registradas por los usuarios a través de la interfaz de administración</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">&lt;ruta&gt;/media</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_MEDIA\_URL</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">RUTA DE ACCESO DE LA URL para servir las imágenes</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">/media</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_MAIL\_SERVER</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Host del servidor de correo</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">localhost</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_MAIL\_PORT</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Puerto de host del servidor de correo</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">1025</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_SECRET\_KEY</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Clave necesaria para la seguridad de los formularios de solicitud (consulte las instrucciones a continuación)</span>

</td><td style="width: 233px;"> </td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_SSM\_SCHEME</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Protocolo de conexión del almacén de objetos</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">https</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_SSM\_DOMAIN</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Host do Object Store</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">ssm.scielo.org</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_SSM\_PORT</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Puerto de host de almacén de objetos</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">80</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_SSM\_XML\_URL\_REWRITE</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">¿Cambiará el esquema de URL + autoridad registrada en el artículo? Si es true, fuerce la búsqueda del artículo en la url 'OPAC\_SSM\_SCHEME + '://' + OPAC\_SSM\_DOMAIN + ':' + OPAC\_SSM\_PORT'. De lo contrario, carga la dirección URL registrada en el artículo</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">True</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_CACHE\_ENABLED</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Activa/desactiva la cache con Redis</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">True</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_CACHE\_DEFAULT\_TIMEOUT</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Duración de los objetos de la memoria caché en segundos</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">3600</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_CACHE\_REDIS\_HOST</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Host de Redis para cache</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">cache en redis</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_USE\_METRICS</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Activa/desactiva la integración con SciELO Analytics</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">False</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_METRICS\_URL</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">URL de SciELO Analytics</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">http://analytics.scielo.org</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_USE\_DIMENSIONS</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Activa/desactiva la integración de dimensiones</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">False</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_DIMENSIONS\_METRICS\_URL</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Dirección URL de dimensiones</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">https://badge.dimensions.ai/details/doi</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_USE\_PLUMX</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Activa/desactiva la integración con PlumX</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">False</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_PLUMX\_METRICS\_URL</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">URL de PlumX</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">https://plu.mx/scielo/a</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_USE\_ALTMETRIC</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Activa/desactiva la integración altmetric</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">False</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_ALTMETRIC\_METRICS\_URL</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Dirección URL de Altmetric</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">https://www.altmetric.com/details.php</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_AUDIT\_LOG\_NOTIFICATION\_ENABLED</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Activa/desactiva las notificaciones de informes de auditoría</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">True</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_AUDIT\_LOG\_NOTIFICATION\_RECIPIENTS</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Lista de correos electrónicos que deben recibir el informe de auditoría, separados por comas (",")</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">Lista vacía (ninguna)</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_SERVER\_NAME</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Nombre del servidor/IP</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">Vacío (ninguno)</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_SESSION\_COOKIE\_DOMAIN</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Dominio para cookie de sesión. Configura SESSION\_COOKIE\_DOMAIN</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">Valor del OPAC\_SERVER\_NAME</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_SESSION\_COOKIE\_HTTPONLY</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Habilita o deshabilita la cookie de sesión solo en HTTP. Configura SESSION\_COOKIE\_NAME</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">True</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_SESSION\_COOKIE\_NAME</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Nombre de la cookie de sesión. Configura SESSION\_COOKIE\_NAME</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">opac\_session</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_SESSION\_COOKIE\_PATH</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Ruta de acceso a la cookie de sesión. Configura SESSION\_COOKIE\_PATH</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">Ninguno, que es la raíz de la aplicación ("/")</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_SESSION\_COOKIE\_SECURE</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Establece si la cookie de sesión debe marcarse como segura. Conjuntos SESSION\_COOKIE\_SECURE</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">False</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_SESSION\_REFRESH\_EACH\_REQUEST</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Envío de la cookie en cada solicitud. Conjuntos SESSION\_REFRESH\_EACH\_REQUEST</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">False</span>

</td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_TWITTER\_ACCESS\_TOKEN</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Token de acceso de la cuenta de twitter</span>

</td><td style="width: 233px;"> </td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_TWITTER\_ACCESS\_TOKEN\_SECRET</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Secreto de token de acceso desde la cuenta de Twitter</span>

</td><td style="width: 233px;"> </td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_TWITTER\_CONSUMER\_KEY</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Cuenta de Twitter de clave de consumidor</span>

</td><td style="width: 233px;"> </td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_TWITTER\_CONSUMER\_SECRET</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Secreto del consumidor de la cuenta de Twitter</span>

</td><td style="width: 233px;"> </td></tr><tr><td style="width: 201px;"><span style="font-weight: 400;">OPAC\_TWITTER\_SCREEN\_NAME</span>

</td><td style="width: 375px;"><span style="font-weight: 400;">Nombre de pantalla de la cuenta de Twitter</span>

</td><td style="width: 233px;"><span style="font-weight: 400;">Red SciELO</span>

</td></tr></tbody></table>

# PRESERVAÇÃO DIGITAL

# COMO CONSULTAR O STATUS DE PRESERVAÇÃO DO PERIÓDICO

Desde 2016 o SciELO faz parte oficialmente da Rede [CARINIANA/LOCKSS](https://www.lockss.org/join-lockss/networks) de preservação. A rede CARINIANA é uma das agências de arquivamento reconhecida pela [ISSN International Centre](https://keepers.issn.org/keepers#global-lockss-network) ) juntamente com o CLOCKSS, Portico, LOCKSS e outros. O termo "Agência de Arquivamento" refere-se a uma organização ou iniciativa que está executando um programa para o arquivamento de longo prazo de periódicos eletrônicos e outros recursos contínuos e pode relatar sobre os materiais arquivados usando o ISSN. Cada agência que participa do [Keepers Registry](https://keepers.issn.org/) fornece regularmente ao ISSN International Center os metadados de seus acervos. Esses metadados são então incluídos no Registro ISSN que é a fonte de informação para o Portal ISSN.

##### CONSULTANDO O STATUS DE PRESERVAÇÃO

Para consultar o status de preservação de um periódico basta entrar no site https://keepers.issn.org/ e no campo "ALL, ISSN, Title".

[![image-1650998497854.png](https://documentacao.scielo.org/uploads/images/gallery/2022-04/scaled-1680-/image-1650998497854.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-04/image-1650998497854.png)

Digite o ISSN do periódico e clique no botão Search.

[![image-1650998539222.png](https://documentacao.scielo.org/uploads/images/gallery/2022-04/scaled-1680-/image-1650998539222.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-04/image-1650998539222.png)

  
Ao fazer a busca, vai aparecer o resultado com o nome do Periódico, basta clicar no Periódico com o termo Online. No exemplo abaixo, buscamos pelo periódico ABCD, veja que há dois resultados, clique em ABCD (São Paulo. Online).

[![image-1650998565608.png](https://documentacao.scielo.org/uploads/images/gallery/2022-04/scaled-1680-/image-1650998565608.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-04/image-1650998565608.png)

Clique na aba "Archival Status" para exibir o status de preservação.

[![image-1650998691916.png](https://documentacao.scielo.org/uploads/images/gallery/2022-04/scaled-1680-/image-1650998691916.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-04/image-1650998691916.png)

Segue o resultado:

[![image-1650998758504.png](https://documentacao.scielo.org/uploads/images/gallery/2022-04/scaled-1680-/image-1650998758504.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-04/image-1650998758504.png)

O status "In Progress" significa que o Publisher está realizando ainda a preservação de forma contínua.

# PLANO DE PRESERVAÇÃO REDE SCIELO

<div drawio-diagram="2454"><img src="https://documentacao.scielo.org/uploads/images/drawio/2023-09/drawing-6-1694440934.png" alt=""/></div>

### Política Relacionada

[Política de Preservação Digital do Programa SciELO](https://www.scielo.org/pt/sobre-o-scielo/preservacao-digital/)

### Objetivo

O plano de preservação da rede SciELO tem como objetivo básico preservar cada coleção da rede através da Rede de Preservação CARINIANA - LOCKSS. A fim de garantir a confidencialidade, integridade e disponibilidade do website da coleção e seu respectivo conteúdo ao longo do tempo.

### Escopo

Este plano de preservação digital se aplica a todos os membros da rede SciELO. Isso inclui a todos os recursos digitais inserido no website da coleção. Isso inclui documentos pdf, xml, html e imagens.

### Definições

- **Servidor**: é um computador ou dispositivo especializado que desempenha o papel central na gestão, organização e compartilhamento de recursos e serviços em uma rede de computadores. Esses servidores são projetados para fornecer funcionalidades específicas para os clientes ou dispositivos que estão conectados à rede.
- **Cluster de Preservação**: é uma configuração na qual dois ou mais computadores são interconectados para trabalhar juntos como uma única unidade, a fim de realizar tarefas computacionais complexas ou para melhorar o desempenho e a confiabilidade de determinadas aplicações. Essa configuração é usada principalmente em situações em que um único computador não é suficiente para lidar com a carga de trabalho exigida.
- **Rede de Preservação**: é uma estrutura ou colaboração organizada entre instituições, organizações ou entidades que compartilham recursos, conhecimentos e boas práticas relacionadas à preservação e conservação de recursos digitais, como documentos, arquivos digitais, imagens, vídeos e outros tipos de conteúdo digital. O principal objetivo de uma rede de preservação é garantir que esses recursos digitais sejam mantidos a longo prazo, preservando sua acessibilidade, autenticidade e integridade.
- **LOCKSS**: é um sistema de preservação digital descentralizado que foi desenvolvido para garantir a preservação de conteúdo digital, como periódicos acadêmicos e outros tipos de publicações online.
- **Unidade de Arquivamento**: é um espaço lógico dedicado ao armazenamento e organização de documentos, arquivos e outros tipos de materiais arquivístico. Uma UA no LOCKSS armazena o volume de um determinado periódico.
- **Backup**: refere-se ao processo de criar cópias de dados, arquivos ou sistemas de computador para fins de preservação e recuperação em caso de perda de dados, falha de hardware, erros humanos, ataques cibernéticos ou outros eventos adversos. Os backups são essenciais para garantir a disponibilidade e a integridade dos dados, bem como para a continuidade das operações de negócios.
- **The Keepers**: refere-se a uma organização ou iniciativa que está executando um programa para o arquivamento de longo prazo de periódicos eletrônicos e outros recursos contínuos e pode relatar sobre os materiais arquivados usando o ISSN.

### Papéis e Responsabilidades

- Gestor da Unidade de Infraestrutura SciELO Brasil: 
    - Adicionar novos servidores ao cluster da Rede de Preservação LOCKSS;
    - Adicionar novas unidades de arquivamento;
    - monitorar o estado de preservação dos volumes;
    - Enviar o relatório ao The Keepers para atualizar a base de periódicos preservados;
    - Notificar erros que envolva os servidores
- Gestor da coleção:   
    
    - Disponibilizar servidor para ser membro do cluster de preservação;
    - Garantir que o servidor esteja disponível e acessível no cluster de preservação;
    - Monitoramento da saúde do servidor;
    - Garantir backup do servidor

### Estratégia de Preservação

#### Participação da sub-rede de Preservação

Requisitos para participar:

- Cada membro da rede precisa se comprometer em configurar na sua rede um servidor para ser membro da rede de preservação. Segue a configuração: 
    - pelo o menos 500 Gigabytes de disco rígido;
    - 8 cpus;
    - 8 Gigabytes de memória RAM;
    - Conexão com a internet.
- Uma vez atendido o item acima, entrar em contato com a Unidade de Infraestrutura do SciELO Brasil (<infra@scielo.org>) solicitando a participação.
- O Gestor da Unidade de Infraestrutura do SciELO avaliará a inclusão.

#### Gerenciamento da sub-rede de Preservação

O SciELO Brasil será responsável por:

- Manter a sub-rede funcionando;
- Monitorar o estado do servidor;
- Adição mensal de novos volumes na preservação;
- Geração de relatórios mensais para o The Keepers atualizar o estado de preservação.

### Histórico de versões

<table border="1" id="bkmrk-data-vers%C3%A3o-descri%C3%A7%C3%A3" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 14.9583%;"></col><col style="width: 10.0468%;"></col><col style="width: 41.6273%;"></col><col style="width: 33.378%;"></col></colgroup><tbody><tr style="background-color: rgb(126, 140, 141);"><td>Data  
</td><td>Versão  
</td><td>Descrição  
</td><td>Autor</td></tr><tr><td>11/09/2023  
</td><td>1.0  
</td><td>Criação do documento.  
</td><td>Rondineli Saad  
</td></tr></tbody></table>

# MODELO DE AVALIAÇÃO E MONITORAMENTO DE OBJETOS DIGITAIS

<div drawio-diagram="2545"><img src="https://documentacao.scielo.org/uploads/images/drawio/2023-11/drawing-6-1701284248.png" alt=""/></div>

# IMPLEMENTAÇÃO DO MONITORAMENTO DE TAXA DE OBSOLESCÊNCIA DOS FORMATOS

## 1. Infraestrutura Base

**Banco de Dados de Formatos** Crie um repositório central para armazenar informações sobre formatos:

- Nome e extensão do formato
- Versão
- Especificações técnicas
- Status (ativo, obsoleto, em observação)
- Data de inclusão no sistema
- Ferramentas compatíveis
- Nível de risco de obsolescência

**Integração com Ferramentas de Identificação**

- **DROID**: Automatize varreduras regulares dos repositórios digitais para identificar formatos em uso
- **JHOVE**: Configure validações automáticas de integridade e conformidade dos arquivos
- Integre os resultados dessas ferramentas ao seu banco de dados central

## 2. Sistema de Monitoramento Automatizado

**Scripts de Auditoria Periódica**

```
Frequência: Mensal ou trimestral
Ações:
- Varredura completa do acervo digital
- Identificação de novos formatos
- Validação de formatos existentes
- Geração de relatórios comparativos
```

**Métricas a Coletar**

- Total de formatos únicos no acervo
- Formatos suportados vs. não suportados
- Distribuição de arquivos por formato
- Idade média dos formatos
- Formatos em risco de obsolescência

## 3. Processo de Revisão e Atualização

**Fluxo de Trabalho Sugerido:**

1. **Auditoria Automática** (mensal) 
    - Execução das ferramentas DROID/JHOVE
    - Consolidação dos dados no banco central
2. **Análise Técnica** (trimestral) 
    - Revisão de formatos não suportados
    - Avaliação de riscos de obsolescência
    - Identificação de necessidades de migração
3. **Revisão Estratégica** (anual) 
    - Atualização da política de formatos
    - Planejamento de migrações necessárias
    - Avaliação de novas tecnologias

## 4. Indicadores e Dashboards

**KPIs Principais:**

- Taxa de cobertura: (Formatos suportados / Total de formatos) × 100
- Taxa de crescimento de formatos: Variação percentual entre auditorias
- Índice de obsolescência: Percentual de arquivos em formatos de alto risco
- Tempo médio para inclusão de novos formatos

**Visualizações Recomendadas:**

- Gráfico de tendência temporal do número de formatos
- Mapa de calor de distribuição de formatos por coleção
- Alertas para formatos críticos
- Timeline de migrações realizadas e planejadas

## 5. Ferramentas e Tecnologias

**Para Implementação:**

- **Banco de dados**: PostgreSQL ou MongoDB para armazenar metadados de formatos
- **Orquestração**: Apache Airflow ou cron jobs para automatizar auditorias
- **Dashboards**: Grafana, Power BI ou Tableau para visualização
- **Alertas**: Sistema de notificações (email, Slack) para formatos críticos

**Ferramentas Open Source Recomendadas:**

- DROID (The National Archives, UK)
- JHOVE (Harvard University Library)
- Apache Tika (identificação de tipos de arquivo)
- PRONOM (registro de formatos de arquivo)

## 6. Documentação e Governança

- Crie uma política formal de preservação digital
- Documente procedimentos de auditoria
- Estabeleça critérios claros para avaliação de risco
- Defina responsáveis por cada etapa do processo
- Mantenha um registro histórico de todas as decisões

## 7. Plano de Ação Inicial

**Fase 1 (1-2 meses):** Levantamento inicial

- Inventário completo do acervo
- Instalação e configuração das ferramentas
- Criação do banco de dados de formatos

**Fase 2 (2-3 meses):** Automação

- Desenvolvimento de scripts de auditoria
- Configuração de processos automatizados
- Criação de dashboards básicos

**Fase 3 (Contínua):** Operação e melhoria

- Execução regular das auditorias
- Análise de tendências
- Refinamento do processo

Essa abordagem permite começar de forma simples e escalar conforme necessário, sempre mantendo visibilidade sobre o estado tecnológico do seu acervo digital.

# Implementação Prática com DROID e JHOVE

Vou mostrar como configurar e automatizar essas ferramentas:

## 1. DROID - Identificação de Formatos

### Instalação e Configuração

**Download e Setup:**

```
# Download do DROID
wget https://github.com/digital-preservation/droid/releases/download/6.9.9/droid-binary-6.9.9-bin.zip

# Descompactar
unzip droid-binary-6.9.9-bin.zip -d /opt/droid

# Tornar executável
chmod +x /opt/droid/droid.sh
```

### Uso via Interface Gráfica

1. Execute: `./droid.sh`
2. Crie um novo perfil
3. Adicione diretórios para varredura
4. Execute a análise
5. Exporte relatórios (CSV, PDF, DROID Report)

### Automação via Linha de Comando

**Script básico de varredura:**

```
#!/bin/bash
# scan_droid.sh

# Variáveis
DROID_HOME="/opt/droid"
REPOSITORY_PATH="/caminho/para/seu/repositorio"
OUTPUT_DIR="/var/droid/reports"
DATE=$(date +%Y%m%d_%H%M%S)
PROFILE_NAME="scan_${DATE}.droid"
REPORT_NAME="report_${DATE}.csv"

# Criar perfil e executar varredura
$DROID_HOME/droid.sh -a "$REPOSITORY_PATH" -p "$OUTPUT_DIR/$PROFILE_NAME"

# Gerar relatório CSV
$DROID_HOME/droid.sh -p "$OUTPUT_DIR/$PROFILE_NAME" -e "$OUTPUT_DIR/$REPORT_NAME"

# Gerar relatório detalhado
$DROID_HOME/droid.sh -p "$OUTPUT_DIR/$PROFILE_NAME" -r "$OUTPUT_DIR/detailed_${DATE}.pdf"

echo "Varredura concluída: $OUTPUT_DIR/$REPORT_NAME"
```

Tornar executável:

```
chmod +x scan_droid.sh
```

### Análise dos Resultados do DROID

**Script Python para processar relatórios CSV:**

```python
#!/usr/bin/env python3
# analyze_droid_report.py

import pandas as pd
import json
from datetime import datetime
from collections import Counter

def analyze_droid_report(csv_file):
    """Analisa relatório CSV do DROID"""
    
    # Ler CSV
    df = pd.read_csv(csv_file)
    
    # Análise de formatos
    formats = df['FORMAT_NAME'].dropna()
    format_counts = Counter(formats)
    
    # Análise por extensão
    extensions = df['EXT'].dropna()
    ext_counts = Counter(extensions)
    
    # Estatísticas gerais
    stats = {
        'data_analise': datetime.now().isoformat(),
        'total_arquivos': len(df),
        'total_formatos_unicos': len(format_counts),
        'total_extensoes_unicas': len(ext_counts),
        'top_10_formatos': dict(format_counts.most_common(10)),
        'top_10_extensoes': dict(ext_counts.most_common(10)),
        'arquivos_sem_identificacao': len(df[df['FORMAT_NAME'].isna()]),
        'tamanho_total_mb': df['SIZE'].sum() / (1024 * 1024)
    }
    
    # Identificar formatos em risco
    formatos_obsoletos = identify_obsolete_formats(format_counts)
    stats['formatos_obsoletos'] = formatos_obsoletos
    
    # Salvar análise
    output_file = f"analysis_{datetime.now().strftime('%Y%m%d_%H%M%S')}.json"
    with open(output_file, 'w') as f:
        json.dump(stats, f, indent=2)
    
    print(f"Análise salva em: {output_file}")
    return stats

def identify_obsolete_formats(format_counts):
    """Identifica formatos potencialmente obsoletos"""
    
    # Lista de formatos conhecidos como obsoletos ou em risco
    obsolete_keywords = [
        'WordPerfect', 'Lotus', 'dBase', 'PageMaker', 
        'Harvard Graphics', 'QuarkXPress'
    ]
    
    obsolete = {}
    for format_name, count in format_counts.items():
        for keyword in obsolete_keywords:
            if keyword.lower() in format_name.lower():
                obsolete[format_name] = count
                break
    
    return obsolete

if __name__ == "__main__":
    import sys
    if len(sys.argv) < 2:
        print("Uso: python analyze_droid_report.py <arquivo.csv>")
        sys.exit(1)
    
    analyze_droid_report(sys.argv[1])
```

## 2. JHOVE - Validação de Integridade

### Instalação

```
# Download do JHOVE
wget http://software.openpreservation.org/rel/jhove-latest.jar

# Configurar PATH
export JHOVE_HOME=/opt/jhove
export PATH=$PATH:$JHOVE_HOME/bin
```

Script de Validação Automatizada

```
#!/bin/bash
# validate_jhove.sh

JHOVE_HOME="/opt/jhove"
REPOSITORY_PATH="/caminho/para/seu/repositorio"
OUTPUT_DIR="/var/jhove/reports"
DATE=$(date +%Y%m%d_%H%M%S)
REPORT_FILE="$OUTPUT_DIR/jhove_report_${DATE}.xml"

# Criar diretório de saída
mkdir -p "$OUTPUT_DIR"

# Executar JHOVE recursivamente
$JHOVE_HOME/bin/jhove -h XML -o "$REPORT_FILE" -kr "$REPOSITORY_PATH"

echo "Validação concluída: $REPORT_FILE"

# Análise básica do relatório
grep -c "Status: Well-Formed and valid" "$REPORT_FILE" > "$OUTPUT_DIR/valid_count_${DATE}.txt"
grep -c "Status: Not well-formed" "$REPORT_FILE" > "$OUTPUT_DIR/invalid_count_${DATE}.txt"
```

Script Python para Análise do JHOVE

```python
#!/usr/bin/env python3
# analyze_jhove_report.py

import xml.etree.ElementTree as ET
import json
from datetime import datetime
from collections import defaultdict

def analyze_jhove_report(xml_file):
    """Analisa relatório XML do JHOVE"""
    
    tree = ET.parse(xml_file)
    root = tree.getroot()
    
    # Namespace do JHOVE
    ns = {'jhove': 'http://hul.harvard.edu/ois/xml/ns/jhove'}
    
    results = {
        'data_analise': datetime.now().isoformat(),
        'total_arquivos': 0,
        'validos': 0,
        'invalidos': 0,
        'bem_formados': 0,
        'erros_por_formato': defaultdict(list),
        'formatos_analisados': defaultdict(int)
    }
    
    # Processar cada arquivo
    for repInfo in root.findall('.//jhove:repInfo', ns):
        results['total_arquivos'] += 1
        
        # Obter status
        status = repInfo.find('.//jhove:status', ns)
        formato = repInfo.find('.//jhove:format', ns)
        filepath = repInfo.get('uri', 'unknown')
        
        if status is not None:
            status_text = status.text
            
            if 'valid' in status_text.lower():
                results['validos'] += 1
            else:
                results['invalidos'] += 1
                
                # Coletar mensagens de erro
                messages = repInfo.findall('.//jhove:message', ns)
                for msg in messages:
                    error_msg = msg.text
                    formato_nome = formato.text if formato is not None else 'unknown'
                    results['erros_por_formato'][formato_nome].append({
                        'arquivo': filepath,
                        'erro': error_msg
                    })
            
            if 'well-formed' in status_text.lower():
                results['bem_formados'] += 1
        
        # Contar formatos
        if formato is not None:
            results['formatos_analisados'][formato.text] += 1
    
    # Converter defaultdict para dict normal
    results['erros_por_formato'] = dict(results['erros_por_formato'])
    results['formatos_analisados'] = dict(results['formatos_analisados'])
    
    # Calcular percentuais
    if results['total_arquivos'] > 0:
        results['percentual_validos'] = (results['validos'] / results['total_arquivos']) * 100
        results['percentual_invalidos'] = (results['invalidos'] / results['total_arquivos']) * 100
    
    # Salvar análise
    output_file = f"jhove_analysis_{datetime.now().strftime('%Y%m%d_%H%M%S')}.json"
    with open(output_file, 'w') as f:
        json.dump(results, f, indent=2)
    
    print(f"Análise JHOVE salva em: {output_file}")
    print(f"Total de arquivos: {results['total_arquivos']}")
    print(f"Válidos: {results['validos']} ({results.get('percentual_validos', 0):.2f}%)")
    print(f"Inválidos: {results['invalidos']} ({results.get('percentual_invalidos', 0):.2f}%)")
    
    return results

if __name__ == "__main__":
    import sys
    if len(sys.argv) < 2:
        print("Uso: python analyze_jhove_report.py <arquivo.xml>")
        sys.exit(1)
    
    analyze_jhove_report(sys.argv[1])
```

## 3. Integração e Automação Completa

### Script Master de Orquestração

```
#!/bin/bash
# master_preservation_scan.sh

set -e

# Configurações
BASE_DIR="/var/preservation"
REPOSITORY="/caminho/para/repositorio"
DROID_SCRIPT="/opt/scripts/scan_droid.sh"
JHOVE_SCRIPT="/opt/scripts/validate_jhove.sh"
PYTHON_ANALYZE="/opt/scripts/analyze_droid_report.py"
JHOVE_ANALYZE="/opt/scripts/analyze_jhove_report.py"
LOG_FILE="$BASE_DIR/logs/scan_$(date +%Y%m%d_%H%M%S).log"

# Criar estrutura de diretórios
mkdir -p "$BASE_DIR"/{logs,reports,droid,jhove,database}

echo "=== Iniciando Varredura de Preservação Digital ===" | tee -a "$LOG_FILE"
echo "Data: $(date)" | tee -a "$LOG_FILE"

# 1. Executar DROID
echo "--- Executando DROID ---" | tee -a "$LOG_FILE"
$DROID_SCRIPT 2>&1 | tee -a "$LOG_FILE"

# Encontrar último relatório DROID
LATEST_DROID=$(ls -t /var/droid/reports/report_*.csv | head -1)

# 2. Analisar relatório DROID
echo "--- Analisando relatório DROID ---" | tee -a "$LOG_FILE"
python3 $PYTHON_ANALYZE "$LATEST_DROID" 2>&1 | tee -a "$LOG_FILE"

# 3. Executar JHOVE
echo "--- Executando JHOVE ---" | tee -a "$LOG_FILE"
$JHOVE_SCRIPT 2>&1 | tee -a "$LOG_FILE"

# Encontrar último relatório JHOVE
LATEST_JHOVE=$(ls -t /var/jhove/reports/jhove_report_*.xml | head -1)

# 4. Analisar relatório JHOVE
echo "--- Analisando relatório JHOVE ---" | tee -a "$LOG_FILE"
python3 $JHOVE_ANALYZE "$LATEST_JHOVE" 2>&1 | tee -a "$LOG_FILE"

# 5. Consolidar resultados
echo "--- Consolidando resultados ---" | tee -a "$LOG_FILE"
python3 /opt/scripts/consolidate_reports.py 2>&1 | tee -a "$LOG_FILE"

echo "=== Varredura Concluída ===" | tee -a "$LOG_FILE"
```

Script de Consolidação

```python
#!/usr/bin/env python3
# consolidate_reports.py

import json
import glob
from datetime import datetime
import sqlite3

def consolidate_reports():
    """Consolida análises do DROID e JHOVE em banco de dados"""
    
    # Conectar ao banco de dados
    conn = sqlite3.connect('/var/preservation/database/preservation.db')
    cursor = conn.cursor()
    
    # Criar tabelas se não existirem
    cursor.execute('''
        CREATE TABLE IF NOT EXISTS scans (
            id INTEGER PRIMARY KEY AUTOINCREMENT,
            data_scan TIMESTAMP,
            total_arquivos INTEGER,
            total_formatos INTEGER,
            arquivos_validos INTEGER,
            arquivos_invalidos INTEGER,
            tamanho_total_mb REAL
        )
    ''')
    
    cursor.execute('''
        CREATE TABLE IF NOT EXISTS formatos (
            id INTEGER PRIMARY KEY AUTOINCREMENT,
            scan_id INTEGER,
            nome_formato TEXT,
            quantidade INTEGER,
            FOREIGN KEY (scan_id) REFERENCES scans(id)
        )
    ''')
    
    # Encontrar últimas análises
    latest_droid = max(glob.glob('analysis_*.json'), key=lambda x: x)
    latest_jhove = max(glob.glob('jhove_analysis_*.json'), key=lambda x: x)
    
    # Carregar dados
    with open(latest_droid) as f:
        droid_data = json.load(f)
    
    with open(latest_jhove) as f:
        jhove_data = json.load(f)
    
    # Inserir scan
    cursor.execute('''
        INSERT INTO scans (data_scan, total_arquivos, total_formatos, 
                          arquivos_validos, arquivos_invalidos, tamanho_total_mb)
        VALUES (?, ?, ?, ?, ?, ?)
    ''', (
        datetime.now(),
        droid_data['total_arquivos'],
        droid_data['total_formatos_unicos'],
        jhove_data['validos'],
        jhove_data['invalidos'],
        droid_data['tamanho_total_mb']
    ))
    
    scan_id = cursor.lastrowid
    
    # Inserir formatos
    for formato, qtd in droid_data['top_10_formatos'].items():
        cursor.execute('''
            INSERT INTO formatos (scan_id, nome_formato, quantidade)
            VALUES (?, ?, ?)
        ''', (scan_id, formato, qtd))
    
    conn.commit()
    conn.close()
    
    print(f"Dados consolidados no banco de dados (Scan ID: {scan_id})")

if __name__ == "__main__":
    consolidate_reports()
```

4\. Agendamento com Cron

```
# Editar crontab
crontab -e

# Adicionar linha para execução mensal (dia 1 às 2h da manhã)
0 2 1 * * /opt/scripts/master_preservation_scan.sh

# Ou para execução semanal (toda segunda às 3h da manhã)
0 3 * * 1 /opt/scripts/master_preservation_scan.sh
```

5\. Dashboard de Visualização

```python
#!/usr/bin/env python3
# generate_dashboard.py

import sqlite3
import matplotlib.pyplot as plt
import pandas as pd
from datetime import datetime

def generate_dashboard():
    """Gera dashboard com métricas de preservação"""
    
    conn = sqlite3.connect('/var/preservation/database/preservation.db')
    
    # Evolução temporal
    df_scans = pd.read_sql_query('''
        SELECT data_scan, total_formatos, arquivos_validos, 
               arquivos_invalidos, tamanho_total_mb
        FROM scans
        ORDER BY data_scan
    ''', conn)
    
    # Criar gráficos
    fig, axes = plt.subplots(2, 2, figsize=(15, 10))
    
    # Gráfico 1: Evolução de formatos
    axes[0, 0].plot(df_scans['data_scan'], df_scans['total_formatos'], marker='o')
    axes[0, 0].set_title('Evolução do Número de Formatos')
    axes[0, 0].set_xlabel('Data')
    axes[0, 0].set_ylabel('Total de Formatos')
    axes[0, 0].grid(True)
    
    # Gráfico 2: Validade dos arquivos
    axes[0, 1].plot(df_scans['data_scan'], df_scans['arquivos_validos'], 
                    label='Válidos', marker='o')
    axes[0, 1].plot(df_scans['data_scan'], df_scans['arquivos_invalidos'], 
                    label='Inválidos', marker='x')
    axes[0, 1].set_title('Integridade dos Arquivos')
    axes[0, 1].set_xlabel('Data')
    axes[0, 1].set_ylabel('Quantidade')
    axes[0, 1].legend()
    axes[0, 1].grid(True)
    
    # Gráfico 3: Top formatos do último scan
    df_formatos = pd.read_sql_query('''
        SELECT nome_formato, quantidade
        FROM formatos
        WHERE scan_id = (SELECT MAX(id) FROM scans)
        ORDER BY quantidade DESC
        LIMIT 10
    ''', conn)
    
    axes[1, 0].barh(df_formatos['nome_formato'], df_formatos['quantidade'])
    axes[1, 0].set_title('Top 10 Formatos (Último Scan)')
    axes[1, 0].set_xlabel('Quantidade')
    
    # Gráfico 4: Tamanho total
    axes[1, 1].plot(df_scans['data_scan'], df_scans['tamanho_total_mb'], 
                    marker='o', color='green')
    axes[1, 1].set_title('Evolução do Tamanho Total (MB)')
    axes[1, 1].set_xlabel('Data')
    axes[1, 1].set_ylabel('Tamanho (MB)')
    axes[1, 1].grid(True)
    
    plt.tight_layout()
    plt.savefig(f'/var/preservation/reports/dashboard_{datetime.now().strftime("%Y%m%d")}.png', 
                dpi=300)
    print("Dashboard gerado com sucesso!")
    
    conn.close()

if __name__ == "__main__":
    generate_dashboard()
```

# Lista de Formatos Obsoletos e em Risco baseada no PRONOM

1\. Script para Consultar e Classificar Formatos PRONOM

```python
#!/usr/bin/env python3
# pronom_obsolescence_checker.py

import requests
import json
import csv
from datetime import datetime
from typing import Dict, List
import xml.etree.ElementTree as ET

class PRONOMObsolescenceChecker:
    """
    Consulta o registro PRONOM e classifica formatos por risco de obsolescência
    """
    
    def __init__(self):
        self.base_url = "https://www.nationalarchives.gov.uk/PRONOM"
        self.api_url = "https://www.nationalarchives.gov.uk/pronom"
        
        # Categorias de risco
        self.risk_categories = {
            'CRÍTICO': [],
            'ALTO': [],
            'MÉDIO': [],
            'BAIXO': [],
            'MÍNIMO': []
        }
        
        # Palavras-chave para classificação
        self.obsolete_keywords = [
            'obsolete', 'deprecated', 'discontinued', 'legacy',
            'superseded', 'replaced', 'outdated', 'no longer'
        ]
        
        self.high_risk_vendors = [
            'WordPerfect', 'Lotus', 'Corel', 'Borland', 'Novell',
            'PageMaker', 'Ventura', 'QuarkXPress', 'FrameMaker',
            'Harvard Graphics', 'Aldus', 'Claris'
        ]
        
        self.proprietary_vendors = [
            'Microsoft', 'Adobe', 'Apple', 'Autodesk'
        ]
    
    def load_pronom_database(self):
        """
        Carrega lista de formatos do PRONOM
        """
        formats_database = self._get_known_formats_database()
        return formats_database
    
    def _get_known_formats_database(self) -> List[Dict]:
        """
        Base de dados de formatos conhecidos com classificação de risco
        Baseado no PRONOM Registry
        """
        
        formats = [
            # FORMATOS DE ALTO RISCO / OBSOLETOS
            {
                'puid': 'x-fmt/44',
                'name': 'WordPerfect Document',
                'version': '5.x',
                'extension': ['wpd', 'wp', 'wp5'],
                'risk_level': 'CRÍTICO',
                'vendor': 'WordPerfect Corporation',
                'reason': 'Formato proprietário descontinuado, suporte limitado',
                'migration_target': 'PDF/A, DOCX, ODT'
            },
            {
                'puid': 'x-fmt/45',
                'name': 'WordPerfect Document',
                'version': '6.x',
                'extension': ['wpd', 'wp6'],
                'risk_level': 'ALTO',
                'vendor': 'Corel',
                'reason': 'Formato proprietário com suporte declinante',
                'migration_target': 'PDF/A, DOCX, ODT'
            },
            {
                'puid': 'x-fmt/274',
                'name': 'Lotus 1-2-3 Worksheet',
                'version': '2-5',
                'extension': ['wk1', 'wk3', 'wk4', 'wks'],
                'risk_level': 'CRÍTICO',
                'vendor': 'IBM/Lotus',
                'reason': 'Software descontinuado, formato obsoleto',
                'migration_target': 'XLSX, ODS, CSV'
            },
            {
                'puid': 'fmt/341',
                'name': 'dBase Database',
                'version': 'III-V',
                'extension': ['dbf'],
                'risk_level': 'ALTO',
                'vendor': 'dBase LLC',
                'reason': 'Formato legado com suporte limitado',
                'migration_target': 'SQLite, CSV, XLSX'
            },
            {
                'puid': 'fmt/467',
                'name': 'Harvard Graphics Presentation',
                'version': '2.x-3.x',
                'extension': ['ch3', 'sho'],
                'risk_level': 'CRÍTICO',
                'vendor': 'Software Publishing Corporation',
                'reason': 'Software descontinuado em 2001',
                'migration_target': 'PDF/A, PPTX, ODP'
            },
            {
                'puid': 'x-fmt/88',
                'name': 'PageMaker Document',
                'version': '6.x-7.x',
                'extension': ['pmd', 'pm6', 'p65'],
                'risk_level': 'ALTO',
                'vendor': 'Adobe (descontinuado)',
                'reason': 'Substituído pelo InDesign em 2004',
                'migration_target': 'INDD, PDF/A'
            },
            {
                'puid': 'fmt/1214',
                'name': 'Ventura Publisher Document',
                'version': '4.x-10.x',
                'extension': ['vp'],
                'risk_level': 'CRÍTICO',
                'vendor': 'Corel (descontinuado)',
                'reason': 'Descontinuado em 2002',
                'migration_target': 'PDF/A, INDD'
            },
            {
                'puid': 'fmt/998',
                'name': 'QuarkXPress Document',
                'version': '3.x-4.x',
                'extension': ['qxd'],
                'risk_level': 'MÉDIO',
                'vendor': 'Quark',
                'reason': 'Versões antigas com compatibilidade limitada',
                'migration_target': 'Versão atual do QXD, PDF/A, INDD'
            },
            
            # FORMATOS DE MÉDIO RISCO
            {
                'puid': 'fmt/39',
                'name': 'Microsoft Word Document',
                'version': '97-2003',
                'extension': ['doc'],
                'risk_level': 'MÉDIO',
                'vendor': 'Microsoft',
                'reason': 'Formato legado, substituído por DOCX',
                'migration_target': 'DOCX, PDF/A, ODT'
            },
            {
                'puid': 'fmt/61',
                'name': 'Microsoft Excel Spreadsheet',
                'version': '97-2003',
                'extension': ['xls'],
                'risk_level': 'MÉDIO',
                'vendor': 'Microsoft',
                'reason': 'Formato legado, substituído por XLSX',
                'migration_target': 'XLSX, ODS, CSV'
            },
            {
                'puid': 'fmt/126',
                'name': 'Microsoft PowerPoint Presentation',
                'version': '97-2003',
                'extension': ['ppt'],
                'risk_level': 'MÉDIO',
                'vendor': 'Microsoft',
                'reason': 'Formato legado, substituído por PPTX',
                'migration_target': 'PPTX, ODP, PDF/A'
            },
            {
                'puid': 'fmt/101',
                'name': 'Adobe Photoshop',
                'version': '3.x-6.x',
                'extension': ['psd'],
                'risk_level': 'MÉDIO',
                'vendor': 'Adobe',
                'reason': 'Versões antigas com recursos limitados',
                'migration_target': 'PSD atual, TIFF, PNG'
            },
            {
                'puid': 'fmt/124',
                'name': 'Macromedia Flash',
                'version': 'SWF',
                'extension': ['swf'],
                'risk_level': 'CRÍTICO',
                'vendor': 'Adobe (descontinuado)',
                'reason': 'Flash Player descontinuado em 2020',
                'migration_target': 'HTML5, MP4, WebM'
            },
            {
                'puid': 'fmt/175',
                'name': 'Windows Media Video',
                'version': '7-9',
                'extension': ['wmv'],
                'risk_level': 'MÉDIO',
                'vendor': 'Microsoft',
                'reason': 'Formato proprietário com suporte declinante',
                'migration_target': 'MP4, WebM, MOV'
            },
            {
                'puid': 'fmt/134',
                'name': 'RealMedia',
                'version': 'RM, RMVB',
                'extension': ['rm', 'rmvb'],
                'risk_level': 'ALTO',
                'vendor': 'RealNetworks',
                'reason': 'Formato obsoleto, software descontinuado',
                'migration_target': 'MP4, WebM'
            },
            
            # FORMATOS DE BAIXO RISCO
            {
                'puid': 'fmt/412',
                'name': 'Microsoft Word Document',
                'version': '2007-2019 (OOXML)',
                'extension': ['docx'],
                'risk_level': 'BAIXO',
                'vendor': 'Microsoft',
                'reason': 'Formato moderno e amplamente suportado',
                'migration_target': 'PDF/A para preservação de longo prazo'
            },
            {
                'puid': 'fmt/214',
                'name': 'Microsoft Excel Spreadsheet',
                'version': '2007-2019 (OOXML)',
                'extension': ['xlsx'],
                'risk_level': 'BAIXO',
                'vendor': 'Microsoft',
                'reason': 'Formato moderno e amplamente suportado',
                'migration_target': 'ODS, CSV para preservação'
            },
            {
                'puid': 'fmt/215',
                'name': 'Microsoft PowerPoint Presentation',
                'version': '2007-2019 (OOXML)',
                'extension': ['pptx'],
                'risk_level': 'BAIXO',
                'vendor': 'Microsoft',
                'reason': 'Formato moderno e amplamente suportado',
                'migration_target': 'PDF/A para preservação'
            },
            
            # FORMATOS DE RISCO MÍNIMO
            {
                'puid': 'fmt/95',
                'name': 'PDF/A',
                'version': '1a, 1b, 2, 3',
                'extension': ['pdf'],
                'risk_level': 'MÍNIMO',
                'vendor': 'ISO Standard',
                'reason': 'Padrão aberto para preservação digital',
                'migration_target': 'N/A - formato de preservação'
            },
            {
                'puid': 'fmt/291',
                'name': 'OpenDocument Text',
                'version': '1.x',
                'extension': ['odt'],
                'risk_level': 'MÍNIMO',
                'vendor': 'OASIS Standard',
                'reason': 'Padrão aberto ISO/IEC 26300',
                'migration_target': 'PDF/A para preservação'
            },
            {
                'puid': 'fmt/294',
                'name': 'OpenDocument Spreadsheet',
                'version': '1.x',
                'extension': ['ods'],
                'risk_level': 'MÍNIMO',
                'vendor': 'OASIS Standard',
                'reason': 'Padrão aberto ISO/IEC 26300',
                'migration_target': 'CSV para dados tabulares simples'
            },
            {
                'puid': 'fmt/295',
                'name': 'OpenDocument Presentation',
                'version': '1.x',
                'extension': ['odp'],
                'risk_level': 'MÍNIMO',
                'vendor': 'OASIS Standard',
                'reason': 'Padrão aberto ISO/IEC 26300',
                'migration_target': 'PDF/A para preservação'
            },
            {
                'puid': 'x-fmt/18',
                'name': 'Plain Text',
                'version': 'UTF-8',
                'extension': ['txt'],
                'risk_level': 'MÍNIMO',
                'vendor': 'Unicode Consortium',
                'reason': 'Formato universal e simples',
                'migration_target': 'N/A'
            },
            {
                'puid': 'x-fmt/384',
                'name': 'Comma Separated Values',
                'version': 'RFC 4180',
                'extension': ['csv'],
                'risk_level': 'MÍNIMO',
                'vendor': 'IETF Standard',
                'reason': 'Formato aberto e universal',
                'migration_target': 'N/A'
            },
            {
                'puid': 'fmt/11',
                'name': 'Portable Network Graphics',
                'version': '1.x',
                'extension': ['png'],
                'risk_level': 'MÍNIMO',
                'vendor': 'W3C Standard',
                'reason': 'Formato aberto amplamente suportado',
                'migration_target': 'N/A'
            },
            {
                'puid': 'fmt/353',
                'name': 'JPEG 2000',
                'version': 'JP2',
                'extension': ['jp2'],
                'risk_level': 'BAIXO',
                'vendor': 'ISO/IEC Standard',
                'reason': 'Padrão aberto para imagens de alta qualidade',
                'migration_target': 'PNG, TIFF para preservação'
            },
            {
                'puid': 'fmt/353',
                'name': 'TIFF',
                'version': '6.0',
                'extension': ['tif', 'tiff'],
                'risk_level': 'MÍNIMO',
                'vendor': 'Adobe (padrão aberto)',
                'reason': 'Padrão de facto para preservação de imagens',
                'migration_target': 'N/A'
            },
            {
                'puid': 'fmt/199',
                'name': 'MPEG-4',
                'version': 'Part 14',
                'extension': ['mp4'],
                'risk_level': 'BAIXO',
                'vendor': 'ISO/IEC Standard',
                'reason': 'Padrão aberto amplamente suportado',
                'migration_target': 'N/A'
            },
            {
                'puid': 'fmt/134',
                'name': 'WAV',
                'version': 'PCM',
                'extension': ['wav'],
                'risk_level': 'MÍNIMO',
                'vendor': 'Microsoft/IBM',
                'reason': 'Formato não comprimido padrão',
                'migration_target': 'FLAC para compressão sem perdas'
            },
            {
                'puid': 'fmt/279',
                'name': 'FLAC',
                'version': '1.x',
                'extension': ['flac'],
                'risk_level': 'MÍNIMO',
                'vendor': 'Xiph.Org (código aberto)',
                'reason': 'Código aberto, compressão sem perdas',
                'migration_target': 'N/A'
            },
            {
                'puid': 'fmt/134',
                'name': 'MP3',
                'version': 'MPEG-1/2 Layer III',
                'extension': ['mp3'],
                'risk_level': 'BAIXO',
                'vendor': 'ISO/IEC Standard',
                'reason': 'Amplamente suportado, mas com perdas',
                'migration_target': 'FLAC, WAV para preservação'
            },
            {
                'puid': 'x-fmt/263',
                'name': 'ZIP',
                'version': '2.0',
                'extension': ['zip'],
                'risk_level': 'BAIXO',
                'vendor': 'PKWARE',
                'reason': 'Amplamente suportado',
                'migration_target': 'TAR.GZ, 7Z para melhor compressão'
            },
            {
                'puid': 'x-fmt/266',
                'name': 'RAR',
                'version': '4.x-5.x',
                'extension': ['rar'],
                'risk_level': 'MÉDIO',
                'vendor': 'RARlab (proprietário)',
                'reason': 'Formato proprietário',
                'migration_target': 'ZIP, 7Z, TAR.GZ'
            },
            {
                'puid': 'fmt/471',
                'name': 'HTML',
                'version': '5',
                'extension': ['html', 'htm'],
                'risk_level': 'MÍNIMO',
                'vendor': 'W3C Standard',
                'reason': 'Padrão web atual',
                'migration_target': 'PDF/A para preservação'
            },
            {
                'puid': 'fmt/817',
                'name': 'EPUB',
                'version': '3.x',
                'extension': ['epub'],
                'risk_level': 'BAIXO',
                'vendor': 'IDPF/W3C Standard',
                'reason': 'Padrão aberto para e-books',
                'migration_target': 'PDF/A para preservação'
            },
            {
                'puid': 'fmt/24',
                'name': 'AutoCAD Drawing',
                'version': 'DWG R14-2000',
                'extension': ['dwg'],
                'risk_level': 'MÉDIO',
                'vendor': 'Autodesk (proprietário)',
                'reason': 'Formato proprietário, versões antigas',
                'migration_target': 'DWG atual, DXF, PDF/A'
            },
            {
                'puid': 'fmt/64',
                'name': 'AutoCAD Drawing Exchange',
                'version': 'DXF',
                'extension': ['dxf'],
                'risk_level': 'BAIXO',
                'vendor': 'Autodesk',
                'reason': 'Formato de intercâmbio documentado',
                'migration_target': 'PDF/A para preservação'
            },
        ]
        
        return formats
    
    def classify_formats(self):
        """Classifica formatos por nível de risco"""
        formats = self.load_pronom_database()
        
        for fmt in formats:
            risk_level = fmt['risk_level']
            self.risk_categories[risk_level].append(fmt)
        
        return self.risk_categories
    
    def export_to_json(self, filename='pronom_obsolescence_list.json'):
        """Exporta lista para JSON"""
        categories = self.classify_formats()
        
        output = {
            'metadata': {
                'generated_date': datetime.now().isoformat(),
                'source': 'PRONOM Registry',
                'total_formats': sum(len(v) for v in categories.values())
            },
            'risk_categories': categories
        }
        
        with open(filename, 'w', encoding='utf-8') as f:
            json.dump(output, f, indent=2, ensure_ascii=False)
        
        print(f"Lista exportada para: {filename}")
        return filename
    
    def export_to_csv(self, filename='pronom_obsolescence_list.csv'):
        """Exporta lista para CSV"""
        categories = self.classify_formats()
        
        with open(filename, 'w', newline='', encoding='utf-8') as f:
            writer = csv.writer(f)
            writer.writerow([
                'PUID', 'Nome', 'Versão', 'Extensões', 'Nível de Risco',
                'Fornecedor', 'Razão', 'Formato de Migração'
            ])
            
            for risk_level, formats in categories.items():
                for fmt in formats:
                    writer.writerow([
                        fmt['puid'],
                        fmt['name'],
                        fmt['version'],
                        ', '.join(fmt['extension']),
                        risk_level,
                        fmt['vendor'],
                        fmt['reason'],
                        fmt['migration_target']
                    ])
        
        print(f"Lista exportada para: {filename}")
        return filename
    
    def generate_markdown_report(self, filename='pronom_obsolescence_report.md'):
        """Gera relatório em Markdown"""
        categories = self.classify_formats()
        
        with open(filename, 'w', encoding='utf-8') as f:
            f.write("# Lista de Formatos - Risco de Obsolescência\n\n")
            f.write(f"**Data de Geração:** {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n\n")
            f.write(f"**Fonte:** PRONOM Registry (The National Archives, UK)\n\n")
            f.write("---\n\n")
            
            risk_order = ['CRÍTICO', 'ALTO', 'MÉDIO', 'BAIXO', 'MÍNIMO']
            
            for risk_level in risk_order:
                formats = categories[risk_level]
                f.write(f"## {risk_level} RISCO ({len(formats)} formatos)\n\n")
                
                for fmt in formats:
                    f.write(f"### {fmt['name']} (v{fmt['version']})\n\n")
                    f.write(f"- **PUID:** {fmt['puid']}\n")
                    f.write(f"- **Extensões:** {', '.join(fmt['extension'])}\n")
                    f.write(f"- **Fornecedor:** {fmt['vendor']}\n")
                    f.write(f"- **Razão:** {fmt['reason']}\n")
                    f.write(f"- **Migração recomendada:** {fmt['migration_target']}\n\n")
                
                f.write("---\n\n")
        
        print(f"Relatório gerado: {filename}")
        return filename
    
    def get_statistics(self):
        """Retorna estatísticas sobre os formatos"""
        categories = self.classify_formats()
        
        stats = {
            'total_formats': sum(len(v) for v in categories.values()),
            'by_risk_level': {k: len(v) for k, v in categories.items()},
            'critical_extensions': [],
            'high_risk_extensions': []
        }
        
        for fmt in categories['CRÍTICO']:
            stats['critical_extensions'].extend(fmt['extension'])
        
        for fmt in categories['ALTO']:
            stats['high_risk_extensions'].extend(fmt['extension'])
        
        return stats


def main():
    """Função principal"""
    checker = PRONOMObsolescenceChecker()
    
    print("=== Gerador de Lista de Obsolescência PRONOM ===\n")
    
    print("Gerando arquivos de saída...\n")
    
    checker.export_to_json()
    checker.export_to_csv()
    checker.generate_markdown_report()
    
    stats = checker.get_statistics()
    print("\n=== ESTATÍSTICAS ===")
    print(f"Total de formatos catalogados: {stats['total_formats']}")
    print("\nDistribuição por nível de risco:")
    for level, count in stats['by_risk_level'].items():
        print(f"  {level}: {count} formatos")
    
    print(f"\nExtensões CRÍTICAS: {', '.join(set(stats['critical_extensions']))}")
    print(f"\nExtensões ALTO RISCO: {', '.join(set(stats['high_risk_extensions']))}")
    
    print("\n✓ Arquivos gerados com sucesso!")


if __name__ == "__main__":
    main()
```

2\. Script de Integração com DROID

```python
#!/usr/bin/env python3
# check_obsolescence_in_droid.py

import json
import csv
import pandas as pd
from collections import defaultdict

def check_obsolescence_in_collection(droid_csv, obsolescence_json):
    """
    Verifica quais formatos obsoletos existem na coleção
    """
    
    # Carregar lista de obsolescência
    with open(obsolescence_json, 'r') as f:
        obsolescence_data = json.load(f)
    
    # Criar dicionário de extensões por risco
    extension_risk = {}
    for risk_level, formats in obsolescence_data['risk_categories'].items():
        for fmt in formats:
            for ext in fmt['extension']:
                extension_risk[ext.lower()] = {
                    'risk_level': risk_level,
                    'format_name': fmt['name'],
                    'migration_target': fmt['migration_target'],
                    'reason': fmt['reason']
                }
    
    # Carregar relatório DROID
    df = pd.read_csv(droid_csv)
    
    # Analisar formatos encontrados
    results = {
        'CRÍTICO': defaultdict(int),
        'ALTO': defaultdict(int),
        'MÉDIO': defaultdict(int),
        'BAIXO': defaultdict(int),
        'MÍNIMO': defaultdict(int),
        'NÃO_CLASSIFICADO': defaultdict(int)
    }
    
    total_files = len(df)
    files_at_risk = 0
    
    for idx, row in df.iterrows():
        ext = str(row.get('EXT', '')).lower()
        
        if ext in extension_risk:
            risk_info = extension_risk[ext]
            risk_level = risk_info['risk_level']
            results[risk_level][ext] += 1
            
            if risk_level in ['CRÍTICO', 'ALTO', 'MÉDIO']:
                files_at_risk += 1
        else:
            results['NÃO_CLASSIFICADO'][ext] += 1
    
    # Gerar relatório
    report = {
        'summary': {
            'total_files': total_files,
            'files_at_risk': files_at_risk,
            'risk_percentage': (files_at_risk / total_files * 100) if total_files > 0 else 0
        },
        'by_risk_level': {}
    }
    
    for risk_level, extensions in results.items():
        if extensions:
            report['by_risk_level'][risk_level] = {
                'count': sum(extensions.values()),
                'extensions': dict(extensions)
            }
    
    # Salvar relatório
    output_file = 'obsolescence_analysis_report.json'
    with open(output_file, 'w') as f:
        json.dump(report, f, indent=2)
    
    # Gerar relatório detalhado
    generate_detailed_report(df, extension_risk, 'obsolescence_detailed_report.csv')
    
    print(f"\n=== ANÁLISE DE OBSOLESCÊNCIA ===")
    print(f"Total de arquivos: {total_files}")
    print(f"Arquivos em risco: {files_at_risk} ({report['summary']['risk_percentage']:.2f}%)")
    print(f"\nDistribuição por nível de risco:")
    
    for risk_level in ['CRÍTICO', 'ALTO', 'MÉDIO', 'BAIXO', 'MÍNIMO']:
        if risk_level in report['by_risk_level']:
            count = report['by_risk_level'][risk_level]['count']
            print(f"  {risk_level}: {count} arquivos")
    
    print(f"\n✓ Relatórios salvos:")
    print(f"  - {output_file}")
    print(f"  - obsolescence_detailed_report.csv")
    
    return report

def generate_detailed_report(df, extension_risk, output_file):
    """Gera relatório detalhado com todos os arquivos em risco"""
    
    with open(output_file, 'w', newline='', encoding='utf-8') as f:
        writer = csv.writer(f)
        writer.writerow([
            'Arquivo', 'Extensão', 'Nível de Risco', 'Formato',
            'Tamanho (bytes)', 'Razão', 'Migração Recomendada'
        ])
        
        for idx, row in df.iterrows():
            ext = str(row.get('EXT', '')).lower()
            filepath = row.get('FILE_PATH', row.get('URI', 'N/A'))
            filesize = row.get('SIZE', 0)
            
            if ext in extension_risk:
                risk_info = extension_risk[ext]
                
                # Apenas incluir arquivos de risco médio ou superior
                if risk_info['risk_level'] in ['CRÍTICO', 'ALTO', 'MÉDIO']:
                    writer.writerow([
                        filepath,
                        ext,
                        risk_info['risk_level'],
                        risk_info['format_name'],
                        filesize,
                        risk_info['reason'],
                        risk_info['migration_target']
                    ])

if __name__ == "__main__":
    import sys
    
    if len(sys.argv) < 2:
        print("Uso: python check_obsolescence_in_droid.py <droid_report.csv> [obsolescence_list.json]")
        sys.exit(1)
    
    droid_csv = sys.argv[1]
    obsolescence_json = sys.argv[2] if len(sys.argv) > 2 else 'pronom_obsolescence_list.json'
    
    check_obsolescence_in_collection(droid_csv, obsolescence_json)
```

3\. Uso Prático

```
#!/bin/bash
# run_obsolescence_check.sh

# 1. Gerar lista de formatos obsoletos do PRONOM
echo "Gerando lista de formatos obsoletos..."
python3 pronom_obsolescence_checker.py

# 2. Executar varredura DROID
echo "Executando varredura DROID..."
./scan_droid.sh

# 3. Verificar obsolescência na coleção
echo "Analisando obsolescência na coleção..."
LATEST_DROID=$(ls -t /OPT/droid/reports/report_*.csv | head -1)
python3 check_obsolescence_in_droid.py "$LATEST_DROID" pronom_obsolescence_list.json

echo "Análise completa!"
```

## 4. Saídas Geradas

Os scripts geram:

1. **pronom\_obsolescence\_list.json** - Lista completa em JSON
2. **pronom\_obsolescence\_list.csv** - Lista em CSV para Excel
3. **pronom\_obsolescence\_report.md** - Relatório legível em Markdown
4. **obsolescence\_analysis\_report.json** - Análise da sua coleção
5. **obsolescence\_detailed\_report.csv** - Lista de arquivos em risco

Esses scripts fornecem uma base sólida baseada no PRONOM para monitorar obsolescência tecnológica no seu acervo digital.

# Lista de Formatos Obsoletos e em Risco usando o Siegfried

Siegfried é uma alternativa ao DROID, mais moderna e sem dependência de Java:

```
# Instalar Siegfried
wget https://github.com/richardlehane/siegfried/releases/download/v1.11.2/siegfried_1-11-2_linux64.zip
unzip siegfried_1-11-2_linux64.zip
sudo cp sf /usr/local/bin/
sudo cp roy /usr/local/bin/

# Atualizar assinaturas PRONOM
sf -update

# Executar varredura
sf -csv /var/archivematica/sharedDirectory/transferSource/dataverse/dataverse/ > report.csv
```

No diretório /opt/scripts-preservacao/checar-obsolescencia/scripts do servidor node01-archivematica foi criado o script abaixo:

```
run_cron_obsolescence.sh (monta o environment python e executa o script run_obsolescence_check_siegfried.sh)
\- setup_python_environment.sh (monta o ambiente python)
\-run_obsolescence_check_siegfried.sh
  |- email_config.sh (carrega as variáveis para funcionar o envio de mensagem)
  |- repositories_config.sh (carrega a variável REPOSITORIES com a relação de pastas que serão monitoradas)
  |- pronom_obsolescence_checker.py (Gera lista de formatos obsoletos (PRONOM)
  |- scan_siegfried_multi.sh (Executando varredura Siegfried)
  |- consolidate_siegfried_reports.py (Executar consolidação e salvar toda a saída)
  |- check_obsolescence_in_droid.py (Analisar obsolescência)
  |- generate_comprehensive_report.py (Gerar HTML abrangente)
  |- send_email_report.py (Enviar email)
```

Caso queira alterar as credenciais do e-mail, basta editar o email\_config.sh

Caso queira alterar (adicionar/remover) diretório, basta editar o repositories\_config.sh

Foi adicionado no crontab para que fosse executado todo dia 07 de cada mês

```
0 2 7 * * /opt/scripts-preservacao/checar-obsolescencia/scripts/run_cron_obsolescence.sh  >> /opt/scripts-preservacao/checar-obsolescencia/logs/cron_$(date +\%Y\%m).log 2>&1
```

# PREPARANDO O AMBIENTE PARA USAR O DROID, SIEGFRIED E JHOVE

1. Ambiente Virtual com venv (Recomendado - Python 3.3+)

Criar ambiente virtual

```
# Navegar para o diretório do projeto
cd /opt/scripts-preservacao

# Criar ambiente virtual
python3 -m venv venv

```

Ativar ambiente virtual

```
# No Linux/Mac
source venv/bin/activate

# Você verá (venv) no início do prompt quando ativado
(venv) [root@node01-archivematica scripts-preservacao]#
```

Desativar ambiente virtual

```
deactivate
```

2\. Instalar Dependências no Ambiente Virtual

```
# Após ativar o ambiente
pip install pandas
pip install matplotlib
pip install requests

# Ou instalar de uma vez
pip install pandas matplotlib requests openpyxl

# Ou criar um arquivo requirements.txt
cat > requirements.txt <<EOF
pandas>=2.0.0
matplotlib>=3.7.0
requests>=2.31.0
openpyxl>=3.1.0
lxml>=4.9.0
EOF

# Instalar do requirements.txt
pip install -r requirements.txt
```

3\. Script Completo de Setup

```
#!/bin/bash
# setup_python_environment.sh

set -e

PROJECT_DIR="/opt/scripts-preservacao"
VENV_NAME="venv"

echo "=== Configurando Ambiente Python ==="

# Verificar se Python 3 está instalado
if ! command -v python3 &> /dev/null; then
    echo "Python 3 não encontrado. Instalando..."
    sudo yum install -y python3 python3-pip
fi

# Criar diretório do projeto se não existir
mkdir -p "$PROJECT_DIR"
cd "$PROJECT_DIR"

# Criar ambiente virtual
echo "Criando ambiente virtual..."
python3 -m venv "$VENV_NAME"

# Ativar ambiente virtual
source "$VENV_NAME/bin/activate"

# Atualizar pip
echo "Atualizando pip..."
pip install --upgrade pip

# Criar requirements.txt
echo "Criando requirements.txt..."
cat > requirements.txt <<EOF
# Análise de dados
pandas>=2.0.0
numpy>=1.24.0

# Visualização
matplotlib>=3.7.0
seaborn>=0.12.0

# Processamento de arquivos
openpyxl>=3.1.0
lxml>=4.9.0

# Requisições HTTP
requests>=2.31.0

# Utilitários
python-dateutil>=2.8.0
EOF

# Instalar dependências
echo "Instalando dependências..."
pip install -r requirements.txt

# Verificar instalação
echo ""
echo "=== Pacotes Instalados ==="
pip list

echo ""
echo "=== Ambiente Configurado com Sucesso! ==="
echo "Para ativar o ambiente no futuro, execute:"
echo "  cd $PROJECT_DIR"
echo "  source $VENV_NAME/bin/activate"
```

Executar o script de setup

```
chmod +x setup_python_environment.sh
./setup_python_environment.sh
```

4\. Estrutura de Projeto Recomendada

```
/opt/scripts-preservacao/
├── venv/                          # Ambiente virtual (não versionar)
├── requirements.txt               # Dependências do projeto
├── README.md                      # Documentação
├── scripts/
│   ├── pronom_obsolescence_checker.py
│   ├── check_obsolescence_in_droid.py
│   ├── analyze_droid_report.py
│   └── analyze_jhove_report.py
├── data/
│   ├── input/                     # Dados de entrada
│   └── output/                    # Relatórios gerados
└── config/
    └── settings.py                # Configurações
```

5\. Criar Script de Ativação Rápida

```
# Criar alias no .bashrc para ativação rápida
cat >> ~/.bashrc <<'EOF'

# Ativar ambiente Python de preservação
alias preserve='cd /opt/scripts-preservacao && source venv/bin/activate'
EOF

source ~/.bashrc

# Agora você pode simplesmente digitar:
preserve
```

# MONITORANDO A INTEGRIDADE DOS ARQUIVOS PRESERVADOS

O script <span class="s1">file\_integrity\_monitor\_multi\_dir.py tem como objetivo monitorar a integridade de um ou mais diretórios gerando como resultado um arquivo txt e um html em formato de relatório e envia via e-mail.</span>

```python
#!/usr/bin/env python3
"""
File Integrity Monitor
Sistema de monitoramento de integridade de arquivos com suporte a múltiplos diretórios
"""

import os
import sys
import json
import hashlib
import subprocess
from datetime import datetime
from pathlib import Path
import argparse
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart

class FileIntegrityMonitor:
    def __init__(self, target_dirs, database_dir=".file_integrity"):
        # Suporta lista de diretórios
        if isinstance(target_dirs, str):
            target_dirs = [target_dirs]
        self.target_dirs = [Path(d).resolve() for d in target_dirs]
        self.database_dir = Path(database_dir)
        self.database_dir.mkdir(exist_ok=True)
        self.current_scan_file = self.database_dir / "current_scan.json"
        self.previous_scan_file = self.database_dir / "previous_scan.json"
        self.history_file = self.database_dir / "scan_history.json"
        self.config_file = self.database_dir / "config.json"
        self.email_config_file = self.database_dir / "email_config.json"
        
    def calculate_hash(self, filepath, algorithm='sha256'):
        """Calcula hash de um arquivo"""
        hash_obj = hashlib.new(algorithm)
        try:
            with open(filepath, 'rb') as f:
                for chunk in iter(lambda: f.read(4096), b''):
                    hash_obj.update(chunk)
            return hash_obj.hexdigest()
        except Exception as e:
            return f"ERROR: {str(e)}"
    
    def scan_directory(self):
        """Escaneia todos os diretórios configurados"""
        print(f"Escaneando {len(self.target_dirs)} diretório(s)...")
        scan_data = {
            'timestamp': datetime.now().isoformat(),
            'target_dirs': [str(d) for d in self.target_dirs],
            'files': {}
        }
        
        total_files = 0
        for target_dir in self.target_dirs:
            if not target_dir.exists():
                print(f"⚠️  Diretório não encontrado: {target_dir}")
                continue
                
            print(f"\n📁 Escaneando: {target_dir}")
            dir_files = 0
            
            for root, dirs, files in os.walk(target_dir):
                # Ignora o diretório de database
                if self.database_dir.name in dirs:
                    dirs.remove(self.database_dir.name)
                
                for filename in files:
                    filepath = Path(root) / filename
                    
                    # Usa caminho relativo ao diretório base
                    try:
                        relative_path = filepath.relative_to(target_dir)
                        # Prefixo com o nome do diretório base para evitar conflitos
                        key = f"{target_dir.name}/{relative_path}"
                    except ValueError:
                        # Se não conseguir fazer relativo, usa caminho absoluto
                        key = str(filepath)
                    
                    try:
                        file_stat = filepath.stat()
                        file_hash = self.calculate_hash(filepath)
                        
                        scan_data['files'][key] = {
                            'hash': file_hash,
                            'size': file_stat.st_size,
                            'modified': datetime.fromtimestamp(file_stat.st_mtime).isoformat(),
                            'full_path': str(filepath),
                            'base_dir': str(target_dir)
                        }
                        dir_files += 1
                        total_files += 1
                        
                        if dir_files % 100 == 0:
                            print(f"  Processados {dir_files} arquivos...")
                    except Exception as e:
                        print(f"  Erro ao processar {filepath}: {e}")
            
            print(f"  ✓ {dir_files} arquivos processados")
        
        print(f"\n✓ Scan completo: {total_files} arquivos no total")
        return scan_data
    
    def save_scan(self, scan_data):
        """Salva dados do scan"""
        # Move scan atual para anterior
        if self.current_scan_file.exists():
            self.current_scan_file.rename(self.previous_scan_file)
        
        # Salva novo scan
        with open(self.current_scan_file, 'w') as f:
            json.dump(scan_data, f, indent=2)
        
        # Adiciona ao histórico
        self.add_to_history(scan_data)
    
    def add_to_history(self, scan_data):
        """Adiciona scan ao histórico"""
        history = []
        if self.history_file.exists():
            with open(self.history_file, 'r') as f:
                history = json.load(f)
        
        history_entry = {
            'timestamp': scan_data['timestamp'],
            'total_files': len(scan_data['files']),
            'total_size': sum(f['size'] for f in scan_data['files'].values()),
            'directories': scan_data['target_dirs']
        }
        history.append(history_entry)
        
        # Mantém apenas últimos 50 registros
        history = history[-50:]
        
        with open(self.history_file, 'w') as f:
            json.dump(history, f, indent=2)
    
    def compare_scans(self):
        """Compara scan atual com anterior"""
        if not self.previous_scan_file.exists():
            return None
        
        with open(self.current_scan_file, 'r') as f:
            current = json.load(f)
        
        with open(self.previous_scan_file, 'r') as f:
            previous = json.load(f)
        
        current_files = set(current['files'].keys())
        previous_files = set(previous['files'].keys())
        
        # Arquivos novos
        new_files = current_files - previous_files
        
        # Arquivos removidos
        removed_files = previous_files - current_files
        
        # Arquivos modificados e corrompidos
        modified_files = []
        corrupted_files = []
        intact_files = []
        
        common_files = current_files & previous_files
        for filepath in common_files:
            current_hash = current['files'][filepath]['hash']
            previous_hash = previous['files'][filepath]['hash']
            
            if current_hash.startswith('ERROR'):
                corrupted_files.append(filepath)
            elif current_hash != previous_hash:
                modified_files.append(filepath)
            else:
                intact_files.append(filepath)
        
        # Agrupa por diretório base
        def group_by_dir(file_list):
            by_dir = {}
            for f in file_list:
                base_dir = current['files'].get(f, {}).get('base_dir') or \
                          previous['files'].get(f, {}).get('base_dir', 'unknown')
                if base_dir not in by_dir:
                    by_dir[base_dir] = []
                by_dir[base_dir].append(f)
            return by_dir
        
        return {
            'current_timestamp': current['timestamp'],
            'previous_timestamp': previous['timestamp'],
            'total_current': len(current_files),
            'total_previous': len(previous_files),
            'new_files': list(new_files),
            'removed_files': list(removed_files),
            'modified_files': modified_files,
            'corrupted_files': corrupted_files,
            'intact_files': intact_files,
            'new_by_dir': group_by_dir(new_files),
            'modified_by_dir': group_by_dir(modified_files),
            'corrupted_by_dir': group_by_dir(corrupted_files),
            'target_dirs': current['target_dirs']
        }
    
    def generate_report(self, comparison):
        """Gera relatório de integridade"""
        if comparison is None:
            print("\n" + "="*60)
            print("PRIMEIRO SCAN - Baseline criado")
            print("="*60)
            print(f"Diretórios monitorados: {len(self.target_dirs)}")
            for d in self.target_dirs:
                print(f"  • {d}")
            return
        
        total = comparison['total_current']
        intact = len(comparison['intact_files'])
        modified = len(comparison['modified_files'])
        corrupted = len(comparison['corrupted_files'])
        new = len(comparison['new_files'])
        removed = len(comparison['removed_files'])
        
        # Calcula porcentagens
        intact_pct = (intact / total * 100) if total > 0 else 0
        modified_pct = (modified / total * 100) if total > 0 else 0
        corrupted_pct = (corrupted / total * 100) if total > 0 else 0
        new_pct = (new / total * 100) if total > 0 else 0
        
        print("\n" + "="*60)
        print("RELATÓRIO DE INTEGRIDADE DE ARQUIVOS")
        print("="*60)
        print(f"Scan atual:    {comparison['current_timestamp']}")
        print(f"Scan anterior: {comparison['previous_timestamp']}")
        print(f"\nDiretórios monitorados: {len(comparison['target_dirs'])}")
        for d in comparison['target_dirs']:
            print(f"  • {d}")
        
        print("\n" + "-"*60)
        print("ESTATÍSTICAS GERAIS")
        print("-"*60)
        print(f"Total de arquivos atuais: {total}")
        print(f"Total de arquivos anteriores: {comparison['total_previous']}")
        
        print("\n" + "-"*60)
        print("GRAU DE INTEGRIDADE")
        print("-"*60)
        print(f"✓ Arquivos íntegros:    {intact:4d} ({intact_pct:6.2f}%)")
        print(f"≠ Arquivos modificados: {modified:4d} ({modified_pct:6.2f}%)")
        print(f"✗ Arquivos corrompidos: {corrupted:4d} ({corrupted_pct:6.2f}%)")
        print(f"+ Arquivos novos:       {new:4d} ({new_pct:6.2f}%)")
        print(f"- Arquivos removidos:   {removed:4d}")
        
        # Integridade geral
        if intact + modified + corrupted > 0:
            integrity_score = (intact / (intact + modified + corrupted)) * 100
            print(f"\n{'='*60}")
            print(f"INTEGRIDADE GERAL: {integrity_score:.2f}%")
            print(f"{'='*60}")
        
        # Detalhes por diretório
        if corrupted > 0:
            print("\n" + "-"*60)
            print("ARQUIVOS CORROMPIDOS POR DIRETÓRIO")
            print("-"*60)
            for base_dir, files in comparison['corrupted_by_dir'].items():
                print(f"\n  📁 {base_dir} ({len(files)} arquivos)")
                for f in files[:10]:
                    print(f"    ✗ {f}")
                if len(files) > 10:
                    print(f"    ... e mais {len(files) - 10} arquivos")
        
        if modified > 0:
            print("\n" + "-"*60)
            print("ARQUIVOS MODIFICADOS POR DIRETÓRIO")
            print("-"*60)
            for base_dir, files in comparison['modified_by_dir'].items():
                print(f"\n  📁 {base_dir} ({len(files)} arquivos)")
                for f in files[:10]:
                    print(f"    ≠ {f}")
                if len(files) > 10:
                    print(f"    ... e mais {len(files) - 10} arquivos")
        
        # Salva relatórios
        self.save_report_to_file(comparison)
        html_file = self.save_html_report(comparison)
        
        return html_file
    
    def save_report_to_file(self, comparison):
        """Salva relatório em arquivo texto"""
        report_file = self.database_dir / f"report_{datetime.now().strftime('%Y%m%d_%H%M%S')}.txt"
        
        with open(report_file, 'w') as f:
            f.write("="*60 + "\n")
            f.write("RELATÓRIO DE INTEGRIDADE DE ARQUIVOS\n")
            f.write("="*60 + "\n")
            f.write(f"Scan atual:    {comparison['current_timestamp']}\n")
            f.write(f"Scan anterior: {comparison['previous_timestamp']}\n\n")
            
            f.write(f"Diretórios monitorados: {len(comparison['target_dirs'])}\n")
            for d in comparison['target_dirs']:
                f.write(f"  • {d}\n")
            
            total = comparison['total_current']
            intact = len(comparison['intact_files'])
            modified = len(comparison['modified_files'])
            corrupted = len(comparison['corrupted_files'])
            new = len(comparison['new_files'])
            removed = len(comparison['removed_files'])
            
            intact_pct = (intact / total * 100) if total > 0 else 0
            modified_pct = (modified / total * 100) if total > 0 else 0
            corrupted_pct = (corrupted / total * 100) if total > 0 else 0
            
            f.write("\n" + "-"*60 + "\n")
            f.write("GRAU DE INTEGRIDADE\n")
            f.write("-"*60 + "\n")
            f.write(f"Arquivos íntegros:    {intact} ({intact_pct:.2f}%)\n")
            f.write(f"Arquivos modificados: {modified} ({modified_pct:.2f}%)\n")
            f.write(f"Arquivos corrompidos: {corrupted} ({corrupted_pct:.2f}%)\n")
            f.write(f"Arquivos novos:       {new}\n")
            f.write(f"Arquivos removidos:   {removed}\n\n")
            
            if intact + modified + corrupted > 0:
                integrity_score = (intact / (intact + modified + corrupted)) * 100
                f.write("="*60 + "\n")
                f.write(f"INTEGRIDADE GERAL: {integrity_score:.2f}%\n")
                f.write("="*60 + "\n\n")
            
            # Lista completa de arquivos com problemas por diretório
            if corrupted:
                f.write("\nARQUIVOS CORROMPIDOS POR DIRETÓRIO:\n")
                for base_dir, files in comparison['corrupted_by_dir'].items():
                    f.write(f"\n{base_dir}:\n")
                    for file in files:
                        f.write(f"  {file}\n")
            
            if modified:
                f.write("\nARQUIVOS MODIFICADOS POR DIRETÓRIO:\n")
                for base_dir, files in comparison['modified_by_dir'].items():
                    f.write(f"\n{base_dir}:\n")
                    for file in files:
                        f.write(f"  {file}\n")
            
            if new:
                f.write("\nARQUIVOS NOVOS POR DIRETÓRIO:\n")
                for base_dir, files in comparison['new_by_dir'].items():
                    f.write(f"\n{base_dir}:\n")
                    for file in files:
                        f.write(f"  {file}\n")
        
        print(f"\nRelatório TXT salvo em: {report_file}")
    
    def save_html_report(self, comparison):
        """Gera relatório HTML"""
        timestamp = datetime.now().strftime('%Y%m%d_%H%M%S')
        report_file = self.database_dir / f"report_{timestamp}.html"
        
        total = comparison['total_current']
        intact = len(comparison['intact_files'])
        modified = len(comparison['modified_files'])
        corrupted = len(comparison['corrupted_files'])
        new = len(comparison['new_files'])
        removed = len(comparison['removed_files'])
        
        intact_pct = (intact / total * 100) if total > 0 else 0
        modified_pct = (modified / total * 100) if total > 0 else 0
        corrupted_pct = (corrupted / total * 100) if total > 0 else 0
        new_pct = (new / total * 100) if total > 0 else 0
        
        integrity_score = (intact / (intact + modified + corrupted)) * 100 if (intact + modified + corrupted) > 0 else 0
        
        # Determina cor e status
        if integrity_score >= 99:
            status_color = "#28a745"
            status_text = "EXCELENTE"
        elif integrity_score >= 95:
            status_color = "#5bc0de"
            status_text = "BOM"
        elif integrity_score >= 90:
            status_color = "#ffc107"
            status_text = "ATENÇÃO"
        else:
            status_color = "#dc3545"
            status_text = "CRÍTICO"
        
        # Lista de diretórios
        dirs_html = ""
        for d in comparison['target_dirs']:
            dirs_html += f"<li>{d}</li>"
        
        html_content = f"""

<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Relatório de Integridade - {timestamp}</title>
    <style>
        * {{ margin: 0; padding: 0; box-sizing: border-box; }}
        body {{ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 20px; color: #333; }}
        .container {{ max-width: 1200px; margin: 0 auto; background: white; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); overflow: hidden; }}
        .header {{ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 40px; text-align: center; }}
        .header h1 {{ font-size: 2.5em; margin-bottom: 10px; }}
        .header .subtitle {{ opacity: 0.9; font-size: 1.1em; }}
        .integrity-score {{ background: {status_color}; color: white; padding: 40px; text-align: center; font-size: 3em; font-weight: bold; }}
        .integrity-score .label {{ font-size: 0.4em; opacity: 0.9; display: block; margin-bottom: 10px; }}
        .integrity-score .status {{ font-size: 0.5em; margin-top: 10px; }}
        .content {{ padding: 40px; }}
        .directories {{ background: #f8f9fa; padding: 20px; border-radius: 8px; margin-bottom: 30px; }}
        .directories h3 {{ color: #667eea; margin-bottom: 15px; }}
        .directories ul {{ list-style: none; }}
        .directories li {{ padding: 8px; margin: 5px 0; background: white; border-radius: 4px; border-left: 3px solid #667eea; }}
        .stats-grid {{ display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 40px; }}
        .stat-card {{ background: white; padding: 25px; border-radius: 8px; border: 2px solid #e9ecef; transition: transform 0.2s; }}
        .stat-card:hover {{ transform: translateY(-5px); box-shadow: 0 5px 20px rgba(0,0,0,0.1); }}
        .stat-card.intact {{ border-left: 4px solid #28a745; }}
        .stat-card.modified {{ border-left: 4px solid #ffc107; }}
        .stat-card.corrupted {{ border-left: 4px solid #dc3545; }}
        .stat-card .number {{ font-size: 2.5em; font-weight: bold; margin: 10px 0; }}
        .stat-card .percentage {{ color: #666; font-size: 1.2em; }}
        .file-list {{ background: #f8f9fa; border-radius: 8px; padding: 20px; margin-top: 20px; }}
        .file-list h3 {{ color: #333; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #dee2e6; }}
        .file-list .dir-section {{ margin: 20px 0; }}
        .file-list .dir-title {{ font-weight: bold; color: #667eea; margin-bottom: 10px; }}
        .file-list ul {{ list-style: none; max-height: 300px; overflow-y: auto; }}
        .file-list li {{ padding: 8px; margin: 5px 0; background: white; border-radius: 4px; word-break: break-all; }}
        .file-list.corrupted li {{ border-left: 3px solid #dc3545; }}
        .file-list.modified li {{ border-left: 3px solid #ffc107; }}
        .timestamp {{ background: #e9ecef; padding: 15px; border-radius: 5px; margin-bottom: 20px; }}
        .timestamp strong {{ color: #667eea; }}
        .footer {{ background: #f8f9fa; padding: 20px; text-align: center; color: #666; font-size: 0.9em; }}
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>📊 Relatório de Integridade de Arquivos</h1>
            <div class="subtitle">Monitoramento de Múltiplos Diretórios</div>
        </div>
        
        <div class="integrity-score">
            <span class="label">INTEGRIDADE GERAL</span>
            {integrity_score:.2f}%
            <div class="status">{status_text}</div>
        </div>
        
        <div class="content">
            <div class="timestamp">
                <strong>Scan Atual:</strong> {comparison['current_timestamp']}<br>
                <strong>Scan Anterior:</strong> {comparison['previous_timestamp']}
            </div>
            
            <div class="directories">
                <h3>📁 Diretórios Monitorados ({len(comparison['target_dirs'])})</h3>
                <ul>{dirs_html}</ul>
            </div>
            
            <h2 style="margin: 30px 0 20px 0; color: #667eea;">Estatísticas Globais</h2>
            
            <div class="stats-grid">
                <div class="stat-card intact">
                    <div style="font-size:2em">✓</div>
                    <div class="number">{intact}</div>
                    <div class="percentage">{intact_pct:.2f}%</div>
                    <div>Arquivos Íntegros</div>
                </div>
                
                <div class="stat-card modified">
                    <div style="font-size:2em">≠</div>
                    <div class="number">{modified}</div>
                    <div class="percentage">{modified_pct:.2f}%</div>
                    <div>Arquivos Modificados</div>
                </div>
                
                <div class="stat-card corrupted">
                    <div style="font-size:2em">✗</div>
                    <div class="number">{corrupted}</div>
                    <div class="percentage">{corrupted_pct:.2f}%</div>
                    <div>Arquivos Corrompidos</div>
                </div>
            </div>
"""
        
        # Adiciona seções por diretório
        if corrupted > 0:
            html_content += '<div class="file-list corrupted"><h3>⚠️ Arquivos Corrompidos</h3>'
            for base_dir, files in comparison['corrupted_by_dir'].items():
                html_content += f'<div class="dir-section"><div class="dir-title">📁 {base_dir} ({len(files)})</div><ul>'
                for f in files[:50]:
                    html_content += f"<li>✗ {f}</li>"
                if len(files) > 50:
                    html_content += f"<li><strong>... e mais {len(files) - 50} arquivos</strong></li>"
                html_content += '</ul></div>'
            html_content += '</div>'
        
        if modified > 0:
            html_content += '<div class="file-list modified"><h3>📝 Arquivos Modificados</h3>'
            for base_dir, files in comparison['modified_by_dir'].items():
                html_content += f'<div class="dir-section"><div class="dir-title">📁 {base_dir} ({len(files)})</div><ul>'
                for f in files[:50]:
                    html_content += f"<li>≠ {f}</li>"
                if len(files) > 50:
                    html_content += f"<li><strong>... e mais {len(files) - 50} arquivos</strong></li>"
                html_content += '</ul></div>'
            html_content += '</div>'
        
        html_content += f"""
        </div>
        <div class="footer">
            Gerado em {datetime.now().strftime('%d/%m/%Y às %H:%M:%S')}<br>
            File Integrity Monitor - Monitoramento de Múltiplos Diretórios
        </div>
    </div>
</body>
</html>"""
        
        with open(report_file, 'w', encoding='utf-8') as f:
            f.write(html_content)
        
        print(f"Relatório HTML salvo em: {report_file}")
        return report_file
    
    def send_email_notification(self, comparison, html_file, config):
        """Envia notificação por email"""
        try:
            total = comparison['total_current']
            intact = len(comparison['intact_files'])
            modified = len(comparison['modified_files'])
            corrupted = len(comparison['corrupted_files'])
            new = len(comparison['new_files'])
            removed = len(comparison['removed_files'])
            
            # Calcula porcentagens
            intact_pct = (intact / total * 100) if total > 0 else 0
            modified_pct = (modified / total * 100) if total > 0 else 0
            corrupted_pct = (corrupted / total * 100) if total > 0 else 0
            
            integrity_score = (intact / (intact + modified + corrupted)) * 100 if (intact + modified + corrupted) > 0 else 0
            
            if corrupted > 0 or integrity_score < 90:
                priority = "ALTA"
            elif integrity_score < 95:
                priority = "MÉDIA"
            else:
                priority = "NORMAL"
            
            msg = MIMEMultipart('alternative')
            msg['Subject'] = f"[{priority}] Integridade {len(comparison['target_dirs'])} Diretórios - {integrity_score:.1f}%"
            msg['From'] = config['from_email']
            msg['To'] = config['to_email']
            
            dirs_text = "\n".join(f"  • {d}" for d in comparison['target_dirs'])
            
            text = f"""
Relatório de Integridade - Múltiplos Diretórios
===============================================

Integridade Geral: {integrity_score:.2f}%
Prioridade: {priority}

Diretórios Monitorados ({len(comparison['target_dirs'])}):
{dirs_text}

Scan atual: {comparison['current_timestamp']}

Estatísticas:
- Arquivos íntegros: {intact} ({intact_pct:.1f}%)
- Arquivos modificados: {modified} ({modified_pct:.1f}%)
- Arquivos corrompidos: {corrupted} ({corrupted_pct:.1f}%)
- Arquivos novos: {new}
- Arquivos removidos: {removed}

Relatório HTML completo em anexo.
"""
            
            with open(html_file, 'r', encoding='utf-8') as f:
                html = f.read()
            
            msg.attach(MIMEText(text, 'plain'))
            msg.attach(MIMEText(html, 'html'))
            
            with smtplib.SMTP(config['smtp_server'], config['smtp_port']) as server:
                if config.get('use_tls', True):
                    server.starttls()
                if config.get('smtp_user') and config.get('smtp_password'):
                    server.login(config['smtp_user'], config['smtp_password'])
                server.send_message(msg)
            
            print(f"\n✓ Email enviado com sucesso para {config['to_email']}")
            return True
            
        except Exception as e:
            print(f"\n✗ Erro ao enviar email: {e}")
            return False
    
    def save_config(self, directories):
        """Salva configuração de diretórios"""
        config = {
            'directories': [str(d) for d in directories],
            'last_updated': datetime.now().isoformat()
        }
        with open(self.config_file, 'w') as f:
            json.dump(config, f, indent=2)
    
    def load_config(self):
        """Carrega configuração"""
        if not self.config_file.exists():
            return None
        with open(self.config_file, 'r') as f:
            return json.load(f)
    
    def save_email_config(self, smtp_server, smtp_port, from_email, to_email, 
                         smtp_user=None, smtp_password=None, use_tls=True):
        """Salva configuração de email"""
        config = {
            'smtp_server': smtp_server,
            'smtp_port': smtp_port,
            'from_email': from_email,
            'to_email': to_email,
            'smtp_user': smtp_user,
            'smtp_password': smtp_password,
            'use_tls': use_tls
        }
        with open(self.email_config_file, 'w') as f:
            json.dump(config, f, indent=2)
        print(f"Configuração de email salva em: {self.email_config_file}")
    
    def load_email_config(self):
        """Carrega configuração de email"""
        if not self.email_config_file.exists():
            return None
        with open(self.email_config_file, 'r') as f:
            return json.load(f)

def main():
    parser = argparse.ArgumentParser(
        description='File Integrity Monitor - Suporta múltiplos diretórios',
        formatter_class=argparse.RawDescriptionHelpFormatter,
        epilog="""
Exemplos:
  %(prog)s /dados                                  # Um diretório
  %(prog)s /dados /backup /www --send-email        # Múltiplos diretórios
  %(prog)s --add-dir /novo/diretorio               # Adiciona diretório
  %(prog)s --list-dirs                             # Lista diretórios configurados
  %(prog)s --config-email                          # Configura email
        """
    )
    parser.add_argument('directories', nargs='*', help='Diretórios a monitorar')
    parser.add_argument('--database', default='.file_integrity',
                       help='Diretório para dados (padrão: .file_integrity)')
    parser.add_argument('--scan-only', action='store_true',
                       help='Apenas escaneia, não gera relatório')
    parser.add_argument('--send-email', action='store_true',
                       help='Envia relatório por email')
    parser.add_argument('--config-email', action='store_true',
                       help='Configura email')
    parser.add_argument('--add-dir', metavar='DIR',
                       help='Adiciona diretório à configuração')
    parser.add_argument('--remove-dir', metavar='DIR',
                       help='Remove diretório da configuração')
    parser.add_argument('--list-dirs', action='store_true',
                       help='Lista diretórios configurados')
    parser.add_argument('--use-config', action='store_true',
                       help='Usa diretórios da configuração')
    
    args = parser.parse_args()
    
    # Modo configuração de email
    if args.config_email:
        print("\n=== Configuração de Email ===\n")
        smtp_server = input("Servidor SMTP (ex: smtp.gmail.com): ")
        smtp_port = int(input("Porta SMTP (ex: 587): "))
        from_email = input("Email remetente: ")
        to_email = input("Email destinatário: ")
        smtp_user = input("Usuário SMTP (ou Enter): ") or None
        smtp_password = input("Senha SMTP (ou Enter): ") or None
        use_tls = input("Usar TLS? (s/n): ").lower() != 'n'
        
        monitor = FileIntegrityMonitor(["/tmp"], args.database)
        monitor.save_email_config(smtp_server, smtp_port, from_email, to_email,
                                  smtp_user, smtp_password, use_tls)
        print("\n✓ Configuração salva!")
        return
    
    # Inicializa monitor temporário para operações de config
    temp_monitor = FileIntegrityMonitor(["/tmp"], args.database)
    
    # Lista diretórios
    if args.list_dirs:
        config = temp_monitor.load_config()
        if config and config.get('directories'):
            print("\nDiretórios configurados:")
            for i, d in enumerate(config['directories'], 1):
                print(f"  {i}. {d}")
        else:
            print("\nNenhum diretório configurado ainda.")
        return
    
    # Adiciona diretório
    if args.add_dir:
        if not os.path.isdir(args.add_dir):
            print(f"Erro: {args.add_dir} não é um diretório válido")
            sys.exit(1)
        
        config = temp_monitor.load_config() or {'directories': []}
        if args.add_dir not in config['directories']:
            config['directories'].append(args.add_dir)
            temp_monitor.save_config(config['directories'])
            print(f"✓ Diretório adicionado: {args.add_dir}")
        else:
            print(f"⚠️  Diretório já configurado: {args.add_dir}")
        return
    
    # Remove diretório
    if args.remove_dir:
        config = temp_monitor.load_config()
        if config and args.remove_dir in config['directories']:
            config['directories'].remove(args.remove_dir)
            temp_monitor.save_config(config['directories'])
            print(f"✓ Diretório removido: {args.remove_dir}")
        else:
            print(f"⚠️  Diretório não encontrado na configuração")
        return
    
    # Determina quais diretórios usar
    directories = []
    if args.use_config:
        config = temp_monitor.load_config()
        if config and config.get('directories'):
            directories = config['directories']
        else:
            print("Erro: Nenhum diretório configurado. Use --add-dir primeiro.")
            sys.exit(1)
    elif args.directories:
        directories = args.directories
    else:
        config = temp_monitor.load_config()
        if config and config.get('directories'):
            print("Usando diretórios da configuração...")
            directories = config['directories']
        else:
            print("Erro: Especifique diretórios ou use --add-dir para configurar")
            sys.exit(1)
    
    # Valida diretórios
    for d in directories:
        if not os.path.isdir(d):
            print(f"Erro: {d} não é um diretório válido")
            sys.exit(1)
    
    # Cria monitor e executa scan
    monitor = FileIntegrityMonitor(directories, args.database)
    monitor.save_config(directories)
    
    scan_data = monitor.scan_directory()
    monitor.save_scan(scan_data)
    
    if not args.scan_only:
        comparison = monitor.compare_scans()
        html_file = monitor.generate_report(comparison)
        
        if args.send_email and comparison is not None:
            config = monitor.load_email_config()
            if config:
                monitor.send_email_notification(comparison, html_file, config)
            else:
                print("\n⚠️  Configure email com --config-email")

if __name__ == '__main__':
    main()
```

<details id="bkmrk-como-usar-m%C3%A9todo-1%3A-"><summary>COMO USAR</summary>

<details><summary>Método 1: Linha de Comando Direta</summary>

```
./file_integrity_monitor_multi_dir.py /var/archivematica/sharedDirectory/transferSource/dataverse/dataverse/ --send-email
```

Nesse exemplo será monitorado o diretório e gerado o html e enviado via e-mail. Deve ser usado pontualmente.

</details><details><summary>Método 2: Configuração Persistente (RECOMENDADO)</summary>

```
# Adiciona diretórios
./file_integrity_monitor_multi_dir.py --add-dir /var/archivematica/sharedDirectory/transferSource/dataverse/dataverse
./file_integrity_monitor_multi_dir.py --add-dir /var/archivematica/sharedDirectory/www/AIPsStore
./file_integrity_monitor_multi_dir.py --add-dir /var/archivematica/sharedDirectory/www/DIPsStore
./file_integrity_monitor_multi_dir.py --add-dir /var/archivematica/sharedDirectory/AIPbackup 

# Lista diretórios
./file_integrity_monitor_multi_dir.py --list-dirs

# Executa (usa os diretórios configurados automaticamente)
./file_integrity_monitor_multi_dir.py --send-email

# Remove diretório
./file_integrity_monitor_multi_dir.py --remove-dir /var/archivematica/sharedDirectory/AIPbackup 
```

✅ **Ideal para automação com cron** ✅ **Não precisa repetir diretórios toda vez**

Configuração no crontab

```
0 2 * * 1 /usr/bin/python3 /opt/scripts-preservacao/checar-integridade/file_integrity_monitor_multi_dir.py --send-email >> /var/log/file_integrity.log 2>&1
```

</details></details></body></html>

# COMO CONFIGURAR UMA REDE LOCKSS

<details id="bkmrk-configurar-o-servido"><summary>CONFIGURAR O SERVIDOR</summary>

ESQUEMA DE PARTIÇÃO

[![image.png](https://documentacao.scielo.org/uploads/images/gallery/2025-12/scaled-1680-/U6PbxocarmfzIuin-image.png)](https://documentacao.scielo.org/uploads/images/gallery/2025-12/U6PbxocarmfzIuin-image.png)

Uma vez instalado o sistema operacional vamos instalar os pacotes:

```
yum -y install java-1.8.0-openjdk bind-utils dstat gitiotop lshw lsof lynx  nmap  pciutils rsync smartmontools sysstat tmux wget

```

Vamos agora instalar o pacote do lockss:

```
rpm -Uhiv https://assets.lockss.org/rpm/repo/lockss-daemon-1.78.6-1.noarch.rpm
```

Ajustamos a permissão na pasta /cache0

```
chown lockss. /cache0/
```

</details><details id="bkmrk-configurar-caixa-loc"><summary>CONFIGURAR CAIXA LOCKSS</summary>

```
[root@node03-lockss-scielored lockss]# ./hostconfig 
root is configuring
eth0: error fetching interface information: Device not found
LOCKSS host configuration for Linux.
For more information see /etc/lockss/README
Configuring for user lockss
Fully qualified hostname (FQDN) of this machine: [node03-lockss-scielored.scielo.org] 
IP address of this machine: [] 192.168.169.166
Is this machine behind NAT?: [N] Y
External IP address for NAT: [] 177.92.116.203
Initial subnet for admin UI access: [192.168.169.0/24] 
LCAP V3 protocol port: [9729] 9735
PROXY port: [8080] 
Admin UI port: [8081] 
Mail relay for this machine: [localhost] mailrelay.scielo.org
Does mail relay mailrelay.scielo.org need user & password: [N] 
E-mail address for administrator: [] infra@scielo.org
Path to java: [/usr/bin/java] 
Java switches: [] 
Configuration URL: [http://props.lockss.org:8001/daemon/lockss.xml] http://200.130.45.61/props/unampln/lockss.xml
Configuration proxy (host:port): [NONE] 
Enable config failover: [Y] 
Config failover max age: [] 
Preservation group(s): [prod] unampln
Content storage directories: [] /cache0
Temporary storage directory: [/cache0/tmp] 
User name for web UI administration: [] admin
Password for web UI administration user admin: [] 
Password for web UI administration (again): [] 

Configuration:
LOCKSS_CONFIG_VERSION=1
LOCKSS_USER="lockss"
LOCKSS_HOSTNAME=node03-lockss-scielored.scielo.org
LOCKSS_IPADDR=192.168.169.166
LOCKSS_EXTERNAL_IPADDR=177.92.116.203
LOCKSS_V3_PORT=9735
LOCKSS_ACCESS_SUBNET="192.168.169.0/24"
LOCKSS_MAILHUB=mailrelay.scielo.org
LOCKSS_MAILHUB_USER=
LOCKSS_MAILHUB_PASSWORD=
LOCKSS_EMAIL=infra@scielo.org
LOCKSS_JAVA_CMD=/usr/bin/java
LOCKSS_JAVA_SWITCHES=
LOCKSS_JAVA_HEAP=
LOCKSS_PROPS_URL="http://200.130.45.61/props/unampln/lockss.xml"
LOCKSS_PROPS_PROXY="NONE"
LOCKSS_PROPS_SERVER_AUTHENTICATE_KEYSTORE=""
LOCKSS_CONFIG_FAILOVER_ENABLE="Y"
LOCKSS_CONFIG_FAILOVER_MAX_AGE=""
LOCKSS_TEST_GROUP="unampln"
LOCKSS_DISK_PATHS="/cache0"
LOCKSS_ADMIN_USER=admin
LOCKSS_ADMIN_PASSWD=SHA-256:d17f0af8b8b9ec09d051523e6a3eb76f3c114ab2cc93f330e4d73e0b7f7347e0
LOCKSS_PROXY_PORT=8080
LOCKSS_UI_PORT=8081
LOCKSS_TMPDIR=/cache0/tmp
LOCKSS_CLEAR_TMPDIR=yes
LOCKSS_RELEASE=1.78.6-1
LOCKSS_HOME is 
OK to store this configuration: [Y] 
Checking content storage dirs
/cache0 exists and is writable by lockss
/var/log/lockss does not exist; shall I create it: [Y] 
/cache0/tmp does not exist; shall I create it: [Y] 
Done
/tmp/hostconfig.TWkRu: line 518: chkconfig: command not found
LOCKSS will start automatically at next reboot, or you may
 start it now by running   /etc/init.d/lockss start
/tmp/hostconfig.TWkRu: line 530: mail: command not found
Sending mail failed. Please check mail configuration.
Please also send /tmp/unsent-lockss-config to lockssdiag@lockss.org.
```

Ao executar /etc/init.d/lockss start deu o seguinte erro:

```
[root@node03-lockss-scielored lockss]# /etc/init.d/lockss start
/etc/init.d/lockss: line 8: /etc/init.d/functions: No such file or directory
```

Copiei de um outro servidor o /etc/init.d/functions

```
# -*-Shell-script-*-
#
# functions This file contains functions to be used by most or all
#       shell scripts in the /etc/init.d directory.
#

TEXTDOMAIN=initscripts

# Make sure umask is sane
umask 022

# Set up a default search path.
PATH="/sbin:/usr/sbin:/bin:/usr/bin"
export PATH

if [ $PPID -ne 1 -a -z "$SYSTEMCTL_SKIP_REDIRECT" ] && \
        [ -d /run/systemd/system ] ; then
    case "$0" in
    /etc/init.d/*|/etc/rc.d/init.d/*)
        _use_systemctl=1
        ;;
    esac
fi

systemctl_redirect () {
    local s
    local prog=${1##*/}
    local command=$2
    local options=""

    case "$command" in
    start)
        s=$"Starting $prog (via systemctl): "
        ;;
    stop)
        s=$"Stopping $prog (via systemctl): "
        ;;
    reload|try-reload)
        s=$"Reloading $prog configuration (via systemctl): "
        ;;
    restart|try-restart|condrestart)
        s=$"Restarting $prog (via systemctl): "
        ;;
    esac

    if [ -n "$SYSTEMCTL_IGNORE_DEPENDENCIES" ] ; then
        options="--ignore-dependencies"
    fi

    if ! systemctl show "$prog.service" > /dev/null 2>&1 || \
            systemctl show -p LoadState "$prog.service" | grep -q 'not-found' ; then
        action $"Reloading systemd: " /bin/systemctl daemon-reload
    fi

    action "$s" /bin/systemctl $options $command "$prog.service"
}

# Get a sane screen width
[ -z "${COLUMNS:-}" ] && COLUMNS=80

# Read in our configuration
if [ -z "${BOOTUP:-}" ]; then
    if [ -f /etc/sysconfig/init ]; then
        . /etc/sysconfig/init
    else
        # verbose ->> very (very!) old bootup look (prior to RHL-6.0?)
        # color ->> default bootup look
        # other ->> default bootup look without ANSI colors or positioning
        BOOTUP=color
        # Column to start "[  OK  ]" label in:
        RES_COL=60
        # terminal sequence to move to that column:
        MOVE_TO_COL="echo -en \\033[${RES_COL}G"
        # Terminal sequence to set color to a 'success' (bright green):
        SETCOLOR_SUCCESS="echo -en \\033[1;32m"
        # Terminal sequence to set color to a 'failure' (bright red):
        SETCOLOR_FAILURE="echo -en \\033[1;31m"
        # Terminal sequence to set color to a 'warning' (bright yellow):
        SETCOLOR_WARNING="echo -en \\033[1;33m"
        # Terminal sequence to reset to the default color:
        SETCOLOR_NORMAL="echo -en \\033[0;39m"

        # Verbosity of logging:
        LOGLEVEL=1
    fi

    # NOTE: /dev/ttyS* is serial console. "not a tty" is such as
    # /dev/null associated when executed under systemd service units.
    if LANG=C tty | grep -q -e '\(/dev/ttyS\|not a tty\)'; then
        BOOTUP=serial
        MOVE_TO_COL=
        SETCOLOR_SUCCESS=
        SETCOLOR_FAILURE=
        SETCOLOR_WARNING=
        SETCOLOR_NORMAL=
    fi
fi

# Check if any of $pid (could be plural) are running
checkpid() {
    local i

    for i in $* ; do
        [ -d "/proc/$i" ] && return 0
    done
    return 1
}

__kill_pids_term_kill_checkpids() {
    local base_stime=$1
    shift 1
    local pid=
    local pids=$*
    local remaining=
    local stat=
    local stime=

    for pid in $pids ; do
        [ ! -e  "/proc/$pid" ] && continue
        read -r line < "/proc/$pid/stat" 2> /dev/null

        stat=($line)
        stime=${stat[21]}

        [ -n "$stime" ] && [ "$base_stime" -lt "$stime" ] && continue
        remaining+="$pid "
    done

    echo "$remaining"
    [ -n "$remaining" ] && return 1

    return 0
}

__kill_pids_term_kill() {
    local try=0
    local delay=3;
    local pid=
    local stat=
    local base_stime=

    # We can't initialize stat & base_stime on the same line where 'local'
    # keyword is, otherwise the sourcing of this file will fail for ksh...
    stat=($(< /proc/self/stat))
    base_stime=${stat[21]}

    if [ "$1" = "-d" ]; then
        delay=$2
        shift 2
    fi

    local kill_list=$*

    kill_list=$(__kill_pids_term_kill_checkpids $base_stime $kill_list)

    [ -z "$kill_list" ] && return 0

    kill -TERM $kill_list >/dev/null 2>&1
    sleep 0.1

    kill_list=$(__kill_pids_term_kill_checkpids $base_stime $kill_list)
    if [ -n "$kill_list" ] ; then
        while [ $try -lt $delay ] ; do
            sleep 1
            kill_list=$(__kill_pids_term_kill_checkpids $base_stime $kill_list)
            [ -z "$kill_list" ] && break
            let try+=1
        done
        if [ -n "$kill_list" ] ; then
            kill -KILL $kill_list >/dev/null 2>&1
            sleep 0.1
            kill_list=$(__kill_pids_term_kill_checkpids $base_stime $kill_list)
        fi
    fi

    [ -n "$kill_list" ] && return 1
    return 0
}

# __proc_pids {program} [pidfile]
# Set $pid to pids from /run* for {program}.  $pid should be declared
# local in the caller.
# Returns LSB exit code for the 'status' action.
__pids_var_run() {
    local base=${1##*/}
    local pid_file=${2:-/run/$base.pid}
    local pid_dir=$(/usr/bin/dirname $pid_file > /dev/null)
    local binary=$3

    [ -d "$pid_dir" ] && [ ! -r "$pid_dir" ] && return 4

    pid=
    if [ -f "$pid_file" ] ; then
            local line p

        [ ! -r "$pid_file" ] && return 4 # "user had insufficient privilege"
        while : ; do
            read line
            [ -z "$line" ] && break
            for p in $line ; do
                if [ -z "${p//[0-9]/}" ] && [ -d "/proc/$p" ] ; then
                    if [ -n "$binary" ] ; then
                        local b=$(readlink /proc/$p/exe | sed -e 's/\s*(deleted)$//')
                        [ "$b" != "$binary" ] && continue
                    fi
                    pid="$pid $p"
                fi
            done
        done < "$pid_file"

            if [ -n "$pid" ]; then
                    return 0
            fi
        return 1 # "Program is dead and /run pid file exists"
    fi
    return 3 # "Program is not running"
}

# Output PIDs of matching processes, found using pidof
__pids_pidof() {
    pidof -c -o $$ -o $PPID -o %PPID -x "$1" || \
        pidof -c -o $$ -o $PPID -o %PPID -x "${1##*/}"
}


# A function to start a program.
daemon() {
    # Test syntax.
    local gotbase= force= nicelevel corelimit
    local pid base= user= nice= bg= pid_file=
    local cgroup=
    nicelevel=0
    while [ "$1" != "${1##[-+]}" ]; do
        case $1 in
        '')
            echo $"$0: Usage: daemon [+/-nicelevel] {program}" "[arg1]..."
            return 1
            ;;
        --check)
            base=$2
            gotbase="yes"
            shift 2
            ;;
        --check=?*)
            base=${1#--check=}
            gotbase="yes"
            shift
            ;;
        --user)
            user=$2
            shift 2
            ;;
        --user=?*)
            user=${1#--user=}
            shift
            ;;
        --pidfile)
            pid_file=$2
            shift 2
            ;;
        --pidfile=?*)
            pid_file=${1#--pidfile=}
            shift
            ;;
        --force)
            force="force"
            shift
            ;;
        [-+][0-9]*)
            nice="nice -n $1"
            shift
            ;;
        *)
            echo $"$0: Usage: daemon [+/-nicelevel] {program}" "[arg1]..."
            return 1
            ;;
      esac
    done

    # Save basename.
    [ -z "$gotbase" ] && base=${1##*/}

    # See if it's already running. Look *only* at the pid file.
    __pids_var_run "$base" "$pid_file"

    [ -n "$pid" -a -z "$force" ] && return

    # make sure it doesn't core dump anywhere unless requested
    corelimit="ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0}"

    # if they set NICELEVEL in /etc/sysconfig/foo, honor it
    [ -n "${NICELEVEL:-}" ] && nice="nice -n $NICELEVEL"

    # Echo daemon
    [ "${BOOTUP:-}" = "verbose" -a -z "${LSB:-}" ] && echo -n " $base"

    # And start it up.
    if [ -z "$user" ]; then
       $nice /bin/bash -c "$corelimit >/dev/null 2>&1 ; $*"
    else
       $nice runuser -s /bin/bash $user -c "$corelimit >/dev/null 2>&1 ; $*"
    fi

    [ "$?" -eq 0 ] && success $"$base startup" || failure $"$base startup"
}

# A function to stop a program.
killproc() {
    local RC killlevel= base pid pid_file= delay try binary=

    RC=0; delay=3; try=0
    # Test syntax.
    if [ "$#" -eq 0 ]; then
        echo $"Usage: killproc [-p {pidfile} [-b {binary}]] [-d {delay}] {program} [-signal]"
        return 1
    fi
    if [ "$1" = "-p" ]; then
        pid_file=$2
        shift 2
    fi
    if [ "$1" = "-b" ]; then
        if [ -z $pid_file ]; then
            echo $"-b option can be used only with -p"
            echo $"Usage: killproc [-p {pidfile} [-b {binary}]] [-d {delay}] {program} [-signal]"
            return 1
        fi
        binary=$2
        shift 2
    fi
    if [ "$1" = "-d" ]; then
        delay=$(echo $2 | awk -v RS=' ' -v IGNORECASE=1 '{if($1!~/^[0-9.]+[smhd]?$/) exit 1;d=$1~/s$|^[0-9.]*$/?1:$1~/m$/?60:$1~/h$/?60*60:$1~/d$/?24*60*60:-1;if(d==-1) exit 1;delay+=d*$1} END {printf("%d",delay+0.5)}')
        if [ "$?" -eq 1 ]; then
            echo $"Usage: killproc [-p {pidfile} [-b {binary}]] [-d {delay}] {program} [-signal]"
            return 1
        fi
        shift 2
    fi


    # check for second arg to be kill level
    [ -n "${2:-}" ] && killlevel=$2

    # Save basename.
    base=${1##*/}

    # Find pid.
    __pids_var_run "$1" "$pid_file" "$binary"
    RC=$?
    if [ -z "$pid" ]; then
        if [ -z "$pid_file" ]; then
            pid="$(__pids_pidof "$1")"
        else
            [ "$RC" = "4" ] && { failure $"$base shutdown" ; return $RC ;}
        fi
    fi

    # Kill it.
    if [ -n "$pid" ] ; then
        [ "$BOOTUP" = "verbose" -a -z "${LSB:-}" ] && echo -n "$base "
        if [ -z "$killlevel" ] ; then
            __kill_pids_term_kill -d $delay $pid
            RC=$?
            [ "$RC" -eq 0 ] && success $"$base shutdown" || failure $"$base shutdown"
        # use specified level only
        else
            if checkpid $pid; then
                kill $killlevel $pid >/dev/null 2>&1
                RC=$?
                [ "$RC" -eq 0 ] && success $"$base $killlevel" || failure $"$base $killlevel"
            elif [ -n "${LSB:-}" ]; then
                RC=7 # Program is not running
            fi
        fi
    else
        if [ -n "${LSB:-}" -a -n "$killlevel" ]; then
            RC=7 # Program is not running
        else
            failure $"$base shutdown"
            RC=0
        fi
    fi

    # Remove pid file if any.
    if [ -z "$killlevel" ]; then
        rm -f "${pid_file:-/run/$base.pid}"
    fi
    return $RC
}

# A function to find the pid of a program. Looks *only* at the pidfile
pidfileofproc() {
    local pid

    # Test syntax.
    if [ "$#" = 0 ] ; then
        echo $"Usage: pidfileofproc {program}"
        return 1
    fi

    __pids_var_run "$1"
    [ -n "$pid" ] && echo $pid
    return 0
}

# A function to find the pid of a program.
pidofproc() {
    local RC pid pid_file=

    # Test syntax.
    if [ "$#" = 0 ]; then
        echo $"Usage: pidofproc [-p {pidfile}] {program}"
        return 1
    fi
    if [ "$1" = "-p" ]; then
        pid_file=$2
        shift 2
    fi
    fail_code=3 # "Program is not running"

    # First try "/run/*.pid" files
    __pids_var_run "$1" "$pid_file"
    RC=$?
    if [ -n "$pid" ]; then
        echo $pid
        return 0
    fi

    [ -n "$pid_file" ] && return $RC
    __pids_pidof "$1" || return $RC
}

status() {
    local base pid lock_file= pid_file= binary=

    # Test syntax.
    if [ "$#" = 0 ] ; then
        echo $"Usage: status [-p {pidfile}] [-l {lockfile}] [-b {binary}] {program}"
        return 1
    fi
    if [ "$1" = "-p" ]; then
        pid_file=$2
        shift 2
    fi
    if [ "$1" = "-l" ]; then
        lock_file=$2
        shift 2
    fi
    if [ "$1" = "-b" ]; then
        if [ -z $pid_file ]; then
            echo $"-b option can be used only with -p"
            echo $"Usage: status [-p {pidfile}] [-l {lockfile}] [-b {binary}] {program}"
            return 1
        fi
        binary=$2
        shift 2
    fi
    base=${1##*/}

    if [ "$_use_systemctl" = "1" ]; then
        systemctl status ${0##*/}.service
        ret=$?
        # LSB daemons that dies abnormally in systemd looks alive in systemd's eyes due to RemainAfterExit=yes
        # lets adjust the reality a little bit
        if systemctl show -p ActiveState ${0##*/}.service | grep -q '=active$' && \
        systemctl show -p SubState ${0##*/}.service | grep -q '=exited$' ; then
            ret=3
        fi
        return $ret
    fi

    # First try "pidof"
    __pids_var_run "$1" "$pid_file" "$binary"
    RC=$?
    if [ -z "$pid_file" -a -z "$pid" ]; then
        pid="$(__pids_pidof "$1")"
    fi
    if [ -n "$pid" ]; then
        echo $"${base} (pid $pid) is running..."
        return 0
    fi

    case "$RC" in
    0)
        echo $"${base} (pid $pid) is running..."
        return 0
        ;;
    1)
        echo $"${base} dead but pid file exists"
        return 1
        ;;
    4)
        echo $"${base} status unknown due to insufficient privileges."
        return 4
        ;;
    esac
    if [ -z "${lock_file}" ]; then
        lock_file=${base}
    fi
    # See if /var/lock/subsys/${lock_file} exists
    if [ -f /var/lock/subsys/${lock_file} ]; then
        echo $"${base} dead but subsys locked"
        return 2
    fi
    echo $"${base} is stopped"
    return 3
}

echo_success() {
    [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
    echo -n "["
    [ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS
    echo -n $"  OK  "
    [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
    echo -n "]"
    echo -ne "\r"
    return 0
}

echo_failure() {
    [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
    echo -n "["
    [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
    echo -n $"FAILED"
    [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
    echo -n "]"
    echo -ne "\r"
    return 1
}

echo_passed() {
    [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
    echo -n "["
    [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
    echo -n $"PASSED"
    [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
    echo -n "]"
    echo -ne "\r"
    return 1
}

echo_warning() {
    [ "$BOOTUP" = "color" ] && $MOVE_TO_COL
    echo -n "["
    [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
    echo -n $"WARNING"
    [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
    echo -n "]"
    echo -ne "\r"
    return 1
}

# Inform the graphical boot of our current state
update_boot_stage() {
    if [ -x /bin/plymouth ]; then
        /bin/plymouth --update="$1"
    fi
    return 0
}

# Log that something succeeded
success() {
    [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_success
    return 0
}

# Log that something failed
failure() {
    local rc=$?
    [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_failure
    [ -x /bin/plymouth ] && /bin/plymouth --details
    return $rc
}

# Log that something passed, but may have had errors. Useful for fsck
passed() {
    local rc=$?
    [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_passed
    return $rc
}

# Log a warning
warning() {
    local rc=$?
    [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_warning
    return $rc
}

# Run some action. Log its output.
action() {
    local STRING rc

    STRING=$1
    echo -n "$STRING "
    shift
    "$@" && success $"$STRING" || failure $"$STRING"
    rc=$?
    echo
    return $rc
}

# returns OK if $1 contains $2
strstr() {
    [ "${1#*$2*}" = "$1" ] && return 1
    return 0
}

# Check whether file $1 is a backup or rpm-generated file and should be ignored
# Copy of the function is present in usr/sbin/service
is_ignored_file() {
    case "$1" in
    *~ | *.bak | *.old | *.orig | *.rpmnew | *.rpmorig | *.rpmsave)
        return 0
        ;;
    esac
    return 1
}

# Convert the value ${1} of time unit ${2}-seconds into seconds:
convert2sec() {
  local retval=""

  case "${2}" in
    deci)   retval=$(awk "BEGIN {printf \"%.1f\", ${1} / 10}") ;;
    centi)  retval=$(awk "BEGIN {printf \"%.2f\", ${1} / 100}") ;;
    mili)   retval=$(awk "BEGIN {printf \"%.3f\", ${1} / 1000}") ;;
    micro)  retval=$(awk "BEGIN {printf \"%.6f\", ${1} / 1000000}") ;;
    nano)   retval=$(awk "BEGIN {printf \"%.9f\", ${1} / 1000000000}") ;;
    piko)   retval=$(awk "BEGIN {printf \"%.12f\", ${1} / 1000000000000}") ;;
  esac

  echo "${retval}"
}

# Evaluate shvar-style booleans
is_true() {
    case "$1" in
    [tT] | [yY] | [yY][eE][sS] | [oO][nN] | [tT][rR][uU][eE] | 1)
        return 0
        ;;
    esac
    return 1
}

# Evaluate shvar-style booleans
is_false() {
    case "$1" in
    [fF] | [nN] | [nN][oO] | [oO][fF][fF] | [fF][aA][lL][sS][eE] | 0)
        return 0
        ;;
    esac
    return 1
}

# Apply sysctl settings, including files in /etc/sysctl.d
apply_sysctl() {
    if [ -x /lib/systemd/systemd-sysctl ]; then
    /lib/systemd/systemd-sysctl
    else
        for file in /usr/lib/sysctl.d/*.conf ; do
            is_ignored_file "$file" && continue
            [ -f /run/sysctl.d/${file##*/} ] && continue
            [ -f /etc/sysctl.d/${file##*/} ] && continue
            test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1
        done
        for file in /run/sysctl.d/*.conf ; do
            is_ignored_file "$file" && continue
            [ -f /etc/sysctl.d/${file##*/} ] && continue
            test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1
        done
        for file in /etc/sysctl.d/*.conf ; do
            is_ignored_file "$file" && continue
            test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1
        done
        sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
    fi
}

# A sed expression to filter out the files that is_ignored_file recognizes
__sed_discard_ignored_files='/\(~\|\.bak\|\.old\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'

if [ "$_use_systemctl" = "1" ]; then
        if  [ "x$1" = xstart -o \
              "x$1" = xstop -o \
              "x$1" = xrestart -o \
              "x$1" = xreload -o \
              "x$1" = xtry-restart -o \
              "x$1" = xforce-reload -o \
              "x$1" = xcondrestart ] ; then

        systemctl_redirect $0 $1
        exit $?
    fi
fi

strstr "$(cat /proc/cmdline)" "rc.debug" && set -x
return 0
```

 ao tentar subir novamente o serviço

```
[root@node03-lockss-scielored lockss]# /etc/init.d/lockss start
Reloading systemd:                                         [  OK  ]
Starting lockss (via systemctl):  Failed to start lockss.service: Unit lockss.service not found.
                                                           [FAILED]
```

crie o script de start

/usr/local/libexec/lockss-start.sh

```
#!/usr/bin/env bash
set -euo pipefail

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

USER_LOCKSS=lockss
HOME_LOCKSS=/home/lockss
LOG_DIR=/var/log/lockss
LOG_FILE=/var/log/lockss/stdout
LOCKFILE=/var/run/lockss/startdaemon.lock.lockss
KEEPGOING=/home/lockss/KeepGoing

mkdir -p /var/run/lockss "${LOG_DIR}" "${HOME_LOCKSS}"
touch "${LOG_FILE}"

chown "${USER_LOCKSS}:${USER_LOCKSS}" "${HOME_LOCKSS}" "${LOG_FILE}"
chmod 755 /var/run/lockss "${LOG_DIR}" "${HOME_LOCKSS}"
chmod 644 "${LOG_FILE}"

# não sobe outra cópia por cima
if pgrep -f '^/bin/bash /etc/lockss/startdaemon lockss$' >/dev/null 2>&1; then
  echo "LOCKSS already appears to be running"
  exit 0
fi

rm -f "${LOCKFILE}" "${KEEPGOING}"

/etc/lockss/startdaemon "${USER_LOCKSS}"

sleep 3

if ! pgrep -f '^/bin/bash /etc/lockss/startdaemon lockss$' >/dev/null 2>&1; then
  echo "LOCKSS startdaemon did not stay running" >&2
  exit 1
fi

if ! pgrep -u "${USER_LOCKSS}" -f '^/bin/sh /etc/lockss/rundaemon wait$' >/dev/null 2>&1; then
  echo "LOCKSS rundaemon did not start" >&2
  exit 1
fi

exit 0
```

Permissão

```
chmod 755 /usr/local/libexec/lockss-start.sh
```

Crie o script de stop

 /usr/local/libexec/lockss-stop.sh

```
#!/usr/bin/env bash
set -euo pipefail

rm -f /home/lockss/KeepGoing || true

pkill -TERM -f '^/bin/bash /etc/lockss/startdaemon lockss$' || true
pkill -TERM -f '^runuser -s /bin/bash - lockss -c ulimit -S -c 0 >/dev/null 2>&1 ; /etc/lockss/rundaemon wait$' || true
pkill -TERM -u lockss -f '^/bin/sh /etc/lockss/rundaemon wait$' || true
pkill -TERM -u lockss -f java || true

sleep 5

pkill -KILL -f '^/bin/bash /etc/lockss/startdaemon lockss$' || true
pkill -KILL -f '^runuser -s /bin/bash - lockss -c ulimit -S -c 0 >/dev/null 2>&1 ; /etc/lockss/rundaemon wait$' || true
pkill -KILL -u lockss -f '^/bin/sh /etc/lockss/rundaemon wait$' || true
pkill -KILL -u lockss -f java || true

rm -f /var/run/lockss/startdaemon.lock.lockss || true
```

Permissão:

```
chmod 755 /usr/local/libexec/lockss-stop.sh
```

criei /etc/systemd/system/lockss.service

```
[Unit]
Description=LOCKSS daemon
After=network.target local-fs.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/libexec/lockss-start.sh
ExecStop=/usr/local/libexec/lockss-stop.sh
TimeoutStartSec=60
TimeoutStopSec=60

[Install]
WantedBy=multi-user.target
```

Agora inicie o daemon

```
systemctl daemon-reload
systemctl status lockss
```

Depois valide:

```
cat /var/run/lockss/startdaemon.lock.lockss
ps -fp "$(cat /var/run/lockss/startdaemon.lock.lockss)"
ls -l /home/lockss/KeepGoing
```

Depois que isso estiver funcionando, confirme sempre:

```
ps -eo pid,ppid,user,cmd | egrep 'startdaemon|rundaemon|[j]ava'
```

Com o serviço rodando, você deve ver <span class="s1">**apenas uma cadeia de processos**</span>.

Se aparecerem várias, significa que algum start anterior não foi limpo.

<span class="s1">💡 </span>**Resumo honesto:**

O problema não é Rocky 9. O problema é que o <span class="s2">startdaemon</span> do LOCKSS foi escrito com um modelo de supervisão próprio (lockfile + KeepGoing + background loops), que não conversa bem com o modelo de gerenciamento de processos do systemd. Então a abordagem correta é <span class="s3">**delegar o stop para um script que mata explicitamente os processos**</span>, como você já comprovou que funciona.

</details><details id="bkmrk-plugin-o-lockss.jar-"><summary>COMPILADO LOCKSS.JAR</summary>

O lockss.jar deve ser alterado para a versão compilada pelo Rondineli. Copie o lockss.jar para o servidor e siga:

```
systemctl stop lockss
cd /usr/share/lockss/
mv lockss.jar lockss.jar.original
cp -a /home/rondinelesaad/lockss.jar .
systemctl start lockss
```

</details>

# ADSelf Service Plus

# Conhecendo o ADSelfService Plus

[![image-1653414631049.12.34.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653414631049-12-34.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653414631049-12-34.png)

##  

## O que é o ADSelfService Plus ?

O **ADSelfService** é uma solução para gestão de senhas totalmente seguro e baseado na Web, com alto nível de segurança.

Nem sempre a equipe do suporte está disponível no momento adequado para modificar uma senha. Essa situação incomoda bastante os colaboradores, porque faz perder tempo com algo que influência diretamente no acesso aos sistemas corporativos.

Com a auto redefinição de senha, o usuário pode redefinir a senha de domínio de forma remota por um navegador Web sem a presença de terceiros. Essa atividade tão corriqueira, sem dúvida, libera a equipe resolver chamados com um grau de complexidade maior.

Notificar os usuários que devem alterar a senha da rede é outro ponto crítico, com o ADSelfService as notificações são enviadas de forma automática, por e-mail, SMS ou notificações no dispositivo móvel. Dessa forma a possibilidade de comunicação é mais ampla e automática.

Essa iniciativa faz com que os colaboradores estejam devidamente informados sobre o melhor momento para atualizar suas senhas.

Além disso, reduz consideravelmente a possibilidade de esquecer de[ ](https://centric.com.br/gerenciamento-de-patches/)atualizar as senhas, de acordo com as práticas de segurança da informação.

<p class="callout warning">**Atenção: Os tópicos abaixo são destinados aos usuários.**</p>

[![image-1653414688673.13.24.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653414688673-13-24.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653414688673-13-24.png)

## Índice

### [Cadastro de Usuários](https://documentacao.scielo.org/books/manuais-publicos/page/cadastro-de-usuario "Cadastro de Usuário")

### [Alteração de Senha](https://documentacao.scielo.org/books/manuais-publicos/page/alteracao-de-senha "Alteração de Senha")

### [Desbloqueio de Conta](https://documentacao.scielo.org/books/manuais-publicos/page/desbloqueio-de-conta "Desbloqueio de Conta")

### [Edição de Perfil de Usuário](https://documentacao.scielo.org/books/manuais-publicos/page/editando-o-perfil-de-usuario "Editando o Perfil de Usuário")

### [App Celular ADSelfService](https://documentacao.scielo.org/books/manuais-publicos/page/app-celular-adselfservice)

# Cadastro de Usuário

<div drawio-diagram="1874"><img src="https://documentacao.scielo.org/uploads/images/drawio/2023-02/drawing-6-1677170226.png" alt=""/></div>

##### [<span style="background-color: rgb(45, 194, 107);">Home</span>](https://documentacao.scielo.org/books/faq/page/portal-de-apoio-operacional-a-equipe-scielo)

### <sub>Download Google Authenticator</sub>

Antes de iniciar o cadastro precisamos fazer o download do aplicativo [Google Authenticator, ](https://support.google.com/accounts/answer/1066447?hl=pt-br "Receber códigos de verificação com o Google Authenticator")conseguimos encontrar o aplicativo para diversos modelos de aparelhos de celular, basta procurar na plataforma de busca de aplicativos do dispositivo.

**App Store**

[![image-1651687066913.52.31.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651687066913-52-31.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651687066913-52-31.png)

**Google Play**

[![image-1651687122458.51.22.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651687122458-51-22.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651687122458-51-22.png)

### <sub>Cadastro ADSelfService</sub>

<p class="callout info">O acesso a aplicação pode ser realizado sem estar conectado a VPN.</p>

Abra o link de acesso a aplicação, no campo baixo:

<table border="1" id="bkmrk-adself.scielo.org" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">[adself.scielo.org](https://adself.scielo.org/authorization.do)</td></tr></tbody></table>

<p class="callout warning">Para um melhor entendimento, sugerimos abrir o manual em uma tela e o navegador com a aplicação em outra tela, dessa forma o passo a passo fica mais claro.</p>

Uma vez na tela de login, preencha os campos solicitados com o usuário e a senha de acesso a rede.

[![image-1651520515359.41.26.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651520515359-41-26.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651520515359-41-26.png)

<p class="callout info">Não se preocupe em selecionar entre ADSelfService Plus Authentication ou SCIELO. No momento em que preencher o campo usuário e senha, automaticamente será alterado para SCIELO. Esse campo é destinado ao meio de autenticação utilizado pela aplicação.</p>

[![image-1651520844203.46.06.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651520844203-46-06.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651520844203-46-06.png)

Como dito anteriormente preencha com usuário e senha da rede interna SciELO, não esqueça de preenche o captcha.

<p class="callout warning">Atenção: A tela abaixo que orienta como fazer a autenticação possui um período determinado de 5 minutos de para expiração. </p>

[![image-1651687700028.03.24.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651687700028-03-24.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651687700028-03-24.png)

Ao acessar a aplicação somos direcionados a uma página de registro.

[![image-1651521817090.03.10.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651521817090-03-10.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651521817090-03-10.png)

Somos instruídos a instalar o aplicativo Google Authenticatos, instalação essa que foi concluída no inicio no manual.

[![image-1652115578993.55.51 (1).jpeg](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652115578993-55-51-1.jpeg)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652115578993-55-51-1.jpeg)

O próximo passo, pede para abrir o aplicativo e toque em no símbolo "+", porém antes disso é necessário selecionar a opção "Ler código QR" e dessa forma escanear o código QR fornecido na tela de registro.

[![image-1652115691628.55.51.jpeg](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652115691628-55-51.jpeg)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652115691628-55-51.jpeg)

Uma vez escaneado o código temos que inserir o código forncecido no campo solicitado.

<p class="callout warning">Atenção: O token gerado possui um período de tempo de expiração.</p>

[![image-1651521694978.01.19.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651521694978-01-19.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651521694978-01-19.png)

Ao concluir o cadastro recebemos o seguinte e-mail:

[![Screen Shot 2022-05-02 at 17.18.07.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/6cescreen-shot-2022-05-02-at-17-18-07.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/6cescreen-shot-2022-05-02-at-17-18-07.png)

Voltando a tela do navegador, somos direcionados a opção para alterar a senha. Temos algumas observações no padrão de senha que deve ser criado, como podemos acompanhar abaixo:

[![image-1651688314028.16.42.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651688314028-16-42.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651688314028-16-42.png)

[![image-1651771857601.29.33.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651771857601-29-33.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651771857601-29-33.png)

<p class="callout info">Sugestão: Não utilizem Post-it para anotar senhas, não deixe um documento com lista de senhas, utilize a aplicação [PassBolt](https://passbolt.scielo.org/ "PassBolt") para gravar as suas senhas, temos um manual explicando como utilizar a ferramenta.</p>

[![image-1651772249076.32.31.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651772249076-32-31.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651772249076-32-31.png)

Uma vez que a senha foi criada e salva na ferramenta, temos a confirmação que a senha foi alterada com sucesso.

[![image-1651771873409.29.48.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651771873409-29-48.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651771873409-29-48.png)

> <p class="callout danger">**O procedimento descrito abaixo é muito importante, caso não sigam os passos abaixo o sistema não vai gravar a nova senha no sistema de gerenciamento de usuários da rede. Isso vai ocasionar bloqueio da conta, impedindo o acesso a VPN.** </p>

### Procedimentos para aplicar a troca de senha

<p class="callout warning">**Atenção: Os procedimentos descritos abaixo são cruciais para conseguir aplicar e validar a troca de senha. É IMPORTANTE QUE ESTEJA CONECTADO NA VPN.** </p>

#### Destinado aos usuários Windows 

##### <sub>Validação de senha Notebook</sub>

<p class="callout warning">Informação importante: Aos usuários de Windos, peço que sigam os passos abaixo:</p>

> <p class="callout danger">**Aos usuários de windows, pedimos que sigam os passos abaixo: Caso não sigam os passos abaixo o sistema não vai gravar a nova senha no sistema de gerenciamento de usuários da rede. Isso vai ocasionar bloqueio da conta, impedindo o acesso a VPN.** </p>

<p class="callout danger">**Atenção: Siga os passos descritos abaixo, com a VPN conectada.**</p>

- Após realizar a troca da senha da senha, vá até o menu iniciar:

[![image-1651857374255.13.27.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651857374255-13-27.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651857374255-13-27.png)

- vá até a opção de "Usuário", símbolo de user:

[![image-1651857461904.13.53.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651857461904-13-53.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651857461904-13-53.png)

- Clique no símbolo de user, depois em "Trocar de usuário":

[![image-1651857537770.29.44.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651857537770-29-44.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651857537770-29-44.png)

- Uma vez na tela de login do windows, voce de inserir a nova senha que acabou de ser cadastrada:

[![image-1651857761040.32.54.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651857761040-32-54.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651857761040-32-54.png)

- Após a validação da senha, temos a tela abaixo como confirmação:

[![image-1651857859280.33.06.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651857859280-33-06.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651857859280-33-06.png)

<p class="callout info">Observação: O procedimento que realizamos foi para validar a troca da senha, como não estamos na rede interna SciELO, preciamos realizar o procedimento para validar no serviço active directory.</p>

##### <sub>Validação de senha VPN SciELO</sub>

<p class="callout info">Uma que a senha foi alterada e validada ao realizar o procedimento acima, vamos validar a nova senha com o serviço de VPN.</p>

- Após realizar a troca da senha, vá até o aplicativo da VPN, clique com o botão direito no símbolo de "Farol":

[![image-1651858891226.38.44.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651858891226-38-44.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651858891226-38-44.png)

- Agora selecione a VPN que está conectada e clique em "Desconectar".

[![image-1651858559597.34.28.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651858559597-34-28.png) ](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651858559597-34-28.png)

- Da mesma forma, vá até o aplicativo da VPN, clique com o botão direito no símbolo de "farol" selecione a VPN e clique em "Conectar".

[![image-1651858836059.34.47.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651858836059-34-47.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651858836059-34-47.png)

- Coloque o usuário da rede e a nova senha que foi cadastrada, lembre-se de colocar o toquem da VPN.

[![image-1651858957544.34.59.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651858957544-34-59.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651858957544-34-59.png)

[![image-1651858986048.35.28.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651858986048-35-28.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651858986048-35-28.png)

- Pronto agora a VPN já esta conectada.

[![image-1651859044653.43.30.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651859044653-43-30.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651859044653-43-30.png)

<p class="callout danger">**Atenção: O procedimento deve ser realizado na VPN-DC e VPN-Matriz.**</p>

#### Destinado aos usuários macOS 

Aos usuários de macOS, peço que sigam os passos abaixo:

<p class="callout danger">**Atenção: Siga os passos descritos abaixo, com a VPN desconectada, conectando apenas quando solicitado.**</p>

##### <sub>Validação de senha VPN SciELO</sub>

- No app de VPN Tunnelblick em VPN Details.

[![image-1651772633216.42.34.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651772633216-42-34.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651772633216-42-34.png)

- Habilite o modo admin, clicando em "Enter admin mode".

[![image-1651772722138.45.03.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651772722138-45-03.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651772722138-45-03.png)

- Clique na opção ao lado dos botões " + ", " - "

[![image-1651773483487.54.47.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651773483487-54-47.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651773483487-54-47.png)

- Selecione a opção: Delete Configuration's Credentials in Keychain

[![image-1651773596157.55.17.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651773596157-55-17.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651773596157-55-17.png)

- Essa opção vai remover as credenciais salvas de user e senha.

[![image-1651773695986.55.36.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651773695986-55-36.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651773695986-55-36.png)

- Ao conectar novamnete na VPN, será solicitado Username e Password.

[![image-1651773756365.55.54.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651773756365-55-54.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651773756365-55-54.png)

<p class="callout warning">**Atenção: Não se esqueça de colocar o token da VPN no campo Security Code:**</p>

[![image-1651773839053.56.42.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651773839053-56-42.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651773839053-56-42.png)

[![image-1651774346690.12.03.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651774346690-12-03.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651774346690-12-03.png)

- Como podemos ver acima a VPN conectou de forma normal.

<p class="callout warning">**Atenção: O procedimento deve ser realizado na VPN-DC e VPN-Matriz.**</p>

# Alteração de Senha da Rede

<div drawio-diagram="1874"><img src="https://documentacao.scielo.org/uploads/images/drawio/2023-02/drawing-6-1677170226.png" alt=""/></div>

##### [<span style="background-color: rgb(45, 194, 107);">HOME</span>](https://documentacao.scielo.org/books/faq/page/portal-de-apoio-operacional-a-equipe-scielo)  


<p class="callout info">O acesso a aplicação pode ser realizado sem estar conectado a VPN.</p>

Abra o link de acesso a aplicação, no campo baixo:

<table border="1" id="bkmrk-adself.scielo.org" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">[https://adself.scielo.org](https://adself.scielo.org "adself.scielo.org")</td></tr></tbody></table>

<p class="callout warning">Para um melhor entendimento, sugerimos abrir o manual em uma tela e o navegador com a aplicação em outra tela, dessa forma o passo a passo fica mais claro.</p>

Uma vez na tela de login, selecione a opção "Esqueceu a senha ?".

[![image-1652116097864.04.07.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652116097864-04-07.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652116097864-04-07.png)

Preencha o campo com o nome de usuário da rede, não se esqueça de preencher o campo do captcha.

Após preencher os campos solicitados e confirmar, somos direcionados a tela de validação.

[![image-1652116569744.12.28.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652116569744-12-28.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652116569744-12-28.png)

Para validação da credencial de acesso temos que abrir o aplicativo [Google Authenticator,](https://support.google.com/accounts/answer/1066447?hl=pt-br "Receber códigos de verificação com o Google Authenticator") aplicativo esse que instalamos na sessão anterior do manual de cadastro de usuário.

<p class="callout warning">Atenção: A tela de verificação de credencial possui tempo de expiração de 5 minutos.</p>

[![image-1652117024904.12.34.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652117024904-12-34.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652117024904-12-34.png)

Caso o tempo da sessão expire, vamos visualizar a tela abaixo:

[![image-1652117064060.19.51.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652117064060-19-51.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652117064060-19-51.png)

Para retornar a tela principal, clique em "Por favor tente de novo".

Uma vez com o toquem em mãos, podemos dar continuidade a validação de credenciais.

[![image-1652117180985.14.23.jpeg](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652117180985-14-23.jpeg)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652117180985-14-23.jpeg)

Após a validação da credencial de acesso, somos direcionados a opção para alterar a senha. Temos algumas observações no padrão de senha que deve ser criado, como podemos acompanhar abaixo:

[![image-1652117356725.13.50.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652117356725-13-50.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652117356725-13-50.png)

<p class="callout info">Sugestão: Não utilizem Post-it para anotar senhas, não deixe um documento com lista de senhas, utilize a aplicação [PassBolt](https://passbolt.scielo.org/ "PassBolt") para gravar as suas senhas, temos um manual explicando como utilizar a ferramenta.</p>

[![image-1651772249076.32.31.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651772249076-32-31.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651772249076-32-31.png)

Uma vez que a senha foi criada e salva na ferramenta, temos a confirmação que a senha foi alterada com sucesso.

[![image-1651771873409.29.48.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651771873409-29-48.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651771873409-29-48.png)

Uma confirmação de alteração de senha é envia por e-mail.

[![image-1652117498389.49.44.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652117498389-49-44.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652117498389-49-44.png)

> <p class="callout danger">**O procedimento descrito abaixo é muito importante, caso não sigam os passos abaixo o sistema não vai gravar a nova senha no sistema de gerenciamento de usuários da rede. Isso vai ocasionar bloqueio da conta, impedindo o acesso a VPN.** </p>

### Procedimentos para aplicar a troca de senha

<p class="callout warning">**Atenção: Os procedimentos descritos abaixo são importantes para conseguir aplicar e validar a troca de senha.**</p>

### Se você for usuário usuários Windows siga esta instrução  


#### <sub>Validação de senha VPN SciELO</sub>

<p class="callout info">Uma que a senha foi alterada e validada ao realizar o procedimento acima, vamos validar a nova senha com o serviço de VPN.</p>

- Após realizar a troca da senha, vá até o aplicativo da VPN, clique com o botão direito no símbolo de "Farol":

[![image-1651858891226.38.44.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651858891226-38-44.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651858891226-38-44.png)

- Agora selecione a VPN que está conectada e clique em "Desconectar". Se o botão Desconectar estiver desabilitado significa que você não está conectado(a). Basta clicar em Conectar para realizar a conexão.

[![image-1651858559597.34.28.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651858559597-34-28.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651858559597-34-28.png)

- Da mesma forma, vá até o aplicativo da VPN, clique com o botão direito no símbolo de "farol" selecione a VPN e clique em "Conectar".

[![image-1651858836059.34.47.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651858836059-34-47.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651858836059-34-47.png)

- Coloque o usuário da rede e a nova senha que foi cadastrada, lembre-se de colocar o toquem da VPN.

[![image-1651858957544.34.59.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651858957544-34-59.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651858957544-34-59.png)

[![image-1651858986048.35.28.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651858986048-35-28.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651858986048-35-28.png)

- Pronto agora a VPN já esta conectada.

[![image-1651859044653.43.30.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651859044653-43-30.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651859044653-43-30.png)

<p class="callout danger">**Atenção: O procedimento deve ser realizado na VPN-DC e VPN-Matriz.**</p>

#### <sub>Validação de senha Notebook</sub>

Este procedimento é importante, pois garantirá que a senha alterada será a mesma usada para fazer logon no windows. O fato de trocar a senha via [https://adself.scielo.org](https://adself.scielo.org) não significa que a senha do logon do windows foi alterada. Quando estávamos no escritório isso era automático, pois estávamos na mesma rede. Agora como estamos em Trabalho Remoto, isso não acontece.

<p class="callout danger">**Atenção: Siga os passos descritos abaixo, com a VPN conectada.**</p>

<p class="callout warning">Informação importante: Aos usuários de Windows, peço que sigam os passos abaixo:</p>

> <p class="callout danger">**Aos usuários de Windows, pedimos que sigam os passos abaixo: Caso não sigam os passos abaixo o sistema não vai gravar a nova senha no sistema de gerenciamento de usuários da rede. Isso vai ocasionar bloqueio da conta, impedindo o acesso a VPN.** </p>

- Após realizar a troca da senha da senha, vá até o menu iniciar:

[![image-1651857374255.13.27.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651857374255-13-27.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651857374255-13-27.png)

- vá até a opção de "Usuário", símbolo de user:

[![image-1651857461904.13.53.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651857461904-13-53.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651857461904-13-53.png)

- Clique no símbolo de user, depois em "Trocar de usuário":

[![image-1651857537770.29.44.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651857537770-29-44.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651857537770-29-44.png)

- Uma vez na tela de login do windows, voce de inserir a nova senha que acabou de ser cadastrada:

[![image-1651857761040.32.54.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651857761040-32-54.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651857761040-32-54.png)

- Após a validação da senha, temos a tela abaixo como confirmação:

[![image-1651857859280.33.06.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651857859280-33-06.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651857859280-33-06.png)

<p class="callout info">Observação: O procedimento que realizamos foi para validar a troca da senha, como não estamos na rede interna SciELO, precisamos realizar o procedimento para validar no serviço Active Directory.</p>




#### Destinado aos usuários macOS 

Aos usuários de macOS, peço que sigam os passos abaixo:

<p class="callout danger">**Atenção: Siga os passos descritos abaixo, com a VPN desconectada, conectando apenas quando solicitado.**</p>

##### <sub>Validação de senha VPN SciELO</sub>

- No app de VPN Tunnelblick em VPN Details.

[![image-1651772633216.42.34.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651772633216-42-34.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651772633216-42-34.png)

- Habilite o modo admin, clicando em "Enter admin mode".

[![image-1651772722138.45.03.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651772722138-45-03.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651772722138-45-03.png)

- Clique na opção ao lado dos botões " + ", " - "

[![image-1651773483487.54.47.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651773483487-54-47.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651773483487-54-47.png)

- Selecione a opção: Delete Configuration's Credentials in Keychain

[![image-1651773596157.55.17.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651773596157-55-17.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651773596157-55-17.png)

- Essa opção vai remover as credenciais salvas de user e senha.

[![image-1651773695986.55.36.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651773695986-55-36.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651773695986-55-36.png)

- Ao conectar novamnete na VPN, será solicitado Username e Password.

[![image-1651773756365.55.54.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651773756365-55-54.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651773756365-55-54.png)

<p class="callout warning">**Atenção: Não se esqueça de colocar o token da VPN no campo Security Code:**</p>

[![image-1651773839053.56.42.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651773839053-56-42.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651773839053-56-42.png)

[![image-1651774346690.12.03.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1651774346690-12-03.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1651774346690-12-03.png)

- Como podemos ver acima a VPN conectou de forma normal.

<p class="callout warning">**Atenção: O procedimento deve ser realizado na VPN-DC e VPN-Matriz.**</p>

# Desbloqueio de Conta da Rede

<div drawio-diagram="1874"><img src="https://documentacao.scielo.org/uploads/images/drawio/2023-02/drawing-6-1677170226.png" alt=""/></div>

##### [<span style="background-color: rgb(45, 194, 107);">HOME</span>](https://documentacao.scielo.org/books/faq/page/portal-de-apoio-operacional-a-equipe-scielo)  


<p class="callout info">O acesso a aplicação pode ser realizado sem estar conectado a VPN.</p>

Abra o link de acesso a aplicação, no campo baixo:

<table border="1" id="bkmrk-adself.scielo.org" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">[https://adself.scielo.org](https://adself.scielo.org)</td></tr></tbody></table>

<p class="callout warning">Para um melhor entendimento, sugerimos abrir o manual em uma tela e o navegador com a aplicação em outra tela, dessa forma o passo a passo fica mais claro.</p>

Uma vez na tela de login, selecione a opção "A conta foi bloqueada ?".

[![image-1652117762136.35.04.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652117762136-35-04.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652117762136-35-04.png)

Preencha o campo com o nome de usuário da rede, não se esqueça de preencher o campo do captcha.

Após preencher os campos solicitados e confirmar, somos direcionados a tela de validação.

[![image-1652117951449.37.07.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652117951449-37-07.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652117951449-37-07.png)

Para validação da credêncial de acesso temos que abrir o applicativo [Google Authenticator,](https://support.google.com/accounts/answer/1066447?hl=pt-br "Receber códigos de verificação com o Google Authenticator") aplicativo esse que instalamos na sessão anterior do manual de casdastro de usuário.

<p class="callout warning">Atenção: A tela de verificação de credêncial possui tempo de expração de 5 minutos.</p>

[![image-1652118024379.37.00.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652118024379-37-00.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652118024379-37-00.png)

Caso o tempo da sessão expire, vamos visualizar a tela abaixo:

[![image-1652117064060.19.51.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652117064060-19-51.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652117064060-19-51.png)

Para retornar a tela principal, clique em "Por favor tente de novo".

Uma vez com o toquem em mãos, podemos dar continuidade a validação de credênciais.

[![image-1652118100715.37.32.jpeg](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652118100715-37-32.jpeg)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652118100715-37-32.jpeg)

Após a validação da credêncial de acesso, somos direcionados ao desbloqueio da conta, é solicitado preencher o campo captcha e clicar em desbloquear. a conta:

[![image-1652118156923.38.05.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652118156923-38-05.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652118156923-38-05.png)

Porém caso a conta não conste como bloqueada, somos informados que o desbloqueio falhou:

[![image-1652118338321.38.30.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652118338321-38-30.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652118338321-38-30.png)

Essa informação foi adicionada no manual, com a intenção de mostrar o que a aplicação detecta se a conta está bloqueada.

O desbloqueio com sucesso deve ter o resultado abaixo:

[![image-1652118946706.54.38.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652118946706-54-38.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652118946706-54-38.png)

Ao concluir o desbloqueio da conta, recebemos um e-mail de confirmação, validando a ação realizada.

[![image-1652124202904.21.16.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652124202904-21-16.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652124202904-21-16.png)

Podemos validar o acesso com aplicações que utilizam os credênciais da rede como validação, por exemplo o site de Documentação ou o acesso remoto ao server Win-TS.

**Documentação**

[![image-1652119273597.57.38.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652119273597-57-38.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652119273597-57-38.png)

[![image-1652119293890.57.49.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652119293890-57-49.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652119293890-57-49.png)

**Win-TS**

[![image-1652119306389.58.13.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652119306389-58-13.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652119306389-58-13.png)

[![image-1652119356674.02.24.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652119356674-02-24.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652119356674-02-24.png)

# Editando o Perfil de Usuário

##### [<span style="background-color: rgb(45, 194, 107);">HOME</span>](https://documentacao.scielo.org/books/faq/page/portal-de-apoio-operacional-a-equipe-scielo)

Com a ferramenta ADSelfService, conseguimos alterar informações do perfil de usuário.

<p class="callout info">O acesso a aplicação pode ser realizado sem estar conectado a VPN.</p>

Abra o link de acesso a aplicação, no campo baixo:

<table border="1" id="bkmrk-adself.scielo.org" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">[adself.scielo.org](https://documentacao.scielo.org/adself.scielo.org)</td></tr></tbody></table>

<p class="callout warning">Para um melhor entendimento, sugerimos abrir o manual em uma tela e o navegador com a aplicação em outra tela, dessa forma o passo a passo fica mais claro.</p>

Uma vez na tela de login, selecione a opção "Entrar".

[![image-1652122973946.02.07.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652122973946-02-07.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652122973946-02-07.png)

Preencha o campo com o nome de usuário da rede, não se esqueça de preencher o campo do captcha.

Após preencher os campos solicitados e confirmar, somos direcionados a tela de perfil.

[![image-1652123519669.07.53.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652123519669-07-53.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652123519669-07-53.png)

Caso queira editar alguma informação, clique em editar:

[![image-1652123583636.12.34.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652123583636-12-34.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652123583636-12-34.png)

Podemos editar campos de nome, sobrenome, e-mail, telefone e endereço. Após os ajustes basta clicar em atualizar.

[![image-1652123591186.12.47.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652123591186-12-47.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652123591186-12-47.png)

Ao concluir a edição do perfil, recebemos um e-mail de confirmação, validando a ação realizada.

[![image-1652124284168.20.59.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652124284168-20-59.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652124284168-20-59.png)

# App Celular ADSelfService

## App Celular ManageEngine ADSelfServicePlus

Temos uma opção muito interessante que é utilizar o app de celular, conseguimos encontrar o aplicativo para diversos modelos de aparelhos de celular, basta procurar na plataforma de busca de aplicativos do dispositivo.

**App Store**

[![image-1653414366646.43.54.jpeg](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653414366646-43-54.jpeg)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653414366646-43-54.jpeg)

**Google Play**

[![image-1653414389550.45.32.jpeg](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653414389550-45-32.jpeg)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653414389550-45-32.jpeg)

### Configurando o acesso no App

Uma vez que baixamos o app, a configuração é simples e rápida. De princípio temos algumas telas com informações sobre o app e as suas funcionalidades.

[![image-1653416886676.27.43.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653416886676-27-43.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653416886676-27-43.png)

  
[![image-1653416995480.29.38.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653416995480-29-38.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653416995480-29-38.png)

Ao passar pelas telas de informações do App, temos a tela principal, com opções para Redefinir a senha e Desbloqueio da conta. Porém não podemos ainda usar essas funcionalidades, temos que primeiro configurar o servidor que o aplicativo vai se conectar para realizar os procedimento.

**Vá até a opção de "Configurações do Servidor"**

[![image-1653417200800.00.08.jpeg](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653417200800-00-08.jpeg)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653417200800-00-08.jpeg)

Será solicitado inserir o nome e/ou endereço IP do servidor, porta do servidor e selecionar o protocolo utilizado.

[![image-1653417502167.38.06.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653417502167-38-06.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653417502167-38-06.png)

<p class="callout warning">Atenção: Siga as instruções abaixo. </p>

Adicione as informações abaixo nos campos do aplicativo.

Nome do serviço:. adself.scielo.org

Porta:. 443

Protocolo:. HTTPS

[![image-1653417600600.39.42.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653417600600-39-42.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653417600600-39-42.png)

Salve a configuração, será questionado se quer habilitar o envio de notificações, recomendamos que habilite as notificações, dessa foirma quando a senha estiver para expirar o aplicativo vai notificar.

[![image-1653417721775.41.42.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653417721775-41-42.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653417721775-41-42.png)

### Redefinição de senha

Uma vez na tela principal do App, temos a opção de "Redefinição de senha".

[![image-1653417903400.44.45.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653417903400-44-45.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653417903400-44-45.png)

Clique na opção, "Redefinição de senha".

[![image-1653418013827.46.38.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653418013827-46-38.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653418013827-46-38.png)

Informe o nome do usuário e a senha atual, uma vez que fizemos o login, somos direcionados a tela de redefinição da senha.

[![image-1653418152050.48.26.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653418152050-48-26.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653418152050-48-26.png)

Temos alguns padrões para seguir no momento de criar a senha.

<p class="callout warning">Atenção: É importante seguir o padrão solicitado, o aplicativo da um check quando cumprimos os requisitos para criar a senha.</p>

[![image-1653418341387.52.11.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653418341387-52-11.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653418341387-52-11.png)

Seguindo o padrão solicitado, conseguimos alterar a senha com sucesso.

[![image-1653418409515.53.20.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653418409515-53-20.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653418409515-53-20.png)

<p class="callout danger">Atenção: Para aplicar a alteração de senha, após o procedimento de redefinição de senha é obrigatório seguir o procedimento abaixo, caso contrário o procedimento não será replicado.</p>

###   


#### Procedimentos para aplicar a troca de senha

##### [Destinado aos usuários macOS ](https://documentacao.scielo.org/books/manuais-publicos/page/cadastro-de-usuario#bkmrk-destinado-aos-usu%C3%A1ri)

##### [Destinado aos usuários Windows ](https://documentacao.scielo.org/books/manuais-publicos/page/cadastro-de-usuario#bkmrk-destinado-aos-usu%C3%A1ri-0)

### Desbloqueio da conta

Uma vez na tela principal do App, temos a opção de "Desbloqueio da conta".

[![image-1653417903400.44.45.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653417903400-44-45.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653417903400-44-45.png)

Clique na opção, "Desbloqueio da conta".

[![image-1653419347517.08.25.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653419347517-08-25.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653419347517-08-25.png)

Informe o nome do usuário da rede.

Será solicitado o "Código de verificação" do [Google Authenticator.](https://support.google.com/accounts/answer/1066447?hl=pt-br "Receber códigos de verificação com o Google Authenticator")

[![image-1653419435212.10.20.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653419435212-10-20.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653419435212-10-20.png)

Copie o codigo gerado no App Google Authenticator.

[![image-1653419550084.11.55.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653419550084-11-55.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653419550084-11-55.png)

Uma vez que a credêncial de acesso foi validada somos direcionados ao desbloqueio da conta.

[![image-1653419592632.12.53.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653419592632-12-53.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653419592632-12-53.png)

Porém caso a conta não conste como bloqueada, somos informados que o desbloqueio falhou:

[![image-1653420070153.15.53.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653420070153-15-53.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653420070153-15-53.png)

Essa informação foi adicionada no manual, com a intenção de mostrar o que a aplicação detecta se a conta está bloqueada.

O desbloqueio com sucesso deve ter o resultado abaixo:

[![image-1653420153016.22.12.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1653420153016-22-12.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1653420153016-22-12.png)

<p class="callout danger">Atenção: Para aplicar o desbloquei de senha, após o procedimento é obrigatório seguir o procedimento abaixo, caso contrário o procedimento, não será replicado.</p>

###   


#### Procedimentos para aplicar a troca de senha

##### [Destinado aos usuários Windows ](https://documentacao.scielo.org/books/manuais-publicos/page/cadastro-de-usuario#bkmrk-destinado-aos-usu%C3%A1ri-0)

##### [Destinado aos usuários macOS ](https://documentacao.scielo.org/books/manuais-publicos/page/cadastro-de-usuario#bkmrk-destinado-aos-usu%C3%A1ri)

# Passbolt

# CADASTRO DE USUARIO NO PASSBOLT

<div drawio-diagram="1874"><img src="https://documentacao.scielo.org/uploads/images/drawio/2023-02/drawing-6-1677170226.png" alt=""/></div>

##### [<span style="background-color: rgb(45, 194, 107);">HOME</span>](https://documentacao.scielo.org/books/faq/page/portal-de-apoio-operacional-a-equipe-scielo)  


## O que é o Passbolt ?

O [Passbolt](https://www.passbolt.com/) é um gerenciador de senhas gratuito e de código aberto desenvolvido para equipes. Ele permite que sua equipe compartilhe e armazene com segurança credenciais como a senha wifi do seu escritório ou as senhas da conta de mídia social da sua organização.

## Cadastro Passbolt

Ao realizar o cadastro do usuário é enviado um e-mail para conta cadastrada:

[![image-1652211958128.45.44.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652211958128-45-44.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652211958128-45-44.png)

O e-mail recebido direciona para um cadastro:

[![image-1652212008676.52.42.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652212008676-52-42.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652212008676-52-42.png)

No momento do cadastro é solicitado instalar a extensão de navegador do aplicativo Passbolt.

[![image-1652212121961.53.16.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652212121961-53-16.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652212121961-53-16.png)

Como é uma extensão para o navegador, não é necessário utilizar senha de administrador para instalar:

[![image-1652212212825.53.46.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652212212825-53-46.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652212212825-53-46.png)

Basta clicar em "Usar no Chrome" e adicionar a extensão:

[![image-1652212280482.54.04.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652212280482-54-04.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652212280482-54-04.png)

Após adicionar a extensão siga para página da aplicação:

<table border="1" id="bkmrk-passbolt.scielo.org" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">[passbolt.scielo.org](https://passbolt.scielo.org/ "passbolt.scielo.org")</td></tr></tbody></table>

  
Adicione o e-mail cadastrado:

[![image-1652212418040.56.58.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652212418040-56-58.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652212418040-56-58.png)

Após adicionar o e-mail do cadastrado, um novo e-mail é enviado para cadastrar a senha:

[![image-1652212551211.57.25.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652212551211-57-25.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652212551211-57-25.png)

Ao verificar o e-mail e clicar no link de criação de senha, somos direcionado a página de criação de senha. Temos algumas observações no padrão de senha que deve ser criada, como podemos acompanhar abaixo:

[![image-1652212655231.58.47.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652212655231-58-47.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652212655231-58-47.png)

Ao criar a senha somos direcionados a salvar um arquivo com token para recuperação de conta:

[![image-1652212981557.01.08.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652212981557-01-08.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652212981557-01-08.png)

<p class="callout warning">Atenção: É muito importante guardar esse arquivo de recuperação de senha, salve ele em um local fácil de achar caso seja necessário.</p>

[![image-1652213084502.02.01.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652213084502-02-01.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652213084502-02-01.png)

Após salvar o aquivo de recuperação, faça login na página inicial da aplicação:

<table border="1" id="bkmrk-passbolt.scielo.org-0" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">[passbolt.scielo.org](https://passbolt.scielo.org/ "passbolt.scielo.org")</td></tr></tbody></table>

[![image-1652213218789.03.32.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652213218789-03-32.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652213218789-03-32.png)

## Create a Password

Para criar o armazenamento de senha de um determinado site ou de uma aplicação podemos ir diretamente no site da aplicação:

<table border="1" id="bkmrk-passbolt.scielo.org-1" style="border-collapse: collapse; width: 100%;"><tbody><tr><td style="width: 100%;">[passbolt.scielo.org](https://passbolt.scielo.org/ "passbolt.scielo.org")</td></tr></tbody></table>

Clicar no canto superior esquerdo em Create:

[![image-1652288301408.57.48.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652288301408-57-48.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652288301408-57-48.png)

Na tela que abrir de criação de senha, adicionar as seuintes informações:

[![image-1652288479690.58.40.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652288479690-58-40.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652288479690-58-40.png)

- Nome - Nome de exibição;
- URI - URL do site;
- Username - Usuário de acesso ao site ou aplicação;
- Password - Senha de acesso ao site ou aplicação;
- Description - Uma breve desdrição caso queira para identficar melhor o acesso ou a aplicação;

Outra forma ainda mais simples para cadastrar a senha é da seguinte forma:

Com a extensão já instalada, faça login para aribuir seu usuário e senha:

[![image-1652288782815.53.08.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652288782815-53-08.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652288782815-53-08.png)

Primeiro, clique icone de extensões do seu navegador, idetifique a extensão Passbolt e clique nela:

[![image-1652289072389.08.29.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652289072389-08-29.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652289072389-08-29.png)

Informe o usuário e senha cadastrados anteriormente, lembre-se de asinalar a opção de Remember until I log out:

Clique no icone que aparece do símbolo da aplicação Passbolt:

[![image-1652289327946.05.32.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652289327946-05-32.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652289327946-05-32.png)

Clique em "Create a new credential", da mesma forma cadastre as informações:

- Nome - Nome de exibição;
- URI - URL do site;
- Username - Usuário de acesso ao site ou aplicação;
- Password - Senha de acesso ao site ou aplicação;
- Description - Uma breve desdrição caso queira para identficar melhor o acesso ou a aplicação;

[![image-1652289421456.08.44.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652289421456-08-44.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652289421456-08-44.png)

Podemos ver que no acesso ao site da aplicação, foi cadastrado o acesso a aplicação:

[![image-1652289459255.10.29.png](https://documentacao.scielo.org/uploads/images/gallery/2022-05/scaled-1680-/image-1652289459255-10-29.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-05/image-1652289459255-10-29.png)

## Configurando o Aplicativo Móvel  


<span style="vertical-align: inherit;">Você precisará transferir informações do navegador para o seu dispositivo móvel: </span>

<span style="vertical-align: inherit;">1. Conecte-se à sua conta passbolt com seu navegador favorito. </span>

<span style="vertical-align: inherit;">2. Acesse seu perfil de usuário no navegador. </span>

[![image-1660829889481.png](https://documentacao.scielo.org/uploads/images/gallery/2022-08/scaled-1680-/image-1660829889481.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-08/image-1660829889481.png)

<span style="vertical-align: inherit;">3. Você verá um novo item de menu “Configuração móvel”, acesse-o e clique no botão iniciar.   
</span>

[![image-1660829988272.png](https://documentacao.scielo.org/uploads/images/gallery/2022-08/scaled-1680-/image-1660829988272.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-08/image-1660829988272.png)

4\. Baixe o aplicativo no dispositivo

5\. Clique em start e escaneie o QRcode pelo aplicativo.

Pronto!!!   
Ja pode gerenciar suas credenciais pelo Smarthphone.

# <span style="vertical-align: inherit;">Como recuperar uma conta? </span>

## <span style="vertical-align: inherit;">Recupere uma conta com o kit de recuperação </span>

<span style="vertical-align: inherit;">O kit de recuperação pode ser usado se você estiver configurando o passbolt em uma nova máquina porque perdeu, atualizou ou reinstalou o anterior. Este procedimento também pode ser usado para configurar o passbolt em uma máquina adicional. </span>

### <span style="vertical-align: inherit;">Requisitos </span>

<span style="vertical-align: inherit;">Você pode seguir este procedimento se estiver atendendo aos seguintes requisitos: </span>

<div class="col7" id="bkmrk-voc%C3%AA-possui-uma-cont" markdown="1"><div class="col7" markdown="1">- <span style="vertical-align: inherit;">Você possui uma conta ativa; </span>
- <span style="vertical-align: inherit;">Você está de posse do seu kit de recuperação, ele contém uma cópia da chave privada associada à sua conta; </span>
- <span style="vertical-align: inherit;">Você se lembra da sua senha. </span>

</div></div><span style="vertical-align: inherit;">Se você perdeu seu kit de recuperação ou sua senha e se inscreveu no programa de recuperação de conta, confira este </span>[<span style="vertical-align: inherit;">documentação </span>](https://help.passbolt.com/faq/start/account-recover#recover-account-recovery-program)<span style="vertical-align: inherit;">. </span>

### <span style="vertical-align: inherit;">Procedimento </span>

**<span style="vertical-align: inherit;">Etapa 1. </span>**<span style="vertical-align: inherit;">Para recuperar, você precisará acessar o URL do seu domínio e adicionar </span>`/recover`<span style="vertical-align: inherit;">no final da url, por exemplo </span>`https://yourpassbolt.com/recover`<span style="vertical-align: inherit;">. </span>**<span style="vertical-align: inherit;">Etapa 2. </span>**<span style="vertical-align: inherit;">Preencha o formulário fornecendo seu endereço de e-mail. </span>

**<span style="vertical-align: inherit;">Etapa 3. </span>**<span style="vertical-align: inherit;">Siga o link em sua caixa de correio. </span>

**<span style="vertical-align: inherit;">Etapa 4. </span>**<span style="vertical-align: inherit;">Siga as etapas de recuperação, que são muito parecidas com a configuração inicial. Você precisará importar sua chave privada. </span>

<span style="vertical-align: inherit;">Etapa 5. Digite sua senha para fazer o login! </span>

### <span style="vertical-align: inherit;">Recupere uma conta com o programa de recuperação de conta </span>

<span style="vertical-align: inherit;">A recuperação de conta é um recurso introduzido com o passbolt v3.6.0 que visa ajudar os usuários a recuperar suas contas em caso de kit de recuperação ou perda de senha. Para saber mais sobre recuperação de conta, confira </span>[<span style="vertical-align: inherit;">esta documentação </span>](https://help.passbolt.com/configure/account-recovery).

### <span style="vertical-align: inherit;">Requisitos </span>

<span style="vertical-align: inherit;">Você pode seguir este procedimento se estiver atendendo aos seguintes requisitos: </span>

<div class="col7" id="bkmrk-voc%C3%AA-possui-uma-cont-0" markdown="1"><div class="col7" markdown="1">- <span style="vertical-align: inherit;">Você possui uma conta ativa; </span>
- <span style="vertical-align: inherit;">Sua organização está executando o passbolt Pro &gt; v3.6.0 ou passbolt Cloud (em breve). </span>
- <span style="vertical-align: inherit;">Você se inscreveu no programa de recuperação de conta ao instalar o passbolt pela primeira vez ou por meio do espaço de trabalho de configurações do usuário. </span>

</div></div>### <span style="vertical-align: inherit;">Procedimento </span>

<span style="vertical-align: inherit;">Existem 2 maneiras de iniciar o procedimento: </span>

<div class="col7" id="bkmrk-supondo-que-a-extens" markdown="1"><div class="col7" markdown="1">1. <span style="vertical-align: inherit;">Supondo que a extensão do navegador esteja configurada, mas a senha seja perdida: os usuários podem, a qualquer momento, clicar no link “ajuda, perdi minha senha” na tela de login. Um e-mail será enviado a eles para iniciar o procedimento. </span>

<figure>![Tela de login com o recurso de recuperação de conta](https://help.passbolt.com/assets/img/help/2022/07/account-recovery-help-lost-passphrase.png)<span class="legend"><span style="vertical-align: inherit;">FIG. Tela de login com o recurso de recuperação de conta </span></span></figure>1. <span style="vertical-align: inherit;">Supondo que os usuários estejam configurando o Passbolt para um novo navegador ou um novo perfil de navegador: durante o processo, eles serão solicitados a fornecer um kit de recuperação e sua senha. Se uma das informações estiver faltando, os usuários podem clicar no link “ajuda, perdi minha chave privada”. Os usuários receberão um e-mail para iniciar o procedimento. </span>

<figure>![Recuperar tela com o link de ajuda](https://help.passbolt.com/assets/img/help/2022/07/account-recovery-help-lost-private-key.png)<span class="legend"><span style="vertical-align: inherit;">FIG. Recuperar tela com o link de ajuda </span></span></figure></div></div>### <span style="vertical-align: inherit;">Como é o procedimento de recuperação de conta </span>

<div class="col7" id="bkmrk-os-usu%C3%A1rios-solicita" markdown="1">1. <span style="vertical-align: inherit;">Os usuários solicitaram uma recuperação de conta e acabaram de receber um e-mail para começar. O e-mail contém um link que leva os usuários à página de solicitação de recuperação de conta. Preste atenção que neste momento, o navegador que está sendo usado deve ser aquele em que a extensão do navegador deve ser configurada para acessar o aplicativo. Se o navegador ou perfil for alterado durante o processo, os usuários serão bloqueados em algum momento e talvez precisem reiniciar desde o início. </span>
2. <span style="vertical-align: inherit;">Os usuários são solicitados a fornecer uma nova senha e definir seu token de segurança. Observe que a senha escolhida não é temporária e será a nova senha para fazer login. É o mesmo para o token de segurança. </span>
3. <span style="vertical-align: inherit;">Após essas etapas, um e-mail é enviado aos administradores para informar que uma recuperação de conta foi solicitada. Os usuários precisam esperar que eles aceitem a solicitação de recuperação de conta (eles também podem rejeitá-la se desejarem e os usuários não poderão concluir o processo de recuperação). </span>
4. <span style="vertical-align: inherit;">Se eles rejeitarem ou aceitarem a solicitação, um e-mail será enviado para informar os usuários sobre sua escolha. Se for aceito, o e-mail contém um link que os usuários podem seguir para prosseguir com o procedimento de recuperação de conta. </span>
5. <span style="vertical-align: inherit;">Nesta etapa, os usuários são solicitados a fornecer a senha que escolheram anteriormente. Se eles não se lembrarem, ainda poderão solicitar outra recuperação de conta na interface. Depois de inserir a senha correta, a extensão do navegador fará o login dos usuários após garantir que eles tenham baixado o novo kit de recuperação. </span>

</div>

# Passo a Passo Assinatura digital PDF

Baixe o documento recebido para a pasta de preferência:

[![image-1664981365957.png](https://documentacao.scielo.org/uploads/images/gallery/2022-10/scaled-1680-/image-1664981365957.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-10/image-1664981365957.png)

Acesse o XODO  
  
[https://pdf.online/pt/assinar-pdf](https://pdf.online/pt/assinar-pdf)

Importe ou arraste o documento baixado

[![image-1664981676779.png](https://documentacao.scielo.org/uploads/images/gallery/2022-10/scaled-1680-/image-1664981676779.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-10/image-1664981676779.png)

Clique no espaço onde deverá assinar

[![image-1664981798100.png](https://documentacao.scielo.org/uploads/images/gallery/2022-10/scaled-1680-/image-1664981798100.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-10/image-1664981798100.png)

Adicione um arquivo, ou assine.

[![image-1664983800870.png](https://documentacao.scielo.org/uploads/images/gallery/2022-10/scaled-1680-/image-1664983800870.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-10/image-1664983800870.png)

Para preencher os campos necessários, seguir neste mesmo link a seguinte opção:

[![image-1664996322957.png](https://documentacao.scielo.org/uploads/images/gallery/2022-10/scaled-1680-/image-1664996322957.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-10/image-1664996322957.png)

A ferramenta "Texto Livre" ira abrir uma caixa para digitar o texto, e você pode enquadra-la no lugar correto.

[![image-1664996530854.png](https://documentacao.scielo.org/uploads/images/gallery/2022-10/scaled-1680-/image-1664996530854.png)](https://documentacao.scielo.org/uploads/images/gallery/2022-10/image-1664996530854.png)