Return to Tech/python

Python - mod_wsgi

Install - mod_wsgi



mod_wsgi
$ git clone https://github.com/GrahamDumpletion/mod_wsgi.git
Initialized empty Git repository in ./mod_wsgi/.git/
remote: Counting objects: 4668, done.
remote: Total 4668 (delta 0), reused 0 (delta 0), pack-reused 4668
Receiving objects: 100% (4668/4668), 3.38 MiB | 1.02 MiB/s, done.
Resolving deltas: 100% (3022/3022), done.

$ cd mod_wsgi

$ ./configure --with-python=/opt/python3.5.0/bin/python3
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking for gcc... gcc
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 for whether we are using the GNU C compiler... yes
checking for whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for prctl... yes
checking Apache version... 2.2.15
configure: creating ./config.status
config.status: creating Makefile

$ make


$ sudo make install
/usr/sbin/apxs -i -S LIBEXECDIR=/usr/lib/httpd/modules -n 'mod_wsgi' src/server/mod_wsgi.la
/usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib/apr-1/build/libtool' src/server/mod_wsgi.la /usr/lib/httpd/modules
/usr/lib/apr-1/build/libtool --mod-install cp src/server/mod_wsgi.la /usr/lib/httpd/modules/
libtool: install: cp src/server/.libs/mod_wsgi.so /usr/lib/httpd/modules/mod_wsgi.so
libtool: install: cp src/server/.libs/mod_wsgi.lai /usr/lib/httpd/modules/mod_wsgi.la
libtool: install: cp src/server/.libs/mod_wsgi.a /usr/lib/httpd/modules/mod_wsgi.a
libtool: install: chmod 644 /usr/lib/httpd/modules/mod_wsgi.a
libtool: install: ranlib /usr/lib/httpd/modules/mod_wsgi.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin:/sbin" ldcofig -n /usr/lib/httpd/modules
------------------------------------------------
Libraries have been installed in:
    /usr/lib/httpd/modules


If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least, one of the following:
    - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
      during execution
    - add LIBDIR to the `LD_RUN_PATH' environment variable
      during linking
    - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
    - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
-------
chmod 755 /usr/lib/httpd/modules/mod_wsgi.so

Return to Tech/python