Them tmux chạy server lite trong rc.local

This commit is contained in:
HaiMD 2020-05-25 10:43:31 +07:00
parent 2edbf1d11a
commit 3e2587a3ce
2 changed files with 8 additions and 3 deletions

View File

@ -6,7 +6,7 @@ sudo chmod -R 0777 html
cd html
git clone http://gitea.beetai.com/dongpd/BiFace_Server_Lite.git
sudo chmod -R 0777 BiFace_Server_Lite
sudo apt-get install -y libapache2-mod-php7.0 php7.0 php7.0-common php7.0-curl php7.0-dev php7.0-gd php-pear php-imagick php7.0-mysql php7.0-xsl php7.0-sqlite3 php7.0-zip
sudo apt-get install -y libapache2-mod-php php php-common php-curl php-dev php-gd php-pear php-imagick php-mysql php-xsl php-sqlite3 php-zip
echo "
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
@ -51,9 +51,10 @@ sudo echo "* * * * * php /var/www/html/BiFace_Server_Lite/yii sync" >> /var/spoo
#
cd /root
git clone http://gitea.beetai.com/dongpd/BiFace_Server_Config_API.git
sudo apt-get install nodejs-dev npm
sudo apt-get install -y nodejs npm
sudo apt-get install -y nodejs-dev node-gyp libssl1.0-dev
sudo apt install -y npm
cd BiFace_Server_Config_API
npm install
node server.js
exit 0

View File

@ -34,6 +34,8 @@ sudo apt install -y gnome-screenshot
#************install v4l***************
echo "install v4l"
sudo apt-get install -y v4l-utils
#************install tmux***************
sudo apt install -y tmux
#****************rc.local*************
echo "setup rc.local"
echo '#!/bin/sh -e
@ -62,6 +64,8 @@ echo "Begin rc.local. Time restart: $time_begin" >> /root/monitor/log/rc_local.l
echo "nameserver 8.8.8.8" > /etc/resolv.conf
tmux new -d -s server_js 'node /node/BiFace_Server_Config_API/server.js'
exit 0' > /etc/rc.local
#
echo "network"