libraries
yum -y install epel-release
yum -y install php-gd php-php-gettext php-imap php-mbstring php-xml php-pear-MDB2-Driver-mysqli php-pecl-zendopcache php-pecl-apcu
deploy
yum -y install git
cd /opt
git clone https://github.com/osTicket/osTicket-1.8
cd osTicket-1.8
php setup/cli/manage.php deploy --setup /var/www/html/
chown -R apache /var/www/html/*
cd /var/www/html
cp include/ost-sampleconfig.php include/ost-config.php
chown apache include/ost-config.php
# ## pending
# cd include/plugins
# git clone https://github.com/osTicket/core-plugins
# cd core-plugins
# sed -i "s/pear-pear\.php\.net/pear.php.net/" auth-ldap/plugin.php
# php make.php hydrate
nginx, php-fpm, mariadb
yum -y install http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
sed -i -e 's@/packages/@/packages/mainline/@' /etc/yum.repos.d/nginx.repo
yum -y install nginx php-fpm mariadb-server
systemctl enable nginx
systemctl enable php-fpm
systemctl enable mariadb
## /etc/php-fpm.d/www.conf
[www]
listen = 127.0.0.1:9000
listen.allowed_clients = 127.0.0.1
user = apache
group = apache
pm = dynamic
pm.max_children = 50
pm.min_spare_servers = 5
pm.max_spare_servers = 35
slowlog = /var/log/php-fpm/www-slow.log
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on
## /etc/nginx/nginx.conf
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
upstream backend {
server 127.0.0.1:9000;
}
server {
root /var/www/html;
index index.php index.html index.htm;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_param PATH_INFO $uri;
location / {
try_files $uri @app;
}
location ~* \.php$ {
fastcgi_pass backend;
}
location @app {
fastcgi_pass backend;
}
location ~* /scp/ajax.php/(.*) {
try_files /scp/ajax.php $uri =404;
}
}
}
systemctl start mariadb
systemctl start php-fpm
systemctl start nginx
mysql -e "create database ost"
mysql -e "grant all on ost.* to ost@'localhost' identified by 'ostdbpass'"