1、先下载好itop安装软件包

wget http://pilotfiber.dl.sourceforge.net/project/itop/itop/2.2.1/iTop-2.2.1-2658.zip

2、在root家目录下编写安装脚本

itop.sh

#!/bin/bash

yum install epel-release -y

yum install httpd php mariadb-server graphviz unzip php-gd php-mysqlnd php-imap php-soap php-ldap php-mbstring php-mcrypt php-pecl-zendopcache -y

mkdir -p /var/lib/php/session

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

systemctl enable httpd mariadb

systemctl start mariadb httpd

unzip iTop-2.2.1-2658.zip -d /var/www/html/

mv /var/www/html/web /var/www/html/itop

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

chown -R apache:apache /var/www/html/itop/{conf,data,log,env-production}

3、给脚本文件执行权限

chmod +x ./itop.sh

4、查询apache默认80端口是否被占用

ss -tunlp | grep 80

5、  解决端口冲突

 /usr/local/nginx/sbin/nginx -s stop  

pkill -9  nginx

ps -cf | grep nginx

ss -tunlp | grep 80

6、启动apache服务并设置开机自启

systemctl start httpd

systemctl enable httpd

7、配置mariadb

mysql
mysql> create database itop22 DEFAULT CHARACTER SET utf8;
mysql> grant all on itop22.* to 'root'@'localhost' identified by '123456';
mysql> flush privileges ;

\q退出

8、设置selinux策略

[[email protected] ~]# vim /etc/selinux/config

SELINUX=permissive

重启:

reboot

8、初始化itop:servers_ip_address是ip地址

http://servers_ip_address/itop/web/

英文初始化教程路径

https://linoxide.com/tools/setup-itop-centos-7/

安装时要注意权限:

chmod 777  /var/www/html/itop/web

9、登录使用itop

[[email protected] ~]# yum -y install firefox

 

itop安装

10、查看数据库

[[email protected] ~]# mysql -uroot -p

Enter password: Welcome to the MariaDB monitor.  Commands end with ; or \g. Your MariaDB connection id is 143 Server version: 5.5.60-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)]> show databases;

+--------------------+ | Database           |

+--------------------+ | information_schema

| | itop               | | itop22             | | mysql              | | performance_schema | | test            

  | +--------------------+

MariaDB [itop]> use itop22 Database changed

MariaDB [itop]> select * from person;

+----+---------------+-----------------+--------------+-------------+------------+ | id | first_name    | employee_number | mobile_phone | location_id | manager_id | +----+---------------+-----------------+--------------+-------------+------------+ |  1 | My first name |                 |              |           0 |          0 | |  2 | Anna          |                 |              |           0 |          0 | |  3 | Claude        |                 |              |           0 |          0 | |  4 | Eugene        |                 |              |           0 |          0 | |  5 | Gustave       |                 |              |           0 |          0 | |  6 | Jean          |                 |              |           0 |          0 | |  7 | Jean-Jacques  |                 |              |           0 |          0 | |  8 | Jean-Paul     |                 |              |           0 |          0 | |  9 | Jules         |                 |              |           0 |          0 | | 10 | Marguerite    |                 |              |           0 |          0 | | 11 | Pablo         |                 |              |           2 |          0 | | 12 | Salvador      |                 |              |           2 |          0 | | 13 | Victor        |                 |              |           0 |          0 | +----+---------------+-----------------+--------------+-------------+------------+ 13 rows in set (0.00 sec)

 

 

 

 

 

相关文章:

  • 2021-10-05
  • 2022-01-03
  • 2022-01-24
  • 2022-12-23
  • 2021-10-30
  • 2022-01-18
  • 2021-12-15
猜你喜欢
  • 2021-05-31
  • 2021-12-27
  • 2021-12-16
  • 2021-09-11
  • 2021-12-24
  • 2021-08-26
相关资源
相似解决方案