Software

How To Install LTSP in Ubuntu Linux

LTSP (Linux Terminal Server Project) is a software package that adds thin-client support to Linux servers.

Home: http://www.ltsp.org/

The following procedure describes How To install the LTSP software package in Ubuntu Linux (8.04 LTS).

1. Fresh Install Using the Ubuntu alternate CD

See: https://help.ubuntu.com/community/UbuntuLTSP/LTSPQuickInstall

1. Make sure that your server has 2 network cards installed and working under Ubuntu;
2. Insert the Ubuntu alternate CD and (re)boot fom this CD;
3. Once you boot up the CD, hit F4. The "Modes" menu will pop up. Select "Install an LTSP Server". Move on with the install.

Once the installer is done and has rebooted into your new system you will be able to boot your first Thin Client right away.

2. Install over an existent Ubuntu Desktop

1. Make sure that your server has 2 network cards installed and working;
2. Configure one card to have the static IP 192.168.0.1. Make sure that it is up and running. It will serve the thin client's boot image;
3. Configure the other card to be in a range different from 192.168.0.x. Make sure that it is able to connect to the Internet;
4. sudo apt-get install ltsp-server-standalone
5. sudo ltsp-build-client --arch i386
6. Check if the LTSP network paramaters fit your organization needs:

  • sudo gedit /etc/ltsp/dhcpd.conf # do check the domain-name
  • sudo invoke-rc.d dhcp3-server restart # if you made changes, restart the DHCP server

7. If needed Install User Security and Policy editors:

  • sudo apt-get install pessulus sabayon
  • Check: System->Administration->Lockdown Editor # This is the Pessulus application
  • Check: System->Administration->User Profile Editorr # This is the Sabayon application
  • Check: System->Administration->Authorizations

Note: if you need to use another IP instead of the 192.168.0.1 stated above, you must edit the IP ranges inside the file /etc/ltsp/dhcpd.conf to match the new IP and then restart the dhcp server.

3. Update the LTSP clients

  • sudo cp /etc/apt/sources.list /opt/ltsp/i386/etc/apt/
  • sudo chroot /opt/ltsp/i386
    • mount -t proc proc /proc
    • apt-get update && apt-get upgrade
    • update-initramfs -k all -c # make the initramfs pick up the new scripts
    • umount /proc
    • CTRL-D to exit chroot
  • sudo ltsp-update-kernels # if the kernels have been upgraded
  • sudo ltsp-update-sshkeys # If network IP numbering changed after you have done the initial setup
  • sudo ltsp-update-image --arch i386

4. Problems

4.1. Booting 32 bit clients from a LTSP AMD64 server

See: LTSP AMD64 and 32 bit clients: <http://ubuntuforums.org/showthread.php?t=213043>

  • sudo rm -rf /opt/ltsp /var/lib/tftpboot/ltsp/amd64
  • sudo sed -e '/^2000/s/amd64/i386/g' /etc/inetd.conf # make sure port 2000 serves an i386.img
  • sudo ltsp-build-client --arch i386
  • sudo ltsp-update-kernels # if the kernels have been upgraded
  • sudo ltsp-update-sshkeys # If network IP numbering changed after you have done the initial setup
  • sudo ltsp-update-image --arch i386

4.2. Workstation isn't authorized to connect to server

If you get error "This workstation isn't authorized to connect to server" on client, please run:

  • sudo ltsp-update-sshkeys && sudo ltsp-update-image --arch i386

See explanation on : https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/144296

5. Use a CDROM, a pen drive or whatever drive on the thin client

To use the CDROM, a pen drive or whatever drive on the thin client you must:

1. sudo apt-get install ltspfs (Not needed anymore: it is now part of the ltsp-server-standalone package)

2. add the users you want to have access to those drives to the fuse group:

  • sudo usermod -G fuse -a $USER

3. reboot the thin client and you should now be able to use the thin client's local drives.

6. Customize LTSP clients

ATENTION: The config file: /opt/ltsp/i386/etc/lts.conf is deprecated, use the following instead:

  • sudo gedit /var/lib/tftpboot/ltsp/i386/lts.conf

7. Install x11vnc on Ltsp Clients

See: https://wiki.edubuntu.org/InstallX11VncOnLtspClients

  • Setting x11vnc to run on the thin clients:
    • (...)

8. Reference

How To Install DJBdns in Ubuntu Linux

DJBdns are a set of applications that retrieve and publish Domain Name System (DNS) information.

Home: http://cr.yp.to/djbdns.html

The following procedure describes How To install the DJBdns software package in Ubuntu Linux (8.04 LTS) to act as a DNS Cache

1. Prepare to install

1. sudo aptitude install build-essential
2. test -d /tmp/downloads && sudo rm -fr /tmp/downloads
3. mkdir -p -m 1755 /tmp/downloads && cd /tmp/downloads
4. wget -c http://www.thedjbway.org/patches/djb_errno_patches.tgz
5. tar -zxvf djb_errno_patches.tgz

2. Install daemontools

1. cd /tmp/downloads
2. wget -c http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
3. tar -xvzf daemontools-0.76.tar.gz
4. cd admin/daemontools-0.76
5. patch -p1 < /tmp/downloads/daemontools-0.76.errno.patch

# (same as?: echo gcc -O2 -include /usr/include/errno.h > /tmp/downloads/compile/
conf-cc)

6. sudo touch /etc/inittab # /etc/inittab isn't used in Ubuntu anymore, but the daemontools install script still needs it
7. sudo package/install
8. sudo rm -rf /command/*
9. sudo cp -a /tmp/downloads/admin/daemontools/command/* /command/
10. create an upstart file (http://upstart.ubuntu.com/) inside /etc/event.d/:

sudo bash -c "cat > /etc/event.d/svscan <<-EOA
# svscan - daemontools
# This service starts daemontools from the point the system is
# started until it is shut down again.

start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

stop on shutdown

respawn
exec /command/svscanboot
EOA" ;

11. sudo initctl start svscan # If needed reboot the computer before running this command. (Is this the same as: sudo /sbin/start svscan ?)

3. Install ucspi-tcp

1. cd /tmp/downloads
2. wget -c http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
3. tar -xvzf ucspi-tcp-0.88.tar.gz
4. cd ucspi-tcp-0.88
5. patch -p1 < /tmp/downloads/ucspi-tcp-0.88.errno.patch # or: echo gcc -O2 -include /usr/include/errno.h > conf-cc
6. make
7. sudo make setup check

4. Install DJBdns

1. cd /tmp/downloads
2. wget -c http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
3. tar -xvzf djbdns-1.05.tar.gz
4. cd djbdns-1.05
5. echo gcc -O2 -include /usr/include/errno.h > conf-cc
6. make
7. sudo make setup check
8. Check if it is working:

  • dnsq a www.google.com 192.203.230.10 # Check that computer can talk to DNS servers at the Internet
  • env DNSCACHEIP=208.67.222.222 dnsqr a www.google.com # Check that your computer can talk to an upstream DNS cache

5. Configure DJBdns

1. sudo groupadd djbdns
2. sudo useradd -d /dev/null -s /bin/false -g djbdns dnslog
3. sudo useradd -d /dev/null -s /bin/false -g djbdns dnscache
4.
5. sudo mkdir /var/lib/svscan
6. sudo dnscache-conf dnscache dnslog /var/lib/svscan/dnscache

  • if you intend to serve other computers use: sudo dnscache-conf dnscache dnslog /var/lib/svscan/dnscache <host-IP> # <host-IP> is the IP on which dnscache should listen

7. sudo ln -sf /var/lib/svscan/dnscache /service
8. sleep 5 && sudo svstat /service/dnscache # check if it is working
9. upgrade root servers & restart djbdns:

  • dnsip `dnsqr ns . | sed -e '/answer/!d' -e 's/\(.*\)NS \(.*\)/\2/'` | sort | sudo tee /var/lib/svscan/dnscache/root/servers/@
  • [ alternative: dnsip `dnsqr ns . | grep answer | cut -d " " -f 5` | sort | sudo tee /var/lib/svscan/dnscache/root/servers/@ ]

10. control:
sudo svc -t /service/dnscache # Restart Service
sudo svc -d /service/dnscache # Stop Service

If your computer is running a DHCP client to obtain a dynamically assigned IP address, configure the DHCP client to discard external DNS cache information and use dnscache (which listens at 127.0.0.1):

  • sudo sed -i -e '/^\#prepend\ domain\-name\-servers\ 127\.0\.0\.1/ c\prepend\ domain\-name\-servers\ 127\.0\.0\.1\;' /etc/dhcp3/dhclient.conf

or, if you want to use OpenDNS as an external backup DNS service:

  • sudo sed -i -e '/^\#prepend\ domain\-name\-servers\ 127\.0\.0\.1/ c\prepend\ domain\-name\-servers\ 127\.0\.0\.1\,\ 208\.67\.222\.222\,\ 208\.67\.220\.220\;' /etc/dhcp3/dhclient.conf

11. sudo /etc/init.d/networking restart

6. Test DJBdns

Check if it is working:

  • dnsip www.fsf.org
  • dnsqr any google.com

  • in a terminal: tail -f /service/dnscache/log/main/current
  • in another terminal: dig google.com

7. Reference

a) Documentation and Man pages are available from: http://smarden.org/pape/djb/
, to install them: wget -c http://smarden.org/pape/Debian/dists/woody/unofficial/binary-i386/djbdns-doc_1.05-4_all.deb && sudo dpkg -i djbdns-doc_1.05-4_all.deb
b) Also see: http://www.linuxjournal.com/article/10112
c) To see how to adjust the cache size see: http://cr.yp.to/djbdns/cachesize.html
d) Perfect DjbDNS Setup On Ubuntu Server 8.04 (amd64) Hardy <http://www.howtoforge.com/perfect-djbdns-setup-on-ubuntu8.04-amd64>
e) Install Djbdns on Ubuntu Server: <http://www.rasyid.net/2008/07/08/install-djbdns-on-ubuntu-server/>
f) For an Debian/Ubuntu way to install djbdns, i.e. using "sudo apt-get install daemontools djbdns qmail cvm" see: http://smarden.org/pape/Debian/djbdns.html

How To Install OpenEMR in Ubuntu Linux

OpenEMR is a free medical practice management, electronic medical records, prescription writing, and medical billing application.

Home: http://www.oemr.org/

The following procedure describes How To install the OpenEMR software package in Ubuntu Linux (8.04 LTS)

1. Install a LAMP server

To install a LAMP server (Linux, Apache, MySQL, PHP) in Ubuntu Linux simply do:

  • sudo tasksel install lamp-server
  • sudo /etc/init.d/apache2 restart

If you get an error like: apache2: Could not determine the server's fully qualified domain name, use localhost (127.0.0.1) for ServerName and restart Apache:

  • echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdn
  • sudo /etc/init.d/apache2 restart

To test the LAMP installation:

2. Download and Prepare OpenEMR

The simplest way to install OpenEMR in Ubuntu seems to be:

  • test -d /home/openemr && sudo rm -fr /home/openemr
  • sudo mkdir -m 0775 -p /home/openemr
  • cd /home/openemr
  • cvs -z3 -d:pserver:anonymous@openemr.cvs.sourceforge.net:/cvsroot/openemr co -P openemr
  • sudo bash -c 'find /home/openemr/ -type f | xargs chmod 0770' # Set File perms to ug+rwx
  • sudo bash -c 'find /home/openemr/ -type d | xargs chmod 0775' # Set Dir. perms to ug+rwx and o+rx
  • test -d /home/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled || sudo mkdir -p -m 0775 /home/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled
  • test -d /home/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache || sudo mkdir -p -m 0775 /home/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache
  • sudo chown -R www-data.www-data /home/openemr # Let the Apache web server own the files
  • sudo ln -s /home/openemr /var/www/ # check if it points to openemr: ls -la /var/www/

  • sudo gedit /var/www/openemr/interface/globals.php # edit to make sure that:
    • $webserver_root = "/var/www/openemr";
    • $web_root = "/openemr";
  • sudo gedit /etc/php5/apache2/php.ini # edit to make sure that:
    • upload_tmp_dir = /tmp ; choose other dir if "/tmp" does not suit your system
    • magic_quotes_gpc = Off ; this one must be Off
    • file_uploads = On
    • upload_max_filesize = 2M ; change if you need more
    • memory_limit = 32M ; change ONLY IF NEEDED

3. Install OpenEMR

To install OpenEMR point your browser to: http://localhost/openemr/setup.php and follow instructions from there.

  • When you arrive at: "Please restore secure permissions on the 'library/sqlconf.php' file now.", open a terminal and run:
    • sudo chmod 400 /home/openemr/library/sqlconf.php

4. Start OpenEMR

To start OpenEMR point your browser to: http://localhost/openemr/

  • Default login data:
    • login: admin
    • password: pass

5. Notes

How To Install Squid in Ubuntu Linux

Squid is a caching proxy for the Web supporting HTTP, HTTPS and FTP

Home: http://www.squid-cache.org/

After installing and configuring Squid you must configure your system to use a proxy cache. Change relevant Internet user applications to access the Internet through the proxy: localhost:8080.

The following procedure describes How To install the Squid software package in Ubuntu Linux (8.04 LTS)

1. Install & Configure Squid

a) install:

  • sudo apt-get install squid

b) configure:

  • sudo cp /etc/squid/squid.conf /etc/squid/squid.conf-backup
  • sudo gedit /etc/squid/squid.conf
    • change squid port: from http_port 3128 to http_port 8080
    • find the http_access section, uncomment the following 2 lines and add your own networks (for instance 10.10.10.0/24): # acl our_networks src 192.168.1.0/24 192.168.2.0/24 10.10.10.0/24 # http_access allow our_networks
    • change hostname in the visible_hostname section after: #Default: # none add: visible_hostname localhost # or any other valid hostaname

c) restart squid: sudo /etc/init.d/squid restart

note - to see only the lines that aren't blanks or don't start with a # use: sudo grep "^[^#]" /etc/squid/squid.conf

2. Configure system and applications to use proxy

  • For Ubuntu > 8.x:
    • On the Ubuntu Menu open "System > Preferences > Network Proxy"
    • Select the "Proxy Configuration" folder
    • Choose "Manual Proxy configuration"
    • Choose "Use the same proxy for all protocols"
    • Set "HTTP Proxy:" to localhost and "Port:" 8080 # or to the port that you choose above

3. Configure Squid as Transparent Proxy (Squid version >= 2.6)

  • sudo gedit /etc/squid/squid.conf
    • change from: http_port 3128 to, either: http_port 3128 transparent or: ** http_port 192.168.x.x:3128 transparent
    • add line: always_direct allow all
  • add this line to iptables:
    • iptables -t nat -A PREROUTING -i eth0 -p tcp - -dport 80 -d ! 192.168.0.0/255.255.0.0 -j REDIRECT - -to-port 3128
      • + -i eth0 - adjust to the interface where it will be listening
      • + -d ! 192.168.0.0/255.255.0.0 - excludes this address range from caching
  • save the new iptables: sudo iptables-save

Reference: http://www.ubuntugeek.com/how-to-setup-transparent-squid-proxy-server-in-ubuntu.html

Software Howto's

Howto's, Manuals and Documents about Software installation, setup and configuration

Free/Open Source Healthcare Software

The sls.netpatia.com site, also known as The Free Healthcare Software site, maintains a list of free/open source healthcare software resources.

Syndicate content