КОИНС.Студия - Статьи - Инсталляция и настройка программ - php - Upgrade php 5.3 to php 5.5 (on Amazon Linux)

Upgrade php 5.3 to php 5.5 (on Amazon Linux)

  • Remove old version of PHP:
    yum remove php httpd php-cli php-xml php-common httpd-tools

  • Update everything:
    yum update

  • Install PHP 5.5 and packages:
    yum install php55 php55-opcache php55-pecl-apcu php55-bcmath php55-gd php55-mcrypt php55-mbstring php55-mysqlnd php55-pecl-memcache php55-process php55-tidy php55-soap php55-pecl-ssh2

    See a list of available packages:
    https://webtatic.com/packages/php55/

  • /etc/httpd/conf/httpd.conf
    Add:
    Include /etc/httpd/conf/default.conf
    Include /etc/httpd/vhosts.d/*.conf
    At the very end of the file.

  • /etc/php-5.5.d/apcu.ini
    apc.shm_size=256M
    apc.entries_hint=10000

  • /etc/php-5.5.d/opcache.ini
    opcache.memory_consumption=256M
    opcache.max_accelerated_files=10000
    opcache.validate_timestamps=0

  • /home/control/public_html/apc.php
    <?php
    if($_SERVER['REMOTE_ADDR']!=='127.0.0.1')
    {
      echo 
    'Invalid remote host: '.$_SERVER['REMOTE_ADDR']."\n";
      exit;
    }

    if(
    function_exists('apc_clear_cache'))
    {
      
    apc_clear_cache();
      
    apc_clear_cache('user');
    }
    if(
    function_exists('opcache_reset'))
      
    opcache_reset();
    echo 
    "ok\n";

    ?>

If https used

  • yum install mod24_ssl

  • /etc/httpd/conf.d/ssl.conf.rpmsave
    rename to ssl.conf

  • Change ssl.conf:
    SSLProtocol all -SSLv2 -SSLv3

    Remove
    SSLMutex
    SSLCertificateChainFile

  • Add content of a file pointed by SSLCertificateChainFile at the end of file pointed by SSLCertificateFile

  • Restart apache

  • Check if certificate is installed correctly

Последняя модификация: 30.04.15 08:47