FreeRadius安装

?、环境准备[root@localhost library]# cat /etc/redhat-release //查看内核版本centos linux release 7.3.1611 (Core)[root@localhost library]#
1 在开始安装前建议关闭SELinux或将其设置为disabled,最好建议永久关闭SELinux
# sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
2 重启系统:reboot ,重启完成后查看SELinux
[root@localhost library]# /usr/sbin/sestatus -vSELinux status: disabled[root@localhost library]#
3 查看防?墙状态,以及关闭防?墙
# firewall-cmd —-state
关闭防?墙及关闭开机启动防?墙:直接关闭防?墙# systemctl stop firewalld.service禁?firewall开机启动# systemctl disable firewalld.service
?、安装Apache服务器 1 安装
# yum -y install httpd httpd-devel
2 设置开机启动并且启动Apache服务
# systemctl enable httpd# systemctl start httpd
3 启动后浏览器输?本机ip,可以看到Apache主?
三 、 安装MariaDB1 安装
# yum install -y mariadb-server mariadb
2 设置MariaDB开机启动和启动MariaDB服务
# systemctl start mariadb
# systemctl enable mariadb
3 查看MariaDB状态,running已经运?
# systemctl status mariadb
4 初始设置MariaDB,设置root密码
出于安全考虑,考虑删除匿名?户和禁?远程根登录,参?下?的示例配置
[root@localhost ~]# MySQL_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the currentpassword for the root user. If you've just installed MariaDB, andyou haven't set the root password yet, the password will be blank,so you should just press enter here.
Enter current password for root (enter for none):OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDBroot user without the proper authorisation.
Set root password? [Y/n] yNew password:Re-enter new password:Password updated successfully!Reloading privilege tables..... Success!
By default, a MariaDB installation has an anonymous user, allowing anyoneto log into MariaDB without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.
Remove anonymous users? [Y/n] y... Success!
Normally, root should only be allowed to connect from 'localhost'. Thisensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y... Success!
By default, MariaDB comes with a database named 'test' that anyone canaccess. This is also intended only for testing, and should be removedbefore moving into a production environment.
Remove test database and access to it? [Y/n] y- Dropping test database...... Success!- Removing privileges on test database...... Success!
Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.
Reload privilege tables now? [Y/n] y... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDBinstallation should now be secure.
Thanks for using MariaDB!
5 创建Radius数据库和?户名密码
[root@localhost ~]# mysql -u root -pEnter password:Welcome to the MariaDB monitor. Commands end with ; or g.Your MariaDB connection id is 11Server version: 5.5.68-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE radius;Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "radius";Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> FLUSH PRIVILEGES;Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exitBye[root@localhost ~]#
四 、 安装php
1 修改yum源
# yum install epel-release -y# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
2 清除历史版本为了防?冲突
# yum -y remove php*
3 安装拓展包
# yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel php72w-embedded php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml
如果出现卡的请求ctrl+c 推出后重新执?命令
4 查看php的版本
# php -v
5 测试php
【FreeRadius安装】Apache?站跟?录下新建info.php??,按Ins输?内容后按esc,:wq 保存退出
# vi /var/www/html/info.php
填?以下测试内容:<?php phpinfo(); ?>
6 重启Apache服务器,浏览器输?php测试?
# systemctl restart httpd.service


推荐阅读