«   2018/07   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Archives
Today
532
Total
1,124,902
안정적인 DNS서비스 DNSEver
관리 메뉴

Blue Breeze

nginx php7.0-fpm upgrade 본문

OS/Ubuntu

nginx php7.0-fpm upgrade

푸른바람 C/H 2016.01.07 17:07

PHP7 설치

Ubuntu php7.1/7.2 Switch

최신버전의 CI(CodeIgniter)를 사용한다면 php7.0-mcrypt는 필수 설치.

sudo add-apt-repository ppa:ondrej/php-7.0
sudo apt-get update
# sudo apt-get install php7.0 php7.0-fpm
# /etc/php/7.0 에 설치 된다.
sudo apt-get install php7.0 php7.0-fpm php7.0-mysql php7.0-mcrypt php7.0-gd
# sudo apt-get install php7.0 php7.0-fpm php7.0-mysql php7.0-mcrypt php7.0-gd php7.0-cli php7.0-common php7.0-curl php7.0-dev php7.0-json php7.0-odbc php7.0-opcache php7.0-tidy
# sudo apt-get install php7.0-common php7.0-cgi php7.0-cli php7.0-phpdbg php7.0-fpm libphp7.0-embed php7.0-dev php7.0-dbg php7.0-curl php7.0-gd php7.0-imap php7.0-interbase php7.0-intl php7.0-ldap php7.0-mcrypt php7.0-readline php7.0-odbc php7.0-pgsql php7.0-pspell php7.0-recode php7.0-tidy php7.0-xmlrpc php7.0 php7.0-json php-all-dev php7.0-sybase php7.0-modules-source php7.0-sqlite3 php7.0-mysql php7.0-opcache php7.0-bz2

설정값 수정

vi /etc/php/7.0/fpm/pool.d/www.conf
vi /etc/nginx/site-available/default.conf
  • PHP-FPM 소켓 PATH 설정
    ; listen = /run/php/php7.0-fpm.sock
    listen = /dev/shm/php7.0-fpm.sock
    ; 또는 listen = /var/run/shm/php7.0-fpm.sock
    
  • NGINX PHP-FPM 소켓 설정
    pastcgi_pass	unix:/dev/shm/php7.0-fpm.sock;
    

PHP 설정

sudo vi /etc/php/7.0/fpm/php.ini
# OpCache 적용
[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60

# 타임존 설정
date.timezone = Asia/Seoul

서비스 시작

sudo service php7.0-fpm start
sudo service nginx restart


apt-get php5 list

php5               php5-gmp           php5-mongo         php5-rrd
php5-adodb         php5-gnupg         php5-msgpack       php5-sasl
php5-apcu          php5-imagick       php5-mysql         php5-snmp
php5-cgi           php5-imap          php5-mysqlnd       php5-sqlite
php5-cli           php5-interbase     php5-mysqlnd-ms    php5-stomp
php5-common        php5-intl          php5-oauth         php5-svn
php5-curl          php5-json          php5-odbc          php5-sybase
php5-dbg           php5-lasso         php5-pgsql         php5-tidy
php5-dev           php5-ldap          php5-pinba         php5-tokyo-tyrant
php5-enchant       php5-librdf        php5-ps            php5-vtkgdcm
php5-exactimage    php5-mapscript     php5-pspell        php5-xcache
php5-fpm           php5-mcrypt        php5-radius        php5-xdebug
php5-gd            php5-memcache      php5-readline      php5-xhprof
php5-gdcm          php5-memcached     php5-recode        php5-xmlrpc
php5-gearman       php5-midgard2      php5-redis         php5-xsl
php5-geoip         php5-ming          php5-remctl 

apt-get php7.0 list 2016.01.14

php7.0                 php7.0-fpm             php7.0-modules-source  php7.0-snmp
php7.0-bz2             php7.0-gd              php7.0-mysql           php7.0-sqlite3
php7.0-cgi             php7.0-gmp             php7.0-odbc            php7.0-sybase
php7.0-cli             php7.0-imap            php7.0-opcache         php7.0-tidy
php7.0-common          php7.0-interbase       php7.0-pgsql           php7.0-xmlrpc
php7.0-curl            php7.0-intl            php7.0-phpdbg          php7.0-xsl
php7.0-dbg             php7.0-json            php7.0-pspell          
php7.0-dev             php7.0-ldap            php7.0-readline        
php7.0-enchant         php7.0-mcrypt          php7.0-recode 

'OS > Ubuntu' 카테고리의 다른 글

php7 ppa.launchpad.net/ondrej/php-7.0/ubuntu  (0) 2016.03.31
add-apt-repository not found  (0) 2016.01.13
nginx php7.0-fpm upgrade  (0) 2016.01.07
Paper 테마  (0) 2016.01.07
ubuntu linux-image install 의존성 문제  (0) 2015.10.27
일괄 이미지 변환툴  (0) 2015.09.06
0 Comments
댓글쓰기 폼