Guest User

Untitled

a guest
Jan 17th, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 7.80 KB | None | 0 0
  1. apt-get install aptitude
  2. aptitude install make gcc autoconf ca-certificates unzip
  3.  
  4. # USER
  5. #-----------------------
  6. useradd -u 2000 -U -m -d /home/geoip -s /bin/bash -c "GeoIP" geoip
  7.  
  8.  
  9. # PHP
  10. #---------------------
  11. mkdir -p /home/geoip/source/php && cd /home/geoip/source/php
  12. wget -O php-7.1.0.tar.gz http://br2.php.net/get/php-7.1.0.tar.gz/from/this/mirror
  13. tar xvf php-7.1.0.tar.gz && cd php-7.1.0
  14. ./configure \
  15.     --prefix=/home/geoip/usr \
  16.     --disable-all \
  17.     --disable-cgi \
  18.     --enable-opcache \
  19.     --enable-mbstring \
  20.     --enable-pdo \
  21.     --enable-json \
  22.     --without-pear \
  23.     --with-pdo-mysql
  24. make
  25. make install
  26.  
  27. cp /home/geoip/source/php/php-7.1.0/php.ini-production /home/geoip/usr/lib/php.ini
  28.  
  29. /home/geoip/usr/bin/php -v
  30. # PHP 7.1.0 (cli) (built: Jan 17 2017 16:41:26) ( NTS )
  31. # Copyright (c) 1997-2016 The PHP Group
  32. # Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
  33.  
  34.  
  35. # LIBMAXMINDDB
  36. #---------------------
  37. mkdir -p /home/geoip/source/libmaxminddb && cd /home/geoip/source/libmaxminddb
  38. wget -O libmaxminddb-1.2.0.tar.gz https://github.com/maxmind/libmaxminddb/releases/download/1.2.0/libmaxminddb-1.2.0.tar.gz
  39. tar xvf libmaxminddb-1.2.0.tar.gz && cd libmaxminddb-1.2.0
  40. ./configure --prefix=/home/geoip/usr
  41. make
  42. make check
  43. # All 17 tests passed
  44. make install
  45. ldconfig
  46.  
  47. # created files:
  48. # /home/geoip/usr/include/maxminddb.h
  49. # /home/geoip/usr/include/maxminddb_config.h
  50.  
  51.  
  52. # MAXMIND-DB-READER-PHP
  53. #---------------------
  54. cd /home/geoip/source/php/
  55. wget -O maxmind-db-reader-php-1.1.2.zip https://github.com/maxmind/MaxMind-DB-Reader-php/archive/master.zip
  56. unzip maxmind-db-reader-php-1.1.2.zip -d maxmind-db-reader-php-1.1.2 && cd maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext
  57.  
  58. /home/geoip/usr/bin/phpize
  59. # Configuring for:
  60. # PHP Api Version:         20160303
  61. # Zend Module Api No:      20160303
  62. # Zend Extension Api No:   320160303
  63.  
  64. ./configure \
  65.     --prefix=/home/geoip/usr \
  66.     --with-maxminddb \
  67.     --with-php-config=/home/geoip/usr/bin/php-config
  68.  
  69. # checking for grep that handles long lines and -e... /bin/grep
  70. # checking for egrep... /bin/grep -E
  71. # checking for a sed that does not truncate output... /bin/sed
  72. # checking for cc... cc
  73. # checking whether the C compiler works... yes
  74. # checking for C compiler default output file name... a.out
  75. # checking for suffix of executables...
  76. # checking whether we are cross compiling... no
  77. # checking for suffix of object files... o
  78. # checking whether we are using the GNU C compiler... yes
  79. # checking whether cc accepts -g... yes
  80. # checking for cc option to accept ISO C89... none needed
  81. # checking how to run the C preprocessor... cc -E
  82. # checking for icc... no
  83. # checking for suncc... no
  84. # checking whether cc understands -c and -o together... yes
  85. # checking for system library directory... lib
  86. # checking if compiler supports -R... no
  87. # checking if compiler supports -Wl,-rpath,... yes
  88. # checking build system type... x86_64-unknown-linux-gnu
  89. # checking host system type... x86_64-unknown-linux-gnu
  90. # checking target system type... x86_64-unknown-linux-gnu
  91. # checking for PHP prefix... /home/geoip/usr
  92. # checking for PHP includes... -I/home/geoip/usr/include/php -I/home/geoip/usr/include/php/main -I/home/geoip/usr/include/php/TSRM -I/home/geoip/usr/include/php/Zend -I/home/geoip/usr/include/php/ext -I/home/geoip/usr/include/php/ext/date/lib
  93. # checking for PHP extension directory... /home/geoip/usr/lib/php/extensions/no-debug-non-zts-20160303
  94. # checking for PHP installed headers prefix... /home/geoip/usr/include/php
  95. # checking if debug is enabled... no
  96. # checking if zts is enabled... no
  97. # checking for re2c... no
  98. # configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
  99. # checking for gawk... no
  100. # checking for nawk... nawk
  101. # checking if nawk is broken... no
  102. # checking Whether to enable the MaxMind DB Reader extension... yes, shared
  103. # checking for MaxMind DB debug support... no
  104. # checking for MMDB_open in -lmaxminddb... no
  105. # checking for ld used by cc... /usr/bin/ld
  106. # checking if the linker (/usr/bin/ld) is GNU ld... yes
  107. # checking for /usr/bin/ld option to reload object files... -r
  108. # checking for BSD-compatible nm... /usr/bin/nm -B
  109. # checking whether ln -s works... yes
  110. # checking how to recognize dependent libraries... pass_all
  111. # ./configure: line 5154: /usr/bin/file: No such file or directory
  112. # checking for ANSI C header files... yes
  113. # checking for sys/types.h... yes
  114. # checking for sys/stat.h... yes
  115. # checking for stdlib.h... yes
  116. # checking for string.h... yes
  117. # checking for memory.h... yes
  118. # checking for strings.h... yes
  119. # checking for inttypes.h... yes
  120. # checking for stdint.h... yes
  121. # checking for unistd.h... yes
  122. # checking dlfcn.h usability... yes
  123. # checking dlfcn.h presence... yes
  124. # checking for dlfcn.h... yes
  125. # checking the maximum length of command line arguments... 1572864
  126. # checking command to parse /usr/bin/nm -B output from cc object... ok
  127. # checking for objdir... .libs
  128. # checking for ar... ar
  129. # checking for ranlib... ranlib
  130. # checking for strip... strip
  131. # checking if cc supports -fno-rtti -fno-exceptions... no
  132. # checking for cc option to produce PIC... -fPIC
  133. # checking if cc PIC flag -fPIC works... yes
  134. # checking if cc static flag -static works... yes
  135. # checking if cc supports -c -o file.o... yes
  136. # checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
  137. # checking whether -lc should be explicitly linked in... no
  138. # checking dynamic linker characteristics... GNU/Linux ld.so
  139. # checking how to hardcode library paths into programs... immediate
  140. # checking whether stripping libraries is possible... yes
  141. # checking if libtool supports shared libraries... yes
  142. # checking whether to build shared libraries... yes
  143. # checking whether to build static libraries... no
  144. #
  145. # creating libtool
  146. # appending configuration tag "CXX" to libtool
  147. # configure: creating ./config.status
  148. # config.status: creating config.h
  149.  
  150. make
  151.  
  152. # /bin/bash /home/geoip/source/php/maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext/libtool --mode=compile cc  -I. -I/home/geoip/source/php/maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext -DPHP_ATOM_INC -I/home/geoip/source/php/maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext/include -I/home/geoip/source/php/maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext/main -I/home/geoip/source/php/maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext -I/home/geoip/usr/include/php -I/home/geoip/usr/include/php/main -I/home/geoip/usr/include/php/TSRM -I/home/geoip/usr/include/php/Zend -I/home/geoip/usr/include/php/ext -I/home/geoip/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /home/geoip/source/php/maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext/maxminddb.c -o maxminddb.lo
  153. # mkdir .libs
  154. #  cc -I. -I/home/geoip/source/php/maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext -DPHP_ATOM_INC -I/home/geoip/source/php/maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext/include -I/home/geoip/source/php/maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext/main -I/home/geoip/source/php/maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext -I/home/geoip/usr/include/php -I/home/geoip/usr/include/php/main -I/home/geoip/usr/include/php/TSRM -I/home/geoip/usr/include/php/Zend -I/home/geoip/usr/include/php/ext -I/home/geoip/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/geoip/source/php/maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext/maxminddb.c  -fPIC -DPIC -o .libs/maxminddb.o
  155. # /home/geoip/source/php/maxmind-db-reader-php-1.1.2/MaxMind-DB-Reader-php-master/ext/maxminddb.c:23:23: fatal error: maxminddb.h: No such file or directory
  156. #  #include <maxminddb.h>
  157. #                        ^
  158. # compilation terminated.
  159. # Makefile:194: recipe for target 'maxminddb.lo' failed
  160. # make: *** [maxminddb.lo] Error 1
Add Comment
Please, Sign In to add comment