寒武

寒武

Record some configurations of the newly installed Cent OS.

Restart Network Command#

service network restart

Set HTTP Proxy#

su root
vi /etc/profile
// Add the following content to the first line
export proxy="http://192.168.1.2:12345"
export http_proxy=$proxy
export https_proxy=$proxy
// Reconnect the user and test access to Google using the command
wget google.com

Time Server Synchronization#

// Install the npdate tool
yum install -y ntpdate
// Adjust the time zone
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
yes | cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
// Time synchronization
ntpdate us.pool.ntp.org
// Scheduled synchronization (every 10 minutes)
crontab -l >/tmp/crontab.bak
echo "*/10 * * * * /usr/sbin/ntpdate us.pool.ntp.org | logger -t NTP" >> /tmp/crontab.bak
crontab /tmp/crontab.bak
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
// Start Docker
systemctl start docker
// Delete Docker image
docker rmi image_id
Delete Docker images that were not successfully created
# Show running Docker processes
docker ps
# Show the most recently created containers (including all states)
docker ps -l
Deletion command
docker rm [ID]
For example
docker rm 8cb6ee1f505a

CentOS Installation Nginx Docker Image Tutorial

Nginx Reverse Proxy Settings#

server{
       listen 80;
       charset utf-8;
       server_name 192.168.112.135;

       location / {
          proxy_pass http://192.168.112.135:8080;
          proxy_redirect default;
       }
    }

Memos Installation#

docker run -d --name memos -p 5230:5230 -v ~/.memos/:/var/opt/memos neosmemo/memos:latest

Set Memos to Start on Boot#

// Enable Docker to start on boot
systemctl enable docker.service
// After Memos starts for the first time, add the startup parameter
docker update --restart=always container_name

Start Mixspace#

cd ~/mix-space/core
docker compose up -d

This article is synchronized and updated to xLog by Mix Space
The original link is https://www.xiaozhengyang.com/posts/IT/centos


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