Daily Systems Administratrion - kwantu/platformconfiguration GitHub Wiki
Create the private and public keys using puttygen.
Save the private key in the user machine, and copy the public key to a location on the server. For this example that place is /home/willem/nceba_public
sudo su -
useradd nceba
cd /home/nceba
mkdir /home/nceba/.ssh
cp /home/willem/nceba_public /home/nceba/.ssh/authorized_keys
chown -R nceba /home/nceba/.ssh
chmod 600 /home/nceba/.ssh/authorized_keys
chmod 700 /home/nceba/.ssh
usermod -a -G wheel nceba
service sshd restart
The following services are running:
This is only used for remote support if needed.
This script will run a procedure that will re-index all the database server couchdb databases. Note that this might affect users so should be run after hours. It writes the results into the two files rebuildCouchdbIndexes.sh.delete.txt rebuildCouchdbIndexes.sh.create.txt
To start: startNode.sh
This will close the app, see if there is any of the latest changes that need to be brought down using git, and then start the app running on node.js.
The logs for the app is in the following location: ~/.pm2/logs/
.
cd ~/.pm2/logs/
ll
-rw-r--r-- 1 root root 129262 Mar 6 11:47 mobile1-8-error-0.log
-rw-r--r-- 1 root root 1307974 Mar 6 11:47 mobile1-8-out-0.log
To see if there are any issues tail the log files for the error, or the output log:
tail -f mobile1-8-error-0.log
will show the logs as they are updated.
tail -200 mobile1-8-error-0.log
will show the last 200 lines in the log.
If there is an issue with looking for node modules, find the instructions here
To stop: ./stop_exist.sh
Once stopped, then make sure that the service stopped completely
ps -ef | grep exist
If there are any instances running stop with kill -9
To Start: sh ./start_exist.sh &
To start service nginx restart
The following apps are running here:
The database is running on a service that is accessed through the sv command
Stop: sv stop couchdb
Start: sv start couchdb
Restart: sv restart couchdb
The logs are in the /var/log/couchdb
To make sure that it is running, where the ip address is the one that is bound
curl http://10.131.229.207:8003
{"couchdb":"Welcome","version":"2.3.0","git_sha":"07ea0c7","uuid":"9ef95bc799d2fb2784193426fa25fd7b","features":["pluggable-storage-engines","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
This is installed in /opt/couchdb-lucene
.
To Start: /opt/start-couchdb-lucene.sh
To see if it is running:
ps -ef | grep java
To find the logs:
/opt/couchdb-lucene/logs