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

相关推荐
Avan_菜菜2 小时前
FRP 内网穿透完整实战:从 HTTP 映射到 HTTPS 自签代理
运维·nginx·https
程序员老赵3 小时前
10 分钟部署 OpenCode:Docker 一键安装,浏览器打开就能用 AI 写代码(附完整命令与排错)
docker·容器·ai编程
WangMingHua1117 小时前
LM Studio Docker 部署——本地大模型一键启动
docker
曲幽1 天前
别再用网页翻译看源码了!你的私人翻译神器LibreTranslate,部署避坑指南来了
python·docker·web·pot·translate·libretranslate·arogstranslate
两个人的幸福2 天前
Windows 桌面应用自研 PHP 队列(下):完整代码与六大工程化优化
php
武子康3 天前
调查研究-183 Apple container:Mac 上用轻量 VM 跑 Linux 容器,Swift 会改写本地容器体验吗?
docker·容器·apple
ping某4 天前
为什么 Nginx 明明监听了 80,转发后端时却用了 4xxxx 端口?
后端·nginx
BingoGo4 天前
PHP 泛型之殇 泛型 RFC 提案被拒绝
后端·php
JaguarJack4 天前
PHP 泛型之殇 泛型 RFC 提案被拒绝
后端·php
用户3074596982075 天前
PHP 扩展——从入门到理解
php