全栈之巅

常用命令、代码

2017-06-17  本文已影响3人  全栈之巅Johnny

brew国内镜像

cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc
source ~/.zshrc

git fork出来的项目和上游仓库同步

git remote add upstream https://github.com/zgabievi/awesome-adonisjs
git remote update upstream
git rebase upstream/master
git push

SSL生成

service nginx stop
certbot certonly --text --agree-tos --email service@genyii.com --standalone --cert-name genyii.com -d genyii.com,www.genyii.com,inventory.genyii.com,inventorybackend.genyii.com,wx.genyii.com,family.genyii.com,adminify.genyii.com,sells.genyii.com
certbot certonly --text --agree-tos --email service@adonis-china.org --standalone --cert-name adonis-china.org -d adonis-china.org,www.adonis-china.org,adonis.genyii.com,adonisjs.net,adonisjs.genyii.com
service nginx start
certbot renew

SSL nginx 配置

listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/inventory.genyii.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/inventory.genyii.com/privkey.pem;

MongoDB

mongod --directoryperdb --dbpath d:/data/db --logpath d:/data/log/mongo.log --logappend --rest --install
net start MongoDB

上一篇下一篇

猜你喜欢

热点阅读