分类目录归档:未分类

安装iTop采坑记录

PHP安装缺少zip模块会提示iTop Uncaught Error: Class ‘DBBackup’ not found in ……

需要安装zip, libzip

tar -zxvf libzip-1.2.0.tar.gz

cd libzip-1.2.0

./configure 

make 

make install 

wget http://pecl.php.net/get/zip-1.14.0.tgz
tar zxvf zip-1.14.0.tgz
cd zip-1.14.0
/usr/local/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin/php-config
make

make install

安装完成后,可以安装zip了。如果找不到’zipconf.h’,先找找,其实可以找到的

find /usr/local -iname ‘zipconf.h’

但是为什么找不到呢?可以
ln -s /usr/local/lib/libzip/include/zipconf.h /usr/local/include 。这样在安装zip即可。

php.ini 中增加
extension=”zip.so”

将zlib.output_compression=Off改为zlib.output_compression=On;

php -m 可以查看已安装的模块。

CentOS7 安装 PHP最新版本

设置你的yum仓库

安装EPEL:

sudo yum install epel-release

安装remi:

sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
安装PHP
## 安装PHP 7.3
yum --enablerepo=remi-php73 install php
## 安装 PHP 7.2
yum --enablerepo=remi-php72 install php
## 安装 PHP 7.1
yum --enablerepo=remi-php71 install php 
安装模块
### For PHP 7.3
yum --enablerepo=remi-php73 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt
### For PHP 7.2
yum --enablerepo=remi-php72 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt
### For PHP 7.1
yum --enablerepo=remi-php71 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt