当前位置:首页 > 实用技巧 >

192.168.0.107登录入口(192.168.0.101登录官方入口)

来源:原点资讯(www.yd166.com)时间:2023-05-21 01:33:44作者:YD166手机阅读>>

⼀、环境准备[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

Apache⽹站跟⽬录下新建info.php⽹⻚,按Ins输⼊内容后按esc,:wq 保存退出

# vi /var/www/html/info.php

填⼊以下测试内容:<?php phpinfo(); ?>

6 重启Apache服务器,浏览器输⼊php测试⻚

# systemctl restart httpd.service

浏览器输⼊:http://192.168.0.107/info.php

五、安装FreeRadius

1 安装

# yum -y install freeradius freeradius-utils freeradius-mysql

2 启动且设置为开机⾃启

3 配置Freeradius连接MariaDB数据

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

1

4 修改FreeRadius配置⽂件

# vi /etc/raddb/mods-available/sql 修改为如下图所示

# chgrp -h radiusd /etc/raddb/mods-available/sql //配置⽂件权限,将所属组更改为radiusd# systemctl restart radiusd.service //重启radius服务

5 添加客户端连接设置,添加允许所以⽤户接⼊

# vi /etc/raddb/clients.conf

添加如下内容

client all_client {ipaddr = 0.0.0.0/0secret = testing123require_message_authenticator = no}

七、安装FreeRadius管理界⾯Daloradius1 进⼊Apache⽹站根⽬录,下载源⽂件

# cd /var/www/html/# wget https://github.com/lirantal/daloradius/archive/master.zip 如出现 -bash: wget: command not found 等就安装相应软件,没出现忽略这步。# yum -y install wget# unzip master.zip //解压# rm -f master.zip # mv daloradius-master/ /var/www/html/daloradius //移动⽂件夹

2 设置DaloRadius⽬录权限及属主信息

# chown -R apache:apache /var/www/html/daloradius# mv /var/www/html/daloradius/library/daloradius.conf.php.sample /var/www/html/daloradius/library/daloradius.conf.php. //修改php.sample为php(这个好像跟版本有关系)# chmod -R 664 /var/www/html/daloradius/library/daloradius.conf.php

3 在MariaDB中创建DaloRadius数据对象

[root@localhost html]# mysql -u root -p radius < /var/www/html/daloradius/contrib/db/fr2-mysql-daloradius-and-freeradius.sql Enter password:[root@localhost html]# mysql -u root -p radius < /var/www/html/daloradius/contrib/db/mysql-daloradius.sql Enter password:[root@localhost html]#

4 修改DaloRadius配置⽂件

# vi /var/www/html/daloradius/library/daloradius.conf.php //使⽤VI编辑器修改DaloRadius配置⽂件

5 重启服务

# systemctl restart radiusd.service# systemctl restart mariadb.service# systemctl restart httpd

如果提示:Warning: radiusd.service changed on disk. Run 'systemctl daemon-reload' to reload units

没有上⾯提示就忽略此步

# systemctl daemon-reload

# systemctl restart radiusd.service

⼋ 、 安装php-pear# yum install -y php-pear-DB --skip-broken

九、登陆web⻚⾯默认⽤户名: administrator 密码: radius

http://192.168.0.107/daloradius/login.php添加⽤户

windows端测试

其它事项:在其安装过程中碰到,dologin.php 500 后查找发现为 php-pear-DB没有安装,安装后问题解决。

后查看php错误信息发现为

[root@localhost daloradius]# php dologin.phpPHP Notice: Undefined index: REMOTE_ADDR in /var/www/html/daloradius/dologin.php on line 27PHP Notice: Undefined index: location in /var/www/html/daloradius/dologin.php on line 45PHP Warning: include_once(DB.php): failed to open stream: No such file or directory in /var/www/html/daloradius/library/opendb.php on line 84PHP Warning: include_once(): Failed opening 'DB.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/daloradius/library/opendb.php on line 84PHP Fatal error: Uncaught Error: Class 'DB' not found in /var/www/html/daloradius/library/opendb.php:86Stack trace:#0 /var/www/html/daloradius/dologin.php(49): include()#1 {main} thrown in /var/www/html/daloradius/library/opendb.php on line 86[root@localhost daloradius]#

cat /etc/httpd/logs/error_log # 查看 http 服务的⽇志,发现有以下错误:PHP Fatal error: Uncaught Error: Class 'DB' not found in /var/www/html/daloradius/library/opendb.php:86\nStack trace:\n#0 /var/www/html/daloradius/dologin.php(49): include()\n#1 {main}\n thrown in /var/www/html/daloradius/library/opendb.php on line 86解决⽅法:安装php-pear-DByum install -y php-pear-DB现在打开浏览器访问 http://your ip address//daloradius 就可以看到daloradius的界⾯了,默认登录的⽤户名和密码分别为 username: administrator password: radius

在其安装过程中碰到⽤户名密码正确被拒:解决三部曲

1 创建软连接

# ln -s /etc/raddb/mods-available/sql /etc/raddb/mods-enabled/ 为/etc/raddb/mods-enabled //创建软连接

2 将raad_clients打开 将client_table 打开

3 重读配置⽂件,重启radius服务

# systemctl daemon-reload# systemctl restart radiusd.service

参考资料:

https://www.cnblogs.com/opsprobe/p/9769555.html (解决了DB没装报错)

https://blog.csdn.net/qq_29056051/article/details/81066205(主要参考来源)

https://www.cnblogs.com/lamp01/p/10101659.html (解决php安装)

https://www.cnblogs.com/travis-li/p/12711355.html(解决Daloradius,以及FreeRadius安装)

栏目热文

钻井平台工作稳定吗(海上钻井平台干活累不累)

钻井平台工作稳定吗(海上钻井平台干活累不累)

海洋除了是我们生态环境中的一部分以外,站在国家经济的层面来看,它也是一个巨大的资源宝库。相信大家应该都有见过在大海中作业...

2023-05-21 01:38:23查看全文 >>

油田钻井工作累不累(川渝地区石油钻井队工作累不累)

油田钻井工作累不累(川渝地区石油钻井队工作累不累)

勘探苦,钻井累,最苦最累修井队,修井何尝不是一次修炼。文 |石油link (更多深度内容,请关注公众号:石油link)前...

2023-05-21 01:27:33查看全文 >>

钻井工人怎么休息的(钻井工人)

钻井工人怎么休息的(钻井工人)

我作为一个石油钻井从业三十年的老石油人,想把十二小时工作制的来龙去脉介绍给大家,看看这个工作制是否合理,供大家讨论。石油...

2023-05-21 01:04:23查看全文 >>

钻井一线工人每天工作多久(钻井工人上几天班休息几天)

钻井一线工人每天工作多久(钻井工人上几天班休息几天)

近几年随着国内经济快速的增长,少不了汽车交通工具突飞猛进的发展,基本每家每户都有一辆车。好多人买车容易用车难,难在了油价...

2023-05-21 01:01:02查看全文 >>

怎么去钻井平台工作(怎么才能去远洋石油钻井平台工作)

怎么去钻井平台工作(怎么才能去远洋石油钻井平台工作)

想转行拖轮或钻井平台,大家给他点建议?一个本科毕业的科班三副已经通过面试成功的进入到国内最大的国企:船东公司。公司对他也...

2023-05-21 01:37:53查看全文 >>

192.168.101.1路由器设置界面(192.168.10.1进入登录页面)

192.168.101.1路由器设置界面(192.168.10.1进入登录页面)

现在的路由器设置已经是很简单的事情了,但是也不无例外的,一些客户还是有需要进入路由器的管理页面,进行修改,或者查看路由...

2023-05-21 01:44:17查看全文 >>

192.168.100.1路由器设置(192.168.100.1手机登录)

192.168.100.1路由器设置(192.168.100.1手机登录)

概况目前有两台路由器,一台华为A1,另一台是公司下放的,刷了OpenWrt的新路由3。华为A1各方面表面还算稳定,属于傻...

2023-05-21 01:49:50查看全文 >>

192.168.0.107设置(192.168.0.101怎么重新设置)

192.168.0.107设置(192.168.0.101怎么重新设置)

PKS系统C站GHOST恢复设置(不同镜像)此操作办法为硬盘损坏,备份丢失,且现场有同类型C站,可将同类型系统备份恢复做...

2023-05-21 01:01:54查看全文 >>

汽车仪表盘故障灯正常情况下点亮(汽车仪表盘故障灯全亮了咋回事)

汽车仪表盘故障灯正常情况下点亮(汽车仪表盘故障灯全亮了咋回事)

说起灯,相信大部分车主都对车上仪表盘上的各种指示灯都不太认识,即使是老司机也未必认得全。但是为了行驶安全,有些故障灯我们...

2023-05-21 01:31:41查看全文 >>

汽车仪表盘故障灯都亮了怎么回事(汽车仪表盘故障灯亮的原因是什么)

汽车仪表盘故障灯都亮了怎么回事(汽车仪表盘故障灯亮的原因是什么)

当车子的故障灯亮起时,一定要及时排除问题,以免发生更严重的事故。那么造成故障灯亮起的原因究竟是什么呢?以下是可能的原因:...

2023-05-21 01:47:51查看全文 >>

文档排行