sed -i ‘s/\(^SELINUX=\).*/\SELINUX=disabled/’ /etc/sysconfig/selinux
sed -i ‘s/\(^SELINUX=\).*/\SELINUX=disabled/’ /etc/selinux/config
reboot
yum -y update
yum -y groupinstall core base “Development Tools”
adduser asterisk -m -c “Asterisk User”
firewall-cmd –zone=public –add-port=80/tcp –permanent
firewall-cmd –reload
yum -y install lynx tftp-server unixODBC mysql-connector-odbc mariadb-server mariadb httpd ncurses-devel sendmail sendmail-cf sox newt-devel libxml2-devel libtiff-devel audiofile-devel gtk2-devel subversion kernel-devel git crontabs cronie cronie-anacron wget vim uuid-devel sqlite-devel net-tools gnutls-devel python-devel texinfo libuuid-devel
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum remove php*
yum install php56w php56w-pdo php56w-mysql php56w-mbstring php56w-pear php56w-process php56w-xml php56w-opcache php56w-ldap php56w-intl php56w-soap
curl -sL https://rpm.nodesource.com/setup_8.x | bash –
yum install -y nodejs
systemctl enable mariadb.service
systemctl start mariadb
mysql_secure_installation
systemctl enable httpd.service
systemctl start httpd.service
pear install Console_Getopt
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-current.tar.gz
wget -O jansson.tar.gz https://github.com/akheron/jansson/archive/v2.10.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
cd /usr/src
tar xvfz dahdi-linux-complete-current.tar.gz
tar xvfz libpri-current.tar.gz
rm -f dahdi-linux-complete-current.tar.gz libpri-current.tar.gz
cd dahdi-linux-complete-*
make all
make install
make config
cd /usr/src/libpri-*
make
make install
cd /usr/src tar vxfz jansson.tar.gz rm -f jansson.tar.gz cd jansson-* autoreconf -i ./configure --libdir=/usr/lib64 make make install
cd /usr/src
tar xvfz asterisk-13-current.tar.gz
rm -f asterisk-*-current.tar.gz
cd asterisk-*
contrib/scripts/install_prereq install
./configure –libdir=/usr/lib64 –with-pjproject-bundled
contrib/scripts/get_mp3_source.sh
make menuselect
make
make install
make config
ldconfig
chkconfig asterisk off
chown asterisk. /var/run/asterisk
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
chown -R asterisk. /usr/lib64/asterisk
chown -R asterisk. /var/www/
sed -i ‘s/\(^upload_max_filesize = \).*/\120M/’ /etc/php.ini
sed -i ‘s/^\(User\|Group\).*/\1 asterisk/’ /etc/httpd/conf/httpd.conf
sed -i ‘s/AllowOverride None/AllowOverride All/’ /etc/httpd/conf/httpd.conf
systemctl restart httpd.service
cd /usr/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-14.0-latest.tgz
tar xfz freepbx-14.0-latest.tgz
rm -f freepbx-14.0-latest.tgz
cd freepbx
./start_asterisk start
./install
chkconfig asterisk on
fwconsole ma disablerepo commercial
fwconsole ma installall
fwconsole ma delete firewall
fwconsole r
コメント