Created
April 4, 2018 16:15
-
-
Save MrHuxu/39ed50d139810c7217dacdbb6a70590d to your computer and use it in GitHub Desktop.
[on ubuntu restart] scripts needed to run when restart ubuntu on vultr #scripts
This file contains 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
# expose the 22 port for ssh login | |
iptables -A INPUT -p tcp --dport 22 -j ACCEPT | |
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT | |
# launch ss server and export port | |
ssserver -d start -c /etc/shadowsocks.json | |
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8398 -j ACCEPT | |
# launch nginx | |
sudo nginx | |
# launch supervisor | |
sudo supervisord -c /etc/supervisor/supervisord.conf | |
# launch mongodb as daemon | |
sudo mongod --fork --dbpath=/var/lib/mongodb --logpath=/var/log/mongodb/mongodb.log | |
# launch the server of easy-interview(http://h.xhu.me/) | |
cd /opt/easy-interview | |
NODE_ENV=production forever start server/bin/www --harmony | |
# launch the server of my-snippets(http://snippets.xhu.me/) | |
cd /opt/snippets | |
forever start server.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment