Instalando PHP (Ubuntu 15.10)

1) Copiando o PHP sudo su - cd /opt git clone https://github.com/cweiske/phpfarm.git 2) Após terminado a copia iremos Editar esse arquivos cd /opt/phpfarm/src gedit custom-options-5.3.sh 3) Esse aquivos estará vazio copie e cole esse conteúdo dentro dele. configoptions= "\ --enable-exif \ --enable-fpm \ --enable-memory-limit \ --enable-calendar \ --enable-soap \ --enable-sockets \ --enable-mbstring \ --enable-gd-native-ttf \ --enable-fastcgi \ --enable-force-cgi-redirect \ --enable-zip \ --enable-pcntl \ --with-fpm-group=www-data \ --with-fpm-user=www-data \ --with-gd \ --with-freetype \ --with-freetype-dir \ --without-xpm-dir \ --with-zlib-dir \ --with-png-dir \ --with-jpeg-dir \ --with-curl \ --with-mcrypt \ --with-mysql=mysqlnd \ --with-mysqli=mysqlnd \ --with-pdo-mysql \ --with-mysql-sock=/var/run/mysqld/mysqld.sock \ --with-xml \ --with-bz2 \ --with-libxml-dir \ --with-zip \" 4) Instalando Build-Essential apt-get install -y build-essential apt-get install -y libxml2-dev libssl-dev libbz2-dev libcurl4-openssl-dev \ libjpeg-dev libpng-dev libmysqlclient-dev libfreetype6-dev \ libpq-dev libmcrypt-dev libmm-dev libltdl-dev 5) Copilando o PHP ./compile.sh 5.3.29 Se de algum erro nas ultimas linhas Ex: If configure fails try --with-xpm-dir=< DIR > configure: error: freetype.h not found. configure.sh failed. Arrumar com: mkdir /usr/include/freetype2/freetype ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h cp /opt/phpfarm/src/php-5.3.29/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm-5.3 chmod +x /etc/init.d/php-fpm-5.3 update-rc.d php-fpm-5.3 defaults 5) cd /opt/phpfarm/inst/php-5.3.29/etc/ cp php-fpm.conf.default php-fpm.conf gedit php-fpm.conf 6) Descomentar: #pid = run/php-fpm.pid #user = www-data #group = www-data E Ajustar: De listen= 127.0.0.1:9000 Para listen= /opt/phpfarm/inst/php-5.3.29/var/run/php5-fpm.sock 7) Ativar o PHP service php-fpm-5.3 start 8) Para verificar se esta tudo funcionando ps aux | grep php

0 comentários: