apt-get install ssh
apt-get install sudo
sudo passwd root
sudo -i
apt-get update && sudo apt-get upgrade -y
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 php-db php5-gd curl sox\ libncurses5-dev libssl-dev libmysqlclient-dev mpg123 libxml2-dev libnewt-dev sqlite3\ libsqlite3-dev pkg-config automake libtool autoconf git subversion unixodbc-dev uuid uuid-dev\ libasound2-dev libogg-dev libvorbis-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp0-dev\ libspandsp-dev libiksemel-dev libiksemel-utils libiksemel3 mysqlのパスワードはブランクを入力する(エンター)
reboot
pear uninstall db pear install db-1.7.14
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-11.0-current.tar.gz git clone https://github.com/akheron/jansson.git wget http://www.pjsip.org/release/2.2.1/pjproject-2.2.1.tar.bz2
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 -xjvf pjproject-2.2.1.tar.bz2 cd pjproject-2.2.1 CFLAGS='-DPJ_HAS_IPV6=1' ./configure --prefix=/usr --enable-shared --disable-sound\ --disable-resample --disable-video --disable-opencore-amr make dep make make install
cd /usr/src/jansson autoreconf -i ./configure make make install
cd /usr/src tar xvfz asterisk-11-current.tar.gz rm -f asterisk-11-current.tar.gz cd asterisk-* ./configure contrib/scripts/get_mp3_source.sh make menuselect
make make install make config ldconfig
wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-12.0-latest.tgz tar vxfz freepbx-12.0-latest.tgz
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 service apache2 restart
export ASTERISK_DB_PW=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 - | cut -c2-18`
mysqladmin -u root create asterisk mysqladmin -u root create asteriskcdrdb
mysql -u root -e "GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';" mysql -u root -e "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';" mysql -u root -e "flush privileges;"
./start_asterisk start ./install_amp --installdb --username=asteriskuser --password=${ASTERISK_DB_PW} 聞いてくるまで少し時間がかかる 全てエンターで答える amportal chown amportal a ma installall amportal a reload amportal a ma refreshsignatures amportal chown
vi /etc/apache2/apache2.conf <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> 以下追記 <Directory /var/www/html> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3 dpkg-reconfigure locales 以下を選択 en_GB.UTF-8 UTF-8 ja_JP.EUC-JP EUC-JP ja_JP.UTF-8 UTF-8 デフォルトロケールの選択画面が出てきたら en_GB.UTF-8 UTF-8 を選択 vi /etc/apache2/envvars export LANG=C と言う行があるのでそこを export LANG=ja_JP.UTF-8 に書き換えて保存
amportal restart
http://Address.Of.FreePBX.Server/admin
asterisk 三角のマークは時間が来ると消える amporta は、LinuxのコマンドプロンプトからFreePBXを制御するLinuxのコマンドです。 asteriskの停止 amportal stop スタート amportal start 再起動 amportal restart
コメント