# Redis releases:
https://download.redis.io/releases/

wget https://download.redis.io/releases/redis-6.2.5.tar.gz

# To compile Redis, first the tarball, change to the root directory, and then run make:
tar -zxvf redis-6.2.5.tar.gz
cd redis-6.2.5
make MALLOC=libc

# If the compile succeeds, you'll find several Redis binaries in the src directory, including:
redis-server: the Redis Server itself
redis-cli is the command line interface utility to talk with Redis.

# To install these binaries in /usr/local/bin, run:
sudo make install

# Starting Redis
redis-server
或
redis-server redis.conf

wget http://nginx.org/download/nginx-1.21.5.tar.gz
tar -xvf nginx-1.21.5.tar.gz
cd nginx-1.21.5
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install

cat /dev/null > /etc/apt/sources.list

Debian 11 修改sources.list

cat <<EOT >> /etc/apt/sources.list
deb http://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
  
deb http://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
  
deb http://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
  
deb http://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free
EOT

Debian 12 修改sources.list

cat <<EOT >> /etc/apt/sources.list
deb https://mirrors.aliyun.com/debian bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian bookworm main non-free non-free-firmware contrib

deb https://mirrors.aliyun.com/debian bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian bookworm-updates main non-free non-free-firmware contrib

deb https://mirrors.aliyun.com/debian bookworm-proposed-updates main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian bookworm-proposed-updates main non-free non-free-firmware contrib

deb https://mirrors.aliyun.com/debian bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian bookworm-backports main non-free non-free-firmware contrib

deb https://mirrors.aliyun.com/debian bookworm-backports-sloppy main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian bookworm-backports-sloppy main non-free non-free-firmware contrib

deb https://mirrors.aliyun.com/debian-security bookworm-security main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian-security bookworm-security main non-free non-free-firmware contrib
EOT

修改时区

1)sudo dpkg-reconfigure tzdata
2)timedatectl set-timezone Asia/Shanghai
3)echo Asia/Shanghai > /etc/timezone && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

安装常用工具

apt update
apt install -y procps telnet inetutils-ping net-tools vim wget
apt clean

Ubuntu修改时区

FROM ubuntu:latest
 
ENV TZ=Asia/Shanghai
 
RUN apt-get update && apt-get install -y tzdata
RUN echo ${TZ} > /etc/timezone && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && dpkg-reconfigure -f noninteractive tzdata

修改repositories

sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories

修改时区

apk add tzdata
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo Asia/Shanghai  > /etc/timezone
apk del tzdata

示例

FROM test.com/base/openjdk:8-jdk-alpine

ENV WORKSPACE=/app TZ=Asia/Shanghai

CMD mkdir ${WORKSPACE}
WORKDIR ${WORKSPACE}

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
    apk --update add --no-cache ttf-dejavu fontconfig tzdata tini curl bash wget busybox-extras bind-tools tcpdump net-tools && \
    cp /usr/share/zoneinfo/${TZ} /etc/localtime && \
    echo ${TZ} > /etc/timezone && \
    rm -rf /var/cache/apk/*

COPY app.jar app.jar

EXPOSE 8080

CMD /sbin/tini -- java -Djava.security.egd=file:/dev/./urandom ${SW_AGENT_OPTS} ${JAVA_OPTS} -jar /app/app.jar ${SPRING_OPTS}

安装

yum groups install "X Window System"
yum groups install "GNOME Desktop"
systemctl set-default graphical.target

yum -y install tigervnc-server tigervnc
reboot

启动

cp /lib/systemd/system/[email protected] /etc/systemd/system/vncserver@:1.service
修改/etc/systemd/system/vncserver@:1.service中的用户名

systemctl daemon-reload
systemctl enable vncserver@:1
执行 vncpasswd 设置密码
systemctl start vncserver@:1

连接

https://www.realvnc.com/en/connect/download/viewer/
下载vnc viewer,地址栏中输入ip地址:1进行连接。