issue109:labolinux2
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue109:labolinux2 [2016/05/29 18:03] – créée auntiee | issue109:labolinux2 [2016/06/07 15:04] (Version actuelle) – d52fr | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Last month, our refurbishing not-for-profit was approached by a small not-for-profit community looking for a donation of used computers. The organization had recently been given some space in which to meet (they’d been meeting in member’s houses before this), and now needed a few computers so members could learn basic computer skills. In my original discussion with the executive, they mentioned that the organization had no funding for computers. After a short discussion about licensing and what the organization was looking for, it dawned on me that a Linux Terminal Server Project (http:// | + | ===== 1 ===== |
+ | |||
+ | **Last month, our refurbishing not-for-profit was approached by a small not-for-profit community looking for a donation of used computers. The organization had recently been given some space in which to meet (they’d been meeting in member’s houses before this), and now needed a few computers so members could learn basic computer skills. In my original discussion with the executive, they mentioned that the organization had no funding for computers. After a short discussion about licensing and what the organization was looking for, it dawned on me that a Linux Terminal Server Project (http:// | ||
Having never even set up a PXE network boot server before, I needed clear instructions: | Having never even set up a PXE network boot server before, I needed clear instructions: | ||
+ | http:// | ||
+ | |||
+ | Le mois dernier, une communauté à but non lucratif qui cherchait des dons d' | ||
+ | |||
+ | N' | ||
+ | |||
http:// | http:// | ||
- | For the server, I used a retired desktop machine that our project once used as a SAMBA file server. The server had an Intel Core 2 Quad Q9400 (2666MHz processor) in it, and 2GB of DDR2 667MHz RAM. The drives we’d pulled and wiped a long time ago, so I installed a pair of matched 80GB hard drives. Initially I created a hardware-based RAID mirror (using the motherboard RAID controller), | + | ===== 2 ===== |
+ | |||
+ | **For the server, I used a retired desktop machine that our project once used as a SAMBA file server. The server had an Intel Core 2 Quad Q9400 (2666MHz processor) in it, and 2GB of DDR2 667MHz RAM. The drives we’d pulled and wiped a long time ago, so I installed a pair of matched 80GB hard drives. Initially I created a hardware-based RAID mirror (using the motherboard RAID controller), | ||
+ | |||
+ | Initially I understood that the organization had an existing Internet connection so I figured the best thing to do was to set up the server for DHCP and when I got to the facility get their system administrator to set a DHCP reservation for the server, then update the SSH keys and the image that gets built.** | ||
+ | |||
+ | Pour le serveur, j'ai choisi un ordinateur de bureau retraité que notre projet avait autrefois utilisé comme serveur de fichiers SAMBA. Le serveur contenait un Intel Core 2 Quad (un processeur à 2 666 MHz) et 2 Go de RAM DDR2 à 667 MHz. Il y a longtemps, nous avions enlevé et effacé les disques et j'y ai donc installé une paire de disques durs assortis de 80 Go. Au départ, j'ai créé un miroir RAID basé sur le matériel (en me servant du contrôleur RAID sur la carte mère), mais j'ai changé d'avis en décidant d' | ||
+ | |||
+ | Au départ, j' | ||
- | Initially I understood that the organization had an existing Internet connection so I figured the best thing to do was to set up the server for DHCP and when I got to the facility get their system administrator to set a DHCP reservation for the server, then update the SSH keys and the image that gets built. | + | ===== 3 ===== |
- | There are a few ways to build LTSP images, but building an image off an existing installation seemed like the simplest way to go and Bobby’s instructions for updating an image are really clear. Some LTSP installations need 2 network interface cards, but Bobby’s method uses only one card and the LTSP server acts as a proxy for the clients. The server acting like a proxy tripped me up when I first got LTSP running because I couldn’t understand why the clients showed the server address when I ran the command: / | + | **There are a few ways to build LTSP images, but building an image off an existing installation seemed like the simplest way to go and Bobby’s instructions for updating an image are really clear. Some LTSP installations need 2 network interface cards, but Bobby’s method uses only one card and the LTSP server acts as a proxy for the clients. The server acting like a proxy tripped me up when I first got LTSP running because I couldn’t understand why the clients showed the server address when I ran the command: / |
Because all the clients would likely be 32-bit, and it wasn’t likely that the organization would have more than 3 or 4 computers, I chose to install the 32-bit version of Ubuntu MATE 14.04 on the server. | Because all the clients would likely be 32-bit, and it wasn’t likely that the organization would have more than 3 or 4 computers, I chose to install the 32-bit version of Ubuntu MATE 14.04 on the server. | ||
As with any desktop or server installation, | As with any desktop or server installation, | ||
+ | |||
+ | sudo apt-get update ** | ||
+ | |||
+ | Il y a plusieurs façons de construire des images LTSP, mais il me semblait que la plus simple était d' | ||
+ | |||
+ | Puisque tous les clients seraient sans doute des 32-bit, et qu'il n' | ||
+ | |||
+ | Tout comme avec n' | ||
sudo apt-get update | sudo apt-get update | ||
- | Some LTSP server setups use the paradigm of letting the server act as a DHCP server for clients. Because I didn’t know the organization’s network setup, it seemed a better idea to allow their router to do DHCP, but the server would act as a proxy for the router - dnsmasq provides this functionality. Dnsmasq can be set up as a DHCP server, but, in this case, I used it to forward DNS to the clients. | + | ===== 4 ===== |
+ | |||
+ | **Some LTSP server setups use the paradigm of letting the server act as a DHCP server for clients. Because I didn’t know the organization’s network setup, it seemed a better idea to allow their router to do DHCP, but the server would act as a proxy for the router - dnsmasq provides this functionality. Dnsmasq can be set up as a DHCP server, but, in this case, I used it to forward DNS to the clients. | ||
The LTSP image had to be deployed to the clients some way. Bobby mentions in his blog that dnsmasq can also act as a tftp server, but that the functionality is broken in Ubuntu 14.04. Ubuntu actually has a few tftp server packages in the repositories, | The LTSP image had to be deployed to the clients some way. Bobby mentions in his blog that dnsmasq can also act as a tftp server, but that the functionality is broken in Ubuntu 14.04. Ubuntu actually has a few tftp server packages in the repositories, | ||
Ligne 23: | Ligne 49: | ||
The next step is to build the LTSP image that will be served to the clients. Because the build process has to download packages, this step can take quite a bit of time, especially on a slow Internet connection, so be patient. In my case, I was building a 32-bit version of Ubuntu MATE because the thin clients I picked (I actually ended up using some old HP DC7100 Pentium 4 based desktops with no hard drives instead, but more on this later) were 32-bit, and because I’d installed a 32-bit version of Ubuntu MATE on the server. Build a 32-bit client using the following command: | The next step is to build the LTSP image that will be served to the clients. Because the build process has to download packages, this step can take quite a bit of time, especially on a slow Internet connection, so be patient. In my case, I was building a 32-bit version of Ubuntu MATE because the thin clients I picked (I actually ended up using some old HP DC7100 Pentium 4 based desktops with no hard drives instead, but more on this later) were 32-bit, and because I’d installed a 32-bit version of Ubuntu MATE on the server. Build a 32-bit client using the following command: | ||
+ | |||
+ | sudo ltsp-build-client --arch i386** | ||
+ | |||
+ | Certaines configurations utilisent un modèle où le serveur LTSP agit comme serveur DHCP pour les clients. Puisque je ne connaissais pas la configuration du réseau de l' | ||
+ | |||
+ | L' | ||
+ | |||
+ | sudo apt-get install dnsmasq tftpd-hpa ltsp-server | ||
+ | |||
+ | La prochaine étape est de construire l' | ||
sudo ltsp-build-client --arch i386 | sudo ltsp-build-client --arch i386 | ||
- | If you’re building for 64-bit clients, just remove the --arch i386. You’ll also need to replace the i386 in several other places with amd64 including the next step, enabling the DHCP proxy support. For 32-bit images, run: | + | |
+ | ===== 5 ===== | ||
+ | |||
+ | **If you’re building for 64-bit clients, just remove the --arch i386. You’ll also need to replace the i386 in several other places with amd64 including the next step, enabling the DHCP proxy support. For 32-bit images, run: | ||
sudo sed -i ' | sudo sed -i ' | ||
Ligne 32: | Ligne 71: | ||
Again, if you’re building for 64-bit, replace the tftpboot/ | Again, if you’re building for 64-bit, replace the tftpboot/ | ||
- | DNSmasq needs to be set up so it can act as a proxy for the clients. At this point, I was stuck because I had no information about the organization’s existing Internet connection. On further discussion with the executive (and to my horror), I found out that the Internet connection they had was a wireless connection that someone was letting them use. Clearly, this wasn’t going to work, even with only 3 clients, they’d choke on a 54g wireless connection. We had a discussion about getting a wired connection, and I set up the rest of the LTSP configuration based on a wired router we had sitting around the shop. I also grabbed a 5-port gigabit switch. Although the router has 4 ports (in addition to the Internet port), all the ports were 10/100, so I connected the router and all the clients to the 5-port gigabit switch. I set the router to hand out DHCP in the 192.168.80.x address range. My / | + | DNSmasq needs to be set up so it can act as a proxy for the clients. At this point, I was stuck because I had no information about the organization’s existing Internet connection. On further discussion with the executive (and to my horror), I found out that the Internet connection they had was a wireless connection that someone was letting them use. Clearly, this wasn’t going to work, even with only 3 clients, they’d choke on a 54g wireless connection. We had a discussion about getting a wired connection, and I set up the rest of the LTSP configuration based on a wired router we had sitting around the shop. I also grabbed a 5-port gigabit switch. Although the router has 4 ports (in addition to the Internet port), all the ports were 10/100, so I connected the router and all the clients to the 5-port gigabit switch. I set the router to hand out DHCP in the 192.168.80.x address range. My / |
- | Again, if you’re building a 64-bit image, replace i386 with amd64 in the line: | + | Si vous construisez des clients 64-bit, il suffit d' |
+ | |||
+ | sudo sed -i ' | ||
+ | |||
+ | Bien entendu, si vous construisez en 64-bit, remplacez la partie tftpboot/ | ||
+ | |||
+ | Il faut paramétrer DNSmasq de sorte qu'il peut agir comme proxy pour les clients. À ce stade, j' | ||
+ | |||
+ | ===== 6 ===== | ||
+ | |||
+ | **Again, if you’re building a 64-bit image, replace i386 with amd64 in the line: | ||
pxe-service=x86PC, | pxe-service=x86PC, | ||
Ligne 42: | Ligne 91: | ||
sudo service dnsmasq restart | sudo service dnsmasq restart | ||
- | I turned on the thin clients, they started to network boot and download the Ubuntu MATE image and I ended up staring at a black screen… After a bit of research, I discovered the thin clients actually had a bit of storage on them, so I installed Ubuntu MATE directly on the storage and booted them to the same result -- it seemed that these particular clients didn’t like to work with Xorg without further configuration. At this point, it was the last chance I’d get to work on the system before having to deliver the news to the executive. I pulled out an old (but reliable) HP DC7100 Pentium 4-based computer we used to use as public computers, and set it up to boot (the first picture in this article shows the computer with the top of the case off) from network and voila, it successfully booted to the LTSP login screen. | + | I turned on the thin clients, they started to network boot and download the Ubuntu MATE image and I ended up staring at a black screen… After a bit of research, I discovered the thin clients actually had a bit of storage on them, so I installed Ubuntu MATE directly on the storage and booted them to the same result -- it seemed that these particular clients didn’t like to work with Xorg without further configuration. At this point, it was the last chance I’d get to work on the system before having to deliver the news to the executive. I pulled out an old (but reliable) HP DC7100 Pentium 4-based computer we used to use as public computers, and set it up to boot (the first picture in this article shows the computer with the top of the case off) from network and voila, it successfully booted to the LTSP login screen.** |
- | Now I was left wondering “what’s the default login username and password? | + | À nouveau, si vous construisez une image 64-bit, remplacez i386 par amd64 dans la ligne : |
+ | |||
+ | pxe-service=x86PC, | ||
+ | |||
+ | Une fois dnsmasq paramétré, | ||
+ | |||
+ | sudo service dnsmasq restart | ||
+ | |||
+ | J'ai allumé les clients légers, ils ont commencé le démarrage à partir du réseau et le téléchargement de l' | ||
+ | |||
+ | ===== 7 ===== | ||
+ | |||
+ | **Now I was left wondering “what’s the default login username and password? | ||
The last problem I ran into was the fact I was using the LTSP server administrator credentials to log in to the server. When I went to shut down the client, and typed in the server admin credentials, | The last problem I ran into was the fact I was using the LTSP server administrator credentials to log in to the server. When I went to shut down the client, and typed in the server admin credentials, | ||
+ | |||
+ | sudo ltsp-update-image | ||
+ | |||
+ | sudo sed -i ' | ||
+ | |||
+ | Et alors, je n' | ||
+ | |||
+ | Le dernier problème que j'ai eu était que j' | ||
sudo ltsp-update-image | sudo ltsp-update-image | ||
Ligne 52: | Ligne 121: | ||
sudo sed -i ' | sudo sed -i ' | ||
+ | ===== 8 ===== | ||
- | These commands need to be run every time you want to rebuild the client image based on a change on your server. Remember to replace the i386 with amd64 for 64-bit images. I found myself updating the image several times before I got it to a point where I thought I had the right mix of software for the community centre. | + | **These commands need to be run every time you want to rebuild the client image based on a change on your server. Remember to replace the i386 with amd64 for 64-bit images. I found myself updating the image several times before I got it to a point where I thought I had the right mix of software for the community centre. |
After work one evening, I headed to the community centre with one of the executives to install the server. The centre had already taken 3 clients. The centre still didn’t have a wired Internet connection, but we set up the network and ran through some of the installed programs so they could get their members started learning keyboard skills (klavaro, I found tuxtyping to be too slow on the clients). When the centre gets a wired connection, I’ll be revisiting them to reconfigure their server for whatever router is giving them DHCP (I’ll add a DHCP reservation for the server on the router). At that point, it will also be necessary to update the ltsp ssh keys, and update the image: | After work one evening, I headed to the community centre with one of the executives to install the server. The centre had already taken 3 clients. The centre still didn’t have a wired Internet connection, but we set up the network and ran through some of the installed programs so they could get their members started learning keyboard skills (klavaro, I found tuxtyping to be too slow on the clients). When the centre gets a wired connection, I’ll be revisiting them to reconfigure their server for whatever router is giving them DHCP (I’ll add a DHCP reservation for the server on the router). At that point, it will also be necessary to update the ltsp ssh keys, and update the image: | ||
Ligne 61: | Ligne 131: | ||
sudo ltsp-update-image | sudo ltsp-update-image | ||
- | sudo sed -i ' | + | sudo sed -i ' |
- | It’s exactly the same process for updating the image with the exception of updating the ltsp ssh keys first. | + | Vous devez lancer ces commandes chaque fois que vous voulez refaire l'image client basée sur une modification sur le serveur. Rappelez-vous qu'il faut remplacer le « i386 » par « amd64 » pour des images 64-bit. Je me suis vu mettre l' |
- | I’ve asked the community centre executive to keep me in the loop to help members, and a person of their choosing with training to administer the server. The centre hasn’t officially opened at the time of this article, so I expect I’ll have a lot more to write about in a future article. It’s worth noting that I didn’t have a problem playing sound on clients, but ran into issues with USB devices. Initially I couldn’t get USB devices recognized on the clients. With some searching, I managed to fix the problem, but then ran into the problem of not being able to get the drives to unmount without administrative privileges. | + | Après le boulot, un soir, je suis allé au centre communautaire avec l'un des cadres pour installer le serveur. Le centre avait déjà récupéré 3 clients. |
- | + | ||
- | I also tried a system with a Core i5 processor as a client, and was surprised to find that it wasn’t that much faster – slightly faster to boot, but not much of a discernable difference running software | + | |
+ | sudo ltsp-update-sshkeys | ||
+ | sudo ltsp-update-image | ||
+ | sudo sed -i ' | ||
+ | ===== 9 ===== | ||
+ | **It’s exactly the same process for updating the image with the exception of updating the ltsp ssh keys first. | ||
+ | I’ve asked the community centre executive to keep me in the loop to help members, and a person of their choosing with training to administer the server. The centre hasn’t officially opened at the time of this article, so I expect I’ll have a lot more to write about in a future article. It’s worth noting that I didn’t have a problem playing sound on clients, but ran into issues with USB devices. Initially I couldn’t get USB devices recognized on the clients. With some searching, I managed to fix the problem, but then ran into the problem of not being able to get the drives to unmount without administrative privileges. | ||
+ | I also tried a system with a Core i5 processor as a client, and was surprised to find that it wasn’t that much faster – slightly faster to boot, but not much of a discernable difference running software (because the server is handling almost all of the load). | ||
LTSP resources: | LTSP resources: | ||
Ligne 84: | Ligne 159: | ||
Bobby Allen’s blog: http:// | Bobby Allen’s blog: http:// | ||
- | Enabling USB and other local devices: https:// | + | Enabling USB and other local devices: https:// |
+ | |||
+ | Le processus est exactement le même que celui de la mise à jour de l' | ||
+ | |||
+ | J'ai demandé au cadre du centre communautaire de me tenir au courant si je peux aider les membres, ainsi qu'une personne choisie par eux avec les connaissances nécessaires pour administrer le serveur. Au moment où j' | ||
+ | |||
+ | J'ai également essayé un système avec un processeur Core i5 en tant que client, et fus surpris de constater qu'il n' | ||
+ | |||
+ | Ressources LTSP : | ||
+ | |||
+ | Page d' | ||
+ | |||
+ | Aide communautaire Ubuntu LTSP : https:// | ||
+ | |||
+ | Le blog de Bobby Allen : http:// | ||
+ | |||
+ | Activer des dispositifs locaux, notamment ceux sur USB : https:// |
issue109/labolinux2.1464537813.txt.gz · Dernière modification : 2016/05/29 18:03 de auntiee