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

  • 9
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值