This is an old revision of the document!
this page will give instructions to install: dahdi,asterisk,php-fpm,nginx and nginx http push module for CentOS/Redhat or Ubuntu, these modules are necessary for asterCC Commercial installation.
You could use a shell script to finish all of these jobs to save your time, click here to download asterCC Commercial installation script
Suppose you ready get a server, and installed a Linux, CentOS or RedHat distributions.
groupadd asterisk useradd -c "astercc Call Center" -M -g asterisk asterisk
cd /usr/src wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/i386/epel-release-6-5.noarch.rpm wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/i386/ius-release-1.0-8.ius.el6.noarch.rpm rpm -ivh epel-release-6-5.noarch.rpm ius-release-1.0-8.ius.el6.noarch.rpm vi /etc/yum.repos.d/ius.repo #Comment out this line: mirrorlist=http://dmirr.iuscommunity.org/mirrorlist?repo=ius-el6&arch=$basearch #Add this line: baseurl=http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/$basearch
yum install php53u-fpm php53u-pecl-apc pcre-devel php53u-mysql yum install mysql-server mysql-devel glibc gcc-c++ libtermcap-devel newt newt-devel ncurses ncurses-devel libtool libxml2-devel kernel-devel subversion flex libstdc++-devel libstdc++
cd /usr/src wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.1.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flame%2Ffiles%2Flame%2F3.99%2F&ts=1320640756&use_mirror=cdnetworks-kr-2 tar zxvf lame-3.99.1.tar.gz cd lame-3.99.1 ./configure make make install ln -s /usr/local/bin/lame /usr/bin/
yum install sox
cd /usr/src wget http://downloads.sourceforge.net/project/mpg123/mpg123/1.13.4/mpg123-1.13.4.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmpg123%2Ffiles%2Fmpg123%2F1.13.4%2F&ts=1320727063&use_mirror=cdnetworks-kr-2 tar jxf mpg123-1.13.4.tar.bz2 cd mpg123-1.13.4 ./configure make make install
cd /usr/src wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.5.0.2+2.5.0.2.tar.gz tar zxvf dahdi-linux-complete-2.5.0.2+2.5.0.2.tar.gz cd dahdi-linux-complete-2.5.0.2+2.5.0.2 make make install make config
cd /usr/src wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.2.13.tar.gz tar zxvf asterisk-1.6.2.13.tar.gz cd asterisk-1.6.2.13 ./configure make make install make config
/usr/sbin/dahdi_genconf /etc/init.d/dahdi start
cp /usr/src/asterisk-1.6.2.13/contrib/init.d/rc.redhat.asterisk /etc/init.d/asterisk
... AST_USER = "asterisk" AST_GROUP = "asterisk" ...
/etc/init.d/httpd stop cd /usr/src wget http://nginx.org/download/nginx-1.0.9.tar.gz wget http://pushmodule.slact.net/downloads/nginx_http_push_module-0.692.tar.gz tar zxf nginx-1.0.9.tar.gz tar zxf nginx_http_push_module-0.692.tar.gz cd nginx-1.0.9 ./configure --add-module=/usr/src/nginx_http_push_module-0.692 --with-http_ssl_module --user=asterisk --group=asterisk make make install
mkdir /usr/local/nginx/conf/vhosts vi /usr/local/nginx/conf/vhosts/demo.astercc.com.confParse the following content
server
{
listen 80;
client_max_body_size 20M;
server_name demo.astercc.com; # use your domain here
index index.html index.htm index.php;
root /home/demo.astercc.com/html;
location ~ .*\.(php|php5)?$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
access_log /home/demo.astercc.com/log/access.log main;
}
edit /usr/local/nginx/conf/nginx.conf, add the following content, then it becomes like
...
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
keepalive_timeout 90 30;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
#gzip on;
include vhosts/*.conf;
server {
listen 80;
server_name localhost;
#charset koi8-r;
...
vi /etc/php-fpm.d/www.conffind and change to
; Unix user/group of processes ; Note: The user is mandatory. If the group is not set, the default user's group ; will be used. ; RPM: apache Choosed to be able to access some dir as httpd user = asterisk ; RPM: Keep a group allowed to write in log dir. group = asterisk
vi /etc/php.inifind and change to
short_open_tag = On
chkconfig httpd off wget http://astercc.org/download/nginx.zip unzip ./nginx.zip mv ./nginx /etc/init.d/ chmod +x /etc/init.d/nginx
create the test directory and file
mkdir /home/demo.astercc.com/html -p mkdir /home/demo.astercc.com/log -p echo '<?phpinfo();?>' > /home/demo.astercc.com/html/test.phpStart the services
/etc/init.d/nginx start /etc/init.d/php-fpm startOpen the browser, enter the address http://demo.astercc.com/test.php , the results shown that the service works
chkconfig nginx on chkconfig php-fpm on chkconfig --level 345 php-fpm on chkconfig --level 345 nginx on
In order to use astercc, we need to load the ioncube module, open http://www.ioncube.com/loaders.php different options under the operating system, download the Linux (x86) or Linux (x86-64)
cd /usr/src wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz tar zxvf ioncube_loaders_lin_x86.tar.gzthen you will see
ioncube/ ioncube/ioncube_loader_lin_5.3.so ioncube/ioncube_loader_lin_4.4.so ioncube/ioncube_loader_lin_5.3_ts.so ioncube/ioncube_loader_lin_5.1_ts.so ioncube/ioncube_loader_lin_5.1.so ioncube/ioncube_loader_lin_4.2_ts.so ioncube/ioncube-loader-helper.php ioncube/ioncube-encoded-file.php ioncube/ioncube_loader_lin_4.1.so ioncube/ioncube_loader_lin_5.0_ts.so ioncube/ioncube_loader_lin_5.0.so ioncube/ioncube_loader_lin_5.2_ts.so ioncube/ioncube_loader_lin_4.2.so ioncube/ioncube_loader_lin_5.2.so ioncube/ioncube_loader_lin_4.3.so ioncube/README.txt ioncube/ioncube_loader_lin_4.4_ts.so ioncube/ioncube_loader_lin_4.3_ts.so ioncube/LICENSE.txtthen
cd ioncube cp *.php /home/demo.astercc.com/html/then in your browser, open address
http://demo.astercc.com/ioncube-loader-helper.php?page=install-assistantor
http://demo.astercc.com/loader-wizard.phpHere you can see the version of php and php.ini location, such as PHP Version 5.3 and php.ini file /etc/php.ini
mv /usr/src/ioncube /usr/local/Modify the php.ini file, add a line “zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.3.so”, like
; Enable the PHP scripting language engine under Apache. engine = On ; Enable compatibility mode with Zend Engine 1 (PHP 4.x) zend.ze1_compatibility_mode = Off zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.3.soalso find memory_limit, it's 16M by default in php.ini, we need make it bigger
max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data memory_limit = 128M ; Maximum amount of memory a script may consumerestart php-fpm
/etc/init.d/php-fpm restartthen open http://demo.astercc.com/ioncube-encoded-file.php, if everything works fine, you will see
This file has been successfully decoded. ionCube Loaders are correctly installed.or else
This encoded file cannot be run. Please run the file ioncube-loader-helper.php for more information.
now, you can start Installation