百度云centos7配置

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

飞华1993

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值