服务器搭建,学习交流

一键命令安装

这里用的是centos 7.6

#先安装wget
yum install wget

#一键命令安装
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh

安装步骤参考

alt
在这里插入图片描述

在这里插入图片描述
安装成功后自动启动服务的了,也可以手动启动或停止

systemctl start openvpn-server@server.service #启动openvpn命令
systemctl stop openvpn-server@server.service #停止openvpn命令

下载客户端,

官网下载客户端,或者文章底部下载链接下载 并安装

再生成多几个证书

一个证书同时只能一个设置连接

  • 生成证书
cd /etc/openvpn/server/easy-rsa/ && ./easyrsa --batch --days=3650 build-client-full lingPcClient nopass
  • 下载证书到本地
# /Users/lizheng/Downloads是我的本地路径,输入命令回车再输入服务器密码
scp root@服务器IP:"/etc/openvpn/server/easy-rsa/pki/issued/lingPcClient.crt" /Users/lizheng/Downloads

scp root@服务器IP:"/etc/openvpn/server/easy-rsa/pki/private/lingPcClient.key" /Users/lizheng/Downloads
  • 客户端连接服务器

打开openVpn,把生成的证书拖拉到客户端连接就可以

在这里插入图片描述

相关推荐

  1. ubuntu 深度学习服务器

    2023-12-21 18:28:02       25 阅读
  2. 文件服务器

    2023-12-21 18:28:02       64 阅读
  3. 服务器 - 笔记

    2023-12-21 18:28:02       33 阅读
  4. ntp服务器

    2023-12-21 18:28:02       38 阅读
  5. 时间服务器

    2023-12-21 18:28:02       36 阅读
  6. 服务器环境

    2023-12-21 18:28:02       30 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-21 18:28:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-21 18:28:02       100 阅读
  3. 在Django里面运行非项目文件

    2023-12-21 18:28:02       82 阅读
  4. Python语言-面向对象

    2023-12-21 18:28:02       91 阅读

热门阅读

  1. Android ViewModel的简单应用

    2023-12-21 18:28:02       48 阅读
  2. 力扣56. 合并区间

    2023-12-21 18:28:02       46 阅读
  3. liunx安装git

    2023-12-21 18:28:02       62 阅读
  4. JNI学习(一)

    2023-12-21 18:28:02       62 阅读
  5. 【SpringBoot】知识点总结

    2023-12-21 18:28:02       63 阅读
  6. css 2D转换

    2023-12-21 18:28:02       44 阅读
  7. 从入门到放弃之「ClickHouse」

    2023-12-21 18:28:02       67 阅读
  8. Ansible

    Ansible

    2023-12-21 18:28:02      39 阅读