Home Backend Development PHP Tutorial PHP 5.5.6 装配试用

PHP 5.5.6 装配试用

Jun 13, 2016 pm 12:32 PM
enable php with

PHP 5.5.6 安装试用

https://github.com/oscm/linux/blob/master/php/5.5.6.sh

?

#!/bin/bash

groupadd -g 80 www
adduser -o --home /www --uid 80 --gid 80 -c "Web Application" www

yum install -y gcc gcc-c++ make automake autoconf patch \
curl-devel libmcrypt-devel mhash-devel gd-devel libjpeg-devel libpng-devel libXpm-devel libxml2-devel libxslt-devel openssl-devel recode-devel 
#yum install openldap-devel net-snmp-devel

cd /usr/local/src/
wget http://tw2.php.net/get/php-5.5.6.tar.gz/from/this/mirror

#ln -s /usr/pgsql-9.2/lib/* /usr/lib/
#ln -s /usr/pgsql-9.2/include/* /usr/include/

tar zxf php-5.5.6.tar.gz
cd php-5.5.6

./configure --prefix=/srv/php-5.5.6 \
--with-config-file-path=/srv/php-5.5.6/etc \
--with-config-file-scan-dir=/srv/php-5.5.6/etc/conf.d \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--with-pear \
--with-curl \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-zlib-dir \
--with-iconv \
--with-mcrypt \
--with-mhash \
--with-pdo-mysql \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-openssl \
--with-xsl \
--with-recode \
--enable-sockets \
--enable-soap \
--enable-mbstring \
--enable-gd-native-ttf \
--enable-zip \
--enable-xml \
--enable-bcmath \
--enable-calendar \
--enable-shmop \
--enable-dba \
--enable-wddx \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-opcache \
--enable-pcntl \
--with-tsrm-pthreads \
--disable-debug

#--with-mysql \
#--with-mysqli=/usr/bin/mysql_config \
#--with-pdo-pgsql=/usr/pgsql-9.2 \
#--with-pgsql=/usr/pgsql-9.2 \

make && make install

strip /srv/php-5.5.6/bin/php
strip /srv/php-5.5.6/bin/php-cgi
                
mkdir -p /srv/php-5.5.6/etc/conf.d
cp php.ini-* /srv/php-5.5.6/etc/
#cp /srv/php-5.5.6/etc/php.ini-development /srv/php-5.5.6/etc/php.ini
cp /srv/php-5.5.6/etc/php.ini-production /srv/php-5.5.6/etc/php.ini
cp /srv/php-5.5.6/etc/php-fpm.conf.default /srv/php-5.5.6/etc/php-fpm.conf
cp /srv/php-5.5.6/etc/pear.conf{,.original}
cp ./sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig php-fpm on

ln -s /srv/php-5.5.6/ /srv/php

vim /srv/php-5.5.6/etc/php-fpm.conf  /dev/null 2>&1
:25,25s/;//
:32,32s/;//
:225,225s/pm.max_children = 5/pm.max_children = 512/
:251,251s/;pm.max_requests = 500/pm.max_requests = 1024/
:448,448s/;rlimit_files = 1024/rlimit_files = 10240/
:wq
end

vim /srv/php-5.5.6/etc/php.ini  /dev/null 2>&1
:309,309s$;open_basedir =$open_basedir = /www/:/tmp/:/var/tmp/:/srv/php-5.5.6/lib/php/:/srv/php-5.5.6/bin/$
:376,376s/expose_php = On/expose_php = Off/
:406,406s/memory_limit = 128M/memory_limit = 32M/
:706,706s!;include_path = ".:/php/includes"!include_path = ".:/srv/php-5.5.6/lib/php:/srv/php-5.5.6/share"!
:768,768s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=1/
:923,923s$;date.timezone =$date.timezone = Asia/Hong_Kong$
:1400,1400s:;session.save_path = "/tmp":session.save_path = "/dev/shm":
:1426,1426s/session.name = PHPSESSID/session.name = JSESSIONID/
:wq
EOF

#:728,728s!; extension_dir = "./"!extension_dir = "./:/srv/php-5.5.6/lib/php/extensions:/srv/php-5.5.6/lib/php/extensions/no-debug-non-zts-20121212"!
#:804,804s/upload_max_filesize = 2M/upload_max_filesize = 3M/

cat >> ~/.bashrc 
<p>?</p>
<p>https://github.com/oscm/linux/blob/master/php/5.5.6.sh</p>

 <div class="clear">
                 
              
              
        
            </div>
Copy after login
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

CakePHP Date and Time

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

CakePHP Project Configuration

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

CakePHP File upload

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

CakePHP Routing

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

Discuss CakePHP

CakePHP Quick Guide CakePHP Quick Guide Sep 10, 2024 pm 05:27 PM

CakePHP Quick Guide

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

How To Set Up Visual Studio Code (VS Code) for PHP Development

See all articles