Private
Public Access
11
1

Install Computer with Debian 13 hinzugefügt

2025-08-19 15:28:19 +02:00
parent aac4a1f24c
commit 592eaef99e

@@ -0,0 +1,201 @@
**Prepare Computer**
For use with Orocos. Orchestra and Comedi libraries are no longer required to be installed. Note that Comedi is now included in the Linux kernel and so you will see the Comedi name in a few places.
- Install a Debian 12 Desktop 64 Bit, username: control with sudo permissions (add control to group sudo and to dialout)
```
su -
apt install sudo
usermod -a -G sudo,dialout control
```
log out and login again to make changes effective
- disable sleep modes in /etc/systemd/sleep.conf
```
[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no
```
- set NTP server (if defaults are not working) in /etc/systemd/timesyncd.conf
```
[Time]
NTP=d.psi.ch
```
- Add various packages:
```
sudo apt-get install fakeroot build-essential flex bison openssh-server git-core geany synaptic joe jed autoconf-archive cmake libreadline-dev libhdf5-dev pkg-config libxml2-dev libzmq3-dev liblog4cpp5-dev libelf-dev libssl-dev libarchive-dev libgtkmm-3.0-dev libatkmm-1.6-dev libglibmm-2.4-dev libncurses5-dev libxerces-c-dev libboost-dev xsltproc cifs-utils xterm meld default-jre autogen autoconf libtool libqwt-qt5-dev libqt5webkit5-dev rsync libboost-all-dev strace python3-numpy python3-pip python3-h5py python3-zmq python3-matplotlib python3-attr python3-scipy hdf5-tools dbus-x11 nfs-common nfs-kernel-server nfs4-acl-tools python3-pyepics locate debhelper quilt bc pahole libcomedi-dev python3-pyqt5 python3-pyqtgraph
#this is only needed if you install the server version of debian (without initial gnome support)
sudo apt install gnome-terminal
#if you need tango support
sudo apt install libtango-dev
```
- Install a realtime kernel
```
#this installs a realtime kernel
sudo apt-get install linux-image-rt-amd64 linux-headers-rt-amd64
#this disables automatic kernel updates by removing the kernel meta-packages (the specific kernel packages remain installed). We do this to avoid problems with unexpected kernel updates and missing modules, as they would have to be recompiled for a new kernel version (e.g. comedi, ethercat...)
sudo apt remove linux-image-amd64 linux-image-rt-amd64 linux-headers-rt-amd64
```
- Install Orocos
```
mkdir ~/Basesystem
cd ~/Basesystem
git clone --recursive https://github.com/orocos-toolchain/orocos_toolchain.git
cd orocos_toolchain
export CXXFLAGS="-std=c++14"
./configure --prefix=/home/control/orocos
## joe ~/Basesystem/orocos_toolchain/log4cpp/include/log4cpp/LayoutAppender.hh
## and add #include <time.h>
make
make install
cp setup.sh ~/orocos/
```
- get the software from the repository, including the System Installation files:
```
cd
mkdir work
cd work
git clone https://gitlab.psi.ch/microspectro/pixelator.git stxm
```
- Compile Epics
```
cd /usr/local/
sudo mkdir epics
cd epics/
sudo chown control .
wget https://epics.anl.gov/download/base/base-7.0.8.1.tar.gz
tar xfvz base-7.0.8.1.tar.gz
rm base-7.0.8.1.tar.gz
cd base-7.0.8.1
make
# edit /etc/bash.bashrc
export PATH="$PATH:/usr/local/epics/base-7.0.8.1/bin/linux-x86_64"
export EPICS_CA_ADDR_LIST="sls-x07da-cagw.psi.ch:5822"
## ^^ Change depending on your CA gateway, or leave blank and
## export EPICS_CA_AUTO_ADDR_LIST=True
sudo cp ~/work/stxm/SystemInstall/epics/epics-7.0.6.conf /etc/ld.so.conf.d
# edit to match lib Path
sudo ldconfig
```
- Install PI libs (only if needed)
```
cd ~/Basesystem
tar xfvj ../work/stxm/SystemInstall/HW-Libs/PI_Application_Software-1.17.0.1-INSTALL.tar.bz2
cd PI_Application_Software/
sudo ./INSTALL
#n
#y 64 bit lib
#n USB rights
#y PiPython
#y Stage Database
#y PiTerminal 64
#n USB rights
```
- Make comedi devices accessible for all users
```
sudo cp ~/work/stxm/SystemInstall/comedi/99-comedi.rules /etc/udev/rules.d/
```
- Install Intens
```
cd /usr/local
sudo mkdir intens
sudo tar xfvz ~/work/stxm/SystemInstall/intens/intens-4.5.15-snapshot-64-qt5.tar.gz
sudo cp ~/work/stxm/SystemInstall/intens/libpython3.8.so.1.0 /lib/x86_64-linux-gnu/
```
- compile Pixelator
Warning: Running compile jobs in parallel (i.e. using the `make -j#` option with #>1) can cause compile errors, especially for PixelatorGUI.
```
cd ~/work/stxm
autoreconf -i
mkdir build
cd build
../configure
make
cd PixelatorController/config/
make # for the config files
cd ../../PixelatorGUI/config/
make
```
- test Pixelator (no Hardware)
```
# run Controller in 1st Terminal
cd ~/work/stxm/build/PixelatorController
./src/PixelatorController-bin config/settingsNoHardware.json
# run GUI in 2nd Terminal
cd ~/work/stxm/build/PixelatorGUI
./scripts/PixelatorGUI-nH # -nH for no Hardware uses Ports 56561 and 56562
```
- compile Orocos modules
```
. ~/orocos/setup.sh
cd ~/work/stxm/PixelatorRealtime/
make
make install
```
- adapt the [Orocos configuration](Orocos-Configuration)
- install shellbox to run orocos as service
```
cd ~/work/stxm/SystemInstall/shellbox/procServ
autoreconf -i
mkdir build
cd build
../configure --disable-doc
make
sudo make install
cd ~/work/stxm/SystemInstall/shellbox/gfa-shellbox
sudo ./install.sh
# use your config file
sudo cp src/shellbox-PolLux.conf /etc/shellbox.conf
sudo shellbox start all
# to connect to orocos
telnet localhost 50001
# ^x to kill and restart
# ^d to close telnet connection
```
- copy startup scripts
```
cp -a ~/work/stxm/SystemInstall/PolLux/StartupScripts/ ~
```
When testing a new install of Pixelator, you can get extra messages by [editing log4cpp.properties](PixelatorControllerSettings#log4cpp-properties) to include the line `log4cpp.rootCategory=DEBUG, stdout`.