Created
July 24, 2020 08:18
-
-
Save vallettea/7e2b19e2e99eaf8d2dac00d00cc2b32f to your computer and use it in GitHub Desktop.
Install cncjs on raspberry pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update -y | |
apt upgrade -y | |
apt-get install git | |
git clone https://github.com/creationix/nvm.git ~/.nvm | |
sudo echo "source ~/.nvm/nvm.sh" >> ~/.bashrc && sudo echo "source ~/.nvm/nvm.sh" >> ~/.profile | |
nvm install --lts | |
npm install npm@latest -g | |
npm install --unsafe-perm -g cncjs | |
npm install -g pm2 | |
pm2 startup | |
pm2 start cnc | |
pm2 save | |
iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8000 | |
apt-get install iptables-persistent -y | |
reboot | |
pm2 status | |
pm2 logs | |
42 git clone https://github.com/jacksonliam/mjpg-streamer.git | |
43 cd mjpg-streamer/mjpg-streamer-experimental | |
44 make | |
45 make install | |
46 vim /home/pi/mjpg-streamer.sh | |
47 chmod +x /home/pi/mjpg-streamer.sh | |
48 crontab -e | |
49 apt-get install ffmpeg -y | |
50 shutdown now | |
51 vim /home/pi/mjpg-streamer.sh | |
52 cd /home/pi | |
53 vim record-stream_basic.sh | |
54 chmod +x record-stream_basic.sh | |
55 ./record-stream_basic.sh | |
56 vim record-stream_basic.sh | |
57 ./record-stream_basic.sh | |
58 mkdir /home/pi/ | |
59 ./record-stream_basic.sh | |
60 mkdir /home/pi/Videos | |
61 mkdir -p /home/pi/Videos | |
62 ./record-stream_basic.sh | |
63 vim record-stream_basic.sh | |
64 ./record-stream_basic.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment