Sunteți pe pagina 1din 3

install freeradius redhat 7.

2
=============================

# setenforce 0
# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

# yum groupinstall "Development Tools" -y


# yum -y install httpd httpd-devel

# systemctl enable httpd


# systemctl start httpd

# yum install -y mariadb-server mariadb


# systemctl start mariadb
# systemctl enable mariadb
# mysql_secure_installation
Enter current password for root (enter for none):
Set root password? [Y/n] Y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
Thanks for using MariaDB!

# mysql -u root -p -e " CREATE DATABASE radius"


# mysql -u root -p -e "show databases"
# mysql -u root -p
MariaDB [(none)]> GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY
"password";
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q
Bye

# yum install net-tools php php-mysql php-gd php-ldap php-odbc php-pear php-xml
php-xmlrpc php-soap curl curl-devel
# yum -y install freeradius
# rpm -qa |grep freeradius
freeradius-3.0.13-8.el7_4.x86_64
# rpm -ivh freeradius-utils-3.0.13-8.el7_4.x86_64 freeradius-mysql-3.0.13-
8.el7_4.x86_64
# systemctl start radiusd.service
# systemctl enable radiusd.service
# pkill radius / systemctl stop radiusd
#
}
listen {
type = "auth"
ipaddr = 127.0.0.1
port = 18120
}
Listening on auth address * port 1812 bound to server default
Listening on acct address * port 1813 bound to server default
Listening on auth address :: port 1812 bound to server default
Listening on acct address :: port 1813 bound to server default
Listening on auth address 127.0.0.1 port 18120 bound to server inner-tunnel
Listening on proxy address * port 35652
Listening on proxy address :: port 59214
Ready to process requests (Tekan ctrl-c)

# mysql -u root -p radius < /etc/raddb/mods-config/sql/main/mysql/schema.sql


# ln -s /etc/raddb/mods-available/sql /etc/raddb/mods-enabled/
# vim /etc/raddb/radiusd.conf
modules {
$INCLUDE mods-enabled/
}
policy {
$INCLUDE sites-enabled/
}

auth_badpass = yes
auth_goodpass = yes

# vim /etc/raddb/sites-available/default
authorize {
# files <------ uncomment pada files

sql

}
accounting {

sql

}
session {

sql

}
post-auth {

sql

}
Post-Auth-Type REJECT {
...
sql
...
}

# vim /etc/raddb/mods-available/sql
driver = "rlm_sql_mysql"
dialect = "mysql"
server = "localhost"
port = 3306
login = "radius"
password = "password"
read_clients = yes
client_table = "nas"

# radiusd -X
}
listen {
type = "auth"
ipaddr = 127.0.0.1
port = 18120
}
Listening on auth address * port 1812 bound to server default
Listening on acct address * port 1813 bound to server default
Listening on auth address :: port 1812 bound to server default
Listening on acct address :: port 1813 bound to server default
Listening on auth address 127.0.0.1 port 18120 bound to server inner-tunnel
Listening on proxy address * port 35652
Listening on proxy address :: port 59214
Ready to process requests (Tekan ctrl-c)

# systemctl restart radiusd

# cd /opt
# tar zxvf daloradius-0.9-9.tar.gz
# mv daloradius-0.9-9 daloradius
# cd daloradius
# mysql -u root -p radius < contrib/db/fr2-mysql-daloradius-and-freeradius.sql
# mysql -u root -p radius < contrib/db/mysql-daloradius.sql

# cd ..
# mv daloradius /var/www/html/

# chown -R apache:apache /var/www/html/daloradius/


# chmod 664 /var/www/html/daloradius/library/daloradius.conf.php

S-ar putea să vă placă și