脚本执行 shell 命令
Python
一般执行系统命令:
import os
os.system('date')
获取系统命令的输出:
import os
stdout = os.popen('date')
content = stdout.read().strip() ......
Python
一般执行系统命令:
import os
os.system('date')
获取系统命令的输出:
import os
stdout = os.popen('date')
content = stdout.read().strip() ......
一直想试试使用 MongoDB, 今天终于决定要在 Linux 上安装了. 准备使用 apt-get 安装, 因为比较方便. 但是网上的教程有的提到了 mongodb-10gen, 有的提到了 mongodb-org, 不知道安装哪个. 查证后发现开发 MongoDB 的公司叫做 10gen, 现已......
If you wanna run external tools, you may need to know the following built-in environment variables:
Variable name
Contents in the above example ......
想要启用 https 连接首先需要证书. 我们可以使用最近比较流行的 Let’s Encrypt 提供的免费证书. 但是我使用 Let's Encrypt 官方提供的申请脚本申请的时候, 总是不能成功. 于是使用了 v2ex 上有人推荐的大神制作的 acme.sh 脚本.
虽然 ac......
安装 Nginx:
sudo apt-get install nginx
启动 Nginx:
sudo nginx -c /etc/nginx/nginx.conf
重启 Nginx:
sudo service nginx reload # or: sudo servi......