Install Freeradius + daloRADIUS in Centos with ros pppoe for verification
Install the LAMP environment:
yum -y
install
httpd httpd-devel mysql mysql-server mysql-devel
yum -y
install
php php-devel php-mysql php-common php-gd php-mbstring php-mcrypt php-xml
/etc/init
.d
/httpd
start
/etc/init
.d
/mysqld
start
chkconfig httpd on
chkconfig mysqld on
mysqladmin -u root password
'newpassowrd'
Freeradius installation:
yum
install
freeradius2 freeradius2-mysql freeradius2-utils
/etc/init
.d
/radiusd
start
chkconfig radiusd on
Test Freeradius:
radiusd -X
Listening on authentication address * port 1812
Listening on accounting address * port 1813
Listening on
command
file
/var/run/radiusd/radiusd
.sock
Listening on authentication address 127.0.0.1 port 18120 as server inner-tunnel
Listening on proxy address * port 1814
Ready to process requests.
Configure Freeradius to support SQL:
cat /etc/raddb/radiusd.conf
$ INCLUDE SQL. conf # Call SQL. conf configuration to remove the previous #
Cat/etc/raddb/sites-enabled/default # Add SQL
authorize {
preprocess
chap
mschap
digest
suffix
eap {
ok = return
}
files
sql
expiration
logintime
pap
}
accounting {
detail
unix
radutmp
sql
exec
attr_filter.accounting_response
}
Set Freeradius SQL connection information:
cat /etc/raddb/sql.conf
database = "mysql"
driver = "rlm_sql_${database}"
server = "localhost"
#port = 3306
login = "radius"
password = "radiupass"
radius_db = "radius"
Install DaloRADIUS:
wget http:
//downloads
.sourceforge.net
/project/daloradius/daloradius/daloradius0
.9-9
/daloradius-0
.9-9.
tar
.gz
tar
zxvf daloradius-0.9-9.
tar
.gz
mv
daloradius-0.9-9
/var/www/html/daloradius
chown
-R apache:apache
/var/www/html/daloradius
Create a database and import it:
mysql -u root -p
mysql>create database radius;
mysql>grant all on radius.* to radius@localhost identified by
"radpass"
;
mysql>
exit
;
mysql -uroot -p radius <
/var/www/html/daloradius/contrib/db/mysql-daloradius
.sql
mysql -uroot -p radius <
/var/www/html/daloradius/contrib/db/fr2-mysql-daloradius-and-freeradius
.sql
Configure DaloRADIUS:
cat cat /var/www/html/daloradius/library/daloradius.conf.php
$configValues['CONFIG_DB_ENGINE'] = 'mysql';
$configValues['CONFIG_DB_HOST'] = 'localhost';
$configValues['CONFIG_DB_PORT'] = '3306';
$configValues['CONFIG_DB_USER'] = 'radius';
$configValues['CONFIG_DB_PASS'] = 'radpass';
$configValues['CONFIG_DB_NAME'] = 'radius';
$ ConfigValues ['config _ PATH_DALO_VARIABLE_DATA '] ='/var/www/daloradius/var'; # modify the parameter in another directory.
Add a RADIUS client:
cat /etc/raddb/clients.conf
client 192.168.1.21 {
secret = root
shortname = ROS
}
Visit http://www.haiyun.me/daloradiusto manage your account. The account number is "administrator" and the password is" radius.
Daloradius creates a user test. For details about how to configure RADIUS on the ROS end, see install Radiusmanager as the ROS verification server.
You can view online users through the Daloradius management interface: