website

dataverse.org/

Relying on the document

Guides.dataverse.org/en/latest/i…

Note: For security reasons, you can run the following commands as user root

Install dependencies

Java

  • Download and install JDK11 or higher
  • Yum installs and switches
yum install java-11-openjdk -y

#If multiple versions are switched, version 11 

sudo alternatives --config java 

#If /etc/profile has a Java path, comment it out firstsourceTake effect only after it takes effect

Copy the code

payara

It is recommended not to run Payara as root (payara is used to run dataverse. War)

#Add a user 
useradd dataverse

# installed in /usr/local/payara5Unzip wget https://s3-eu-west-1.amazonaws.com/payara.fish/Payara+Downloads/5.2021.5/payara-5.2021.5.zip Payara - 5.2021.5.zip payara5 mv/usr/localCopy the code

Modify the permissions

chown -R root:root /usr/local/payara5 
chown dataverse /usr/local/payara5/glassfish/lib 
chown -R dataverse:dataverse /usr/local/payara5/glassfish/domains/domain1
Copy the code

Modify the model

vim /usr/local/payara5/glassfish/domains/domain1/config/domain.xml 

#
      
       -client
       to 
      
       -server
      
Copy the code

postgresql

yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm yum  makecache fast -y yum install -y postgresql13-server /usr/pgsql-13/bin/postgresql-13-setup initdb /usr/bin/systemctl start postgresql-13 /usr/bin/systemctl enable postgresql-13Copy the code

Modify the PGSQL configuration file

cd /var/lib/pgsql/13/data 

vim postgresql.conf 
#Modify the------ listen_addresses='*' port=5433 # Optional change, because another PGSQL service is running on the server and has occupied port 5432 ------
#Connect with the administrator account 
psql -U postgres -p 5433
#Add the administrator password, which will be used later 
ALTER USER postgres PASSWORD 'admin'; 
#exit 
\q 

#Example Change METHOD to MD5Vim pg_hba.conf ------ local all all MD5 host all all 127.0.0.1/32 MD5 ------
#restart 
systemctl restart postgresql-13 
#Check the status 
systemctl status postgresql-13 
#Check whether the password needs to be entered 
psql -U postgres -p 5433
Copy the code

Solr

#Run solr as the solr useruseradd solr mkdir /usr/local/solr chown solr:solr /usr/local/solr su - solr cd /usr/local/solr wget https://archive.apache.org/dist/lucene/solr/8.8.1/solr-8.8.1.tgz tar XVZF solr - 8.8.1. Solr - TGZ CD 8.8.1 cp -r server/solr/configsets/_default server/solr/collection1Copy the code

Download dataverse

Github.com/IQSS/datave…

Download dvInstall. zip and unzip it. Copy the files from DVInstall to Solr

Cp/data/dataverse/dvinstall/schema *. XML/usr/local/solr/solr - 8.8.1 / server/solr/collection1 / conf cp / data/dataverse/dvinstall/solrconfig. XML/usr/local/solr/solr - 8.8.1 / server/solr/collection1 / confCopy the code

Edit the file

Vim/usr/local/solr/solr - 8.8.1 / server/etc/jetty. The XML#Change the requestHeaderSize value to 8192 -> 102400
Copy the code

The editor

vim /etc/security/limits.conf 
#Add the following 
solr soft nproc 65000 
solr hard nproc 65000 
solr soft nofile 65000 
solr hard nofile 65000
Copy the code

Solr starts asynchronously and tries to use lsof binaries to monitor its own availability. This package does not need to be installed, but will prevent warnings in the logs at startup:

yum install lsof
Copy the code

Solr creates a core “collection1” at startup

Echo "name = collection1" > / usr/local/solr/solr - 8.8.1 / server/solr/collection1 / core propertiesCopy the code

Centos Download files

Guides.dataverse.org/en/latest/_…

Because the system version is different, I suggest to read the original text, because the server system is centos, so I download the script for centos

Guides.dataverse.org/en/latest/i…

The article suggests

cp /tmp/solr /etc/init.d 
service start solr 
chkconfig solr on
Copy the code

But the downloaded file is solr.txt

Check the contents of the file and find that it is a startup script, so just run it

#No permission chmod a+x solr.txt 
sh solr.txt start 
#Since I only started solr according to the script, the meaning of the article is to add solr to the boot service, if it is found that solr is not started, then execute the boot command again

Copy the code

(Note: the original article always stressed that do not use root user to run solr, because it is not safe, I will use root user in the process, recommend to use the solr user created.)

jq

yum install epel-release -y 
yum install jq -y 
jq --version
Copy the code

ImageMagick

yum install ImageMagick -y
Copy the code

R

yum install R-core R-core-devel -y 

#Run the R command 
R 

#Install the following packs one by one to check whether the pack is installed successfully 
install.packages("R2HTML", repos="https://cloud.r-project.org/", lib="/usr/lib64/R/library" ) 
install.packages("rjson", repos="https://cloud.r-project.org/", lib="/usr/lib64/R/library" ) 
install.packages("DescTools", repos="https://cloud.r-project.org/", lib="/usr/lib64/R/library" ) 
install.packages("Rserve", repos="https://cloud.r-project.org/", lib="/usr/lib64/R/library" ) 
install.packages("haven", repos="https://cloud.r-project.org/", lib="/usr/lib64/R/library" )
Copy the code

Rserve

Download the rserve-setup.sh file github.com/IQSS/datave…

Upload to the server for execution

sh rserve-setup.sh
Copy the code

For RedHat/CentOS 7, download the rserve.servicesystemd unit file. Copy it to/usr/lib/systemd/system/directory (guides.dataverse.org/en/latest/_…). And then:

systemctl daemon-reload 
systemctl enable rserve 
systemctl start rserve
systemctl status rserve
Copy the code

Counter Processor

cd /usr/local 
#Can't download it, download it locally and then upload itWget https://github.com/CDLUC3/counter-processor/archive/v0.0.1.tar.gz tar XVFZ v0.0.1. Tar. GzCopy the code
CD/usr/local/counter - processor - 0.0.1#Can't download it, download it locally and then upload it 
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz 
tar xvfz GeoLite2-Country.tar.gz 
cp GeoLite2-Country_*/GeoLite2-Country.mmdb maxmind_geoip
Copy the code

The geolite2-country download link above has been invalid, you need to go to the website to register and download by yourself

www.maxmind.com/en/geolite2…

After registering and logging in

Download and upload files to the server

tar xvfz GeoLite2-Country_20211116.tar.gz cp GeoLite2-Country_*/GeoLite2-Country.mmdb maxmind_geoip useradd counter Chown -r counter:counter /usr/local/counter-processor-0.0.1 yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm - y yum install python36 - python3.6 y -m ensurepip CD /usr/local/counter-processor-0.0.1 pip3 install -r requirements.txtCopy the code

Start installing Dataverse

Go to the previous directory of Dataverse

cd /data/dataverse/dvinstall
Copy the code

Modify some Settings in default.config


vim default.config 

-----------
[database] 
POSTGRES_ONLY = false 
POSTGRES_SERVER = localhost 
#Because the pgSQL-13 port of my server is not 5432, I need to change it 
POSTGRES_PORT = 5433 
#These are the databases and users that the initialization script will create 
POSTGRES_DATABASE = dvndb 
POSTGRES_USER = dvnapp 
POSTGRES_PASSWORD = 123456 
#The install.py code will connect as the postgres administrator, so enter the postgres password POSTGRES_ADMIN_PASSWORD = admin 
[system] 
ADMIN_EMAIL = [email protected]

Copy the code

Read the README before installation

less README_python.txt
Copy the code

Configure PGSQL’s lib into path

PATH=/usr/pgsql-13/bin:$PATH; export PATH
Copy the code
yum install python36-devel -y 
yum install postgresql-devel -y
Copy the code

Install the dependencies first

pip3 install psycopg2
Copy the code

Since I have changed the default port of PGSQL, I need to modify the startup script (default 5432 should be skipped).

vim install.py 

#Add as shown 
pgPort = config.get('database', 'POSTGRES_PORT') 
#Add port= to admin_conn_string'"+pgPort+"' 
admin_conn_string = "dbname='postgres' user='postgres' password='"+pgAdminPassword+"' host='"+pgHost+"' port='"+pgPort+"' "
Copy the code

The installation

python3 install.py
Copy the code

The following is output some configuration information, directly enter the line

Finally, after printing the configuration, enter confirm Y

Open http://yourserver:8080/

For example: http://10.0.0.1:8080/

Administrator Account password

  • username: dataverseAdmin
  • password: admin

The password will be reset after login

This is the end of the installation process

How do I set the language to Chinese

Guides.dataverse.org/en/5.8/inst…

Language repository: github.com/GlobalDatav…

No Chinese, copy en_US machine turn over

Rename *. Properties under en_US to *_en.properties

Then turn the machine over the Chinese configuration file

Such as:

# Bundle.propertiesHostDataverse = dataVerses = passwd= codewords dataset= dataset datasets= averse= data universe newDataverse= new data universe hostDataverse= dataVerses = passwd= dataset datasets= dataset NewDataset = newDataset files= folder file= file public= civilian restricted= restricted= restricted= restrictedaccess= restrictions granted to access find= discovery search= search language= language Created = created= deposited......Copy the code

Rename it to * _en.properties

Upload it to the server together

#First compression 
zip languages.zip *.properties 

#Add drop-down languagecurl http://localhost:8080/api/admin/settings/:Languages -X PUT -d '[{" locale ":" en ", "title" : "English"}, {" locale ":" useful ", "title" : "Chinese"}]'
#Then upload the language configuration file 
curl http://localhost:8080/api/admin/datasetfield/loadpropertyfiles -X POST --upload-file /data/dataverse/dvinstall/languages/languages.zip -H "Content-Type: application/zip" 

#Restart to take effect 
cd /usr/local/payara5/bin 
./asadmin restart-domains /data/dataverse/dvinstall/dataverse.war 

Copy the code

Refresh the page every 1 minute to see the effect