-
创立 www 用户和用户组和 /data/www, /data/log 目录
useradd www -m chown -R www:www /data ssh-keygen -t rsa -C "your_email@example.com"
- 初始化零碎
export LC_ALL="en_US.UTF-8"
echo "LC_ALL=en_US.UTF-8" >> /etc/default/locale
locale-gen en_US.UTF-8
locale-gen zh_CN.UTF-8
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
apt-get update
apt-get install -y software-properties-common
- 初始化软件源
add-apt-repository -y ppa:ondrej/php
add-apt-repository -y ppa:nginx/stable
grep -rl ppa.launchpad.net /etc/apt/sources.list.d/ | xargs sed -i 's/http:\/\/ppa.launchpad.net/https:\/\/launchpad.proxy.ustclug.org/g'
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
# https://mirrors.tuna.tsinghua.edu.cn/ 2021-02-05 移除 nodesource 镜像
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
echo 'deb https://deb.nodesource.com/node_10.x focal main' > /etc/apt/sources.list.d/nodesource.list
echo 'deb-src https://deb.nodesource.com/node_10.x focal main' >> /etc/apt/sources.list.d/nodesource.list
apt-get update
- 装置根底软件
apt-get install -y curl git build-essential unzip supervisor
- 装置 PHP8.0
apt-get install -y php8.0-bcmath php8.0-cli php8.0-curl php8.0-fpm php8.0-gd php8.0-mbstring php8.0-mysql php8.0-opcache php8.0-pgsql php8.0-readline php8.0-xml php8.0-zip php8.0-sqlite3 php8.0-redis
- 装置 nginx redis-server memcached sqlite3
apt-get remove -y apache2
apt-get install -y nginx redis-server memcached sqlite3