一、 iTop概述
iTop,是IT運營門戶(IT Operation Portal)的簡稱,它是一個開源web應用程序,適用於IT服務的日常運維管理。它基於ITIL最佳實踐,適應符合ITIL最佳實踐的流程,同時它又很靈活,可以適應一般的IT服務管理流程。
iTop的核心是CMDB,即配置管理數據庫(Configuration Management Data Base)。CMDB是iTop最早開發的部分。以CMDB爲中心的設計理念,需要保證CMDB的準確性和及時更新,服務人員和客戶均使用iTop來解決運維管理中的各類問題將會對這一點有幫助。此外,CMDB與其它工具,如監控系統、報表工具、庫存管理系統等整合得越多,CMDB的信息就會越豐富。CMDB快速實施,與其它系統相比iTop有豐富的CMDB接口,支持多種方式的數據導入。
iTop基於Apache/IIS、MySQL和PHP,它可以在任何支持這些程序的操作系統上運行,如Windows、Linux(Debian、Ubuntu和Redhat)、Solaris和MacOS X等。此外,由於iTop是基於B/S架構的應用程序,不需要在用戶電腦上部署任何客戶端,只需要一個簡單的Web瀏覽器(IE 8+、Firefox 3.5+、Chrome或Safari 5+)即可使用。
iTop架構圖
二、安裝iTop
環境說明 :
iTop 2.5只支持PHP5.6以上版本,本例安裝的是php72w版本
1、下載鏈接:
2.5.1版本:https://jaist.dl.sourceforge.net/project/itop/itop/2.5.1/iTop-2.5.1-4123.zip 這裏找到一個漢化比較全的包:https://pan.baidu.com/s/1u-UEJC84Xm2svKdNcSf0iQ 安裝完成後替換掉/env-production/dictionaries/zh-cn.dict.php
2.6.0版本:https://nchc.dl.sourceforge.net/project/itop/itop/2.6.0/iTop-2.6.0-4294.zip 中文比較全,不需要換字典
2.6.1版本:https://jaist.dl.sourceforge.net/project/itop/itop/2.6.1/iTop-2.6.1-4463.zip 中文比較全,不需要換字典
2、安裝lamp及相關組件
[root@tencent ~]# yum -y install epel-release
[root@tencent ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
[root@tencent ~]# yum -y install httpd graphviz unzip mod_ssl mariadb-server php72w php72w-gd php72w-mysql php72w-imap php72w-soap php72w-ldap php72w-mbstring php72w-pecl-zendopcache php72w-xml php72w-cli
3、開啓防火牆、關閉SELinux
[root@tencent ~]# firewall-cmd --permanent --add-service=http
[root@tencent ~]# firewall-cmd --permanent --add-service=https
[root@tencent ~]# firewall-cmd --reload
[root@tencent ~]# vi /etc/selinux/config #修改爲SELINUX=disabled,重啓後生效
SELINUX=disabled
4、創建PHP會話目錄,配置目錄權限
[root@tencent ~]# mkdir -p /var/lib/php/session
[root@tencent ~]# chown apache:apache -R /var/lib/php/session/
5、啓動httpd、mariadb服務
[root@tencent ~]# systemctl start httpd
[root@tencent ~]# systemctl start mariadb
[root@tencent ~]# systemctl enable httpd
[root@tencent ~]# systemctl enable mariadb
6、創建數據庫、創建庫用戶、用戶授權、修改數據配置(密碼請根據需求自行修改)
[root@tencent ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 5.6.41 Source distribution
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> mysql> create database itop DEFAULT CHARACTER SET utf8;
mysql> create user itop@localhost identified by 'itopasswd';
mysql> grant all privileges on *.* to itop@'localhost' identified by 'itopasswd';
mysql> flush privileges;
mysql> exit
[root@tencent ~]# vi /etc/my.conf
max_allowed_packet=1048576 //允許上傳包的最大值
7、上傳iTop網站程序 /var/www/iTop目錄(可以通過xftp或者直接在此目錄wget)
[root@tencent ~]#
[root@tencent ~]# mkdir -p /var/www/html/{conf,data,log,env-production}
[root@tencent ~]# chown -R apache:apache /var/www/html
[root@tencent ~]# cd /var/www/html
[root@tencent html]# unzip iTop-2.6.1-4463.zip
8、WEB安裝過程:
瀏覽器打開 http://你的IP/ossim/web/setup/index.php
此時需要對增加權限
[root@tencent html]# chmod 777 web/
[root@tencent html]# chmod 777 /web/log/
[root@tencent html]# chmod 777 /web/data/
點擊安裝模式,全新安裝還是升級安裝
接受Licenses
配置數據庫
設置管理員密碼
設置URL和安裝模式
自動登錄到歡迎界面