User Tools

Site Tools


php:buildphpapachenginxfromsource

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

php:buildphpapachenginxfromsource [2017/04/22 05:57] – [Memcache Admin] adminphp:buildphpapachenginxfromsource [2022/10/29 16:15] (current) – external edit 127.0.0.1
Line 5: Line 5:
 yum install gcc-c++ yum install gcc-c++
 yum install automake yum install automake
 +yum install make
 </code> </code>
 ===== Build and config PHP and Nginx ===== ===== Build and config PHP and Nginx =====
Line 240: Line 241:
  
 restart(){ restart(){
-        stop +    stop 
-        sleep 2 +    sleep 2 
-        start+    start
 } }
  
 rh_status(){ rh_status(){
-        status -p ${pidfile} $prog+    status -p ${pidfile} $prog
 } }
  
Line 278: Line 279:
 yum install libxml2-devel yum install libxml2-devel
 yum install libxslt-devel yum install libxslt-devel
 +yum install bison bison-devel
 </code> </code>
   * step2: Build libmcrypt: libmcrypt-2.5.8.tar.gz   * step2: Build libmcrypt: libmcrypt-2.5.8.tar.gz
Line 286: Line 288:
 </code> </code>
      
-  * step4: Build php-fpm (add option **--enable-fpm**)<code bash>+  * Step4:If you don't find file configure, run script below<code bash> 
 +./buildconf --force 
 +</code>  
 +  * step5: Build php-fpm (add option **--enable-fpm**)<code bash>
 tar zxvf php-5.3.28.tar.gz tar zxvf php-5.3.28.tar.gz
 cd php-5.3.28 cd php-5.3.28
Line 292: Line 297:
 make & make install make & make install
 cp php.ini-production /usr/local/php/etc/php.ini cp php.ini-production /usr/local/php/etc/php.ini
 +</code>
 +=== Build PHP7.4 with php-fpm ===
 +<code bash>
 +./configure --prefix=/onec/php7 --with-config-file-path=/onec/php7/etc --with-libdir=lib64 --enable-fpm --disable-rpath --disable-ipv6 --disable-safe-mode --enable-opcache --enable-calendar --enable-bcmath --enable-ftp --enable-soap --enable-shared --enable-mbstring --disable-mbregex --enable-magic-quotes --enable-sockets --with-openssl --with-zlib --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --with-zlib-dir=/usr --with-mysql --with-mysqli --without-sqlite3 --without-pdo-sqlite --with-pdo-mysql --with-pear --with-curl --with-curlwrappers --with-mcrypt=/usr/local
 +</code> option **--disable-mbregex** fix error:<code>
 +configure: error: Package requirements (oniguruma) were not met
 </code> </code>
 === Script start php-fpm === === Script start php-fpm ===
Line 563: Line 574:
 ===== Memcache ===== ===== Memcache =====
 ==== Build and Install Memcache server ==== ==== Build and Install Memcache server ====
-  - step1: Install missinge package<code>+  - step1: Install missing package<code>
 yum install libevent-devel yum install libevent-devel
 </code> </code>
-  - step2: download memcache<code>+  - step2: Download memcache<code>
 wget http://memcached.org/files/memcached-1.4.22.tar.gz wget http://memcached.org/files/memcached-1.4.22.tar.gz
 </code> </code>
-  - step3: buld and install<code bash>+  - step3: Build and install<code bash>
 tar xvf memcached-1.4.22.tar.gz tar xvf memcached-1.4.22.tar.gz
 cd memcached-1.4.22 cd memcached-1.4.22
Line 1083: Line 1094:
 session.name = PHPSESSID session.name = PHPSESSID
 session.save_path = "/tmp" session.save_path = "/tmp"
 +upload_max_filesize = 20M
 +post_max_size = 8M
 </code> </code>
 ==== PHP check ==== ==== PHP check ====
php/buildphpapachenginxfromsource.1492840668.txt.gz · Last modified: 2022/10/29 16:15 (external edit)