iTop安裝 vm虛擬機、Linux、centos7安裝itop 2.6.1


itop安裝流程,是我基於下面兩位博主發布的文章整理出來的,歡迎大家學習,如有錯誤之處請大家留言指出我看到之后及時更新。謝謝

https://blog.csdn.net/qq_23565543/article/details/102753708

https://blog.csdn.net/qq_41955653/article/details/89575163

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版本為:2.6.1

itop2.6.1版本要求的mysql版本必須要是5.7以上、PHP7.2以上

數據庫為:mariadb,版本為:10.2.36-MariaDB

PHP環境,版本7.2

第一步安裝數據庫

由於我使用的是虛擬機安裝方式,我的ISO鏡像版本為:CentOS-7-x86_64-Minimal-1810.iso,centos系統默認的yum源下載的數據庫版本要低於itop的要求,在安裝數據庫前,需要在yum源下新增一個mariadb源文件

增加yum源

vim /etc/yum.repos.d/Mariadb.repo

編輯內容

[mariadb]
name = MariaDB
baseurl = https://mirrors.ustc.edu.cn/mariadb/yum/10.2/centos7-amd64
gpgkey=https://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1

清除yum緩存並重建yum緩存

yum clean all
yum makecache all

執行安裝數據庫

yum install MariaDB-server MariaDB-client -y

至此數據庫安裝完成。

#啟動數據庫
systemctl start mariadb
#開機自啟
systemctl enable mariadb

數據庫配置

創建數據庫、創建庫用戶、用戶授權、修改數據配置

# 執行數據庫安全向導,建議不論什么環境都進行這一步。
# 安裝后第一次執行該文件,root密碼,直接設定即可。以下為安全向導步驟:
  # a)為root用戶設置密碼
  # b)刪除匿名賬號
  # c)取消root用戶遠程登錄
  # d)刪除test庫和對test庫的訪問權限
  # e)刷新授權表使修改生效
[root@localhost html]# /usr/bin/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.

You already have a root password set, so you can safely answer 'n'.

Change the root password? [Y/n] n
 ... skipping.

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!

[root@localhost html]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 14
Server version: 10.2.36-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)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [mysql]> create database itop DEFAULT CHARACTER SET utf8;
MariaDB [mysql]> create user itop@localhost identified by 'itop';
MariaDB [mysql]> grant all privileges on *.* to itop@'localhost' identified by 'itop';
MariaDB [mysql]> flush privileges;
MariaDB [mysql]> exit;
[root@localhost html]# vim /etc/my.cnf
max_allowed_packet=2097652   --  允許上傳包的最大值


至此數據庫配置完成。

第二步:安裝 itop其他依賴:PHP、Apache等

PHP需要7.2以上版本,在按照PHP之前,需要先配置一下yum源。

安裝php72w,是需要配置額外的yum源地址的,否則會報錯不能找到相關軟件包。

php高版本的yum源地址,有兩部分,其中一部分是epel-release,另外一部分來自webtatic。如果跳過epel-release的話,安裝webtatic的時候,會有錯誤爆出。

所以,這里需要的命令是:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

當然,您也可以選擇下面的這個命令,也是一樣的效果。

yum install epel-release -y
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

https://www.cnblogs.com/lamp01/p/10101659.html

安裝相關組件:

yum -y install httpd graphviz unzip mod_ssl php72w php72w-gd php72w-mysql php72w-imap php72w-soap php72w-ldap php72w-mbstring php72w-pecl-zendopcache php72w-xml php72w-cli

查看PHP版本:

[root@localhost ~]# php -v
PHP 7.2.34 (cli) (built: Oct  1 2020 13:37:37) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.34, Copyright (c) 1999-2018, by Zend Technologies

配置PHP會話目錄

mkdir -p /var/lib/php/session
chown apache:apache -R /var/lib/php/session/

配置

#啟動 Apache
systemctl start httpd
#開機自啟
systemctl enable httpd

第三步:開啟防火牆、關閉SELinux

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
# 放開數據庫   謹慎操作 
firewall-cmd --zone=public --add-port=3306/tcp --permanent
#重啟防火牆
firewall-cmd --reload

關閉SELinux

安全增強型 Linux(Security-Enhanced Linux)簡稱 SELinux,它是一個 Linux 內核模塊,也是 Linux 的一個安全子系統。

SELinux 的結構及配置非常復雜,而且有大量概念性的東西,要學精難度較大。很多 Linux 系統管理員嫌麻煩都把 SELinux 關閉了。

https://blog.csdn.net/yanjun821126/article/details/80828908

#重啟生效
sed -i 's#ELINUX=enforcing#ELINUX=disabled#g' /etc/selinux/config

第四步:下載itop、目錄權限配置

itop官網:

mkdir -p /var/www/html/{conf,data,log,env-production}

cd /var/www/html

wget https://nchc.dl.sourceforge.net/project/itop/itop/2.6.1/iTop-2.6.1-4463.zip

unzip iTop-2.6.1-4463.zip

chown -R apache:apache /var/www/html
chmod 777 web/
chmod 777 web/log/
chmod 777 web/data/

第五步:安裝配置itop

通過瀏覽器訪問itop進行安裝配置。安裝步驟根據下面圖片示意即可

http://{你的ip}/web/setup/

在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述
管理員賬號密碼,一定要記清楚:
在這里插入圖片描述

在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述
在這里插入圖片描述

在這里插入圖片描述
在這里插入圖片描述

在這里插入圖片描述

在這里插入圖片描述


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM