mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
Created GmSSL-3.1.1 - 在 Linux 上安装 GmSSL (markdown)
77
GmSSL‐3.1.1-‐-在-Linux-上安装-GmSSL.md
Normal file
77
GmSSL‐3.1.1-‐-在-Linux-上安装-GmSSL.md
Normal file
@@ -0,0 +1,77 @@
|
||||
## 通过源码编译安装
|
||||
|
||||
### 先决条件
|
||||
|
||||
- GCC
|
||||
- cmake
|
||||
- make
|
||||
|
||||
```Bash
|
||||
# Rocky Linux
|
||||
dnf install gcc cmake make
|
||||
# 若不希望交互,请添加参数 `-y`
|
||||
# dnf -y install gcc cmake make
|
||||
```
|
||||
|
||||
### 编译过程
|
||||
|
||||
```bash
|
||||
$ tar zxvf GmSSL-3.1.1.tar.gz
|
||||
$ cd GmSSL-3.1.1
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake ..
|
||||
$ make
|
||||
$ make test
|
||||
$ sudo make install
|
||||
|
||||
$ tee >>/etc/ld.so.conf <<EOF
|
||||
/usr/local/lib/
|
||||
EOF
|
||||
ldconfig
|
||||
```
|
||||
|
||||
验证
|
||||
```bash
|
||||
$ gmssl version
|
||||
GmSSL 3.1.1
|
||||
```
|
||||
|
||||
## 通过官方二进制文件安装
|
||||
|
||||
## 先决条件
|
||||
|
||||
- glibc >= 2.34
|
||||
|
||||
### 通过 GmSSL-3.1.1-Linux.tar.gz 文件安装
|
||||
|
||||
```Bash
|
||||
tar zxvf GmSSL-3.1.1-Linux.tar.gz
|
||||
mv -v GmSSL-3.1.1-Linux /usr/local/gmssl
|
||||
tee >>/etc/profile <<EOF
|
||||
# GmSSL-3.1.1
|
||||
export PATH="\$PATH:/usr/local/gmssl/bin"
|
||||
EOF
|
||||
source /etc/profile
|
||||
tee >>/etc/ld.so.conf <<EOF
|
||||
/usr/local/gmssl/lib
|
||||
EOF
|
||||
ldconfig
|
||||
```
|
||||
|
||||
### 通过 GmSSL-3.1.1-Linux.sh 文件安装
|
||||
|
||||
```Bash
|
||||
$ chmod u+x GmSSL-3.1.1-Linux.sh
|
||||
$ ./GmSSL-3.1.1-Linux.sh --prefix=/usr/local
|
||||
|
||||
$ tee >>/etc/profile <<EOF
|
||||
# GmSSL-3.1.1
|
||||
export PATH="\$PATH:/usr/local/gmssl/bin"
|
||||
EOF
|
||||
$ source /etc/profile
|
||||
$ tee >>/etc/ld.so.conf <<EOF
|
||||
/usr/local/gmssl/lib
|
||||
EOF
|
||||
$ ldconfig
|
||||
```
|
||||
Reference in New Issue
Block a user