$ sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat We’ll make this user a member of the tomcat group, with a home directory of /opt/tomcat (where we will install Tomcat), and with a shell of /bin/false (so nobody can log into the account): We will create a new user and group that will run the Tomcat service. Now that Java is installed, we can create a tomcat user, which will be used to run the Tomcat service.įor security purposes, Tomcat should be run as an unprivileged user (i.e. Then install the Java Development Kit package with apt-get: We can satisfy that requirement by installing OpenJDK with apt-get.įirst, update your apt-get package index: Tomcat requires Java to be installed on the server so that any Java web application code can be executed. First, change the current directory to /opt Directory. Installation of Tomcat (one more prerequisite software for DSpace):ĭownload and extract the Tomcat package. $ select no.2 = openjdk-8 as default Įnter into Dspace package folder to download packages by issuing the following commands. $ cd /dspace_build/dspace-6.3-src-release/ Use the following command to run maven for the installation of Dspace in Installation Directory (/dspace): Then extract Dspace package by using the following command: Then simply Copy and paste (use mouse only) following line in the terminal. $ psql -username=postgres dspace -c "CREATE EXTENSION pgcrypto "Ĭreate Dspace Source directory and give permission to it:ĭownload Dspace to /dspace_build directory: Execute the following command to proceed. Now type the following command to create extension pgcrypto (simply copy & paste the following command in your command line interface) $ sudo -u dspace createdb -U dspace -E UNICODE dspace – ***if necessaryĬreate Dspace user and Dspace Installation Directory:Įxecute the following commands one by one.Ĭreate the PostgreSQL 'dspace' database and extension pgcrypto: Save and close the file ( CTRL+O, ENTER, CTRL+X) $ sudo nano /etc/postgresql/12/main/pg_hba.confĪdd this line to the configuration file at the end: Open the file "pg_hba.conf" by using the following command. Shall the new role be allowed to create more new roles? (y/n) nĪllow the database user (dspace) to connect to the database Please use the following command and follow the instructions.Įnter password for new role: $ sudo apt-get install default-jdk openjdk-8-jdk postgresql ant maven git openssh-server net-tools curl unzipĬreate the database user. Use to open Terminal.įirst update and upgrade your Ubuntu server and then Install All Prerequisite Softwares for creating Institutional Repository at your Institute. Open Terminal and execute following commands. Must know, what is to be required for creating IR using DSpace:Ĥ.Ěpache Ant (Pure Java Build Tool) v1.10.5ĥ.Ěpache Maven (Apache Build Automation Tool for Java Projects) v3.6.0Ħ.Ěpache Tomcat (Web Server for hosting Dspace) v9.0.37 Please subscribe my channel for more update.Prerequisite Softwares for Creating Institutional Repository Using DSpace. If any problem please see my YouTube channel for more details. chmod 755 /etc/init.d/tomcat startĪll is done! now browse your server ip address using 8080 port. Step #05: Setup permission for tomcat file. #!/bin/bash # BEGIN INIT INFO # Provides:tomcat8 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server # END INIT INFOįor save press Esc type :wq then press Enter. Then insert below all text into tomcat file. Step #04: Create tomcat start and stop file. Then save file using press Esc type :wq then press Enter. JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms1024m -Xmx2048m -XX:PermSize=64m -XX:MaxPermSize=256m =true -XX:+UseParallelGC -XX:MaxGCPauseMillis=100" vim /home/app/Tomcat/8.0.53/bin/catalina.sh JRE_HOME=/home/app/Java/jdk/8.0.191įor save press Esc type :wq then press Enter. Step #02: Open profile file and add java file location. update-alternatives -install "/usr/bin/javac" "javac" "/home/app/Java/jdk/8.0.191/bin/javac" update-alternatives -install "/usr/bin/java" "java" "/home/app/Java/jdk/8.0.191/bin/java" update-alternatives -set "javac" update-alternatives -set "java" chmod -R 755 /home/app/ Then run below command for select update file location. export JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms1024m -Xmx2048m -XX:PermSize=64m -XX:MaxPermSize=256m" Insert below all text into setenv.sh file and save. apt update & apt-get apt install mkdir -p mkdir -p tar xf unzip mv jdk1.8.0_191/ mv apache-tomcat-8.0.53 /home/app/Tomcat/8.0.53Ĭreate setenv.sh file for environment variable. Step #01: Server update and extract Java and Tomcat file. After complete download and connect your server via ssh then upload this file. Must be account needed for java package download. Download Java from jdk-8u191 and download Tomcat 8.0.53.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |