Debian
- Update the
apt
package index:
$ sudo apt-get update
Install packages to allow
apt
to use a repository over HTTPS:$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
Add Docker’s official GPG key:
$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
- 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.
$ sudo apt-key fingerprint 0EBFCD88
pub 4096R/0EBFCD88 2017-02-22
Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid Docker Release (CE deb) <docker@docker.com>
sub 4096R/F273FCD8 2017-02-22
- Use the following command to set up the stable repository. To add the nightly or test repository, add the word
nightly
ortest
(or both) after the wordstable
in the commands below. Learn about nightly and test channels.
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
- Update the
apt
package index.
$ sudo apt-get update
- Install the latest version of Docker Engine - Community and containerd, or go to the next step to install a specific version:
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
Nodejs v13.x
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs
git
sudo apt-get install git
nginx
安装nginx:sudo apt install nginx
配置环境:sudo apt install gcc-c++
sudo apt install pcre pcre-devel
sudo apt install zlib zlib-devel
sudo apt install openssl openssl-devel
使用命令:nginx -h #帮助
nginx -v #显示版本
nginx -V #显示版本和配置信息
nginx -t #测试配置
nginx -q #测试配置时,只输出错误信息
nginx -s stop #停止服务器
nginx -s reload #重新加载配置
停止服务:sudo systemctl stop nginx
启动服务:sudo systemctl start nginx
重启服务:sudo systemctl restart nginx
Linux下文件目录位置:
主程序:/usr/sbin/nginx
配置文件:/etc/nginx/nginx.conf
日志文件:/var/log/nginx/error.log
修改文件时记得使用管理员权限!!!
卸载软件(以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查看即可