1 zsh
1.1 安装
sudo yum install zsh -y
1.2 切换到zsh
chsh -s /bin/zsh
2 安装git
sudo yum install git -y
3 安装oh-my-zsh
yum update -y nss curl libcurl
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
如果报错
curl: (7) Failed connect to raw.github.com:443; Connection refused
把 raw.github.com 改成 raw.githubusercontent.com
在浏览器种输入进入网址:www.ipaddress.com,查询raw.githubusercontent.com的ip。打开hosts文件
vim /etc/hosts
在最末尾插入
ip raw.githubusercontent.com
这个ip就是查询得到的ip,然后
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
如果出现错误:Error: git clone of oh-my-zsh repo failed
则下载install.sh文件,地址为:https://gitee.com/mirrors/oh-my-zsh/blob/master/tools/install.sh
将
REMOTE=${REMOTE:-https://github.com/${REPO}.git}
改为
REMOTE=${REMOTE:-https://gitee.com/mirrors/oh-my-zsh.git}
然后运行
sh install.sh
4 oh-my-zsh高亮显示
4.1 下载并安装
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
4.2 激活插件
通过在~/.zshrc中加入插件的名字
vim ~/.zshrc
plugins=( [plugins...] zsh-syntax-highlighting)
最后,source使得环境生效
source ~/.zshrc
5 历史命令
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
同样打开~/.zshrc文件编辑plugins,然后source
vim ~/.zshrc
plugins=( [plugins...] zsh-autosuggestions)
source ~/.zshrc
问题:
zsh: no matches found:
vim ~/.zshrc
在最后添加
setopt no_nomatch
6 安装pypi服务
6.1 安装pypiserver
pip install pypiserver
6.2 加入systemd托管
vim /usr/lib/systemd/system/pipserver.service
文件内容为
[Unit]
Description=pipserver
After=network.target
[Service]
Type=simple
#PIDFile=/run/pipserver.pid
ExecStart= /usr/local/python3.6.4/bin/pypi-server -p 8077 -P . -a . /data/pipserver/packages
#ExecReload=/bin/kill -s HUP $MAINPID
#ExecStop=/bin/kill -s QUIT $MAINPID
#PrivateTmp=true
[Install]
WantedBy=multi-user.target
6.3 重新加载服务
systemctl daemon-reload
systemctl enable pipserver
systemctl start pipserver
6.4 无密码上传pip包
python setup.py bdist_wheel upload -r http://localhost:8077
6.5 安装python包
pip install -i http://192.168.0.2:8077/ packagename --trusted-host 192.168.0.2
7. 安装tmux
yum install tmux