Ubuntu 系统软件安装系列指导说明
工具系列
1. Docker 与 Docker-Compose部署与安装
链接
2. Nginx
离线安装(源码)推荐👍🏻
下载链接

sudo apt install gcc make libpcre3-dev zlib1g-dev openssl libssl-dev curl gnupg2 ca-certificates lsb-release ubuntu-keyring
tar -zxvf nginx-1.26.2.tar.gz
cd nginx-1.26.2
./configure --prefix=/usr/local/nginx --with-http_ssl_module
sudo make -j8
sudo make install
sudo /usr/local/nginx/sbin/nginx -t
touch nginx.service
vim nginx.service
Description=nginx - high performance web server
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
ExecStart=/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
ExecReload=/usr/local/nginx/sbin/nginx -s reload
ExecStop=/usr/local/nginx/sbin/nginx -s stop
[Install]
WantedBy=multi-user.target
chmod 777 nginx.service
sudo mv nginx.service /etc/systemd/system/
cd /etc/systemd/system/
systemctl daemon-reload
sudo systemctl enable nginx.service
sudo systemctl start nginx.service
sudo systemctl status nginx.service
vim /usr/local/nginx/conf/nginx.conf
联网安装(命令)
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \
| sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \
| sudo tee /etc/apt/preferences.d/99nginx
sudo apt update
sudo apt install nginx
sudo nginx
环境系列
1. Golang部署与安装
链接
wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
rm -rf /usr/local/go
tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version
数据库系列
1. PostgreSQL17.2源码部署与安装
链接
sudo su
apt install dirmngr ca-certificates software-properties-common apt-transport-https lsb-release curl libicu-dev pkg-config bison flex m4 -y
cd /home/ubnuntu
wget https://ftp.postgresql.org/pub/source/v17.2/postgresql-17.2.tar.gz
tar -zxvf postgresql-17.2.tar.gz
cd postgresql-17.2
mkdir /usr/local/pg17_2
mkdir /usr/local/pg17_2/data
groupadd postgres
useradd -g postgres -m postgres
chown postgres:postgres postgresql-17.2
su - postgres
./configure --prefix=/usr/local/pg17_2
make -j8 world
make install
vim ~/.bashrc
export PATH=/usr/local/pg17_2/bin:$PATH
export PGHOME=/usr/local/pg17_2
export PGDATA=$PGHOME/data
export PGUSER=postgres
export PGPORT=5432
wq
source ~/.bashrc
initdb
pg_ctl -l logs start
psql