Date: Thu, 28 Mar 2024 05:26:18 -0400 (EDT) Message-ID: <1522066138.632.1711617978772@ip-10-208-27-219.ec2.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_631_1309055520.1711617978769" ------=_Part_631_1309055520.1711617978769 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Instructions for installing LexEVS 6.x CTS2 Documentation API Service.= p>
Clone git repository
export NPM_HOME=3D/usr/local/cts2Docs/node
export PATH=3D${PATH}:$NPM_HOME/bin
Created the nodejs start/stop script /usr/local/cts2Docs= /bin/nodejs_init_script with the following properties
LEXEVSDO= CS_HOME=3D/usr/local/cts2Docs/lexevs-service-rest-docs LOGDIR=3D/usr/local/cts2Docs/logs LOGFILE=3D${LOGDIR}/nodejs.log PIDFILE=3D${LEXEVSDOCS_HOME}/nodejs.pid
Create a copy of redis.conf called cts2_redis.co= nf
Make the following changes in the cts2_redis.conf f= ile
daemoniz= e yes pidfile /usr/local/cts2Docs/redis/redis_6379.pid logfile "/usr/local/cts2Docs/logs/redis.log"
Copy the file /usr/local/cts2Docs/redis/utils/redis_init_script to /= usr/local/cts2Docs/bin and make the following modifications
#!/bin/s= h # # start/stop cts2doc-redis # chkconfig: 345 94 90 # description: Redis server # ## Instructions ## ## This is a template only. ## Rename appropriately and copy this file into /etc/init.d ## chkconfig --add FILENAME ########## # # Simple Redis init.d script conceived to work on Linux systems # as it does use of the /proc filesystem. DATE=3D`date +%Y%m%d-%H%M%S` REDISPORT=3D6379 REDISDIR=3D/usr/local/cts2Docs/redis EXEC=3D${REDISDIR}/src/redis-server CLIEXEC=3D${REDISDIR}/src/redis-cli LOGDIR=3D/usr/local/cts2Docs/logs/ #EXEC=3D/usr/local/bin/redis-server #CLIEXEC=3D/usr/local/bin/redis-cli PIDFILE=3D${REDISDIR}/redis_${REDISPORT}.pid CONF=3D"${REDISDIR}/cts2_redis.conf" #PIDFILE=3D/var/run/redis_${REDISPORT}.pid #CONF=3D"/etc/redis/${REDISPORT}.conf" REDIS_USER=3Dcts2 case "$1" in start) if [ -f $PIDFILE ] then echo "$PIDFILE exists, process is already running or crashe= d" else if [ -f ${LOGDIR}/redis.log ]; then echo "Renaming redis.log" cd ${LOGDIR}/ mv redis.log redis.log-$DATE fi echo "Starting Redis server..." su - ${REDIS_USER} -c "$EXEC $CONF" fi ;; stop) if [ ! -f $PIDFILE ] then echo "$PIDFILE does not exist, process is not running" else PID=3D$(cat $PIDFILE) echo "Stopping ..." su - ${REDIS_USER} -c "$CLIEXEC -p $REDISPORT shutdown" while [ -x /proc/${PID} ] do echo "Waiting for Redis to shutdown ..." sleep 1 done echo "Redis stopped" fi ;; *) echo "Usage: $0 { start | stop }" ;; esac
At this point the install directory should have = the following structure:
For security purposes, restrict access to the fo=
llowing directories/files:
Create Linux account cts2 and added the following to .= bash_profile
export N= PM_HOME=3D/usr/local/cts2Docs/node PATH=3D$JAVA_HOME/bin:$ANT_HOME/bin:$NPM_HOME/bin:$HOME/bin:$PATH
DEV=
Server: ncias-d1224
User account: cts2
Deploy Directory: /usr/local/cts2Docs
CTS2 Home: /local/home/cts2
Service Ports: 3000, 6379
Application URL: http://ncias-d1224:3000/ (DEV server)
Once redis and node.js have been successfully started, the CTS2 Document= ation API service can be reached at the following URL:
http://<server_name>:port