XS Community Edition/0.4/IIAB: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Please see https://github.com/braddockcg/internet-in-a-box for information on how to install internet in a box on an XSCE school server.
In addition to the tips below, please also see https://github.com/braddockcg/internet-in-a-box for information on how to install Internet-in-a-Box on an XSCE school server.




<pre>
<pre>
Subject: [XSCE] Internet-in-a-Box on XO-4 in ten easy steps
Subject: [XSCE] Re: Internet-in-a-Box on XO-4 in ten easy steps
Date: Sun, 12 May 2013 11:22:02 -0700
Date: Sun, 12 May 2013 18:36:12 -0700
From: Braddock <braddock@braddock.com>
From: Braddock


Here is a procedure for installing and running Internet-in-a-Box on an
Below are further notes on getting Internet-in-a-Box to run on the XS-CE
School Server pre-Alpha.
XO-4 using a external USB harddrive.
This is a first pass! We should package this.


The latest version of these and other notes are available at the github
Installing on an OLPC XO Laptop
link at http://internet-in-a-box.org
-------------------------------


-braddock
Installation of the Internet-in-a-Box server on an XO-4 running OLPC OS 13.1


1. Flash the OS with a USB key, boot, connect to your wireless network


Install along side School Server XS-CE
2. Open Terminal, sudo -i


First I flashed to 13.1.0
3. Enable SSHD (optional)
Then installed IIAB using the procedure in README.md
vi /etc/ssh/sshd_config
Then I installed School Server XS-CE
Uncomment line "PermitRootLogin yes"
systemctl restart sshd
passwd root # Create a root password
The rest of these instructions can now be executed via ssh


Looks like School Server installs a conflicting older version of SQLAlchemy
4. Install compilers and build essentials:
0.7.10 vs pip's 0.8.1. You must not just remove it, but reinstall from pip
(This is overkill - we don't need all these dependencies)
yum -y groupinstall "Development Tools"
yum -y install python-devel python-pip nginx xz-devel screen vim


yum remove python-sqlalchemy
5. Install python dependencies
python-pip install Flask-Babel whoosh
python-pip uninstall SQLAlchemy
# You must clean up the pip-build-root dir before SQLAlchemy
python-pip install SQLAlchemy
# or you will run out of /tmp space
rm -rvf /tmp/pip-build-root
python-pip install Flask-SQLAlchemy


School server mounts the USB hard drive in a different place, in /mnt/usb0
6. Plug in the Internet-in-a-Box USB Hard Drive
It will auto-mount at /run/media/olpc/knowledge
instead of /run/media/olpc/knowledge.


7. Create a link from /knowledge
ln -sf /mnt/usb0/knowledge /knowledge
ln -s /run/media/olpc/knowledge/knowledge /knowledge


School server mounts the USB hard drive with the noexec flag. Annoying.
8. Link nginx configuration
ln -s /knowledge/internet-in-a-box/conf/iiab_nginx.conf
/etc/nginx/conf.d/


School server installed Apache, which conflicts with nginx
9. Create a local.ini configuration file
cd /knowledge/internet-in-a-box
cat <<EOF >local.ini
[KIWIX]
url = /iiab/zim
zimdump = /knowledge/sys/bin-arm/zimdump-patched
EOF


systemctl stop httpd
10. Run!

scripts/startup-xo.sh
To turn off the noexec flag

Edit /etc/usbmount/usbmount.conf
Remove noexec from: MOUNTOPTIONS=

To run IIAB:

Boot
Plug in USB drive.
/knowledge/internet-in-a-box/scripts/startup-xo.sh

Go to http://schoolserver from any client machine


On 05/12/2013 11:22 AM, Braddock wrote:
> Here is a procedure for installing and running Internet-in-a-Box on an
> XO-4 using a external USB harddrive.
> This is a first pass! We should package this.
>
>
> Installing on an OLPC XO Laptop
> -------------------------------
>
> Installation of the Internet-in-a-Box server on an XO-4 running OLPC
> OS 13.1
>
> 1. Flash the OS with a USB key, boot, connect to your wireless network
>
> 2. Open Terminal, sudo -i
>
> 3. Enable SSHD (optional)
> vi /etc/ssh/sshd_config
> Uncomment line "PermitRootLogin yes"
> systemctl restart sshd
> passwd root # Create a root password
> The rest of these instructions can now be executed via ssh
>
> 4. Install compilers and build essentials:
> (This is overkill - we don't need all these dependencies)
> yum -y groupinstall "Development Tools"
> yum -y install python-devel python-pip nginx xz-devel screen vim
>
> 5. Install python dependencies
> python-pip install Flask-Babel whoosh
> # You must clean up the pip-build-root dir before SQLAlchemy
> # or you will run out of /tmp space
> rm -rvf /tmp/pip-build-root
> python-pip install Flask-SQLAlchemy
>
> 6. Plug in the Internet-in-a-Box USB Hard Drive
> It will auto-mount at /run/media/olpc/knowledge
>
> 7. Create a link from /knowledge
> ln -s /run/media/olpc/knowledge/knowledge /knowledge
>
> 8. Link nginx configuration
> ln -s /knowledge/internet-in-a-box/conf/iiab_nginx.conf
> /etc/nginx/conf.d/
>
> 9. Create a local.ini configuration file
> cd /knowledge/internet-in-a-box
> cat <<EOF >local.ini
> [KIWIX]
> url = /iiab/zim
> zimdump = /knowledge/sys/bin-arm/zimdump-patched
> EOF
>
>
> 10. Run!
> scripts/startup-xo.sh

Latest revision as of 23:49, 8 August 2013

In addition to the tips below, please also see https://github.com/braddockcg/internet-in-a-box for information on how to install Internet-in-a-Box on an XSCE school server.


Subject: [XSCE] Re: Internet-in-a-Box on XO-4 in ten easy steps
Date: Sun, 12 May 2013 18:36:12 -0700
From: Braddock

Below are further notes on getting Internet-in-a-Box to run on the XS-CE 
School Server pre-Alpha.

The latest version of these and other notes are available at the github 
link at http://internet-in-a-box.org

-braddock


Install along side School Server XS-CE

    First I flashed to 13.1.0
    Then installed IIAB using the procedure in README.md
    Then I installed School Server XS-CE

Looks like School Server installs a conflicting older version of SQLAlchemy
0.7.10 vs pip's 0.8.1.  You must not just remove it, but reinstall from pip

    yum remove python-sqlalchemy
    python-pip uninstall SQLAlchemy
    python-pip install SQLAlchemy

School server mounts the USB hard drive in a different place, in /mnt/usb0
instead of /run/media/olpc/knowledge.

    ln -sf /mnt/usb0/knowledge /knowledge

School server mounts the USB hard drive with the noexec flag. Annoying.

School server installed Apache, which conflicts with nginx

    systemctl stop httpd

To turn off the noexec flag

    Edit /etc/usbmount/usbmount.conf
    Remove noexec from: MOUNTOPTIONS=

To run IIAB:

    Boot
    Plug in USB drive.
    /knowledge/internet-in-a-box/scripts/startup-xo.sh

Go to http://schoolserver from any client machine


On 05/12/2013 11:22 AM, Braddock wrote:
> Here is a procedure for installing and running Internet-in-a-Box on an 
> XO-4 using a external USB harddrive.
> This is a first pass!  We should package this.
>
>
> Installing on an OLPC XO Laptop
> -------------------------------
>
> Installation of the Internet-in-a-Box server on an XO-4 running OLPC 
> OS 13.1
>
> 1. Flash the OS with a USB key, boot, connect to your wireless network
>
> 2. Open Terminal, sudo -i
>
> 3. Enable SSHD (optional)
>     vi /etc/ssh/sshd_config
>     Uncomment line "PermitRootLogin yes"
>     systemctl restart sshd
>     passwd root  # Create a root password
>     The rest of these instructions can now be executed via ssh
>
> 4.  Install compilers and build essentials:
>     (This is overkill - we don't need all these dependencies)
>     yum -y groupinstall "Development Tools"
>     yum -y install python-devel python-pip nginx xz-devel screen vim
>
> 5. Install python dependencies
>     python-pip install Flask-Babel whoosh
>     # You must clean up the pip-build-root dir before SQLAlchemy
>     # or you will run out of /tmp space
>     rm -rvf /tmp/pip-build-root
>     python-pip install Flask-SQLAlchemy
>
> 6. Plug in the Internet-in-a-Box USB Hard Drive
>     It will auto-mount at /run/media/olpc/knowledge
>
> 7. Create a link from /knowledge
>     ln -s /run/media/olpc/knowledge/knowledge /knowledge
>
> 8. Link nginx configuration
>     ln -s /knowledge/internet-in-a-box/conf/iiab_nginx.conf 
> /etc/nginx/conf.d/
>
> 9. Create a local.ini configuration file
>     cd /knowledge/internet-in-a-box
>     cat <<EOF >local.ini
>     [KIWIX]
>     url = /iiab/zim
>     zimdump = /knowledge/sys/bin-arm/zimdump-patched
>     EOF
>
>
> 10. Run!
>     scripts/startup-xo.sh