1.配置PHP源并安装必备包
Centos 5.X:rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm
CentOs 6.x:rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
CentOs 7.X:rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
yum install -y httpd mariadb-server php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring php56w-ldap php56w-bcmath
2.关闭selinux 防火墙
setenforce 0
sed -i ‘s/SELINUX=enforcing/\SELINUX=permissive/’ /etc/selinux/config
systemctl stop firewalld
systemctl disable firewalld
3.数据库配置
systemctl enable mariadb
systemctl start mariadb
mysql_secure_installation
mysql -u root -p
> create database teampassdb;
> create user ‘teampassuser’@‘localhost’ identified by ‘P@ssword01’;
> grant all privileges on teampassdb.* to teampassuser@localhost;
> flush privileges;
4.下载teampass并配置权限
cd /var/www/
git clone https://github.com/nilsteampassnet/TeamPass.git
useradd apache -s /sbin/nologin -M
chown -R apache:apache /var/www/TeamPass
5.Apache与PHP配置
vim /etc/php.ini
date.timezone = Asia/Phnom_Penh
log_errors = syslog
max_execution_time = 120
vim /etc/httpd/conf.d/teampass.conf
<VirtualHost *:80>
ServerAdmin sysadmin@techspacekh.com
ServerName teampass.techspacekh.com
DocumentRoot /var/www/TeamPass
ErrorLog “/var/log/httpd/teampass.techspacekh.com.log”
CustomLog “/var/log/httpd/teampass.techspacekh.com.log” combined
5.
systemctl start httpd