phpipam安装部署

一、IPAM管理系统简介

phpipam是一个开源Web IP地址管理应用程序(IPAM)。其目标是提供轻便,现代且有用的IP地址管理。它是基于PHP的应用程序,具有MySQL数据库后端,使用jQuery库,ajax和HTML5 / CSS3功能。

二、IPAM安装部署教程

2.1 环境准备

#安装依赖模块 Web server、Database 组件

[root@localhost ~]# yum install httpd mariadb-server php php-cli php-gd php-common php-ldap php-pdo php-pear php-snmp php-xml php-mysql php-mbstring git -y

#设置时区

[root@localhost ~]# vim /etc/php.ini
	[Date]
	; Defines the default timezone used by the date functions
	; http://php.net/date.timezone
	# 修改下面语句
	date.timezone =Asia/Shanghai

#启动 Apache Web Server 并设置开机启动

[root@localhost ~]# systemctl start httpd
[root@localhost ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

#启动 MySQL (MariaDB) database server

[root@localhost ~]# systemctl start mariadb
[root@localhost ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

#配置 Apache Web Server

[root@localhost ~]# vim /etc/httpd/conf/httpd.conf
	<Directory "/var/www/html">
	    #
	    # Possible values for the Options directive are "None", "All",
	    …………省略…………
	    # It can be "All", "None", or any combination of the keywords:
	    #   Options FileInfo AuthConfig Limit
	    ######## 修改此处 ########
	    # AllowOverride none
	    AllowOverride all
	    Order allow,deny
	    Allow from all
	    #
	    …………省略…………
	</Directory>

#初始化数据库设置

[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 current
	password for the root user.  If you've just installed MariaDB, and
	you 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 MariaDB
	root user without the proper authorisation.
	
	Set root password? [Y/n] y
	New password: 
	Re-enter new password: 
	Password updated successfully!
	Reloading privilege tables..
	 ... Success!
	
	
	By default, a MariaDB installation has an anonymous user, allowing anyone
	to log into MariaDB without having to have a user account created for
	them.  This is intended only for testing, and to make the installation
	go a bit smoother.  You should remove them before moving into a
	production environment.
	
	Remove anonymous users? [Y/n] y
	 ... Success!
	
	Normally, root should only be allowed to connect from 'localhost'.  This
	ensures that someone cannot guess at the root password from the network.
	
	Disallow root login remotely? [Y/n] n
	 ... skipping.
	
	By default, MariaDB comes with a database named 'test' that anyone can
	access.  This is also intended only for testing, and should be removed
	before 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 far
	will 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 MariaDB
	installation should now be secure.
	
	Thanks for using MariaDB!

2.2 安装phpIPAM

#从 git 下载 phpIPAM 文件

[root@localhost ~]# cd /var/www/html/
[root@localhost html]# git clone https://github.com/phpipam/phpipam.git phpipam
	正克隆到 'phpipam'...
	remote: Enumerating objects: 30147, done.
	remote: Counting objects: 100% (310/310), done.
	remote: Compressing objects: 100% (164/164), done.
	remote: Total 30147 (delta 153), reused 289 (delta 145), pack-reused 29837
	接收对象中: 100% (30147/30147), 21.75 MiB | 11.88 MiB/s, done.
	处理 delta 中: 100% (22244/22244), done.

#先cd 到phpipam确认下

git checkout 1.4
	[root@localhost phpipam]# git checkout 1.4
	分支 1.4 设置为跟踪来自 origin 的远程分支 1.4。
	切换到一个新分支 '1.4'

#让 apache 用户有权限访问 phpipam

[root@localhost phpipam]# chown apache:apache -R /var/www/html/
[root@localhost phpipam]# cd /var/www/html/
[root@localhost html]# find . -type f -exec chmod 0644 {} \;
[root@localhost html]# find . -type d -exec chmod 0755 {} \;

#配置数据库链接

[root@localhost html]# cp /var/www/html/phpipam/config.dist.php /var/www/html/phpipam/config.dist.php.bak
[root@localhost html]# mv /var/www/html/phpipam/config.dist.php /var/www/html/phpipam/config.php
[root@localhost html]# vim /var/www//html/phpipam/config.php
	/**
	 * database connection details
	 ******************************/
	$db['host'] = 'localhost';
	$db['user'] = 'phpipam_user';
	$db['pass'] = 'phpipam_Pass';
	$db['name'] = 'phpipam_db';
	$db['port'] = 3306;
	# 还有一处需要替换
	if(!defined('BASE'))
	define('BASE', "/phpipam/");

#重启 http 服务

[root@localhost html]# systemctl restart httpd

2.3 phpIPAM web配置

http://x.x.x.x/phpipam/index.php?page=install x.x.x.x地址为服务器的地址

未完待续……

原文地址:https://www.cnblogs.com/zhaoqian0129/p/17232882.html
感谢大佬

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

深度学习0407

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值