This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| en:download_and_install:system_environment_configuration [2012/01/31 02:21] – created wangl | en: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 | ||
| - | < | ||
| - | groupadd asterisk | ||
| - | useradd -c " | ||
| - | </ | ||
| - | * Install new repo | ||
| - | < | ||
| - | cd /usr/src | ||
| - | wget http:// | ||
| - | wget http:// | ||
| - | rpm -ivh epel-release-6-5.noarch.rpm ius-release-1.0-8.ius.el6.noarch.rpm | ||
| - | vi / | ||
| - | #Comment out this line: | ||
| - | mirrorlist=http:// | ||
| - | #Add this line: | ||
| - | baseurl=http:// | ||
| - | </ | ||
| - | * Install PHP and system depends package | ||
| - | < | ||
| - | 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++ | ||
| - | |||
| - | </ | ||
| - | * Install lame | ||
| - | < | ||
| - | cd /usr/src | ||
| - | wget http:// | ||
| - | tar zxvf lame-3.99.1.tar.gz | ||
| - | cd lame-3.99.1 | ||
| - | ./configure | ||
| - | make | ||
| - | make install | ||
| - | ln -s / | ||
| - | </ | ||
| - | * Install sox | ||
| - | < | ||
| - | yum install sox | ||
| - | </ | ||
| - | * Install mpg123 | ||
| - | < | ||
| - | cd /usr/src | ||
| - | wget http:// | ||
| - | tar jxf mpg123-1.13.4.tar.bz2 | ||
| - | cd mpg123-1.13.4 | ||
| - | ./configure | ||
| - | make | ||
| - | make install | ||
| - | </ | ||
| - | * Install DAHDI | ||
| - | < | ||
| - | cd /usr/src | ||
| - | wget http:// | ||
| - | 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 | ||
| - | </ | ||
| - | * Installed asterisk 1.6.2.13 | ||
| - | < | ||
| - | cd /usr/src | ||
| - | wget http:// | ||
| - | tar zxvf asterisk-1.6.2.13.tar.gz | ||
| - | cd asterisk-1.6.2.13 | ||
| - | ./configure | ||
| - | make | ||
| - | make install | ||
| - | make config | ||
| - | </ | ||
| - | * Configure and start DAHDI | ||
| - | < | ||
| - | / | ||
| - | / | ||
| - | </ | ||
| - | * add asterisk to init script | ||
| - | < | ||
| - | cp / | ||
| - | </ | ||
| - | * Modify asterisk running user | ||
| - | * Open / | ||
| - | < | ||
| - | ... | ||
| - | AST_USER = " | ||
| - | AST_GROUP = " | ||
| - | ... | ||
| - | </ | ||
| - | |||
| - | * Install NGINX as the http server((you can also use apache as you like)) | ||
| - | < | ||
| - | / | ||
| - | cd /usr/src | ||
| - | wget http:// | ||
| - | wget http:// | ||
| - | 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=/ | ||
| - | make | ||
| - | make install | ||
| - | </ | ||
| - | * Configure NGINX ((the specific file and content may need to be adjusted according to actual situation)), | ||
| - | < | ||
| - | mkdir / | ||
| - | vi / | ||
| - | </ | ||
| - | Parse the following content | ||
| - | < | ||
| - | server | ||
| - | { | ||
| - | | ||
| - | | ||
| - | | ||
| - | index index.html index.htm index.php; | ||
| - | | ||
| - | |||
| - | | ||
| - | { | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | } | ||
| - | |||
| - | | ||
| - | } | ||
| - | </ | ||
| - | edit / | ||
| - | < | ||
| - | ... | ||
| - | log_format | ||
| - | ' | ||
| - | '" | ||
| - | |||
| - | access_log | ||
| - | |||
| - | sendfile | ||
| - | # | ||
| - | # | ||
| - | client_header_timeout 3m; | ||
| - | client_body_timeout 3m; | ||
| - | send_timeout 3m; | ||
| - | keepalive_timeout | ||
| - | |||
| - | |||
| - | 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/ | ||
| - | |||
| - | server { | ||
| - | listen | ||
| - | server_name | ||
| - | |||
| - | #charset koi8-r; | ||
| - | ... | ||
| - | </ | ||
| - | * open / | ||
| - | < | ||
| - | vi / | ||
| - | </ | ||
| - | find 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 | ||
| - | </ | ||
| - | * open / | ||
| - | < | ||
| - | vi / | ||
| - | </ | ||
| - | find and change to | ||
| - | < | ||
| - | short_open_tag = On | ||
| - | </ | ||
| - | * Startup script | ||
| - | < | ||
| - | chkconfig httpd off | ||
| - | wget http:// | ||
| - | unzip ./nginx.zip | ||
| - | mv ./nginx / | ||
| - | chmod +x / | ||
| - | </ | ||
| - | * Some test | ||
| - | create the test directory and file | ||
| - | < | ||
| - | mkdir / | ||
| - | mkdir / | ||
| - | echo '<? | ||
| - | </ | ||
| - | Start the services | ||
| - | < | ||
| - | / | ||
| - | / | ||
| - | </ | ||
| - | Open the browser, enter the address http:// | ||
| - | * Add to auto start | ||
| - | < | ||
| - | chkconfig nginx on | ||
| - | chkconfig php-fpm on | ||
| - | chkconfig --level 345 php-fpm on | ||
| - | chkconfig --level 345 nginx on | ||
| - | </ | ||
| - | * Install ioncube module | ||
| - | In order to use astercc, we need to load the ioncube module, open http:// | ||
| - | < | ||
| - | cd /usr/src | ||
| - | wget http:// | ||
| - | tar zxvf ioncube_loaders_lin_x86.tar.gz | ||
| - | </ | ||
| - | then you will see | ||
| - | < | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | ioncube/ | ||
| - | </ | ||
| - | then | ||
| - | < | ||
| - | cd ioncube | ||
| - | cp *.php / | ||
| - | </ | ||
| - | then in your browser, open address | ||
| - | < | ||
| - | http:// | ||
| - | </ | ||
| - | or | ||
| - | < | ||
| - | http:// | ||
| - | </ | ||
| - | Here you can see the version of php and php.ini location, such as PHP Version 5.3 and php.ini file / | ||
| - | < | ||
| - | mv / | ||
| - | </ | ||
| - | Modify the php.ini file, add a line " | ||
| - | < | ||
| - | ; 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 = / | ||
| - | </ | ||
| - | also find memory_limit, | ||
| - | < | ||
| - | 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 | ||
| - | </ | ||
| - | restart php-fpm | ||
| - | < | ||
| - | / | ||
| - | </ | ||
| - | then open http:// | ||
| - | < | ||
| - | 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]] | ||