docker

  1. Debian 系安装docker-ce

    因为Debian sid仓库的docker有已知bug还未修复,所以使用开源的docker-ce

    配置仓库源

    1
    2
    3
    4
    
    ## docker-ce
    deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster stable
    #deb-src [arch=amd64] https://download.docker.com/linux/debian buster stable
       
    

    移除已有的docker包

    sudo apt-get remove docker docker-engine docker.io containerd runc

    安装docker-ce

    1
    2
    3
    4
    5
    6
    7
    8
    
    sudo apt-get install \
        apt-transport-https \
        ca-certificates \
        curl \
        gnupg-agent \
        software-properties-common
           
    sudo apt-get install docker-ce docker-ce-cli containerd.io
    
  2. 配置国内源

    /etc/docker/daemon.json

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    
    {
      "registry-mirrors": [
        "https://hub-mirror.c.163.com",
        "https://mirror.baidubce.com"
      ]
    }
    or 
          
    {
    "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]
    }
       
    
    1
    2
    
    sudo systemctl daemon-reload
    sudo systemctl restart docker
    
  3. sudo使用

    1
    2
    3
    
    sudo gpasswd -a ${USER} docker
    systemctl restart docker.service
    newgrp - docker
    
  4. 容器使用–httpd

    1
    
    docker run --name httpd_apache2 --restart=always -p 8000:80 -v $PWD/yourpath/:/usr/local/apache2/htdocs/  -d httpd
    
  5. 容器使用–portainer

    1
    
    docker run -d -p 9000:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock --name Portainer-WebUI portainer/portainer
    
  6. 容器使用– mariadb

    1
    
    docker run -d -p 32680:3306 --name MariaDB-Service -e MYSQL_ROOT_PASSWORD=passwd --restart=always -v /data/Db/mariadb:/var/lib/mysql mariadb
    

pip

  1. 换源

    ~/.pip/pip.conf

    1
    2
    
    [global]
    index-url = https://pypi.tuna.tsinghua.edu.cn/simple
    
  2. 升级pip

    1
    
    python -m pip install --upgrade pip
    
  3. 升级所有包-一键脚本

    1
    
    pip freeze --local | grep -v '^-e' | cut -d = -f 1  | xargs -n1 pip install -U
    

    or

    1
    
    pip list -o --format legacy|awk '{print $1}'` ; do pip install --upgrade $i; done
    

64位系统添加32位支持

1
2
sudo dpkg --add-architecture i386;sudo apt update
sudo apt install ia32-libs/sudo apt install lib32z1

debian gnome卸载多余组件

1
2
3
sudo aptitude purge aisleriot fcitx-googlepinyin fcitx-sunpinyin:amd64 fcitx-table-wubi gnome-chess  gnome-klotski gnome-mahjongg gnome-robots  quadrapassel gnome-maps gnome-taquin gnome-clocks gnome-nibbles rhythmbox gnome-mahjongg hitori goldendict shotwell transmission-gtk iagno swell-foop lightsoff four-in-a-row gnome-weather gnome-sound-recorder gnome-todo simple-scan gnome-tetravex cheese file-roller gnome-documents five-or-more  gnome-games gnome gnome-system-monitor gnome-logs gnome-core task-gnome-desktop evince firefox-esr gnome-contacts gnome-calculator totem evolution gnome-software
sudo apt remove --purge libreoffice* fcitx* xterm*
sudo apt install nautilus gnome-shell-extension-dash-to-panel gnome-tweaks gnome-shell-extensions fonts-cantarell adwaita-qt  gnome-themes-extra 

deepin 卸载多余组件

1
sudo aptitude purge deepin-album deepin-calculator deepin-compressor deepin-deb-installer deepin-draw deepin-movie deepin-music deepin-reader deepin-voice-note dde-printer uos-browser-stable thunderbird simple-scan gparted  cheese org.deepin.contacts org.deepin.chineseime org.deepin.scaner firefox-esr deepin-system-monitor deepin-log-viewer deepin-font-manager deepin-devicemanager dde-introduction

Arch Linux 引导 windows,和 支持挂载 ntfs 格式磁盘

pacman -S os-prober and ntfs-3g

然后执行

sudo grub-mkconfig -o /boot/grub/grub.cfg

后重启即可

wine应用(如企业微信) 打开 Wine 配置

1
env WINEPREFIX="$HOME/.deepinwine/Deepin-WXWork" deepin-wine winecfg

wine的企业微信字体问题

需要将其他DEEPIN机器上的/usr/share/fonts/* 目录下的字体全部复制过来即可

telegram 无法输入中文问题解决

在telegram的desktop的Exec字段前加env QT_IM_MODULE=fcitx 即可

gpg签名找不到文件

1
git config --global gpg.program $(which gpg)

journalctl常用方式

1
2
3
4
5
journalctl -k -f 
journalctl  -b 0 
journalctl -u deepin-elf-verify
journalctl --since "18:50"
journalctl -r