Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apt-get install aptitude
- aptitude install make gcc autoconf ca-certificates unzip
- # USER
- #-----------------------
- useradd -u 2000 -U -m -d /home/geoip -s /bin/bash -c "GeoIP" geoip
- # PHP
- #---------------------
- mkdir -p /home/geoip/source/php && cd /home/geoip/source/php
- wget -O php-7.1.0.tar.gz http://br2.php.net/get/php-7.1.0.tar.gz/from/this/mirror
- tar xvf php-7.1.0.tar.gz && cd php-7.1.0
- ./configure \
- --prefix=/home/geoip/usr \
- --disable-all \
- --disable-cgi \
- --enable-opcache \
- --enable-mbstring \
- --enable-pdo \
- --enable-json \
- --without-pear \
- --with-pdo-mysql
- make
- make install
- cp /home/geoip/source/php/php-7.1.0/php.ini-production /home/geoip/usr/lib/php.ini
- /home/geoip/usr/bin/php -v
- # PHP 7.1.0 (cli) (built: Jan 17 2017 16:41:26) ( NTS )
- # Copyright (c) 1997-2016 The PHP Group
- # Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
- # LIBMAXMINDDB
- #---------------------
- mkdir -p /home/geoip/source/libmaxminddb && cd /home/geoip/source/libmaxminddb
- wget -O libmaxminddb-1.2.0.tar.gz https://github.com/maxmind/libmaxminddb/releases/download/1.2.0/libmaxminddb-1.2.0.tar.gz
- tar xvf libmaxminddb-1.2.0.tar.gz && cd libmaxminddb-1.2.0
- ./configure --prefix=/home/geoip/usr
- make
- make check
- # All 17 tests passed
- make install
- ldconfig
- # created files:
- # /home/geoip/usr/include/maxminddb.h
- # /home/geoip/usr/include/maxminddb_config.h
- # MAXMIND-DB-READER-PHP
- #---------------------
- cd /home/geoip/source/php/
- wget -O maxmind-db-reader-php-1.1.2.zip https://github.com/maxmind/MaxMind-DB-Reader-php/archive/master.zip
- 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
- /home/geoip/usr/bin/phpize
- # Configuring for:
- # PHP Api Version: 20160303
- # Zend Module Api No: 20160303
- # Zend Extension Api No: 320160303
- ./configure \
- --prefix=/home/geoip/usr \
- --with-maxminddb \
- --with-php-config=/home/geoip/usr/bin/php-config
- # checking for grep that handles long lines and -e... /bin/grep
- # checking for egrep... /bin/grep -E
- # checking for a sed that does not truncate output... /bin/sed
- # checking for cc... cc
- # checking whether the C compiler works... yes
- # checking for C compiler default output file name... a.out
- # checking for suffix of executables...
- # checking whether we are cross compiling... no
- # checking for suffix of object files... o
- # checking whether we are using the GNU C compiler... yes
- # checking whether cc accepts -g... yes
- # checking for cc option to accept ISO C89... none needed
- # checking how to run the C preprocessor... cc -E
- # checking for icc... no
- # checking for suncc... no
- # checking whether cc understands -c and -o together... yes
- # checking for system library directory... lib
- # checking if compiler supports -R... no
- # checking if compiler supports -Wl,-rpath,... yes
- # checking build system type... x86_64-unknown-linux-gnu
- # checking host system type... x86_64-unknown-linux-gnu
- # checking target system type... x86_64-unknown-linux-gnu
- # checking for PHP prefix... /home/geoip/usr
- # 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
- # checking for PHP extension directory... /home/geoip/usr/lib/php/extensions/no-debug-non-zts-20160303
- # checking for PHP installed headers prefix... /home/geoip/usr/include/php
- # checking if debug is enabled... no
- # checking if zts is enabled... no
- # checking for re2c... no
- # configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
- # checking for gawk... no
- # checking for nawk... nawk
- # checking if nawk is broken... no
- # checking Whether to enable the MaxMind DB Reader extension... yes, shared
- # checking for MaxMind DB debug support... no
- # checking for MMDB_open in -lmaxminddb... no
- # checking for ld used by cc... /usr/bin/ld
- # checking if the linker (/usr/bin/ld) is GNU ld... yes
- # checking for /usr/bin/ld option to reload object files... -r
- # checking for BSD-compatible nm... /usr/bin/nm -B
- # checking whether ln -s works... yes
- # checking how to recognize dependent libraries... pass_all
- # ./configure: line 5154: /usr/bin/file: No such file or directory
- # checking for ANSI C header files... yes
- # checking for sys/types.h... yes
- # checking for sys/stat.h... yes
- # checking for stdlib.h... yes
- # checking for string.h... yes
- # checking for memory.h... yes
- # checking for strings.h... yes
- # checking for inttypes.h... yes
- # checking for stdint.h... yes
- # checking for unistd.h... yes
- # checking dlfcn.h usability... yes
- # checking dlfcn.h presence... yes
- # checking for dlfcn.h... yes
- # checking the maximum length of command line arguments... 1572864
- # checking command to parse /usr/bin/nm -B output from cc object... ok
- # checking for objdir... .libs
- # checking for ar... ar
- # checking for ranlib... ranlib
- # checking for strip... strip
- # checking if cc supports -fno-rtti -fno-exceptions... no
- # checking for cc option to produce PIC... -fPIC
- # checking if cc PIC flag -fPIC works... yes
- # checking if cc static flag -static works... yes
- # checking if cc supports -c -o file.o... yes
- # checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
- # checking whether -lc should be explicitly linked in... no
- # checking dynamic linker characteristics... GNU/Linux ld.so
- # checking how to hardcode library paths into programs... immediate
- # checking whether stripping libraries is possible... yes
- # checking if libtool supports shared libraries... yes
- # checking whether to build shared libraries... yes
- # checking whether to build static libraries... no
- #
- # creating libtool
- # appending configuration tag "CXX" to libtool
- # configure: creating ./config.status
- # config.status: creating config.h
- make
- # /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
- # mkdir .libs
- # 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
- # /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
- # #include <maxminddb.h>
- # ^
- # compilation terminated.
- # Makefile:194: recipe for target 'maxminddb.lo' failed
- # make: *** [maxminddb.lo] Error 1
Add Comment
Please, Sign In to add comment