Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:download_and_install:system_environment_configuration [2012/01/31 02:21] – created wanglen:download_and_install:system_environment_configuration [2013/02/12 02:36] (current) – removed solo
Line 1: Line 1:
-====CentOS and RedHat==== 
- 
-Suppose you ready get a server, and installed a Linux, CentOS or RedHat distributions. 
-  * Add Group and User 
-<code> 
-groupadd asterisk 
-useradd -c "astercc Call Center" -M -g asterisk asterisk 
-</code> 
-  * Install new repo 
-<code> 
-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 
-</code> 
-  * Install PHP and system depends package 
-<code> 
-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++  
- 
-</code> 
-  * Install lame 
-<code> 
-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/ 
-</code> 
-  * Install sox 
-<code> 
-yum install sox 
-</code> 
-  * Install mpg123 
-<code> 
-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 
-</code> 
-  * Install DAHDI 
-<code> 
-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 
-</code> 
-  * Installed asterisk 1.6.2.13 
-<code> 
-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 
-</code> 
-  * Configure and start DAHDI 
-<code> 
-/usr/sbin/dahdi_genconf 
-/etc/init.d/dahdi start 
-</code> 
-  * add asterisk to init script 
-<code> 
-cp /usr/src/asterisk-1.6.2.13/contrib/init.d/rc.redhat.asterisk /etc/init.d/asterisk 
-</code> 
-  * Modify asterisk running user 
-    * Open /etc/init.d/asterisk, find AST_USER and AST_GROUP, and change to asterisk 
-<file> 
-... 
-AST_USER = "asterisk" 
-AST_GROUP = "asterisk" 
-... 
-</file> 
- 
-  * Install NGINX as the http server((you can also use apache as you like)) 
-<code> 
-/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 
-</code> 
-  * Configure NGINX ((the specific file and content may need to be adjusted according to actual situation)), where the domain name is demo.astercc.com assumed configuration 
-<code> 
-mkdir /usr/local/nginx/conf/vhosts 
-vi /usr/local/nginx/conf/vhosts/demo.astercc.com.conf 
-</code> 
-Parse the following content  
-<file> 
-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; 
- } 
-</file> 
-edit /usr/local/nginx/conf/nginx.conf, add the following content, then it becomes like 
-<file> 
-... 
-    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; 
-... 
-</file> 
-  * open /etc/php-fpm.d/www.conf 
-<code> 
-vi /etc/php-fpm.d/www.conf 
-</code> 
-find and change to 
-<file> 
-; 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 
-</file> 
-  * open /etc/php.ini 
-<code> 
-vi /etc/php.ini 
-</code> 
-find and change to 
-<file> 
-short_open_tag = On 
-</file> 
-  * Startup script 
-<code> 
-chkconfig httpd off 
-wget http://astercc.org/download/nginx.zip 
-unzip ./nginx.zip 
-mv ./nginx /etc/init.d/ 
-chmod +x /etc/init.d/nginx 
-</code> 
-  * Some test 
-create the test directory and file 
-<code> 
-mkdir /home/demo.astercc.com/html -p 
-mkdir /home/demo.astercc.com/log -p 
-echo '<?phpinfo();?>' > /home/demo.astercc.com/html/test.php 
-</code> 
-Start the services 
-<code> 
-/etc/init.d/nginx start 
-/etc/init.d/php-fpm start 
-</code> 
-Open the browser, enter the address http://demo.astercc.com/test.php , the results shown that the service works 
-  * Add to auto start 
-<code> 
-chkconfig nginx on 
-chkconfig php-fpm on 
-chkconfig --level 345 php-fpm on 
-chkconfig --level 345 nginx on 
-</code> 
-  * Install ioncube module 
-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)   
-<code> 
-cd /usr/src 
-wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz 
-tar zxvf ioncube_loaders_lin_x86.tar.gz 
-</code> 
-then you will see 
-<file> 
-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.txt 
-</file> 
-then 
-<code> 
-cd ioncube 
-cp *.php /home/demo.astercc.com/html/ 
-</code> 
-then in your browser, open address  
-<code> 
-http://demo.astercc.com/ioncube-loader-helper.php?page=install-assistant 
-</code> 
-or 
-<code> 
-http://demo.astercc.com/loader-wizard.php 
-</code> 
-Here you can see the version of php and php.ini location, such as PHP Version 5.3 and php.ini file /etc/php.ini  
-<code> 
-mv /usr/src/ioncube /usr/local/ 
-</code> 
-Modify the php.ini file, add a line "zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.3.so", like 
-<file> 
-; 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.so 
-</file> 
-also find memory_limit, it's 16M by default in php.ini, we need make it bigger 
-<file> 
-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 consume 
-</file> 
-restart php-fpm 
-<code> 
-/etc/init.d/php-fpm restart 
-</code> 
-then open http://demo.astercc.com/ioncube-encoded-file.php, if everything works fine, you will see 
-<file> 
-This file has been successfully decoded. ionCube Loaders are correctly installed. 
-</file> 
-or else 
-<file> 
-This encoded file cannot be run. Please run the file ioncube-loader-helper.php for more information. 
-</file> 
- 
-now, you can start [[Installation]] 
  
en/download_and_install/system_environment_configuration.1327976493.txt.gz · Last modified: (external edit)
Recent changes RSS feed Debian Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki