linux deploy + ubuntu 18.04 + nginx 完成搭建

最近尝试在手机上搭建一个linux开发环境,尝试了termux,感觉还行,不过不够完整,很多东西都没有

不过有点还是有的,安装快速,软件下载速度也很快,而且更新的特别快,python3.7.3刚出就有了,这个赞一个

然后找了其他解决方案,发现说linux deploy才是完整的linux环境,然后就尝试了下安装,安装过程参考如下

https://github.com/meefik/linuxdeploy/releases  最新安装包

https://www.luogu.org/blog/wendster/play-linux-on-your-android-phone

安装完成后电脑上用xshell连接即可

#安装nginx

apt install nginx

#启动nginx

sudo server start nginx

#停止
sudo server stop nginx

#重启
sudo server restart nginx

#其他命令

sudo service nginx {start|stop|restart|reload|force-reload|status|configtest|rotate|upgrade}

不要使用如下2中方法启动

第一种启动不了,第二中会忽略systemctl命令

/etc/init.d/nginx start
sudo systemctl start nginx


启动后在同一局域网的话输入手机ip地址即可看到nginx的欢迎页

接下去就可以折腾django + uwsgi + nginx 生产环境搭建了

 

posted @ 2019-04-28 13:27  darkspr  阅读(4269)  评论(0编辑  收藏  举报