现场编译ppp2.4.9源码, 现场安装.

This commit is contained in:
lijia
2021-12-01 21:42:24 +08:00
parent e15fb93003
commit 0e4de6671c
9 changed files with 50 additions and 27 deletions

View File

@@ -7,7 +7,7 @@ wannat_global:
redis_index: 0
bifang_db_server_ip: "192.168.xx.yy"
bifang_db_username: "root"
bifang_db_password: "bifang!@#"
bifang_db_password: "xxgceBifang!@#"
bifang_radius_db_name: "tsg-bifang"
vpn_client_ip_cidr: "10.10.120.0/24"
vpn_client_ip_mask: "10.10.120.0 255.255.255.0"
@@ -33,7 +33,12 @@ wannat_global:
g_probe_retry_times: 2
max_item_number: 100000
lru_timeout: 60
pptp:
dns1: 8.8.8.8
dns2: 114.114.114.114
mtu: 2000
openvpn:
mtu: 1400
mss: 1360
@@ -41,7 +46,7 @@ wannat_global:
radius:
shared_secret: "testing123"
server_ip: "192.168.xx.zz"
rpm_files:
wannat_common_rpm_file: "libwannat_common-1.0.1.8cc3bda-2.el7.x86_64.rpm"
natgw_rpm_file: "wannat_natgw-1.5.1.3d915d4-2.el7.x86_64.rpm"

View File

@@ -5,13 +5,19 @@
dest: "/tmp/"
#- name: "install natgw"
# yum:
# name: "{{ packages }}"
# state: present
# vars:
# packages:
# - /tmp/{{ wannat_global.rpm_files.natgw_rpm_file }}
- name: "install natgw"
yum:
name: "{{ packages }}"
state: present
vars:
packages:
- /tmp/{{ wannat_global.rpm_files.natgw_rpm_file }}
shell: rpm --nodeps --force -i /tmp/{{ wannat_global.rpm_files.natgw_rpm_file }}
args:
warn: false
- name: "Creates /opt/tsg/wannat/natgw directory"
file:

View File

@@ -4,21 +4,23 @@
path: /opt/tsg/framework/ppp2.4.9
state: directory
- name: "copy pppd2.4.9 to destination server"
- name: "copy pppd2.4.9.tgz to destination server"
copy:
src: "{{ role_path }}/files/pppd"
dest: "/opt/tsg/framework/ppp2.4.9"
mode: 0755
src: "{{ role_path }}/files/ppp-2.4.9_disable_INET6.tgz"
dest: "/tmp/"
- name: "install pppd2.4.9"
shell:
cd /tmp/;
tar -zxf ppp-2.4.9_disable_INET6.tgz;
cd ppp-2.4.9_disable_INET6;
./configure;
./disable_HAVE_INET6.sh;
make;
make install
args:
warn: false
- name: "copy radattr.so to destination server"
copy:
src: "{{ role_path }}/files/radattr.so"
dest: "/opt/tsg/framework/ppp2.4.9"
- name: "copy radius.so to destination server"
copy:
src: "{{ role_path }}/files/radius.so"
dest: "/opt/tsg/framework/ppp2.4.9"
- name: "Template the pptpd.conf file"
template:

View File

@@ -130,6 +130,6 @@ nologfd
mtu {{wannat_global.pptp.mtu}}
plugin /opt/tsg/framework/ppp2.4.9/radius.so
plugin /opt/tsg/framework/ppp2.4.9/radattr.so
plugin /usr/local/lib/pppd/2.4.9/radius.so
plugin /usr/local/lib/pppd/2.4.9/radattr.so
radius-config-file /etc/radiusclient-ng/radiusclient.conf

View File

@@ -9,7 +9,6 @@
# TAG: ppp
# Path to the pppd program, default '/usr/sbin/pppd' on Linux
#
ppp /opt/tsg/framework/ppp2.4.9
# TAG: option
# Specifies the location of the PPP options file.
@@ -106,4 +105,4 @@ option /etc/ppp/options.pptpd
#remoteip 192.168.1.234-238,192.168.1.245
localip 10.10.120.1
remoteip 10.10.120.200-254
remoteip 10.10.120.2-254

View File

@@ -15,7 +15,7 @@
dest: "/tmp/"
- name: "install nanomsg"
shell: rpm -i /tmp/nanomsg-1.1.5-6.el7.x86_64.rpm
shell: rpm --force -i /tmp/nanomsg-1.1.5-6.el7.x86_64.rpm
args:
warn: false

View File

@@ -30,6 +30,17 @@
name: "wannat_natgw"
state: absent
- hosts: natgw
tasks:
- name: "uninstall wannat_common"
yum:
name: "libwannat_common"
state: absent
- name: "uninstall nanomsg"
yum:
name: "nanomsg"
state: absent
- hosts: radius_server
tasks:
- name: "stop radiusd service"