直接搬运,懒得翻译了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
                                              DMA Softlab in CentOS
=================== How to Install DMA Softlab in CentOS 64bit========================

=================== Download Links. Use the following links to download ==============

http://mirrors.ges.net.pk/centos/7/isos/x86_64/
http://mirrors.ges.net.pk/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso

=================== MAC Address for DMA ==============================================

RadiusManager 4.1.6 MAC Addr = 00:00:5A:74:FD:29



=================== How to Chek the Current IP Address ================================
ip addr

=================== Step - 1 >Disabling Firewall =====================================

yum install update
yum -y install nano
yum install iptables-services
systemctl stop iptables
chkconfig iptables off

nano /etc/selinux/config

SELINUX=enforcing change to SELINUX=disabled

Ctrl+x y Enter
Save & Exit

systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld

=================== Step - 2 Installing=====================================

rpm -ivh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm
yum install mc wget crontabs make gcc libtool-ltdl curl mysql-devel net-snmp net-snmp-utils php php-mysql php-gd php-snmp php-process ntp sendmail sendmail-cf alpine mutt mariadb-server mariadb php-mcrypt cronie wget phpmyadmin net-tools psmisc

1#-Is this ok [y/d/N]: y ENTER
2#-Is this ok [y/N]: y ENTER

#- http://192.168.10.108/phpmyadmin

yum -y install glibc.i686 libgcc_s.so.1
systemctl start mariadb.service
systemctl enable mariadb.service

=================== Step - 3 > Config Mysql =====================================

#Make sure to setup mysql root password

mysql_secure_installation

"Follow Steps"
1#-Enter current password for root (enter for none): ENTER
2#-Set root password? [Y/n] y ENTER
3#-New password:xxxxxx Type Strong Password than press ENTER
4#-Re-enter new password:xxxxxx Re-Type Password ENTER
5#-Remove anonymous users? [Y/n] y ENTER
6#-Disallow root login remotely? [Y/n] n ENTER
7#-Remove test database and access to it? [Y/n] y ENTER
8#-Reload privilege tables now? [Y/n] y ENTER

systemctl start httpd.service
systemctl enable httpd.service

=================== Step - 4 > Adding IONCUBE module in PHP =====================================

wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -xvzf ioncube_loaders_lin_x86-64.tar.gz
cd ioncube
mv ioncube_loader_lin_5.4.so /usr/lib64/php/modules/
chmod 777 /usr/lib64/php/modules/ioncube_loader_lin_5.4.so

-------------------------------------
nano /etc/php.ini

#-php.ini > add this line

zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.4.so

>following line after [PHP] heading, usually this heading is in first line.

Ctrl+x y Enter
Save & Exit
-------------------------------------

systemctl restart httpd.service


-------------------------------------------------------------


php -v
> check php version

Version
___________________________________________________________________________________________________
| |
| PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17) |
| Copyright (c) 1997-2013 The PHP Group |
| Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies |
| with the ionCube PHP Loader + ionCube24 v11.0.1, Copyright (c) 2002-2022, by ionCube Ltd. |
|___________________________________________________________________________________________________|

-------------------------------------------------------------

cd


=================== Step - 5 Download FreeRadius in > root > Temp folder=====================================

mkdir temp

cd temp

wget http://www.dmasoftlab.com/download/freeradius-server-2.2.0-dma-patch-2.tar.gz

tar -xvzf freeradius-server-2.2.0-dma-patch-2.tar.gz

cd freeradius-server-2.2.0

./configure

make

make install

radiusd -X

EXIT
CTRL+C

> press CTRL+C to return to command prompt



-------------------------------------------------------------

cd


=================== STEP - 6 Create Database in Mysql=====================================

mysql -u root -p
"YOURMYSQLPASS"
"Copy and paste all commands"
CREATE DATABASE radius;
CREATE DATABASE conntrack;
CREATE USER 'radius'@'localhost' IDENTIFIED BY 'radius123';
CREATE USER 'conntrack'@'localhost' IDENTIFIED BY 'conn123';
GRANT ALL ON radius.* TO radius@localhost;
GRANT ALL ON conntrack.* TO conntrack@localhost;
exit

=================== Step - 7 >Download & Install RADIUS MANAGER 4.1.6 =====================================

cd temp

# - Download the file with attachments, filename " radiusmanager-4.1.6.gz "
# - Copy the file to the following address " root ... /temp "
# - by a program WinSCP

tar zxvf radiusmanager-4.1.6.gz

cd radiusmanager-4.1.6

chmod 755 install.sh

#####Now start the Radius Install Script.

./install.sh

#-1
Select the type of your operating system:
1. Redhat (CentOS, Fedora Core)
2. Debian (Ubuntu, Debian)
Sellect = 1
Choose an option: [1]1 Press Enter

#-2
Select installation type:
1. New installation
2. Upgrade
New installation Select 1
Choose an option: [1]1 Press Enter
#-3

#-1 WWW root path: [/var/www/html] Press Enter
#-2 RADIUS database host: [localhost] Press Enter
#-3 RADIUS database username: [radius] Press Enter
#-4 RADIUS database password: [radius123] Press Enter
#-5 CTS database host: [localhost] Press Enter
#-6 CTS database username: [conntrack] Press Enter
#-7 CTS database password: [conn123] Press Enter
#-8 Freeradius UNIX user: [root] Press Enter
#-9 HTTPD UNIX user: [apache] Press Enter
#-10 Create rmpoller service: [y] y Press Enter
#-11 Create rmconntrack service: [y] y Press Enter
#-12 Back up RADIUS database: [y] y Press Enter
#-13 Are You sure to begin the installation? [n] y Press Enter

-------------------------------------

systemctl restart httpd.service

systemctl restart mariadb.service

systemctl restart radiusd


Copy Radius from var/www/html paste in var/www/
reboot


http://yourip/radiusmanager/admin.php

=================== Access DMA ========================================================
http://192.168.10.111/radiusmanager/admin.php
ID = admin
Password = 1111
=======================================================================================

web程序更改为Nginx

以下为我的nginx配置,因为DMA4.1.6貌似不允许配置https,所以用ngxin来转发一下(apache不会用)
如果你有更好的方式,请分享

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
worker_connections 1024;
}

http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 4096;

include /etc/nginx/mime.types;
default_type application/octet-stream;

# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;

server {
listen 80;
listen [::]:80;
server_name _;
root /var/www/radiusmanager;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

error_page 404 /404.html;
location = /404.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}


}
#####################https configuretion ##################
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name _;
root /var/www/radiusmanager;

ssl_certificate "/var/www/radiusmanager/certs/server.crt";
ssl_certificate_key "/var/www/radiusmanager/certs/server.key";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

error_page 404 /404.html;
location = /40x.html {
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
# location ~ \.php$ {
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# include fastcgi_params;
# }

location / {
proxy_pass http://127.0.0.1;
}
location ~ .* {
proxy_pass http://127.0.0.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

}

# Settings for a TLS enabled server.
#
# server {
# listen 443 ssl http2;
# listen [::]:443 ssl http2;
# server_name _;
# root /usr/share/nginx/html;
#
# ssl_certificate "/etc/pki/nginx/server.crt";
# ssl_certificate_key "/etc/pki/nginx/private/server.key";
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 10m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
#
# # Load configuration files for the default server block.
# include /etc/nginx/default.d/*.conf;
#
# error_page 404 /404.html;
# location = /40x.html {
# }
#
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# }
# }

}