サーラリマンは働き過ぎ、社畜化に注意しよう!!

debian9 freepbx15 asteriak16

asterisk
スポンサーリンク

apt-get install ssh

apt-get install net-tools
apt-get install dosfstools
apt-get install vim
sed -i ‘s/#PermitRootLogin prohibit-password/PermitRootLogin yes/’ /etc/ssh/sshd_config
service sshd restart
apt-get install -y build-essential linux-headers-`uname -r` openssh-server apache2 mariadb-server
apt-get install mariadb-client bison flex php php-curl php-cli php-pdo php-mysql php-pear php-gd php-mbstring php-intl
apt-get install curl sox libncurses5-dev libssl-dev mpg123 libxml2-dev libnewt-dev sqlite3
apt-get install libsqlite3-dev pkg-config automake libtool autoconf git unixodbc-dev uuid uuid-dev
apt-get install libasound2-dev libogg-dev libvorbis-dev libicu-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev
apt-get install libspandsp-dev sudo subversion libtool-bin python-dev unixodbc dirmngr sendmail-bin sendmail

curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash –
apt-get install -y nodejs
rebbot

wget https://wiki.freepbx.org/download/attachments/122487323/mariadb-connector-client-library_3.0.8-1_amd64.deb
dpkg -i mariadb-connector-client-library_3.0.8-1_amd64.deb

pear install Console_Getopt

wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz

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

tar xvfz dahdi-linux-complete-current.tar.gz
rm -f dahdi-linux-complete-current.tar.gz
cd dahdi-linux-complete-*
make all
make install
make config

cd /usr/src
tar xvfz libpri-current.tar.gz
rm -f libpri-current.tar.gz
cd libpri-*
make
make install

cd /usr/src
tar xvfz asterisk-16-current.tar.gz
cd asterisk-*
rm -f asterisk-16-current.tar.gz

contrib/scripts/install_prereq install
./configure –with-pjproject-bundled –with-jansson-bundled
make menuselect.makeopts
menuselect/menuselect –enable app_macro menuselect.makeopts
# oplus などコーデック追加 日本語サウンド
make menuselect

make
make install
make config
ldconfig
update-rc.d -f asterisk remove

useradd -m asterisk
chown asterisk. /var/run/asterisk
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
chown -R asterisk. /usr/lib/asterisk
rm -rf /var/www/html

sed -i ‘s/\(^upload_max_filesize = \).*/\120M/’ /etc/php/7.0/apache2/php.ini
cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig
sed -i ‘s/^\(User\|Group\).*/\1 asterisk/’ /etc/apache2/apache2.conf
sed -i ‘s/AllowOverride None/AllowOverride All/’ /etc/apache2/apache2.conf
a2enmod rewrite
service apache2 restart

cat < /etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL (MariaDB)
Driver = /usr/local/lib/libmaodbc.so
FileUsage = 1
EOF

cat < /etc/odbc.ini
[MySQL-asteriskcdrdb]
Description = MySQL connection to ‘asteriskcdrdb’ database
Driver = MySQL
Server = localhost
Database = asteriskcdrdb
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
Option = 3
EOF

cd /usr/src
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-15.0-latest.tgz
tar vxfz freepbx-15.0-latest.tgz
rm -f freepbx-15.0-latest.tgz
touch /etc/asterisk/{modules,cdr}.conf
cd freepbx
./start_asterisk start
./install -n

fwconsole ma disablerepo commercial
fwconsole ma installall
fwconsole ma delete firewall
fwconsole r

update-rc.d -f asterisk defaults

reboot

fwconsole ma downloadinstall backup –tag 14.0.10.7 fwconsole ma delete backup fwconsole ma downloadinstall backup

ブラウザで更新が終わらない現象はブラウザの再読込をすればOK

コメント