OLPC Oceania Guide to Pacific XS Server-- Leeming Jun10

Page 1

Guide to installing the Pacific XS School Server

David Leeming Leeming International Consulting for the OLPC Oceania Technical Working Group June 2010


OLPC Oceania Basic Guide to installing the XS School Server David Leeming, Leeming International Consulting for the OLPC Oceania Technical Working Group OLPC Oceania is a non-profit, multi-stakeholder partnership linking country-driven programmes to regionwide technical assistance. OLPC Oceania is a coalition of governments, donors, civil society, academic institutions, educators, and volunteers all working together to provide technical assistance to Pacific countries to establish 1-to-1 computing in schools as a sustainable reality. Find out more: oceania@laptop.org

http://olpcoceania.blogspot.com http://wiki.laptop.org/go/OLPC_Oceania

David Leeming 2010. Published under a Creative Commons Licence: Attribution-NonCommercial-ShareAlike More Info: http://creativecommons.org/licenses/by-nc-sa/3.0/

David Leeming – CC BY SA

-2-

Basic Guide to XS School Server 14/9/2010


Basic Guide to installing the XS School Server Note that this will give you the basic default XS, with the WAN interface (eth0) set to automatic (DHCP) configuration. Some available services like Squid are not installed by default. The links below will give you clues how to build a customised installation, and it is advised to subscribe to the server-devel email group where you can seek assistance from the community. OLPC Australia have made some interesting customizations, for instance an installer that makes life easier when embedding the XS in an existing school network. Main information: http://wiki.laptop.org/go/XS_Installing_Software http://wiki.laptop.org/go/XS_Techniques_and_Configuration Server-devel email community http://lists.laptop.org/listinfo/server-devel

Caution Note that the wikis above are updated. This sheet is not. It was written on 14/9/2010

Hardware advice Depends on power availability and student numbers - and normal considerations. Main specs: • • • • • • • • •

2 built in wired NICs are easiest to install using default method. 1 wired and one USB or one wireless can be done but need customizations. 2-4GB RAM is best. However, in schools with less than 200 students, we are finding that 1GB seems to be adequate – from the limited information we have. Aim for 2GB storage (HDD) per student. If you have reliable sufficient power supply and good clan environment, go for a dual-core modern tower PC. Look for cooler-running processors if no air conditioning. For large schools with power, i.e. 500+. Consider a standard rack mount server solution. Don’t use multiple servers in a school if it can be avoided Unless you plan to install a GUI, a large monitor is not needed. If the server machine has no optical drive, we found it MUCH easier to install from a USB CD-drive rather than a USD flash drive, although that is possible. Note that if you want to administer content on the server machine from a remote Windows PC or server you can use WinSCP

Example 1 This is the model used in the PNGSDP schools. These are mainly remote schools with no grid or generator power. We totally avoided using AC power inverters by using 12V solar, with car charger-type voltage down converter to give 5V, and hubs and access points that ran on 12V, or capable of powering from POR using 12V. Dreamvision E485 Green Mini PC from www.pioneercomputers.com.au PRO: Low power fan-less “green mini PC” device, runs on 5V DC, less than 10W. Cost about AUD 800. CON: Only 1GB RAM (but early experience in PNG is good – memory use in the low 100s when tested). IDE hard drive is a weakness. Self destructs if 12V applied !!! Example 2 In Samoa the ASUS e-Box was used.

David Leeming – CC BY SA

-3-

Basic Guide to XS School Server 14/9/2010


What you need 1.

The latest stable installer build. Download from either link below, and burn as an image (not as data) on a CD-R to give you a bootable install disk. http://xs-dev.laptop.org/xs/ http://xs-dev.laptop.org/xs/OLPC_XS_LATEST.iso

2.

A direct wired internet connection with DHCP. If none, you have to set up static network configuration onthe XS, which is not in the scope of this guide (see XS Techniques and Configuration). Or see (3) below.

3.

If you want to run updates offline, you can get them first from the link below. We found this useful when we did not have access to a direct Internet connection and were short of time. Download onto a flashdrive the latest versions (rpms) of the below services from the link given: ejabberd-xs moodle-xs xs-activation xs-config http://fedora.laptop.org/xs/testing/olpc/9/i386/

4.

Wireless access point, configured as a simple access point, with dynamic (DHCP) network (LAN) settings, any SSID such as “XS-School-Server” and no wireless security. Choose channel 1,6, 11 or automatic, 802.11b or g • If you use multiple APs, set them up identically and use network hubs as needed. You can connect any PC including Windows PCs to the LAN and they will be able to access the server too. • Whilst it is quite easy to set up a small wireless LAN, some experience might be needed if doing this in a large school where 10 or more APs are needed. A ratio of about 1 AP to 30 students is about right. • When deploying to a school, access points and switches supporting POE are very useful to avoid having to also install a power distribution system.

5.

Your content (public folders). Best method is to have it all set up on a USB hard drive, ready to be copied into the /library folder on the server. Note that you should avoid use of spaces in filenames as some Sugar activities reject them.

David Leeming – CC BY SA

-4-

Basic Guide to XS School Server 14/9/2010


Installing 1.

Preparing the HDD. You need to wipe any partitions off it and format in FAT. When we had problems with this, we found a failsafe method is to first install any version of Linux using the entire drive space, and then install the XS on top of that.

2.

No need to have any Internet connection to do the install, until later on. Connect any USB CD drive and/or insert the install CD

3.

Set the BIOS on the server to boot from CD. We also set the BIOS to power up automatically if the power comes on. That helps with schools where power is intermittent as it does not depend on people to restart after an outage. Note that the XS is resistant to hard shut downs, pulling the cable is almost “de rigueur”.

4.

Boot from the installer, and • select “install from kickstart” • error downloading kickstart file tab > OK • local CD/DVD tab > OK • Next • Select location (many Pacific locations) and uncheck “System clock uses UTC” then Next • Set the logon(root) password • When it asks to partition the drive it needs to use the whole drive. This is where problems emerge if the HDD is not prepared in advance. It should work with default option by just clicking “Next” and use the whole drive with “Remove Linux partitions on selected drives and create default layout”. If you can’t get past this step return to step 1. • It will format the file systems on each partition and transfer image to HDD. The system is installed in one 8GB partition and the rest is for the /library. • When asked about optional packages such as GNOME, if you just want the default install, just select Next. • It will now install the 546+ packages, taking some time to complete.... • When complete shutdown/reboot removing the install CD

5.

Set up the server with Internet connection in the eth0 interface and the wireless AP (or LAN with a network hub connecting one or more APs )

6.

Start up the server and you should be able to log in as “root” using the password you set.

7.

Set the local time and date, as below, and it should echo back with your local time code (corresponding to the location you used in the installation. date –s “16 AUG 2010 16:35:00”

8.

Set the domain for the school using your chosen name (an internal domain) and reboot (type reboot) /etc/sysconfig/olpc-scripts/domain_config

9.

schoolname.org

When the system comes up, look for successfully bring up eth0 (this means it found the Internet gateway and DHCP). Note that some services come up red (fail), that is OK

10. Log on again and do a ping to test Internet connection (i.e. ping www.google.com and Ctrl-C) David Leeming – CC BY SA

-5-

Basic Guide to XS School Server 14/9/2010


11. Run the online updating or skip to step 12 yum --enablerepo=olpcxs-testing -y update 12. To do offline updating, copy the rpms you downloaded (what you need step 3) on a flashdrive, insert flashdrive and navigate to it and run. (skip this if step 11 done OK) rpm –Fv *.rpm 13. Now copy your public folders content to the /library folder. Insert the USB HDD and navigate to it, usually cd /media/usb cp –r –f * /library

(do “ls” to verify you see the folders to copy)

14. Set up the html.conf file to allow access to the public folders: nano /etc/httpd/conf.d/html.conf Note, what you add to this file depends on the names of the folders of content, but the demonstration server at PacINET used the following (spaces exaggerated). The Alias names are the ones you use to add links on the Moodle front page. The folder names are the exact (case sensitive) names ofthe folders where your content is. Alias /Schools-Wikipedia /library/Schools-Wikipedia Alias /UNESCO-2008 /library/unesco-2008 Alias /UNESCO-2005 /library/unesco-2005 Alias /SPC /library/spc Alias /Public /library/content Alias /eBooks /library/ebooks Alias /OLPC /library/olpc-resources Alias /Curriculum /library/curriculum Alias /PNG /library/png Alias /School /library/school <Directory /library> Order allow,deny Allow from all Options Indexes FollowSymLinks AllowOverride none </Directory> 15. Reboot and you are now ready to set up Moodle. 16. You should now check that you can connect to the wireless AP using both an XO and/or any PC. It should be given network settings automatically in the range 172.18.xxx.xxx and if you have an Internet connection on the WAN interface (eth0) this should now be accessible on your connected PC or XO too.

David Leeming – CC BY SA

-6-

Basic Guide to XS School Server 14/9/2010


Moodle configuration for XS This is usually done at the school where the deployment is taking place, using the first XO to be registered, which is automatically given the “administrator” role.

Logging on without registering / as admin user If you don’t have an XO, or which to set up Moodle without registering an XO (for instance if you are setting it up remotely) You can also choose to log on with a PC connected wirelessly (or on the wired eth1 (LAN) network). However, care is needed!! The admin user is disabled by default. To enable it, on the server type sudo -u apache php /var/www/moodle/web/local/scripts/adminuser-enable.php (note the reverse is done by changing the above to “-disable.php”). Then type the below and make a note of the admin password which is unique for every XS installation cat /etc/moodle/adminpw Now you can go ahead to connect to the school server LAN. First check you can connect wirelessly or wired as appropriate, as described on the previous page. (a) On an XO, connect to the server and start Browse. Click “Local Schoolserver”. (b) On a PC, start a browser and enter http://schoolserver/ In both cases you should see the Moodle log on page. IN ALL OTHER CASES, just register one XO and then use that as your “admin laptop”. Once registered and rebooted, it will access the Moodle front page without any need to log on (all XOs when registered behave this way). You can do the following steps entirely using the admin log on, or with the first XO (the one which will then be the school’s admin XO). Do ALL of the below using EITHER the first XO to be registered, or a PC logged on as admin user 1.

Turn editing on

2.

Site News o update this forum o main title – change to something like “Gaire School News and Announcements” o change setting to “force everyone subscribe forever” o save and return o post an announcement, like “Welcome to the school server”

3.

Front Page - Settings o Change the main title to something like “Gaire OLPC School Server” o Change the “Short name” from XS to “School-Server-Home” o Description (enter the school name and address) o Save

David Leeming – CC BY SA

-7-

Basic Guide to XS School Server 14/9/2010


4.

Add block – Messages

5.

Add block - Courses

6.

On left under Site News: Add Resource – Link to a file or website and for each of the Aliases create a link, i.e. • Schools-Wikipedia URL • UNESCO-2008 URL • Regional resources from SPC URL • Contunue...... to add all Aliases

http://schoolserver/Schools-Wikipedia http://schoolserver/UNESCO-2008 http://schoolserver/SPC

7.

On left under Site News: Add a Resource - Display a directory • Give it the title “Teacher Upload Folders” • Click “edit files” and create a new folder “Students” • Return to Front Page

8.

Repeat step 7 but give it title “Students Upload Folders” and click the drop down menu where you see “Main Directory” and select the new folder “Students” At this stage you should now be able to click all the Public Folder links to browse the content, and see two links to folders, one to the main directory (teachers upload area) and one to a directory “Students”.

9.

Now add the courses (classes). For each of the below, just click “Add Course” and add the main course name and the short name, and save. Leave all the other settings. • Start with the Teachers course Teachers teachers • Then starting with the highest course Grade 8B G8B add all the classes down to Grade 3A G3A • The above is PNG, in other countries it might be G1A – G6B etc

10. You are now all set up to add the teachers and students. (next page)

David Leeming – CC BY SA

-8-

Basic Guide to XS School Server 14/9/2010


Adding student and teacher XOs to Moodle 11. First, register all the XOs and restart the system 12. Then, using the admin laptop (or the one logged on as admin user) • click on the course you want to add students to, and then on left under administration, click “assign roles”. • Select “Students” role, and then move all the students in that class from the right pane to the left pane using the “Add” button. Then don’t forget to click the button below “Assign roles and save” • When you have added the students, do the same with the class teacher, but use the role “Teacher” • Repeat with all classes until each “course” has all the correct students and their teacher enrolled. • Then add all the Teachers to the “teacher” course with the role “Teacher”.

• • •

Some important points: It is easy to manage if the students names on the laptops include their class, i.e. G3A Nelson Mikibue They can always change the name later using Control Panel. Another strategy is to register one class, then add them all to the correct course before moving to the next class. But we found that can lead to confusion when class name lists are inaccurate and some students are not attending that day etc.

13. Now join the teachers and students to the Site News (School news and Announcements). Click on it, select “Update this resource” and “locally assigned roles”. Add all the teachers as “teachers” and all the students in the school as “students”. After doing this, all teachers should see the “School News and Announcements” and have the ability to edit/post. Students will see the posts but cannot edit. 14. Under SiteAdmin, FrontPage > Front Page Roles • Assign the role “teacher” to all teachers 15. Check that the teachers can see the “edit files” button in the “Front Page - Site Files”, and likewise the Students can “edit files” in their “Students upload folders” . To do this, using the admin laptop: • click ‘Teachers Upload Folders” • click “update this resource” • click “locally assigned roles” and all the teachers XOs as “Teachers”, then “assign roles and save” • Repeat using the “Students Upload Folders” but add all the Students XOs with role “Teachers” (they need to be “teachers” to get the right to edit files. 16. Finally, using the admin laptop, under “Site Administration” you can change “Front Page – Courses – Presence Service” to “split by course”. This is the final step to enable the course segregation.

David Leeming – CC BY SA

-9-

Basic Guide to XS School Server 14/9/2010


Other minor customizations and advice SSH Logon If you are not too worried about security you can allow log on by SSH using simple password authentication. You can then also easily log on from a Windows machine connected to the LAN (eth1) using WinSCP. Edit the config file as follows • • • •

nano /etc/ssh/sshd_config Change “PermitRootLogin” to “yes” Change the variable "PasswordAuthentication" to “yes” Save the file using Crtl-O and Crtl-X and reboot

Now you can either use any XO connected wirelessly or wired to eth1 and in Terminal activity, type: • • •

su ssh root@schoolserver Reply yes and enter the XS root password.

Cloning the XS In PNG we were setting up servers in a central location and shipping them out with as much pre-configuration as possible. It was therefore convenient to clone the HDD from a “master”. We only tried this with identical HDDs. NOTE: This would be done BEFORE any XOs are registered on the master!!! You need: • • • • •

Any PC with the “master HDD” to be cloned inserted An external (USB) HDD case with the HDD on which the clone to be burned inserted into a USB port An internal or external CD drive with Knoppix Live CD (or any other Live CD linux) Keyboard and mouse A USB hub might be useful to plug everything in

The most predictable way (if not the most elegant) is to make sure the partitions and format is correct by installing the XS 0.6 software and then simply over writing the complete contents bit by bit using the “dd” command. NOTE: It may be possible to omit steps 1 and 2, as long as the clone HDD is identical to the master. 1. 2.

First insert the CLONE in the server and install Ubuntu Linux Now install the XS 0.6 over the top of the Linux. Don’t worry about the location etc, it will all be overwritten

3. 4. 5. 6.

Once installed, remove the clone and insert the MASTER in the server. Insert the CLONE in the IDE USB case (don’t insert it yet in the server) Insert KNOPPIX CD in the CD drive and boot the server on Knoppix Start up a terminal In the terminal type fdisk –l (This will list the partitions of the master (sda1, 2, 3)

David Leeming – CC BY SA

- 10 -

Basic Guide to XS School Server 14/9/2010


7.

Now insert the CLONE with the USB cable. Wait a few seconds then repeat the command above, you should see the clone as well, (sdb1, 2, 3)

8.

You can now perform the “RSYNC” operation which takes a few hours. Type the below EXACTLY (danger of overwriting the master!!!). dd bs=8192 if=/dev/sda of=/dev/sdb When you hit this, the “write” light should come on the CLONE IDE USB drive. This will take several hours.

9.

Finally, delete a file by typing the command belows (this step may not be necessary as the hardware is identical) but try if you can. Whilst Knoppix still active and in same config (i.e. master is in server, clone on usb) and assuming the clone is sdb (check using fdisk –l)

mount /dev/sdb2 /mnt cd /mnt rm etc/udev/rules.d/70-persistent-net.rules 10. Note, we don’t need to do this to get it working, but to complete the job tidily we should also regenerate UUIDs, change the HDD devices (sdc1,sdc2,sd3) to new UUID and change /etc/fstab to the new UUIDs for the devices. But we can ignore this if the server HDDs will work in isolation. Can be done later if need be. This only affects things if two of these identical HDDs are used together in the same computer. 11. Finally, insert the clone in the server and test that it starts up. Don’t register any XOs if you don’t have the ones to be used at that school. But you can try and access the Moodle page by connecting an XO (or a PC) by connecting to the wireless or wired LAN (eth1) and then (a) with an XO, starting Browse and “local schoolserver” or (b) with a PC, starting a browser and typing http://schoolserver/. If it is working, you will see the log on page of Moodle. 12. Then run the command to rename the domain for the school where the HDD is to be used. (step 8 above)

ENDS

David Leeming – CC BY SA

- 11 -

Basic Guide to XS School Server 14/9/2010


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.