Snipe-IT部署方案
一、环境准备
操作系统:centos 7.5
IP:192.168.248.110
二、安装步骤
2.1 系统更新
sudo yum -y install epel-release
sudo yum update -y
2.2 安装php
- CentOS 7启用epel和添加PHP 7.3 Remi存储库
yum -y install epel-release
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
- 安装yum-utils,用于管理yum存储库和包的有用程序。
yum -y install yum-utils
- centos7默认存储库PHP 5.4,禁用此repo并启用PHP 7.3
yum-config-manager --disable remi-php54
yum-config-manager --enable remi-php73
(如需使用其他版本PHP,将remi-php73改为remi-php7.1这样子即可)
- 在CentOS 7上安装PHP 7.3
yum -y install php php-cli php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json php-pdo php-pecl-apcu php-pecl-apcu-devel php-fpm php-openssl php-tokenizer php-mysql php-ldap php-fileinfo php-dom
检查安装的版本
php -v
2.3 Apache 2.4.6的安装与配置
2.3.1 安装Apache 2.4.6
yum install -y httpd httpd-devel
2.3.2 修改httpd.conf文件
vi /etc/httpd/conf/httpd.conf
在AddType application*后面加如下一行
AddType application/x-httpd-php .php .phtml
大概在第285行左右添加,添加后如下:
272 #AddType application/x-gzip .tgz
273 #
274 # AddEncoding allows you to have certain browsers uncompress
275 # information on the fly. Note: Not all browsers support this.
276 #
277 #AddEncoding x-compress .Z