Debian

  1. Update the apt package index:
  1. $ sudo apt-get update
  1. Install packages to allow apt to use a repository over HTTPS:

    1. $ sudo apt-get install \
    2. apt-transport-https \
    3. ca-certificates \
    4. curl \
    5. gnupg-agent \
    6. software-properties-common
  2. Add Docker’s official GPG key:

  1. $ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
  1. Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.
  1. $ sudo apt-key fingerprint 0EBFCD88
  2. pub 4096R/0EBFCD88 2017-02-22
  3. Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
  4. uid Docker Release (CE deb) <docker@docker.com>
  5. sub 4096R/F273FCD8 2017-02-22
  1. Use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.
  1. $ sudo add-apt-repository \
  2. "deb [arch=amd64] https://download.docker.com/linux/debian \
  3. $(lsb_release -cs) \
  4. stable"
  1. Update the apt package index.
  1. $ sudo apt-get update
  1. Install the latest version of Docker Engine - Community and containerd, or go to the next step to install a specific version:
  1. $ sudo apt-get install docker-ce docker-ce-cli containerd.io

Nodejs v13.x

  1. curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
  2. sudo apt-get install -y nodejs

git

  1. sudo apt-get install git

nginx

  1. 安装nginxsudo apt install nginx
  2. 配置环境:sudo apt install gcc-c++
  3. sudo apt install pcre pcre-devel
  4. sudo apt install zlib zlib-devel
  5. sudo apt install openssl openssl-devel
  6. 使用命令:nginx -h #帮助
  7. nginx -v #显示版本
  8. nginx -V #显示版本和配置信息
  9. nginx -t #测试配置
  10. nginx -q #测试配置时,只输出错误信息
  11. nginx -s stop #停止服务器
  12. nginx -s reload #重新加载配置
  13. 停止服务:sudo systemctl stop nginx
  14. 启动服务:sudo systemctl start nginx
  15. 重启服务:sudo systemctl restart nginx
  16. Linux下文件目录位置:
  17. 主程序:/usr/sbin/nginx
  18. 配置文件:/etc/nginx/nginx.conf
  19. 日志文件:/var/log/nginx/error.log
  20. 修改文件时记得使用管理员权限!!!

卸载软件(以dotnet为例)

  • 查看已安装的包:dpkg --list
  • 查看正则匹配的包:dpkg --list 'dotnet-*' //查看以dotnet-开头的包
  • 卸载匹配的包:sudo apt-get --purge remove <programname>
  • 按照正则卸载匹配的包:sudo apt-get --purge remove 'dotnet-*' //卸载以dotnet-开头的包
  • 如果不想自己手动输入Y确认的话则使用:echo "Y" |sudo apt-get --purge remove 'dotnet-*'

<br />
更多参数使用—help查看即可