软件的RPM包制作,VPN服务器,frp连接Linux系统实现内网穿透,systemd简介
创始人
2025-01-18 20:03:22
0

  1. [root@web1 ~]# yum -y install rpm-build
  2. [root@web1 ~]# rpmbuild -ba nginx.spec                #会报错,没有文件或目录
  3. [root@web1 ~]# ls /root/rpmbuild                    #自动生成的目录结构
  4. BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
  5. 将源码软件复制到SOURCES目录       [root@web1 ~]# cp nginx-1.22.1.tar.gz /root/rpmbuild/SOURCES/

rpmbuild创建RPM软件包

    • [root@web1 ~]# rpmbuild -ba /root/rpmbuild/SPECS/nginx.spec
    • [root@web1 ~]# ls /root/rpmbuild/RPMS/x86_64/nginx-1.22.1-1.x86_64.rpm
  1. [root@web1 ~]# yum install /root/rpmbuild/RPMS/x86_64/nginx-1.22.1-1.x86_64.rpm
  2. [root@web1 ~]# rpm -qa |grep nginx
  3. [root@web1 ~]# ls /usr/local/nginx/

VPN服务器    Linux客户端连接WireGuard

制作密钥文件

  1. [root@proxy ~]#cd /usr/local/nginx/html/vpn/linux
  2. [root@proxy linux]# wg genkey | tee private.key | wg pubkey > public.key    #生成私钥存入private.key,再利用私钥生成公钥存入public.key
  3. [root@proxy linux]# cp public.key ../ser.txt #拷贝一份方便客户端通过浏览器查看
  4. [root@proxy linux]# cat public.key        UygBBCi6gEX5aJ0hMpKjBXDxltsV4+yI4NQTqK1ih1k=
  5. [root@proxy linux]# cat private.key
  6. GB2NbtPoAEvNufEggKM41GNEUBlxfJfVYn4i9yJ4WlU=

编写配置文件

  1. [root@proxy linux]# cd /etc/wireguard
  2. [root@proxy wireguard]# vim wg.conf
  3. [Interface] #服务端配置
  4. PrivateKey = GB2NbtPoAEvNufEggKM41GNEUBlxfJfVYn4i9yJ4WlU= #服务器的私钥
  5. Address = 10.10.10.1/8 #VPN隧道里面的IP和网段
  6. ListenPort = 54321 #WireGuard服务监听的端口
  7. [Peer] #对端(客户端)配置
  8. PublicKey = #客户端的公钥,稍后获取
  9. AllowedIPs = 10.10.10.2/32 #允许哪些客户端访问VPN服务器 ,32代表ip的二进制32位必须和10.10.10.2一样,也就是ip必须为10.10.10.2的客户才能访问

启动服务,注意,该步骤必须在上述配置文件获取客户端的公钥才可进行

  1. [root@proxy wireguard]# wg-quick up wg #启动VPN服务,wg是之前配置文件的名称
  2. [root@proxy wireguard]# ss -ntulp | grep 54321 #检查端口
  3. [root@proxy wireguard]# systemctl stop firewalld
  4. [root@proxy wireguard]# ifconfig #查看

步骤二:配置客户端

首先将$教学资料目录/vpn/linux目录拷贝到虚拟机/root下

在客户端安装VPN软件

Windows客户端连接WireGuard

frp连接Linux系统实现内网穿透

  • 熟悉systemctl常用命令

相关内容

热门资讯

八分钟辅助!拱趴大菠萝万能挂图... 八分钟辅助!拱趴大菠萝万能挂图解,如何下载wpk透视版,妙招教程(有挂秘笈)1、打开软件启动之后找到...
第9分钟辅助!wepoker辅... 第9分钟辅助!wepoker辅助插件功能,hhpoker辅助软件是真的么,项目教程(有挂头条)该软件...
第五分钟辅助!wpk作弊最怕三... 第五分钟辅助!wpk作弊最怕三个东西,wepoker免费脚本,手册教程(有挂总结)1、下载好wpk作...
9分钟辅助!德普之星透视辅助,... 9分钟辅助!德普之星透视辅助,wepokerplus辅助,方式教程(有挂透明挂)1、用户打开应用后不...
1分钟辅助!wepoker透视... 1分钟辅助!wepoker透视挂底牌,hhpoker透视脚本视频,方案教程(今日头条)1、玩家可以在...
第三分钟辅助!如何下载德普之星... 第三分钟辅助!如何下载德普之星辅助软件,智星菠萝有挂吗,模块教程(有挂教程)如何下载德普之星辅助软件...
9分钟辅助!hhpoker作弊... 9分钟辅助!hhpoker作弊码,xpoker辅助工具,教程书教程(有挂分析)运xpoker辅助工具...
第4分钟辅助!pokemmo手... 第4分钟辅助!pokemmo手机脚本,werplan辅助软件,总结教程(真是有挂)1、首先打开pok...
9分钟辅助!德州真人透视脚本,... 9分钟辅助!德州真人透视脚本,pokemmo脚本辅助器下载,妙计教程(存在有挂)1、超多福利:超高返...
第五分钟辅助!德普之星怎么设置... 您好,德普之星怎么设置埋牌这款游戏可以开挂的,确实是有挂的,需要了解加去威信【136704302】很...