CentOS7.2にphp7をインストールする

1.依存パッケージのインストール
#yum install gcc make crul-devel libxslt-devel gd-devel libjpeg-devel libpng libpng-devel libxml2-devel bzip2-devel libcurl-devel –y
#yum -y install libmcrypt-devel mcytpt mhash libxslt-devel

2.libiconvのインストール
#tar xf libiconv-1.14.tar.gz
#cd libiconv-1.14
#./configure –prefix=/usr/lcoal/libiconv
#make && make install

3.php7のインストール
#tar xf php-7.0.0.tar.gz
#cd php-7.0.0/
./configure \
–prefix=/usr/local/php7 \
–with-fpm-user=nginx \
–with-fpm-group=nginx \
–with-bz2 \
–with-curl \
–with-gd \
–with-mcrypt \
–with-openssl \
–with-mhash \
–with-jpeg-dir \
–with-png-dir \
–with-freetype-dir \
–with-iconv-dir=/usr/local/libiconv \
–with-gettext \
–with-libxml-dir \
–with-zlib \
–with-xmlrpc \
–with-pcre-regex \
–with-pear \
–with-pdo-mysql=mysqlnd \
–with-mysql=mysqlnd \
–with-mysqli=mysqlnd \
–with-libdir=lib64 \
–enable-dom \
–enable-xml \
–enable-fpm \
–enable-bcmath \
–enable-ftp \
–enable-sockets \
–disable-ipv6 \
–enable-mbregex \
–enable-mbstring \
–enable-calendar \
–enable-gd-native-ttf \
–enable-static \
–enable-fpm \
–enable-bcmath \
–enable-libxml \
–enable-inline-optimization \
–enable-mbregex \
–enable-opcache \
–enable-pcntl \
–enable-shmop \
–enable-soap \
–enable-sockets \
–enable-sysvsem \

–enable-zip \
#make && make install
4.設定ファイルのコピー
#cp php.ini-production /usr/local/php7/lib/php.ini
#cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf

#cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf

Comments are closed.