docker下debian8编译安装nginx+php

--------------nginx 也可以apt安装

10 cd /work/

12 tar -zxvf nginx-1.12.1.tar.gz

13 mkdir libs

14 cd nginx-1.12.1

19 apt-get install gcc libpcre3 libpcre3-dev libssl-dev automake autoconf libtool make

30 ./configure --prefix=/work/libs/nginx-1.12.1 --with-pcre --with-http_ssl_module

36 make

37 make install

38 cd /work/libs/nginx-1.12.1/sbin/

43 ./nginx

php7.2

9 tar -zxvf php-7.2.7.tar.gz

11 cd php-7.2.7

13 apt-get install gcc libpcre3 libpcre3-dev libssl-dev automake autoconf libtool make libbz2-dev libjpeg-dev libxml2 libxml2-dev libpcre3-dev libpng12-dev libgd2-xpm-dev libmhash-dev libtidy-dev libmcrypt-dev libxpm-dev libxpm curl libcurl4-gnutls-dev libbz2-dev libjpeg-dev libxml2 libxml2-dev libpcre3-dev libpng12-dev libgd2-xpm-dev libmhash-dev libtidy-dev libmcrypt-dev libxpm-dev libxpm curl libcurl4-gnutls-dev libxml2 libxml2-dev openssl libbz2-dev libjpeg-dev curl libcurl4-gnutls-dev libpng12-dev libfreetype6-dev libreadline-dev librecode-dev libtidy-dev libxslt1-dev

apt-get install gcc libpcre3 libpcre3-dev libssl-dev automake autoconf libtool make libbz2-dev libjpeg-dev libxml2 libxml2-dev libpcre3-dev libpng12-dev libgd2-xpm-dev libmhash-dev libtidy-dev libmcrypt-dev libbz2-dev libjpeg-dev libxml2 libxml2-dev libpcre3-dev libpng12-dev libgd2-xpm-dev libmhash-dev libtidy-dev libmcrypt-dev curl libxml2 libxml2-dev openssl libbz2-dev libjpeg-dev curl libpng12-dev libfreetype6-dev libreadline-dev librecode-dev libtidy-dev libxslt1-dev

find / -name libssl.so

ln -s /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/

14 ./configure --prefix=/work/libs/php-7.2.9 --enable-fpm --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mhash --with-openssl --with-zlib --with-bz2 --with-curl --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-zlib --enable-mbstring --enable-sockets --with-iconv-dir --with-xsl --enable-zip --with-pcre-dir --with-pear --enable-session --enable-xml --with-freetype-dir --enable-gd-jis-conv --enable-inline-optimization --enable-shared --enable-bcmath --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-mbregex --enable-pcntl --with-xmlrpc --with-gettext --enable-exif --with-readline --with-recode --with-tidy

$ ./configure --prefix=/usr/local/libmcrypt --disable-posix-threads --build=i686-pc-linux

make && make install

-----------php5.3

60 tar -zxvf php-5.3.29.tar.gz

61 cd php-5.3.29

93 apt-get install libbz2-dev libjpeg-dev libxml2 libxml2-dev libpcre3-dev libpng12-dev

98 apt-get install libgd2-xpm-dev libmhash-dev libtidy-dev libmcrypt-dev

103 apt-get install libxpm-dev

104 apt-get install libxpm curl libcurl4-gnutls-dev

119 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.6.5.tar.gz

125 tar -zxvf freetype-2.6.5.tar.gz

126 cd freetype-2.6.5

131 ./configure

132 make

133 make install

157 tar -jxvf gmp-6.1.2.tar.bz2

161 ./configure

162 make

163 make install

169 apt-get install libreadline6 libreadline6-dev

178 tar -zxvf libiconv-1.15.tar.gz

179 cd libiconv-1.15

180 ./configure

181 make

182 make install

208 tar -zxvf openssl-1.0.2l.tar.gz

209 cd openssl-1.0.2l

210 ./config

211 make

212 make install

ln -sf /usr/include/freetype2 /usr/include/freetype2/freetype

sudo apt-get install libgmp-dev sudo apt-get install libgmp3-dev ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h

213 cd ..

214 cd php-5.3.29

./configure --prefix=/work/libs/php-5.3.29 --enable-fpm --enable-bcmath --with-gd --enable-gd-native-ttf --with-mysql=mysqlnd --with-gd --with-png-dir --with-curl --with-bz2 --with-freetype-dir --with-iconv-dir --with-zlib-dir --enable-soap --with-pear=PREFIX/pear --enable-gd-native-ttf --enable-mbstring --enable-exif --disable-cgi --enable-cli --with-jpeg-dir --enable-bcmath --enable-sockets --disable-ipv6 --with-mcrypt=/usr/local/libmcrypt/ --enable-mysqlnd --with-mysqli=mysqlnd --disable-mysqlnd-compression-support --with-pdo-mysql=mysqlnd --with-openssl --enable-bcmath --enable-calendar --enable-ftp --with-gettext --with-gmp --enable-mbstring --with-zlib --enable-zip --enable-sockets --enable-shmop --with-readline --enable-sqlite-utf8 --enable-pcntl

219 make

220 make install

224 cp php.ini-development /work/libs/php-5.3.29/lib/php.ini

225 vi /work/libs/php-5.3.29/lib/php.ini

date.timezone = PRC

226 cp /work/libs/php-5.3.29/etc/php-fpm.conf.default /work/libs/php-5.3.29/etc/php-fpm.conf

227 vi /work/libs/php-5.3.29/etc/php-fpm.conf

9002

230 tar -zxvf php-5.6.30.tar.gz

231 cd php-5.6.30

232 history

233 ./configure --prefix=/work/libs/php-5.6.30 --enable-fpm --enable-bcmath --with-gd --enable-gd-native-ttf --with-gd --with-png-dir --with-curl --with-bz2 --with-freetype-dir --with-iconv-dir

--with-zlib-dir --enable-soap --with-pear=PREFIX/pear --enable-gd-native-ttf --enable-mbstring --enable-exif --disable-cgi --enable-cli --with-jpeg-dir --enable-bcmath --enable-sockets --disable-ip

v6 --with-mcrypt --with-mysql=mysqlnd --enable-ftp --enable-mysqlnd --with-mysqli=mysqlnd --enable-embedded-mysqli --enable-embedded-mysqli --disable-mysqlnd-compression-support --with-pdo-mys

ql=mysqlnd --with-openssl

234 make ; make install

235 history | grep iconv

236 history | grep iconv

237 history | grep iconv --color

240 ./configure --prefix=/work/libs/php-5.6.30 --enable-fpm --enable-bcmath --with-gd --enable-gd-native-ttf --with-gd --with-png-dir --with-curl --with-bz2 --with-freetype-dir --with-iconv-dir

--with-zlib-dir --enable-soap --with-pear=PREFIX/pear --enable-gd-native-ttf --enable-mbstring --enable-exif --disable-cgi --enable-cli --with-jpeg-dir --enable-bcmath --enable-sockets --disable-ip

v6 --with-mcrypt --with-mysql=mysqlnd --enable-ftp --enable-mysqlnd --with-mysqli=mysqlnd --enable-embedded-mysqli --disable-mysqlnd-compression-support --with-pdo-mysql=mysqlnd --with-openssl

241 make

242 ls

243 cd ..

244 ls

245 cd libiconv-1.15

246 ./configure --help

247 ./configure --prefix=/work/libs/libiconv-1.15

248 make;make install

249 cd ../php-5.6.30

250 ./configure --prefix=/work/libs/php-5.6.30 --enable-fpm --enable-bcmath --with-gd --enable-gd-native-ttf --with-gd --with-png-dir --with-curl --with-bz2 --with-freetype-dir --with-iconv-dir=

/work/libs/libiconv-1.15/ --with-zlib-dir --enable-soap --with-pear=PREFIX/pear --enable-gd-native-ttf --enable-mbstring --enable-exif --disable-cgi --enable-cli --with-jpeg-dir --enable-bcmath --e

nable-sockets --disable-ipv6 --with-mcrypt --with-mysql=mysqlnd --enable-ftp --enable-mysqlnd --with-mysqli=mysqlnd --enable-embedded-mysqli --compression-support --with-pdo-mysql=mysqlnd --wit

h-openssl

251 ./configure --prefix=/work/libs/php-5.6.30 --enable-fpm --enable-bcmath --with-gd --enable-gd-native-ttf --with-gd --with-png-dir --with-curl --with-bz2 --with-freetype-dir --with-iconv-dir=

/work/libs/libiconv-1.15/ --with-zlib-dir --enable-soap --with-pear=PREFIX/pear --enable-gd-native-ttf --enable-mbstring --enable-exif --disable-cgi --enable-cli --with-jpeg-dir --enable-bcmath --e

nable-sockets --disable-ipv6 --with-mcrypt --with-mysql=mysqlnd --enable-ftp --enable-mysqlnd --with-mysqli=mysqlnd --enable-embedded-mysqli --disable-mysqlnd-compression-support --with-pdo-mys

ql=mysqlnd --with-openssl

252 make

253 apt search iconv

254 vi Makefile

255 make

256 make install

257 cp php.ini-development /work/libs/php-5.6.30/lib/php.ini

258 cd ..

259 ls

260 tar -zxvf php-7.1.6.tar.gz

261 cd php-7.1.6

262 ./configure --prefix=/work/libs/php-7.1.6 --enable-fpm --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mhash --with-openssl --with-zlib --with-bz2 --with-curl --with-libxml-dir --with-

gd --with-jpeg-dir --with-png-dir --with-zlib --enable-mbstring --with-mcrypt --enable-sockets --with-iconv-dir --with-xsl --enable-zip --with-pcre-dir --with-pear --enable-session --enable-gd-nat

ive-ttf --enable-xml --with-freetype-dir --enable-gd-jis-conv --enable-inline-optimization --enable-shared --enable-bcmath --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-mbregex --enab

le-pcntl --with-xmlrpc --with-gettext --enable-exif --with-readline --with-recode --with-tidy

263 apt search recode

264 apt-get install librecode-dev recode

265 apt-get install librecode-dev librecode

266 apt-get install librecode-dev recode

267 ./configure --prefix=/work/libs/php-7.1.6 --enable-fpm --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mhash --with-openssl --with-zlib --with-bz2 --with-curl --with-libxml-dir --with-

gd --with-jpeg-dir --with-png-dir --with-zlib --enable-mbstring --with-mcrypt --enable-sockets --with-iconv-dir --with-xsl --enable-zip --with-pcre-dir --with-pear --enable-session --enable-gd-nat

ive-ttf --enable-xml --with-freetype-dir --enable-gd-jis-conv --enable-inline-optimization --enable-shared --enable-bcmath --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-mbregex --enab

le-pcntl --with-xmlrpc --with-gettext --enable-exif --with-readline --with-recode --with-tidy

268 apt search libxslt

269 apt-get install libxslt1-dev libxslt1.1

270 ./configure --prefix=/work/libs/php-7.1.6 --enable-fpm --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mhash --with-openssl --with-zlib --with-bz2 --with-curl --with-libxml-dir --with-

gd --with-jpeg-dir --with-png-dir --with-zlib --enable-mbstring --with-mcrypt --enable-sockets --with-iconv-dir --with-xsl --enable-zip --with-pcre-dir --with-pear --enable-session --enable-gd-nat

ive-ttf --enable-xml --with-freetype-dir --enable-gd-jis-conv --enable-inline-optimization --enable-shared --enable-bcmath --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-mbregex --enable-pcntl --with-xmlrpc --with-gettext --enable-exif --with-readline --with-recode --with-tidy

271 make

./configure --prefix=/usr/local/php71 --enable-fpm --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mhash --with-openssl --with-zlib --with-bz2 --with-curl --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-zlib --enable-mbstring --with-mcrypt --enable-sockets --with-iconv-dir --with-xsl --enable-zip --with-pcre-dir --with-pear --enable-session --enable-gd-native-ttf --enable-xml --with-freetype-dir --enable-gd-jis-conv --enable-inline-optimization --enable-shared --enable-bcmath --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-mbregex --enable-pcntl --with-xmlrpc --with-gettext --enable-exif --with-readline --with-recode --with-tidy

./configure --prefix=/usr/local/php71 --with-apxs2 --with-config-file-path=/usr/local/php71/etc --enable-fpm --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mhash --with-openssl --with-zlib --with-bz2 --with-curl --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-zlib --enable-mbstring --with-mcrypt --enable-sockets --with-iconv-dir --with-xsl --enable-zip --with-pcre-dir --with-pear --enable-session --enable-gd-native-ttf --enable-xml --with-freetype-dir --enable-gd-jis-conv --enable-inline-optimization --enable-shared --enable-bcmath --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-mbregex --enable-pcntl --with-xmlrpc --with-gettext --enable-exif --with-readline --with-recode --with-tidy

相关推荐
spider_xcxc3 小时前
Docker 实战:容器化多服务应用,Dockerfile 与 Compose 配置全解析
docker·云原生·eureka·虚拟化·容器化
柒星栈3 小时前
PHP 源码怎么加密防破解?三套方案实战指南
开发语言·php·android studio
小小代码狗3 小时前
SQLi-Labs 基础注入实战教程(Less-1 ~ Less-5and Less-9)
服务器·python·php
晚风吹长发4 小时前
Docker使用——Docker容器及相关命令
linux·运维·服务器·docker·容器·架构
ShiXZ2134 小时前
Docker Compose 安装与配置指南
运维·docker·容器
shencz20004 小时前
在windows10里的apache2.4加php7.2的环境下上安装Laravel5.8框架
php·laravel
BullSmall5 小时前
Anolis OS 8.10 Docker 部署 SonarQube 9.9 完整教程
运维·docker·容器
chexus6 小时前
21. 深入 Nginx HTTP 缓存源码:CDN功能
nginx·http·缓存
java_logo8 小时前
Apache Doris Docker 部署指南:实时分析数据库实战
数据库·docker·apache·doris·apache doris·轩辕镜像·docker部署doris
生活爱好者!21 小时前
我把NAS当作下载机,docker一键部署qb
运维·docker·容器