Nginx
yum -y install gcc gcc-c++ make automake autoconf pcre pcre-devel zlib zlib-devel openssl openssl-devel libtool useradd www -s /sbin/nologin/ -M cd curl -O http://nginx.org/download/nginx-1.16.1.tar.gz tar xf nginx-1.16.1.tar.gz cd nginx-1.16.1 ./configure --prefix=/application/nginx-1.16.1 --user=www --group=www --with-http_ssl_module --with-http_stub_status_module --with-http_gzip_static_module --with-stream make && make install
PHP
yum install -y zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel libmcrypt-devel mhash mcrypt cd curl -O https://www.php.net/distributions/php-7.1.32.tar.gz tar -zxvf php-7.1.32.tar.gz cd php-7.1.32 ./configure --prefix=/application/php-7.1.32 --with-pdo-mysql=mysqlnd --enable-mysqlnd --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --enable-short-tags --enable-static --with-xsl --with-fpm-user=www --with-fpm-group=www --enable-ftp --enable-zip --enable-opcache=no make && make install