当前位置:网站首页>如何使用phpIPAM来管理IP地址和子网
如何使用phpIPAM来管理IP地址和子网
2022-07-01 16:12:00 【星哥玩云】
通常,网络或系统管理员有责任来管理其所管理的网络下的一个或多个子网。例如,当一个网段分配了/24子网,那么该子网就有254个IP地址可以用于不同用途。要跟踪某个IP被分配到了哪个主机,就需要通过某种方式记录下来。最简单的方法,就是使用一个电子表格,如Excel来记录IP地址的分配信息。此方法对于只有一个管理员,并且网络很小的情况下比较奏效。然而,对于多个大型网络而言,依赖于电子表格并不方便,而且十分容易出错。更糟糕的是,如果有多个管理员参与管理,更新电子表格就十分麻烦了,因为每个管理员可能生成各种不同版本的文档记录。
一种系统地管理IP地址分配的方式是使用网络化的IP地址管理工具。不仅仅是因为网络化管理工具能在任何地方访问并管理,而且其后端数据库也能保证所有更新能正确同步并实时生效。尽管有许多可用的网络化应用工具,但我们将在此教程中关注如何来安装phpIPAM(IP Address Manager IP地址管理工具)。phpIPAM是一个开源、高效的IP地址管理应用软件,有着以下一些特性。
- 同时支持IPv4和IPv6(和其它工具不同,它对IPv6支持得很好)
- 内建的IPv4和IPv6计算器
- 支持无类域间路由(CIDR)标记
- 支持MySQL数据库
- 子网嵌套
- 基于用户/组权限
- 可视化报表工具
- 使用.xls文件导入/导出
- 支持设备、VRF和VLAN
- 强大的搜索引擎
- 电子邮件标记
- 支持基于AD/LDAP的验证
可访问http://demo.phpipam.net查看phpIPAM演示网站。
在本教程中,我们将在Ubuntu环境中使用Apache来配置phpIPAM。
在Ubuntu上安装phpIPAM
首先,使用apt-get来安装需要的软件包。
- # apt-get install apache2 mysql-server php5 php5-gmp php-pear php5-mysql php5-ldap wget
如果MySQL是首次安装,请使用以下命令来设置root密码。
- # mysqladmin -u root password NEWPASSWORD
phpIPAM可以安装在任何Web服务器目录中,我们将会安装到Apache Web服务器的根目录下的/phpipam/子目录中。
下载phpIPAM软件包。
- # wget http://kent.dl.sourceforge.net/project/phpipam/phpipam-1.0.tar
将软件包解压到Web服务器相应目录。
- # cp phpipam-1.0.tar /var/www/
- # cp /var/www/
- # tar xvf phpipam-1.0.tar
- # rm phpipam-1.0.tar
现在来指定MySQL的用户名和密码,同时指定基准目录。
- # vim /var/www/phpipam/config.php
- $db['host']="localhost";
- ## MySQL user for ipam ##
- $db['user']="phpipam";
- ## password for the MySQL user ##
- $db['pass']="phpipamadmin";
- ## database for MySQL ##
- $db['name']="phpipam";
- ## base directory ##
- define('BASE',"/phpipam/");
需要在提供的.htaccess文件中指定基准目录。
- # vim /var/www/phpipam/.htaccess
- RewriteBase/phpipam/
准备Apache Web服务器
phpIPAM的运行需要Apache 的 Rewrite模块,该模块可以在Ubuntu或Debian机器上使用以下命令来启用。
- # a2enmod rewrite
接下来,需要修改Apache的默认配置。请添加/修改你的配置,使它看起来像下面这样。
- # vim /etc/apache2/sites-enabled/000-default
- <Directory/var/www/>
- Options Indexes FollowSymLinks MultiViews
- AllowOverride all
- Order allow,deny
- allow from all
- </Directory>
最后,重启Apache Web服务。
- # service apache2 restart
完成安装
我们可以使用浏览器来完成phpIPAM的安装。将浏览器地址指向URL: http:///phpIPAM,将会显示以下phpIPAM安装页面。我们可以开始自动化数据库安装。
现在,phpIPAM应该已经起来,并正在运行了,我们可以使用以下默认用户来登录。
- URL: http:///phpipam
- User: Admin
- Pass: ipamadmin
边栏推荐
- The picgo shortcut is amazing. This person thinks exactly the same as me
- China's intelligent transportation construction from the perspective of "one hour life circle" in Dawan District
- 部门来了个拿25k出来的00后测试卷王,老油条表示真干不过,已被...
- 制造业数字化转型究竟是什么
- 怎麼用MySQL語言進行行列裝置?
- Problèmes rencontrés dans le développement de la GI pour maintenir le rythme cardiaque en vie
- idea启动Command line is too long问题处理
- The sharp drop in electricity consumption in Guangdong shows that the substitution of high-tech industries for high-energy consumption industries has achieved preliminary results
- [SQL statement] Why do you select two Shanghai and query different counts here? I want it to become a Shanghai, and count only displays a sum
- Where should older test / development programmers go? Will it be abandoned by the times?
猜你喜欢

最新NLP赛事实践总结!
![[open source data] open source data set for cross modal (MRI, Meg, eye movement) human spatial memory research based on virtual reality scenes](/img/73/98e4847783be26d86d147425ce3ecd.jpg)
[open source data] open source data set for cross modal (MRI, Meg, eye movement) human spatial memory research based on virtual reality scenes

使用腾讯云搭建图床服务

苹果自研基带芯片再次失败,说明了华为海思的技术领先性

There will be a gap bug when the search box and button are zoomed

Sales management system of lightweight enterprises based on PHP

The Department came to a Post-00 test paper king who took out 25K. The veteran said it was really dry, but it had been

接口测试框架中的鉴权处理

Hardware development notes (9): basic process of hardware development, making a USB to RS232 module (8): create asm1117-3.3v package library and associate principle graphic devices

【Hot100】20. 有效的括号
随机推荐
China's intelligent transportation construction from the perspective of "one hour life circle" in Dawan District
【Hot100】20. 有效的括号
HR interview: the most common interview questions and technical answers
Thinkphp内核工单系统源码商业开源版 多用户+多客服+短信+邮件通知
Win11如何設置用戶權限?Win11設置用戶權限的方法
电脑屏幕变色了怎么调回来,电脑屏幕颜色怎么改
Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
[open source data] open source data set for cross modal (MRI, Meg, eye movement) human spatial memory research based on virtual reality scenes
基于PHP的轻量企业销售管理系统
运动捕捉系统原理
How does win11 set user permissions? Win11 method of setting user permissions
【LeetCode】43. String multiplication
普通二本,去过阿里外包,到现在年薪40W+的高级测试工程师,我的两年转行心酸经历...
DO280管理应用部署--pod调度控制
程序员职业生涯真的很短吗?
How to adjust the color of the computer screen and how to change the color of the computer screen
When ABAP screen switching, refresh the previous screen
How to use MySQL language for row and column devices?
最新NLP赛事实践总结!
IM即时通讯开发实现心跳保活遇到的问题