deepin从开机到配置

1. 更换镜像源

1、 首先进入 sources.list

对于 /etc/apt/sources.list 最好原文件做个备份。

然后将其修改保存来覆盖原文件。

# 备份原来的source文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

修改sources.list文件
sudo vim /etc/apt/sources.list 

# 换清华源,删除里面所有内容,加上
deb [by-hash=force] https://mirrors.tuna.tsinghua.edu.cn/deepin panda main contrib non-free

2. 配置

# 更新源
sudo apt-get update

安装git,zsh
sudo apt-get install -y git zsh curl

更改默认管理器:
gio mime inode/directory dde-file-manager.desktop

# 切换 zsh shell
chsh -s /bin/zsh

# 查看当前shell
echo $SHELL

3. oh-my-zsh配置

curl 安装

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

更改主题,sudo vim .zshrc,将 ZSH_THEME 改成如下

ZSH_THEME="agnoster"

然后安装字体Menlo-for-Powerline,不然会乱码

git clone https://github.com/abertsch/Menlo-for-Powerline.git 

cd Menlo-for-Powerline

sudo mv "Menlo for Powerline.ttf" /usr/share/fonts/ 

sudo fc-cache -vf /usr/share/fonts/

插件

自动提示插件zsh-autosuggestions
使用以下命令安装

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

语法高亮zsh-syntax-highlighting使用以下命令安装

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
sudo vim .zshrc
# 将.zshrc 里面的plugins改成如下

plugins=(git zsh-autosuggestions)

supervisor安装 

sudo apt-get install -y supervisor

# 如果报错,E: 有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?并提示建议安装:supervisor-doc,则

sudo apt-get install -y supervisor-doc supervisor

配置supervisord

sudo vim /etc/supervisor/supervisord.conf

  加入 

[inet_http_server]
port=0.0.0.0:9001

ps -ef | grep supervisor

# 然后kill 掉该进程,因为supervisor安装完后会直接默认启动

sudo kill -9 进程

# 再重新启动
sudo supervisord -c /etc/supervisor/supervisord.conf

然后访问:127.0.0.1:9001,可以访问页面就成功了

 

Docker

使用脚本安装 Docker(参考https://www.runoob.com/docker/ubuntu-docker-install.html

1、获取最新版本的 Docker 安装包

wget -qO- https://get.docker.com/ | sh
 

 安装完成后有个提示:

If you would like to use Docker as a non-root user, you should now consider     adding your user to the "docker" group with something like:     sudo usermod -aG docker runoob Remember that you will have to log out and back in for this to take effect! 

当要以非root用户可以直接运行docker时,需要执行 sudo usermod -aG docker 用户名 命令,然后重新登陆,否则会有如下报错

2、启动docker 后台服务

sudo service docker start

3、测试运行hello-world

docker run hello-world

镜像加速

鉴于国内网络问题,后续拉取 Docker 镜像十分缓慢,我们可以需要配置加速器来解决,我使用的是网易的镜像地址:http://hub-mirror.c.163.com。

新版的 Docker 使用 /etc/docker/daemon.json(Linux) 或者 %programdata%\docker\config\daemon.json(Windows) 来配置 Daemon。

请在该配置文件中加入(没有该文件的话,请先建一个):

{
  "registry-mirrors": ["http://hub-mirror.c.163.com"]
}

安装docker-compose(参考https://docs.docker.com/compose/install/

  1. Run this command to download the current stable release of Docker Compose:

    sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    

    To install a different version of Compose, substitute 1.24.1 with the version of Compose you want to use.

    If you have problems installing with curl, see Alternative Install Options tab above.

  2. Apply executable permissions to the binary:

    sudo chmod +x /usr/local/bin/docker-compose
    

Note: If the command docker-compose fails after installation, check your path. You can also create a symbolic link to /usr/bin or any other directory in your path.

For example:

sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
  1. Optionally, install command completion for the bash and zsh shell.

  2. Test the installation.

    $ docker-compose --version
    docker-compose version 1.24.1, build 1110ad01
    

 

 

 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值