通过 brew 安装 mosquitto,并启动
brew install mosquitto
mosquitto -v
打开终端订阅 topic1
mosquitto_sub -t topic1
打开新的终端往 topic1 发消息
mosquitto_pub -t topic1 -m "HelloWorld"
通过 brew 安装 mosquitto,并启动
brew install mosquitto
mosquitto -v
打开终端订阅 topic1
mosquitto_sub -t topic1
打开新的终端往 topic1 发消息
mosquitto_pub -t topic1 -m "HelloWorld"
docker run -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -p 8080:8080 quay.io/keycloak/keycloak:14.0.0
使用浏览器访问 http://localhost:8080,用户名:admin,密码:admin 访问
首先对源仓库执行 clone
git clone --mirror git@domain1.com:group1/repo1.git
然后对目标仓库执行 push
git push --mirror git@domain2.com:group2/repo2.git
这样 2 个仓库内容就完全一致了
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh" | sudo bash
yum install -y gitlab-runner
在 gitlab 后台注册新的 runner,按照提示输入命令,运行方式选择 docker, 默认镜像选择 docker:stable
gitlab-runner register --url http://172.20.103.21 --token xxxxxxxx
systemctl enable gitlab-runner
systemctl restart gitlab-runner
curl https://get.acme.sh | sh -s email=admin@domain.com
acme.sh --issue --dns -d yourdomain.com \
--yes-I-know-dns-manual-mode-enough-go-ahead-please
根据提示创建相应的 TXT 记录,再执行
acme.sh --renew -d yourdomain.com \
--yes-I-know-dns-manual-mode-enough-go-ahead-please
如果DNS服务器支持API,可以与acme.sh对接,一步完成,以 CLOUDFLARE 为例,如果直接使用 Global API Key,则使用命令:
export CF_Key=00000000000000000000000000000000
acme.sh --issue --dns dns_cf -d yourdomain.com
如果使用首先的 API 权限,则使用命令:
export CF_Token=00000000000000000000000000000000
acme.sh --issue --dns dns_cf -d yourdomain.com
当前版本的 acme.sh 默认使用的是 zerossl 作为证书签发服务器,如果你想更换为 letsencrypt,可以使用 server 参数来实现:
acme.sh --issue --dns dns_cf -d yourdomain.com --server letsencrypt
IP地址:172.20.103.21
系统版本:Rocky Linux 8
firewall-cmd --permanent --add-service=http
firewall-cmd --reload
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
EXTERNAL_URL="http://172.20.103.21" yum install -y gitlab-ce
浏览器打开:http://172.20.103.21
默认用户名:root
默认密码在:/etc/gitlab/initial_root_password
在 macOS Ventura 下使用 brew 即可安装 minica
brew install minica
minica -domains 192.168.56.10.nip.io
第一次运行的时候,他会自动生成 ca 的公钥和私钥,同时生成 192.168.56.10.nip.io 的公钥和私钥,其中 ca 的有效期为 100 年,192.168.56.10.nip.io 的有效期为 2 年,我们可以查看其具体信息:
openssl x509 -in minica.pem -text -noout
openssl x509 -in 192.168.56.10.nip.io/cert.pem -text -noout
我们把 minica.pem 上传至客户端的 /etc/pki/ca-trust/source/anchors/minica.pem 目录
update-ca-trust
cert.pem 和 key.pem 按照普通 https 证书放到 web 服务器内即可
sudo sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list sudo apt update sudo apt install -y xfce4 xfce4-goodies sudo apt install -y tightvncserver autocutsel
vagrant@ubuntu-focal:~$ vncserver You will require a password to access your desktops. Password: Verify: Would you like to enter a view-only password (y/n)? xauth: file /home/vagrant/.Xauthority does not exist New 'X' desktop is ubuntu-focal:1 Creating default startup script /home/vagrant/.vnc/xstartup Starting applications specified in /home/vagrant/.vnc/xstartup Log file is /home/vagrant/.vnc/ubuntu-focal:1.log
vagrant@ubuntu-focal:~/.vnc$ vi ~/.vnc/xstartup #!/bin/sh xrdb $HOME/.Xresources xsetroot -solid grey #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & # Fix to make GNOME work export XKL_XMODMAP_DISABLE=1 /etc/X11/Xsession startxfce4 &
重点是修改 pom.xml 中的 packaging 标签,设置其值为 war。
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.13</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>demo</name>
<description>demo</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO curl -s https://mirror.go-repo.io/centos/go-repo.repo | tee /etc/yum.repos.d/go-repo.repo yum install golang