fusionpbx-install.sh/centos/install.sh

68 lines
1.3 KiB
Bash
Raw Normal View History

2017-02-23 17:53:37 +01:00
#!/bin/sh
# CentOS 7 install, no arm arch support
#move to script directory so all relative paths work
cd "$(dirname "$0")"
2017-04-23 10:21:24 +02:00
#includes
. ./resources/config.sh
2017-02-23 17:53:37 +01:00
. ./resources/colors.sh
2017-04-23 10:21:24 +02:00
2017-02-23 17:53:37 +01:00
# Update CentOS
verbose "Updating CentOS"
yum -y update && yum -y upgrade
# Installing basics packages
yum -y install ntp htop epel-release vim openssl
# Disable SELinux
verbose "Disabling SELinux"
warning "Reboot required after installation completes"
setenforce 0
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config
verbose "SELinux disabled"
#FreeSWITCH
resources/switch/package-release.sh
#FusionPBX
resources/fusionpbx.sh
#Postgres
resources/postgres.sh
#NGINX web server
resources/sslcert.sh
resources/nginx.sh
#PHP/PHP-FPM
resources/php.sh
#IPTables
resources/firewalld.sh
# FusionPBX to FreeSWITCH configs
verbose "Configuring freeswitch"
resources/switch/conf-copy.sh
resources/switch/package-permissions.sh
resources/switch/package-systemd.sh
verbose "freeswitch configured"
#Fail2ban
resources/fail2ban.sh
#restart services
verbose "Restarting packages for final configuration"
systemctl daemon-reload
systemctl restart freeswitch
systemctl restart php-fpm
systemctl restart nginx
systemctl restart fail2ban
verbose "Restart of service complete"
#add the database schema, user and groups
resources/finish.sh