วิธีติดตั้ง R9Gateway สำหรับ Linux

 

การติดตั้ง R9Gateway สำหรับ Linux Server

1.     สร้างฐานข้อมูลเพิ่มใน Server สถานบริการ เพื่อใช้เก็บข้อมูล r9referral hub ชื่อฐานข้อมูล r9db


2.     ติดตั้ง NodeJS และ pm2 สำหรับ CentOS7 linux server

คำสั่ง

curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -



คำสั่ง

yum -y install gcc-c++ make


คำสั่ง yum -y install nodejs


คำสั่ง npm install -g nodemon


คำสั่ง npm install -g pm2


คำสั่ง npm install -g typings


3.     Copy Folder R9Gateway to Linux Server



4.     แก้ไขไฟล์ Config.txt เพื่อกำหนดค่าตามสถานพยาบาล


5.     เข้าไปที่ไดเร็คทอรี /home ทำตามขั้นตอนต่อไป

cd /home/R9Gateway/


(**ภาพต่อไปนี้จากโปรแกรม Putty)

คำสั่ง

pm2 start ./R9AGent/app/bin/www.js --name gateway_client



คำสั่ง pm2 save



คำสั่ง  pm2 startup



คำสั่ง pm2 startup systemd



คำสั่ง pm2 save



คำสั่ง pm2 list



เสร็จขั้นตอนการติดตั้งใน Linux Server

**เครื่องต้องออกอินเตอร์เน็ตได้และเปิดใช้ Port 3000

*เปิด Allow Url

http://broker.r9hub.net

และ Url  R9Gateway Server แต่ละจังหวัด

# จ.ชัยภูมิ  http://cpm.r9hub.net:3000

# จ.นครราชสีมา http://nma.r9hub.net:3000

# จ.บุรีรัมย์  http://brm.r9hub.net:3000

# จ.สุรินทร์  http://srn.r9hub.net:3000

ความคิดเห็น