Bootstrap

CentOS7+Apache+PHP7.2+Mariadb环境下安装Snipe-IT资产管理系统

一、环境准备

CentOS 7 + Apache 2.4.6 + PHP +Mariadb5.5.60

其中Apache及Mariadb采用yum的方式直接安装,PHP采用二进制源码安装的方式

 

二、安装前准备

1.系统更新#注 此处采用最小化安装的Centos7.5

yum -y install epel-release 

yum update -y

2.使用yum安装Apache 2.4.6

yum install -y httpd httpd-devel

3.使用yum安装Mariadb 5.5.60

yum install -y mariadb mariadb-server

4.源码安装PHP7.2并配置Apache支持

安装PHP依赖环境

yum install -y make gcc wget openssl readline-devel openssl-devel libxslt-devel gmp-devel bzip2-devel freetype-devel libjpeg-devel php-mcrypt libmcrypt libmcrypt-devel  autoconf  freetype gd jpegsrc libmcrypt libpng libpng-devel libjpeg libxml2 libxml2-devel zlib curl curl-devel  

下载PHP安装包,并解压

cd /home
wget http://cn2.php.net/get/php-7.2.3.tar.gz/from/this/mirror
tar zxvf mirror

编译安装

cd php-7.2.3

./configure --prefix=/usr/local/php7.2.3 --with-config-file-path=/etc --enable-fpm --enable-inline-optimization --disable-debug --disable-rpath --enable-shared --enable-soap --with-apxs2=/usr/bin/apxs --with-libxml-dir --with-xmlrpc --with-openssl --with-mcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-c
;