Ubuntu20.04安装笔记

1. 更新、换源

1
2
3
4
5
6
sudo apt-get update
sudo apt-get upgrade
sudo apt install python3-pip
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
sudo apt-get install git wget flex bison gperf python cmake ninja-build ccache

2.安装软件

golang

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
wget https://studygolang.com/dl/golang/go1.16.3.linux-amd64.tar.gz
sudo tar xfz go1.16.3.linux-amd64.tar.gz -C /usr/local
vim ~/.profile
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:/home/ubuntu/go/bin
export GOROOT=/usr/local/go
export GOPATH=/home/ubuntu/go
export GO111MODULE=on
export GOPROXY=https://goproxy.cn
----------ZZ----------
source ~/.profile

docker

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get update
sudo apt-get install docker-ce
sudo service docker start
sudo docker run hello-worldq

nginx

sudo apt install nginx
在/etc/security/limits.conf最后增加如下两行记录
* soft nofile 65535
* hard nofile 65535
sudo reboot

>>Nginx配置<<

updatedupdated2022-10-262022-10-26