Rich : resume 18-Jan-13 pre-django This page last changed on Apr 24, 2013 by rich. Pick up at 18-Jan-13 with the pre-django snapshot 1) Check for then install EPEL http://www.thegeekstuff.com/2012/06/enable-epel-repository/\\
    [rich@mbari1548-COS-vm ~]$ yum repolist
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Determining fastest mirrors
    Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=i386&repo=os error was
    14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
    repo id                      repo name                                    status
    base                         CentOS-6 - Base                              0
    extras                       CentOS-6 - Extras                            0
    pgdg91                       PostgreSQL 9.1 6 - i386                      0
    updates                      CentOS-6 - Updates                           0
    repolist: 0
    [rich@mbari1548-COS-vm ~]$
shows need stuff.. as root:
    [rich@mbari1548-COS-vm ~]$ su -
    Password:
    [root@mbari1548-COS-vm ~]# rpm -Uvh http://ftp.linux.ncsu.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpm
    Retrieving http://ftp.linux.ncsu.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpm
    warning: /var/tmp/rpm-tmp.UFfaT0: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
    Preparing...                ########################################### [100%]
       1:epel-release           ########################################### [100%]
    [root@mbari1548-COS-vm ~]#
now redo the repolist [root@mbari1548-COS-vm ~]# yum repolist
    [root@mbari1548-COS-vm ~]# yum repolist
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
    epel/metalink                                                   12 kB     00:00
     * base: mirrors.tummy.co
     * epel: linux.mirrors.es.net
     * extras: mirrors.finalasp.com
     * updates: mirrors.bluehost.com
    base                                                           3.7 kB     00:00
    epel                                                           4.2 kB     00:00
    epel/primary_db                                                4.2 MB     00:00
    extras                                                         3.5 kB     00:00
    pgdg91                                                         2.8 kB     00:00
    pgdg91/primary_db                                              125 kB     00:00
    updates                                                        3.5 kB     00:00
    updates/primary_db                                             1.4 MB     00:00
    repo id                                    repo name                                                                        status
    base                                       CentOS-6 - Base                                                                  4,790+12
    epel                                       Extra Packages for Enterprise Linux 6 - i386                                        7,152
    extras                                     CentOS-6 - Extras                                                                      12
    pgdg91                                     PostgreSQL 9.1 6 - i386                                                               274
    updates                                    CentOS-6 - Updates                                                                    372
    repolist: 12,600
    [root@mbari1548-COS-vm ~]#
apache is working... from centos install earlier. test by geting ip then http://134.89.11.51:80 the apache site is at /var/www/ the apache cfg is at /etc/httpd/conf postgres is there also - verfiy by becomming su then su - postgres the psql I want virtualenv for python package management. As root:
    [root@mbari1548-COS-vm ~]# easy_install virtualenv
    Searching for virtualenv
    Reading http://pypi.python.org/simple/virtualenv/
    Reading http://www.virtualenv.org
    Reading http://virtualenv.openplans.org
    Best match: virtualenv 1.9.1
    Downloading http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz#md5=07e09df0adfca0b2d487e39a4bf2270a
    Processing virtualenv-1.9.1.tar.gz
    Running virtualenv-1.9.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-gpmmYD/virtualenv-1.9.1/egg-dist-tmp-vpWkoe
    warning: no previously-included files matching '*' found under directory 'docs/_templates'
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    Adding virtualenv 1.9.1 to easy-install.pth file
    Installing virtualenv script to /usr/bin
    Installing virtualenv-2.6 script to /usr/bin

    Installed /usr/lib/python2.6/site-packages/virtualenv-1.9.1-py2.6.egg
    Processing dependencies for virtualenv
    Finished processing dependencies for virtualenv
    [root@mbari1548-COS-vm ~]#
Also want pip for python package install (yum replacement) As root:
     [root@mbari1548-COS-vm ~]# curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 85929  100 85929    0     0  15544      0  0:00:05  0:00:05 --:--:--  191k
    Downloading/unpacking pip
      Downloading pip-1.3.1.tar.gz (247Kb): 247Kb downloaded
      Running setup.py egg_info for package pip
        warning: no files found matching '*.html' under directory 'docs'
        warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
        no previously-included directories found matching 'docs/_build/_sources'
    Installing collected packages: pip
      Running setup.py install for pip
        warning: no files found matching '*.html' under directory 'docs'
        warning: no previously-included files matching '*.txt' found under directory 'docs/_build'
        no previously-included directories found matching 'docs/_build/_sources'
        Installing pip script to /usr/bin
        Installing pip-2.6 script to /usr/bin
    Successfully installed pip
    Cleaning up...
    [root@mbari1548-COS-vm ~]#
now as rich, make a sandbox to play in...
    [rich@mbari1548-COS-vm ~]$ mkdir dev
    [rich@mbari1548-COS-vm ~]$ cd dev
    [rich@mbari1548-COS-vm dev]$ mkdir rovctdplots
    [rich@mbari1548-COS-vm dev]$ cd rovctdplots
    [rich@mbari1548-COS-vm rovctdplots]$ virtualenv rovctdplotsenv
    New python executable in rovctdplotsenv/bin/python
    Installing setuptools............done.
    Installing pip...............done.
    [rich@mbari1548-COS-vm rovctdplots]$ ls
    rovctdplotsenv
    [rich@mbari1548-COS-vm rovctdplots]$
[rich@mbari1548-COS-vm rovctdplots]$ source ./rovctdplotsenv/bin/activate for matplotlib etc... need numpy pip install numpy (takes awhile, at times looks like its hung, just wait...) pip install matplotlib 25-Apr-2013 so now I want to enable mod_wsgi looks like its install into apache at some point (default?) there is a wsgi.conf at /etc/httpd/conf.d that loads the mod_wsgi.so I needed to edit the /etc/httpd/conf to enable execute perms on /var/www/cgi-bin:<Directory "/var/www/cgi-bin"> AllowOverride None Options +ExecCGI Order allow,deny Allow from all </Directory> also added handler in same file... AddHandler wsgi-script .wsgi restarted httpd then created a small test.wsgi file in /var/www/cgi-bin [root@mbari1548-COS-vm cgi-bin]# more test.wsgi def application(environ, start_response): """Simplest possible application object""" output = "Hello World" status = '200 OK' response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output] make it read and executable.. browse to http://134.89.11.51/cgi-bin/test.wsgi it works

Document generated by Confluence on Feb 04, 2026 08:50