[IIAB] New IIAB VEnv Approach
Tony Anderson
tony_anderson at usa.net
Fri Aug 16 23:44:09 PDT 2013
Hi,
I can now access iiab via http://schoolserver/iiab using mod_wsgi and
apache.
The next problem is to point the dataset to /library/knowledge
In XS-0.7, the /library partition has almost all of the disk space.
The intent is that all content and expanding directories (Journal
backup) should be in /library. The root partition has 8GB.
I set up iiab.conf in /etc/httpd/conf.d as
XSendFile on
WSGIScriptAlias /iiab /var/www/html/iiab.wsgi
Alias /iiabstatic /library/knowledge
However, I get an error when I click on Gutenberg/books by author that
it did not find a database. Currently /library/knowledge has the sampler
dataset but that may not be installed correctly either.
[root at schoolserver library]# ls -1 knowledge
gutenberg
INFO.json
khanacademy
openstreetmap
wikipedia-kiwix
wikipedia-zim
I am rapidly becoming an expert!
"An expert is a man who has made all the mistakes which can be made, in
a narrow field."
-- Niels Henrik David Bohr
Yours,
Tony
On 08/17/2013 12:22 AM, Braddock wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Tony,
> Here is a different approach which might get you up and running on XS
> 0.7/CentOS 6.2.
>
> You will need to install
>
> yum install python-virtualenv
>
> Then download:
>
> http://downloads.internet-in-a-box.org/iiab-venv-centos-20130816.tgz
>
> cd /home/root
> tar xvzf iiab-venv-centos-20130816.tgz
>
> This is a "self-contained" python virtual environment containing IIAB
> and all dependencies, including compiled lzma. I'm using XS 0.7 on x86.
>
> To test:
> cd /home/root
> virtualenv iiab-venv
> iiab-server
>
> Browse to http://localhost:25000/iiab
>
> To get WSGI working:
>
> Edit top of /var/www/iiab.wsgi to be:
> # WSGI interface file for Apache's mod_wsgi
>
> # If you are using a virtualenv, set this path
> path_to_virtualenv = "/root/iiab-venv"
>
> - -----
>
>
> I hope this works for you.
>
> - -braddock
>
>
> On 08/16/2013 01:51 PM, Tony Anderson wrote:
>>
>> Hi,
>>
>> As I mentioned the gcc problem has been solved by installing lzma
>> built on the Ubuntu system. I ran the test and it ran perfectly.
>> Also the installs dependent on lzma accepted it.
>>
>> The reason for the install of the packages is that the
>> internet-in-a-box assumes the install occurs online. I downloaded
>> the corresponding tar or zip files and installed each separately.
>>
>> As a result, I have the latest of each package.
>>
>> SQLalchemy is 0.82, Flask-SQLalchemy is 1.0.
>>
>> Since both of these are Python packages, I can't see how this
>> import error occurs.
>>
>> Ultimately, the way I got off the beaten path is not have being
>> online. What I could do now is use yum with the CentOS repository
>> to install pip and retry the install. However, as you mentioned,
>> the state of the server is unknown due to all the installs and
>> re-installs.
>>
>> It looks like several of these packages are based on Django. Was
>> there a particular reason you chose to go with Flask instead of
>> Django?
>>
>> When I get back home (end of September), I plan to purchase another
>> box and use it to test the install process from scratch. It may be
>> that I won't be able to get iiab working until then.
>>
>> Thanks for your help and advice.
>>
>> Yours,
>>
>> Tony
>>
>>
>>
>> On 08/16/2013 09:44 PM, Braddock wrote: Hi Tony,
>>
>> On 08/16/2013 04:09 AM, Tony Anderson wrote:
>>>>> This has led to installing a dozen Python packages from tar
>>>>> and zip downloads using python setup.py install. (pip is not
>>>>> installed but probably could be now that I have the
>>>>> repository set up.).
>>
>> I worry you are straying very far from the beaten path and making
>> a lot of extra work for yourself.
>>
>> pip as documented in our INSTALL.txt and my e-mail on usage under
>> XS 0.7 should be doing all of this legwork for you, and ensure you
>> are getting the proper versions.
>>
>> Without gcc and your rpm dependency hell this is difficult. I'd
>> really recommend figuring out how to fix that because your platform
>> is really broken.
>>
>> Even with broken gcc, I recommend you use pip to install all
>> pre-requisites except SQLAlchemy and lzma (which require gcc). A
>> list of pre-requisites is in the IIAB repo file requirements.txt:
>>
>> Flask>=0.10 Flask-Babel>=0.8 Flask-SQLAlchemy>=0.16
>> Flask-AutoIndex Whoosh>=2.4.1 backports.lzma>=0.0.2
>>
>>>>> The penultimate problem is that webapp.py, top-views.py,
>>>>> gutemberg.py, and zip-views.py import flaskext.babel.
>>>>> Apparently Flask has changed to import flask_babel. I changed
>>>>> this and all is ok.
>>
>> This flask.babel import problem was fixed last week when you first
>> reported it. pip install --upgrade Internet-in-a-Box should
>> correct it, or get the latest code from github.
>>
>>>>> [Fri Aug 16 21:39:57 2013] [error] [client 172.18.96.177]
>>>>> from sqlalchemy import orm, event [Fri Aug 16 21:39:57 2013]
>>>>> [error] [client 172.18.96.177] ImportError: cannot import
>>>>> name event
>>
>> This is probably because CentOS 6.2 has a very old version of
>> SQLAlchemy installed via RPM. Again, pip will install a
>> compatible version, but you won't be able to install it without
>> gcc.
>>
>> A longer term alternative to using pip that removes the gcc
>> requirement is for us to generate you CentoOS/XS0.7 specific RPMs.
>> This is what we are doing for XSCE, although there would be extra
>> work required because CentOS 6.2 is so far out of date compared to
>> Fedora 18.
>>
>> I'd be interested in more information why your attempt to install
>> IIAB on Ubuntu 12.04 failed. That is our main development platform
>> and is pretty well tested.
>>
>> -bradodck
>>> .
>>>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJSDqZCAAoJEHWLR/DQzlZu9kQH/i8VrU1ZcTqrK0zMVJg54Xt0
> 1zmjhYMOqD8fi3N6mm4zCotlGzMtacAXTT8u26uXFlOMolUOO6GpbPXBOGSzDckU
> 9QGHaW6Sedu0sAvwM/0HMb9ZqNnVHKnibRt/HdPs2H2/ck4QBsKmHNIPtgLr2Lub
> Jgq6hAieodKwVOWgu4QtZRJ1BmSJuHD83DnUwED4v4egekif8/CX/KS8CAW2jW4Z
> WSdUgi99VEtHRk+NBS437HBju1mDwKB+oxY/OVJ00ITIJuYrOH5zR5oRL9cviiuh
> u4+NvEta47Z8ZoW42L9wbc5pP9J+AhKn2n4V2BUejfo9imrs4Fp0cK0m6IzKuk8=
> =eS0v
> -----END PGP SIGNATURE-----
> .
>
More information about the IIAB
mailing list