apt-get install ssh
rootでログイン
sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config service sshd restart
apt-get update
apt-get upgrade
apt-get install -y build-essential linux-headers-`uname -r` openssh-server apache2 mysql-server mysql-client bison flex php5 php5-curl php5-cli php5-mysql php-pear php5-gd curl sox libncurses5-dev libssl-dev libmysqlclient-dev mpg123 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool autoconf git unixodbc-dev uuid uuid-dev libasound2-dev libogg-dev libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev libspandsp-dev sudo libmyodbc subversion
reboot
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 http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz wget -O jansson.tar.gz https://github.com/akheron/jansson/archive/v2.7.tar.gz wget http://www.pjsip.org/release/2.4/pjproject-2.4.tar.bz2
cd /usr/src tar -xjvf pjproject-2.4.tar.bz2 rm -f pjproject-2.4.tar.bz2 cd pjproject-2.4 CFLAGS='-DPJ_HAS_IPV6=1' ./configure --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr make dep make make install
cd /usr/src
tar vxfz jansson.tar.gz
rm -f jansson.tar.gz
cd jansson-*
autoreconf -i
./configure
make
make install
cd /usr/src
tar xvfz asterisk-13-current.tar.gz
rm -f asterisk-13-current.tar.gz
cd asterisk-*
mkdir addons/mp3
cd addons/mp3
wget http://svn.digium.com/svn/thirdparty/mp3/trunk/MPGLIB_README http://svn.digium.com/svn/thirdparty/mp3/trunk/MPGLIB_TODO http://svn.digium.com/svn/thirdparty/mp3/trunk/Makefile http://svn.digium.com/svn/thirdparty/mp3/trunk/README http://svn.digium.com/svn/thirdparty/mp3/trunk/common.c http://svn.digium.com/svn/thirdparty/mp3/trunk/dct64_i386.c http://svn.digium.com/svn/thirdparty/mp3/trunk/decode_i386.c http://svn.digium.com/svn/thirdparty/mp3/trunk/decode_ntom.c http://svn.digium.com/svn/thirdparty/mp3/trunk/huffman.h http://svn.digium.com/svn/thirdparty/mp3/trunk/interface.c http://svn.digium.com/svn/thirdparty/mp3/trunk/layer3.c http://svn.digium.com/svn/thirdparty/mp3/trunk/mpg123.h http://svn.digium.com/svn/thirdparty/mp3/trunk/mpglib.h http://svn.digium.com/svn/thirdparty/mp3/trunk/tabinit.c
cd /usr/src/asterisk*
contrib/scripts/install_prereq install ./configure --with-pjproject-bundled 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/php5/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 << EOF [MySQL] Description = ODBC for MySQL Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so FileUsage = 1 EOF cat >> /etc/odbc.ini << EOF [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-13.0-latest.tgz tar vxfz freepbx-13.0-latest.tgz rm -f freepbx-13.0-latest.tgz cd freepbx ./start_asterisk start ./install update-rc.d -f asterisk defaults fwconsole ma disablerepo commercial fwconsole ma installall fwconsole ma delete firewall fwconsole r
ブラウザ画面でエラーが起こったとき
fwconsole restart
コメント