User Tools

Site Tools


wiki:installing_x2goserver_linuxfromscratch

This is an old revision of the document!


X2goServer Installation (LinuxFromScratch)

WORK IN PROGRESS – NOT FINISHED YET

Run the following commands as a regular, non-root user. You'll need the root password to install them.

1. Create the necessary group and user

Make sure you already have a group called fuse
$ su -c "groupadd --system x2gouser &&
useradd --system --no-create-home --shell /bin/false --home /var/lib/x2go -g x2gouser x2gouser &&
usermod -a -G fuse <each user who'll connect to this x2go server>"

2. Install makepasswd

$ wget http://people.defora.org/~khorben/projects/makepasswd-0.5.0.tar.gz
$ tar xf makepasswd-0.5.0.tar.gz
$ cd makepasswd-0.5.0
$ make
$ su -c "make PREFIX=/usr install"

3. Install man2html

$ wget http://dcssrv1.oit.uci.edu/indiv/ehood/tar/man2html3.0.1.tar.gz
$ tar xf man2html3.0.1.tar.gz
$ cd man2html3.0.1
$ su -c "sed 's,/local,,g' man2html > /usr/bin/man2html &&
sed 's,/local,,g' man.cgi > /usr/bin/man.cgi &&
cp doc/man2html.1 /usr/share/man/man1/ &&
chown root:root /usr/bin/man2html /usr/bin/man.cgi /usr/share/man/man1/man2html.1 &&
chmod 755 /usr/bin/man2html /usr/bin/man.cgi"

4. Install perl module DBI

$ wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.615.tar.gz
$ tar xf DBI-1.615.tar.gz
$ cd DBI-1.615
$ perl Makefile.PL
$ make
$ su -c "make install"
Here you need to decide if you need a single-server or multiple-server setup.

If you pick a single-server setup, you need to install sqlite. Follow the installation instructions at BLFS.

If you pick a multiple-server setup, you need to install postgresql. Follow the installation instructions at BLFS.

5. Install perl module DBD-SQLite (for a single-server setup)

$ wget http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/DBD-SQLite-1.33.tar.gz
$ tar xf DBD-SQLite-1.33.tar.gz
$ cd DBD-SQLite-1.33
$ perl Makefile.PL
$ make
$ su -c "make install"

6. Install perl module for PostgreSQL

TODO

7. Install nxcomp from git

$ git clone git://code.x2go.org/nxcomp
$ cd nxcomp
$ autoconf 
$ ./configure --prefix=/usr
$ make
$ su -c "make install && /sbin/ldconfig"

8. Install nxcompext from git

$ git clone git://code.x2go.org/nxcompext
$ cd nxcompext
$ autoconf 
$ ./configure --prefix=/usr
$ make
$ su -c "make install && /sbin/ldconfig"

9. Install nxcompshad from git

$ git clone git://code.x2go.org/nxcompshad
$ cd nxcompshad
$ autoconf 
$ ./configure --prefix=/usr
$ make
$ su -c "make install && /sbin/ldconfig"

10. Install x2goagent from git

$ su -c "rm -fr /usr/lib/x2go &&
mkdir -p /usr/lib/x2go"
$ git clone git://code.x2go.org/x2goagent
$ cd x2goagent
$ make World
$ su -c "cp -a lib/Xext/libXext.so* /usr/lib/x2go/ &&
cp -a lib/X11/libX11.so* /usr/lib/x2go/ &&
cp -a lib/Xpm/libXpm.so* /usr/lib/x2go/ &&
cp -a lib/Xrender/libXrender.so* /usr/lib/x2go/ &&
cp -a lib/Xfixes/libXfixes.so* /usr/lib/x2go/ &&
cp -a lib/Xtst/libXtst.so* /usr/lib/x2go/ &&
cp -a lib/Xdamage/libXdamage.so* /usr/lib/x2go/ &&
cp -a lib/Xrandr/libXrandr.so* /usr/lib/x2go/ &&
cp -a lib/Xcomposite/libXcomposite.so* /usr/lib/x2go/ &&
chown -R root:root /usr/lib/x2go"

$ install -m755 programs/Xserver/x2goagent /usr/bin/x2goagent.original
Use make -j <number of cpus> World to speed up the build

Now create a wrapper to call the actual x2goagent binary with the correct LD_LIBRARY_PATH

$ su -c "echo '#\!/bin/bash' | sed 's,\\\,,g' > /usr/bin/x2goagent &&
echo 'X2GO_LIBS=/usr/lib/x2go LD_LIBRARY_PATH=/usr/lib/x2go exec /usr/bin/x2goagent.original \$@' >> /usr/bin/x2goagent &&
chmod 755 /usr/bin/x2goagent"

11. Install x2goserver from git

$ git clone git://code.x2go.org/x2goserver
$ cd x2goserver
$ sed -i "s,/local,,g" x2goserver-compat/Makefile
$ sed -i "s,/local,,g" x2goserver-extensions/Makefile
$ sed -i "s,/local,,g" x2goserver/Makefile
$ make
$ su -c "make install &&
chown root:x2gouser /usr/lib/x2go/x2gosqlitewrapper &&
chmod 2755 /usr/lib/x2go/x2gosqlitewrapper
rm -fr /var/lib/x2go/x2go_sessions &&
/usr/sbin/x2godbadmin --createdb"
wiki/installing_x2goserver_linuxfromscratch.1313698532.txt.gz · Last modified: 2013/03/08 13:31 (external edit)