[Linux] Php7-fpm + zts + pthreads + redis (centos7)

   Á¶È¸ 5531   Ãßõ 0    

http://ehostidc.co.kr/center/EH050402.php?no=141443&page=8&choose=tit¡¦ (404)
https://blog.naver.com/goethe1/221642889788 (370)

A. 의존성 설치

yum install git bison autoconf build-essential pkg-config gitcore libltdl-devel libbz2-devel libxml2-devel libxslt1-devel libssl-devel libicu-devel libpspell-devel libenchant-devel libmcrypt-devel libpng-devel libjpeg-devel freetype-devel libmysqlclient-devel libreadline-devel libcurl-devel openssl-devel bzip2-devel curl-devel enchant-devel gd-devel aspell-devel libxslt-devel

B. php7 설치

  1. wget http://php.net/get/php-7.2.0.tar.gz/from/a/mirror
  2. tar –zxvpf php-7.2.0.tar.gz
  3. cd /opt/php-7.2.0
  4. mkdir /etc/php7
  5. mkdir /etc/php7/cli
  6. ./buildconf –force
  7. CONFIGURE_STRING="--prefix=/etc/php7 --with-bz2 --with-zlib --enable-zip --disable-cgi --enable-soap --enable-intl --with-mcrypt --with-openssl --with-readline --with-curl -enable-ftp --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-sockets --enable-pcntl --with-pspell --with-enchant --with-gettext --with-gd --enable-exif --with-jpeg-dir --with-png-dir --with-freetype-dir --with-xsl --enable-bcmath --enable-mbstring --enable-calendar --enable-simplexml --enable-json --enable-hash --enable-session --enable-xml --enable-wddx --enable-opcache --with-pcre-regex --with-config-file-path=/etc/php7/cli --with-config-file-scan-dir=/etc/php7/etc --enable-cli --enable-maintainer-zts --with-tsrm-pthreads --enable-debug --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data"
  8. ./configure $CONFFIGURE_STRING
  9. make && make install
  10. cd /opt/php7-2.0/
  11. cp -r php.ini-production /etc/php7/cli/php.ini
  12. cp /etc/php7/etc/php-fpm.conf.default /etc/php7/etc/php-fpm.conf
  13. cp /etc/php7/etc/php-fpm.d/www.conf.default /etc/php7/etc/php-fpm.d/www.conf
  14. cp sapi/fpm/init.d.php-fpm /etc/init.d/php7-fpm
  15. cp php.ini-production /etc/php7/cli/php-cli.ini
  16. systemctl enable php7-fpm

C. php pthreads 설치

  1. cd /opt/php-7.2.0/ext/
  2. git clone https://github.com/krakjoe/pthreads -b master pthreads
  3. /etc/php7/bin/phpize
  4. ./configure --with-php-config=/etc/php7/bin/php-config && make && make install
  5. echo "extension=pthreads.so" > /etc/php7/cli/php-cli.ini


D. phpredis 설치

  1. cd /opt/php-7.2.0/ext/
  2. wget wget https://github.com/phpredis/phpredis/archive/master.zip -O phpredis.zip
  3. unzip phpredis.zip
  4. cd /opt/php-7.2.0/ext/phpredis-master
  5. /etc/php7/bin/phpize
  6. ./configure --with-php-config=/etc/php7/bin/php-config && make && make install
  7. echo "extension=redis.so" >> /etc/php7/cli/php.ini


E. php mcrypt 설치

  1. cd /opt/php-7.2.0/ext/
  2. wget https://sourceforge.net/projects/mcrypt/files/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz
  3. /etc/php7/bin/phpize
  4. ./configure --with-php-config=/etc/php7/bin/php-config && make && make install
  5. echo "extension=mcrypt.so" >> /etc/php7/cli/php.ini


F. 모듈 확인

  1. /etc/php7/bin/php -m | grep pthread

비고. php pthreads 와 redis 설치를 안하는 경우 일반적인 php 7 fpm 으로 사용도 가능






https://www.aiocp.co.kr/ ( 딥러닝,머신러닝 서버 판매 ,컨설팅) https://bigbangcloud.co.kr/ ( GPU 클라우드 서비스) ::: AI 서버의 모든것 ::: 인공지능의 시작~ (주)이호스트ICT
ªÀº±Û Àϼö·Ï ½ÅÁßÇÏ°Ô.


PDS
Á¦¸ñPage 41/77
2014-05   4961130   Á¤ÀºÁØ1
2015-12   1497670   ¹é¸Þ°¡
2019-08   5198   µö·¯´×¼­¹ö
2019-08   5215   µö·¯´×¼­¹ö
2019-08   4152   Á¦°¥±âõ
2019-08   4233   Á¦°¥±âõ
2019-08   5362   µö·¯´×¼­¹ö
2019-08   5290   µö·¯´×¼­¹ö
2019-09   5455   µö·¯´×¼­¹ö
2019-09   4807   ±èȲÁß
2019-09   5540   µö·¯´×¼­¹ö
2019-09   5417   À¯Á¤È£»þÄÜ´À
2019-09   5439   ½ºÄµl¹ÎÇö±â
2019-09   6102   µö·¯´×¼­¹ö
2019-09   5536   µö·¯´×¼­¹ö
2019-09   5532   µö·¯´×¼­¹ö
2019-09   3535   FOXBI
2019-09   4754   ±¤Áֱ¸®
2019-09   7349   µö·¯´×¼­¹ö
2019-09   4581   µö·¯´×¼­¹ö
2019-09   4659   µö·¯´×¼­¹ö
2019-09   5745   µö·¯´×¼­¹ö