EpiaSP

From CourvilleWiki

Jump to: navigation, search

Contents

EpiaSP ubuntu configuration

I am using an EPIA SP 8000E with a travla case and an Hauppauge PVR250 card as a server. Below are my installation notes for the ubuntu/breezy distribution.

Big fat warning!!!

  • DO NOT USE the longhaul module: it will make your kernel crash randomly. Many people reports DMA issues with epia boards but I suspect that everything is linked to this module that you need to disable in the kernel

required apps

  • apt-get install
ssh
build-essential
autoconf automake
linux-headers-2.6.12-9-686 linux-image-2.6.12-9-686
gcc-3.3 g++3.3

unichrome xorg compilation procedure

  • build xorg tree
apt-get source xserver-xorg
apt-get build-dep xserver-xorg
cd xorg-6.8.2
dpkg-buildpackage -b
cd ..
  • checkout and build unichrome server:
svn co http://svn.openchrome.org/svn/trunk openchrome
cd openchrome
cd unichrome
svn update
make clean
xmkmf ../../xorg-6.8.2/build-tree/xc
make
make install install.man
cd ..
cd libxvmc
make clean
xmkmf ../../xorg-6.8.2/build-tree/xc
make
make install
cd ../..
  • checkout and make latest via drm modules:
cvs -z3 -d :pserver:anonymous@cvs.freedesktop.org:/cvs/dri checkout drm
cd drm
cvs update
cd linux-core
make LINUXDIR=/lib/modules/`uname -r`/build DRM_MODULES=via
cp drm.ko via.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/
depmod -ae

phpwiki installation

Note that I used to use phpwiki as a wiki. I removed it and use now mediawiki. I still preserve this section for archive purpose but I do not have this package now installed on the computer.

apt-get install phpwiki
cd /etc/apache2/conf.d
ln -s /etc/phpwiki/apache.conf phpwiki

hauppauge pv250 ivitv driver installation

  1. get driver from http://ivtvdriver.org/index.php/Main_Page stable releases can be found at http://dl.ivtvdriver.org/ivtv/stable/
  2. before installation do a
cd ivtv-*
make && make install
cd utils
cp ivtvfbctl ivtvctl ivtv-detect ivtv-encoder ivtvplay ivtv-mpegindex ivtvfwextract.pl ivtv-radio utils/ivtv-tune /usr/local/bin
apt-get install libconfig-inifiles-perl
cd ..
  1. firmware installation following http://ivtvdriver.org/index.php/Firmware or http://ivtv.writeme.ch/tiki-index.php?page=FirmwareVersions
wget ftp://ftp.shspvr.com/download/wintv-pvr_150-500/inf/pvr_2.0.24.23035.zip
unzip pvr_2.0.24.23035.zip
cp HcwMakoA.ROM /usr/lib/hotplug/firmware/v4l-cx25840.fw
cp HcwFalcn.rom /usr/lib/hotplug/firmware/v4l-cx2341x-enc.fw
wget ftp://ftp.shspvr.com/download/wintv-pvr_250-350/inf/pvr_1.18.21.22254_inf.zip
unzip pvr_1.18.21.22254_inf.zip
utils/ivtvfwextract.pl pvr_1.18.21.22254_inf.zip
cp v4l-cx2341x-init.mpg /usr/lib/hotplug/firmware
modprobe ivtv
dmesg
ivtvctl -d /dev/video0 -u 0x7f0000
ivtvctl -d /dev/video0 -p 4
ivtvctl -d /dev/video0 -f width=720,height=576
ivtv-tune --device=/dev/video0 --freqtable=france --channel=50
mplayer /dev/video0

mediawiki installation

apt-get install libapache2-mod-proxy-html
apt-get install mediawiki mediawiki-math
apt-get install libcache-memcached-perl memcached turck-mmcache imagemagick libgd2
  • make sure that /etc/mediawiki/LocalSettings.php has permission 600
  • restrict login and edition
## Shared memory settings
$wgUseMemCached = true;
$wgMemCachedServers = array('localhost');
#force users to login for edit
$wgWhitelistEdit = true;
$wgWhitelistRead = false;
#preventing new user registration http://meta.wikimedia.org/wiki/Preventing_Access and http://meta.wikimedia.org/wiki/Talk:Setting_user_rights_in_MediaWiki
$wgWhitelistAccount = array ( "user" => 0, "sysop" => 1, "developer" => 1 );
#change default logo
#put logo into /usr/share/mediawiki/skins/common/images
#$wgLogo = '/var/www/Images/courville-wiki.png';
$wgLogo = "$wgStylePath/common/images/courville-wiki.png";
  • how to perform a backup of wiki database:
mysqldump -u root --single-transaction wikidb > backup-wikidb.sql
  • create and restore database on new computer
mysql -u root
mysql> create database wikidb;
mysql> use wikidb;
mysql> source backup-wikidb.sql;
apt-get install mediawiki

gallery installation

  • install gallery:
apt-get install gallery jhead
  • enable configuration of gallery
/usr/share/gallery/configure.sh
 /usr/share/gallery/secure.sh

ftp server

apt-get install proftpd proftpd-common

print server for deskjet 970cxi

apt-get install libgtk1.2

propagate user key into another user

  • generate key for user1
ssh-keygen -t dsa -b 1024
  • then propagate the key to user2
ssh-copy-id -i ~/.ssh/id_dsa.pub user2@localhost

kernel recompilation

Patches that I use:

web statistics: awstats

apt-get install awstats libnet-ip-perl libgeo-ipfree-perl
cd /etc/awstats
cp awstats.conf awstats.www.courville.org.conf
  • add the following plugins in /etc/awstats/awstats.conf geoipfree and Tooltips
SkipHosts="127.0.0.1 REGEX[^192\.168\.] localhost REGEX[^.*\.localdomain$] REGEX[^.*\.courville.org$]"
SiteDomain="www.courville.org"
LogFile="/var/log/apache2/access.log"
LogFormat=1
  • add apache configuration file /etc/apache2/conf.d/awstats to secure icon path
Alias /awstats-icon /usr/share/awstats/icon
<Directory /usr/share/awstats/icons>
  php_flag register_globals off
  Options Indexes FollowSymLinks
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  </IfModule>
</Directory>
  • update permission in /var/log/apache2 to allow user www-data to read access logs
 chmod a+r /var/log/apache/access*
  • change log file reference to apache2 in cron /etc/cron.d/:
0,10,20,30,40,50 * * * * www-data [ -x /usr/lib/cgi-bin/awstats.pl -a -f /etc/awstats/awstats.conf -a -r /var/log/apache2/access.log ] && /usr/lib/cgi-bin/awstats.pl -config=awstats -update >/dev/null
  • in order to process old log files one can use according the FAQ the following tip:
 LogFile="/usr/share/doc/awstats/examples/logresolvemerge.pl /tmp/logs/access.log.* |"

backuppc

The solution to backups: backuppc

 apt-get install backuppc
 apt-get install libfile-rsync-perl libfile-rsyncp-perl
  • modify /etc/backuppc/loclhost.pl in order to define all the regexps for the backups in file incexcl-hyperion
$Conf{XferMethod} = 'rsync';
$Conf{RsyncShareName} = '/' ;
$Conf{RsyncArgs} = [
  '--numeric-ids',
  '--perms',
  '--owner',
  '--group',
  '--devices',
  '--links',
  '--times',
  '--block-size=2048',
  '--recursive',
  '--exclude-from=/etc/backuppc/incexcl-hyperion',
  '--exclude-from=/etc/backuppc/incexcl-global',
];
$Conf{RsyncRestoreArgs} = [
  '--numeric-ids',
  '--perms',
  '--owner',
  '--group',
  '--devices',
  '--links',
  '--times',
  '--block-size=2048',
  '--relative',
  '--ignore-times',
  '--recursive',
];
  • generate ssh keys for root and backuppc and grant access for backuppc user to root
ssh-keygen -t rsa
cp ~/.ssh/id_rsa.pub ~/.ssh/BackupPC_id_rsa.pub
touch ~/.ssh/authorized_keys
cat BackupPC_id_rsa.pub >> ~/.ssh/authorized_keys
  • add in front of the authorized_keys from "hyperion.courville.org" before the ssh-rsa to limit access to host.
  • note: you need to copy /etc/backuppc/incexcl-* file to all hosts to backup
Personal tools