Browsed by
Tag: itop

CentOS7 安装 iTOP 2.7.1

CentOS7 安装 iTOP 2.7.1

因为CentOS7自带PHP和Maraidb版本过低,安装iTop会报错,因此需要安装额外包。

安装EPEL源和REMI源

yum install -y epel-release
yum install -y https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rpm
yum update -y

安装PHP7

yum -y install yum-utils
yum-config-manager --enable remi-php74
yum install -y php  php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json
yum install -y graphviz
systemctl enable php74-php-fpm.service --now
systemctl enable httpd.service --now
firewall-cmd --permanent --add-service={http,https}
firewall-cmd --reload

安装iTop

unzip iTop-2.7.1-5896.zip
mv web/* /var/www/html/
chown -Rf apache:apache html/

安装Mariadb

cat >>/etc/yum.repos.d/mariadb.repo<EOF
# MariaDB 10.5 CentOS repository list - created 2020-08-24 10:19 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = https://mirrors.tuna.tsinghua.edu.cn/mariadb/yum/10.5/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF
yum update -y
yum install mariadb-server.x86_64 mariadb
systemctl enable mariadb --now

数据库配置

mysql -uroot -p
MariaDB [(none)]> create database itop character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on itop.* to itop@'localhost' identified by 'itop';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;

配置SSL

可以申请itop的SSL证书

[root@itop ~]# vim /etc/httpd/conf/httpd.conf

SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLHonorCipherOrder on
SSLCertificateFile /etc/httpd/cert/4402254_itop.subwin.cn_public.crt
SSLCertificateKeyFile /etc/httpd/cert/4402254_itop.subwin.cn.key
SSLCertificateChainFile /etc/httpd/cert/4402254_itop.subwin.cn_chain.crt

[root@itop httpd]# systemctl restart httpd

网页安装

基于CentOS8快速部署iTop

基于CentOS8快速部署iTop

iTop是一个用PHP编写的基于ITIL理念打造的开源ITSM系统。本次将在CentOS8的虚机上安装部署一套iTOP系统。

  1. 系统准备
    首先是准本LAMP环境,使用系统默认的Apache2.4.3、PHP7.2、Mariadb10.3.
yum update -y
yum install -y cmake make autoconf gcc gcc-g++ unzip graphviz libzip-devel libzip-tools
yum install -y httpd php php-fpm php-ldap php-soap
yum install -y php-xmlrpc php-gd php-opcache php-mysqlnd php-json php-devel
yum install -y libmcrypt libmcrypt-devel php-pecl-apcu mhash
yum install -y php-odbc php-mbstring php-snmp
yum install -y mariadb mariadb-server
firewall-cmd --permanent --add-service=http
firewall-cmd --reload
systemctl enable httpd php-fpm mariadb --now
  1. 上传iTop系统,修改配置文件
    我们把iTop的程序文件放置到/var/www/web目录下,修改/etc/httpd/conf/httpd.conf配置文件,使得根文件系统指向web目录,同时对web目录进行赋权。
unzip iTop-2.6.1-4463.zip
cp web/* /var/www/html/ -R
chown -R apache:apache /var/www/html/
mysql -uroot -p
MariaDB [(none)]> create database itop character set utf8 collate utf8_bin;
MariaDB [(none)]> grant all privileges on itop.* to itop@'localhost' identified by 'itop';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;
  1. 编译PHP扩展实现支持zip
    使用YUM/DNF安装的PHP默认不支持zip扩展,因此默认配置下iTOP会出现白屏,日志报错:
    PHP Fatal error: Class 'DBBackup' not found in /var/www/html/itop/web/setup/applicationinstaller.class.inc.php
    所以,需要编译安装PHP的zip扩展。
wget http://pecl.php.net/get/zip
tar zxvf zip
cd zip-1.15.5
phpize
./configure 
make 
cp modules/zip.so /usr/lib64/php/modules/
touch /etc/php.d/20-zip.ini
echo 'extension=zip' >> /etc/php.d/20-zip.ini
vim /etc/php.ini
~~~~~~
## 开启zlib压缩支持
269 zlib.output_compression = On
~~~~~~
systemctl restart php-fpm

然后打开站点就可以进行安装了。

  1. iTOP部署
    iTopDeploy1
    iTopDeploy2
    iTopDeploy3
    iTopDeploy4
    iTopDeploy5
    iTopDeploy6
    iTopDeploy7
    iTopDeploy8
    iTopDeploy9
    iTopDeploy10
    iTopDeploy11
    iTopDeploy12
    iTopDeploy13
    iTopDeploy14
    iTopDeploy15