本文会将平时遇到的一些小的碎片化的trick整理起来
nginx
- mac中 设置nginx开机自启动
1 | sudo cp /usr/local/opt/nginx/*.plist /Library/LaunchDaemons |
默认python3解释器
- mac系统中,如果要默认python为python3,首先找到python3在哪里,然后创建软链接实现
1 | ln -s /usr/local/bin/python3 /usr/local/bin/python |
Linux
- ssh 无密码连接,将本机的ssh的公钥放置到服务器的
~/.ssh/authorized_keys
文件中,该文件如果设置过高的权限将不会生效。
archlinux 设置ss开机自启动运行
systemd
启动一个自定义的unit。
用户的units是放在/etc/systemd/system/
目录下,创建一个shadowsocks-local.service
文件,配置如下:1
2
3
4
5
6
7
8[Unit]
Description=Shadowsocks local
[Service]
ExecStart=/usr/bin/ss-local ...
[Install]
WantedBy=nulti-user.targetshell脚本放在
/etc/profile.d/
目录下
mac
- mac brew install 安装openssl的时候会导致python2 无法使用
[!link] https://github.com/wting/autojump/issues/540brew reinstall python@2
然而brew已经把python2 移除了,[!link]https://github.com/Homebrew/homebrew-core/issues/49796
本文将持续更新