banner
NCC-17039

NCC-17039

欢迎来到NCC-17039的历史数据库!请随便参观,无需多言哦。
email
telegram
bilibili
douban

VPS Basic Environment Configuration

Given that many friends have provided feedback that some configurations in the series of articles on 【Fun Docker Projects】 are too complicated, making the articles very long, I, Gugu, have separated the configuration content to create a standalone article.

If anyone has any comments or suggestions, feel free to provide feedback in the comments section. Gugu will promptly improve based on reasonable suggestions or opinions.

Preparation Work#

  • Server: Tencent Hong Kong Lightweight Application Server 24 yuan/month VPS. Gugu uses Tencent Lightweight Application Server for setup (it is best to choose a server outside the mainland (Hong Kong)). If you are a beginner just starting out, you can also purchase a Racknerd server (select the West US region), which costs less than 100 yuan for a year (Racknerd server introduction: click to view).
  • System: Debian 10 or above (Ubuntu 20.04 or above). CentOS is not recommended; for specific reasons, please see: Explanation of why to use Debian instead of CentOS.

Logging into the Server#

Choose a software to connect via SSH.

Mac or Linux users can directly use the built-in terminal (also called Terminal) to log into the server.

Enter:

ssh your_username@your_server_IP -P 22

If you haven't changed the SSH port, the default is 22. Of course, for server security, it is recommended to change to another port.

Upgrade Packages#

sudo -i # Switch to root user

apt update -y  # Upgrade packages

apt install wget curl sudo vim git -y  # Debian system is relatively clean, install commonly used software

Add SWAP Virtual Memory#

You can use a script to set up SWAP:

wget -O [box.sh](http://box.sh/) [https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh](https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh) && chmod +x [box.sh](http://box.sh/) && clear && ./box.sh

Untitled

Select 18, then enter the value you want to expand.

Untitled

Install Docker Environment#

Install Docker (Non-Mainland Server)#

wget -qO- [get.docker.com](http://get.docker.com/) | bash
docker -v # Check Docker version
systemctl enable docker # Set to start automatically on boot

Install Docker-compose (Non-Mainland Server)#

sudo curl -L "[https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$](https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$)(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version # Check Docker Compose version

Install Docker (Domestic Server)#

curl -sSL [https://get.daocloud.io/docker](https://get.daocloud.io/docker) | sh
docker -v # Check Docker version
systemctl enable docker # Set to start automatically on boot

Install Docker-compose (Domestic Server)#

curl -L https://get.daocloud.io/docker/compose/releases/download/v2.1.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose

docker-compose --version  # Check Docker Compose version

Reprinted from:

VPS Basic Environment Configuration – I Am Not Gugu Pigeon——Incomplete Record of VPS Tinkering

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.