forked from nextgenswitch/nextgenswitch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSTALL
More file actions
82 lines (65 loc) · 2.38 KB
/
Copy pathINSTALL
File metadata and controls
82 lines (65 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#install dnf essentials
export cwd=$(pwd)
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
sudo dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
sudo dnf -y install yum-utils
#install supporting apps
sudo dnf install wget zip unzip sox redis supervisor git httpd -y
sudo systemctl start supervisord
sudo systemctl enable supervisord
sudo systemctl start redis
sudo systemctl enable redis
sudo dnf install http://repo.okay.com.mx/centos/8/x86_64/release/lame-3.100-6.el8.x86_64.rpm -y
#install mariadb server
sudo dnf install mariadb-server -y
sudo systemctl start mariadb
sudo systemctl enable mariadb
mysql -sfu root < "init.sql"
#install php and easypbx
sudo dnf module reset php
dnf module install php:remi-8.2 -y
sudo dnf install php-{bz2,cli,common,curl,intl,mbstring,mysql,zip,redis,xml} -y
mv easypbx /var/www/html
cd /var/www/html/easypbx
unzip storage.zip
cp .env.example .env
mysql -ueasypbx -peasypbx easypbx< database/easypbx.sql
php composer.phar install
sudo chcon -R -t httpd_sys_rw_content_t /var/www/html/easypbx
find /var/www/html/easypbx/public/ -type f -exec chmod 644 {} \;
find /var/www/html/easypbx/public/ -type d -exec chmod 755 {} \;
chmod -R 0777 storage
ln -s ../../../public/sounds storage/app/public/sounds
ln -s ../storage/app/public public/storage
systemctl enable httpd
cd $cwd
#install nextgenswitch
sudo mkdir /usr/infosoftbd
mv bin /usr/infosoftbd/nextgenswitch
cp supervisord/nextgenswitch.ini /etc/supervisord.d/
cp httpd/easypbx.conf /etc/httpd/conf.d/
cd /usr/infosoftbd/nextgenswitch
yes | rm lua/config.lua
cp lua/config.lua.sample lua/config.lua
mkdir logs media pid
ln -s /var/www/html/easypbx/storage/app/public/records records
cd $cwd
#configure firewall
sudo systemctl stop firewalld
sudo systemctl mask firewalld
sudo yum install iptables-services -y
sudo systemctl enable iptables
mv iptables-rules /var/www/html/easypbx/storage/
sudo systemctl start iptables
#starting services
sudo useradd nextgenswitch
chown -R nextgenswitch:nextgenswitch /usr/infosoftbd/nextgenswitch
sudo /usr/sbin/setsebool -P httpd_can_network_connect=1
sudo systemctl stop firewalld
sudo systemctl disable firewalld
sudo systemctl start httpd
sudo systemctl start supervisord
sudo supervisorctl reload
#finally setup user account to login
php /var/www/html/easypbx/artisan easypbx:setup
#finallly browse easypbx http://your_vps_ip/