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

网页安装

Leave a Reply

Your email address will not be published. Required fields are marked *