Nodejs Server Configuration On Ubuntu Plus Git Installation
NodeJS Configuration
Install Ubuntu 20 on virtual machine
- Install
virtual machine 12
- Install OS
(ubuntu) with required spec’s
- Make user as a
sudo
- Update OS online
Installing secure shell to access
- sudo –l
- groups
- ssh –V
- sudo apt-get update
- sudo apt-get install
openssh-server
- sudo systemctl status sshd
- netstat –tulpn | grep 22 /
2222
- sudo ufw enable
- sudo ufw allow ssh
- sudo systemctl
list-unit-files | grep enabled | grep ssh
- sudo systemctl enable ssh
Git installation
- sudo apt update
- sudo apt install git
- git –version
Cloning project through Git
- git clone https://github.com/luqman310/app.git
- sudo chown user:user
appdir
Installing Node using the node version manager for versioning
- sudo apt install curl
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh
- curl -o-
https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
- source ~/.bashrc
- nvm list-remote
- nvm install v12.9.0
- node –v
Project Settings
- cd app/appname
- sudo npm install
- sudo nano .env (envionment file will be provided by DBA+Developer)
To
download database single instant
- https://gist.github.com/tcnksm/7316877
- Download zip
file of basic
- Unzip to instant client folder
Oracle Library for Node
export LD_LIBRARY_PATH=/usr/lib/oracle/19.9/client64/lib/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
OR
{ export LD_LIBRARY_PATH=/home/devjs/Oracle/instantclient_19_6
export PATH=$PATH:$LD_LIBRARY_PATH }
sudo nano /etc/ld.so.conf.d/oracle-instantclient.conf
add /usr/lib/oracle/19.9/client64/lib
sudo ldconfig
Now go to project directory and run app ( like node index.js ) and verify from your browser
Comments
Post a Comment