Mục tiêu thực hành:
- Download Daloradius release archive từ Github.
- Import Daloradius mysql tables.
- Kết nối vào giao diện WebPage của Daloradius.
Các bước triển khai:
Download Daloradius release archive từ Github.
sudo yum -y install wgetwget https://github.com/lirantal/daloradius/archive/master.zipunzip master.zipmv daloradius-master/ daloradius
- Import Daloradius mysql tables.
[root@localhost ~]# cd daloradius[root@localhost daloradius]#[root@localhost daloradius]# mysql -u root -p radius < contrib/db/fr2-mysql-daloradius-and-freeradius.sqlEnter password:[root@localhost daloradius]# mysql -u root -p radius < contrib/db/mysql-daloradius.sqlEnter password:[root@localhost daloradius]#
- Move daloradius folder to path in /var/www/html
[root@localhost daloradius]# cd ..[root@localhost ~]# sudo mv daloradius /var/www/html/
- Change permissions for http folder and set the right permissions for daloradius configuration file.
sudo chown -R apache:apache /var/www/html/daloradius/cp /var/www/html/daloradius/library/daloradius.conf.php.sample /var/www/html/daloradius/library/daloradius.conf.phpsudo chmod 664 /var/www/html/daloradius/library/daloradius.conf.php
- Modify daloradius.conf.php file to adjust the MySQL database information.
sudo vi /var/www/html/daloradius/library/daloradius.conf.php
$configValues['CONFIG_DB_HOST'] = 'localhost';$configValues['CONFIG_DB_PORT'] = '3306';$configValues['CONFIG_DB_USER'] = 'radius';$configValues['CONFIG_DB_PASS'] = 'admin2021';$configValues['CONFIG_DB_NAME'] = 'radius';
[root@localhost library]# sudo systemctl restart radiusd.service httpd[root@localhost library]# systemctl status radiusd.service httpd● radiusd.service - FreeRADIUS high performance RADIUS server.Loaded: loaded (/usr/lib/systemd/system/radiusd.service; enabled; vendor preset: disabled)Active: active (running) since Mon 2021-05-17 23:55:25 EDT; 4s agoProcess: 23419 ExecStart=/usr/sbin/radiusd -d /etc/raddb (code=exited, status=0/SUCCESS)Process: 23415 ExecStartPre=/usr/sbin/radiusd -C (code=exited, status=0/SUCCESS)Process: 23413 ExecStartPre=/bin/chown -R radiusd.radiusd /var/run/radiusd (code=exited, status=0/SUCCESS)Main PID: 23422 (radiusd)CGroup: /system.slice/radiusd.service└─23422 /usr/sbin/radiusd -d /etc/raddbMay 17 23:55:25 localhost.localdomain systemd[1]: Stopped FreeRADIUS high performance RADIUS server..May 17 23:55:25 localhost.localdomain systemd[1]: Starting FreeRADIUS high performance RADIUS server....May 17 23:55:25 localhost.localdomain systemd[1]: Started FreeRADIUS high performance RADIUS server..● httpd.service - The Apache HTTP ServerLoaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)Active: active (running) since Mon 2021-05-17 23:55:27 EDT; 3s agoDocs: man:httpd(8)man:apachectl(8)Process: 23414 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)Main PID: 23435 (httpd)Status: "Processing requests..."CGroup: /system.slice/httpd.service├─23435 /usr/sbin/httpd -DFOREGROUND├─23436 /usr/sbin/httpd -DFOREGROUND├─23437 /usr/sbin/httpd -DFOREGROUND├─23438 /usr/sbin/httpd -DFOREGROUND├─23439 /usr/sbin/httpd -DFOREGROUND└─23440 /usr/sbin/httpd -DFOREGROUNDMay 17 23:55:26 localhost.localdomain systemd[1]: Stopped The Apache HTTP Server.May 17 23:55:26 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...May 17 23:55:26 localhost.localdomain httpd[23435]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localho...s messageMay 17 23:55:27 localhost.localdomain systemd[1]: Started The Apache HTTP Server.Hint: Some lines were ellipsized, use -l to show in full.[root@localhost library]#
sudo pear install DBsudo pear install MDB2
Kết nối vào giao diện WebPage của Daloradius.
- Link: http://192.168.100.45/daloradius/login.php
- Username/Password Default: administrator/radius
Mọi thắc mắc các bạn vui lòng liên hệ với mình thông qua kênh Zalo (Jade Bùi) 076.877.2021.
0 comments