Tu môžete vidieť rozdiely medzi vybranou verziou a aktuálnou verziou danej stránky.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
dev:omega:terminal:install [2015/06/24 22:08] Stanislav Nízky |
dev:omega:terminal:install [2018/09/24 18:27] (aktuálne) Stanislav Nízky |
||
|---|---|---|---|
| Riadok 19: | Riadok 19: | ||
| Konfiguracia NTP | Konfiguracia NTP | ||
| <code> | <code> | ||
| + | </code> | ||
| + | |||
| + | editovat subor /etc/default/keyboard pre zmenu jazyka klavesnice | ||
| + | <code> | ||
| + | XKBLAYOUT="us" | ||
| </code> | </code> | ||
| Riadok 33: | Riadok 38: | ||
| <code bash> | <code bash> | ||
| sudo chmod +x /etc/init.d/asplash | sudo chmod +x /etc/init.d/asplash | ||
| - | sudo chmod a+x /etc/init.d/asplashscreen | + | sudo chmod a+x /etc/init.d/asplash |
| - | sudo insserv /etc/init.d/asplashscreen | + | sudo insserv /etc/init.d/asplash |
| + | |||
| + | sudo update-rc.d asplash defaults | ||
| + | sudo update-rc.d asplash enable | ||
| </code> | </code> | ||
| Riadok 103: | Riadok 111: | ||
| ---- | ---- | ||
| == Nastavenie zakladneho snmpd == | == Nastavenie zakladneho snmpd == | ||
| - | V subore /etc/snmpd.conf zmenime community password | + | V subore /etc/snmpd.conf zmenime community password a zopar premennych |
| <code> | <code> | ||
| - | rocommunity public727 default -V systemonly | + | agentAddress udp:161 |
| - | rocommunity public727 localhost | + | rocommunity public727 |
| - | rocommunity public727 192.168.192.0/24 | + | |
| sysLocation Behind the TV | sysLocation Behind the TV | ||
| Riadok 113: | Riadok 120: | ||
| # Application + End-to-End layers | # Application + End-to-End layers | ||
| sysServices 72 | sysServices 72 | ||
| + | </code> | ||
| + | FIXME potrebujeme pridat vlastne rozsirenia cez extend | ||
| + | |||
| + | FIXME Nasledujuca cast len pre zariadenia, ktore neboli instalovane so snmpd od zaciatku! | ||
| + | zo servera | ||
| + | <code> | ||
| + | cd /root | ||
| + | scp -r piconf pi00x:/home/pi/ | ||
| + | ssh pi00x 'cd piconf && sudo sh install' | ||
| + | </code> | ||
| + | a na danom pi00x uz nebude nutne, ale je to alternativa | ||
| + | <code> | ||
| + | sudo cp /home/pi/snmpd_deb/*.deb /var/cache/apt/archives/ | ||
| + | sudo apt-get install snmpd snmp | ||
| + | sudo cp /home/pi/snmpd.conf /etc/snmp/snmpd.conf | ||
| + | </code> | ||
| + | |||
| + | == Pridanie do muninu == | ||
| + | Na serveri vykoname | ||
| + | <code> | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__cpuload' '/etc/munin/plugins/snmp_pi00x_cpuload' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__df' '/etc/munin/plugins/snmp_pi00x_df' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__df_ram' '/etc/munin/plugins/snmp_pi00x_df_ram' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__if_' '/etc/munin/plugins/snmp_pi00x_if_2' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__if_err_' '/etc/munin/plugins/snmp_pi00x_if_err_2' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__if_multi' '/etc/munin/plugins/snmp_pi00x_if_multi' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__load' '/etc/munin/plugins/snmp_pi00x_load' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__memory' '/etc/munin/plugins/snmp_pi00x_memory' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__netstat' '/etc/munin/plugins/snmp_pi00x_netstat' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__processes' '/etc/munin/plugins/snmp_pi00x_processes' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__swap' '/etc/munin/plugins/snmp_pi00x_swap' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__uptime' '/etc/munin/plugins/snmp_pi00x_uptime' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__users' '/etc/munin/plugins/snmp_pi00x_users' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__winload' '/etc/munin/plugins/snmp_pi00x_winload' | ||
| + | ln -s '/usr/libexec/munin/plugins/snmp__winmem' '/etc/munin/plugins/snmp_pi00x_winmem' | ||
| </code> | </code> | ||
| ---- | ---- | ||
| Riadok 118: | Riadok 160: | ||
| Zvysok je z predoslej verzie => OBSOLETE | Zvysok je z predoslej verzie => OBSOLETE | ||
| - | |||
| ---- | ---- | ||
| + | Postup aj s redundatnymi prikazmi na instalaciu CEC - posielanie prikazov po hdmi kabli. | ||
| + | |||
| + | <code> | ||
| + | #update your raspberry to jessie (needed for c++11) | ||
| + | sudo apt-get update | ||
| + | sudo apt-get upgrade | ||
| + | sudo apt-get dist-upgrade | ||
| + | sudo sed -i /deb/s/wheezy/jessie/g /etc/apt/sources.list | ||
| + | sudo sed -i /deb/s/wheezy/jessie/g /etc/apt/sources.list.d/*.list | ||
| + | sudo apt-get update | ||
| + | sudo apt-get upgrade | ||
| + | sudo apt-get dist-upgrade | ||
| + | |||
| + | #reboot | ||
| + | sudo reboot | ||
| + | |||
| + | sudo apt-get install cmake | ||
| + | #get libcec: | ||
| + | git clone git://github.com/Pulse-Eight/libcec.git | ||
| + | git clone git://github.com/Pulse-Eight/platform.git | ||
| + | |||
| + | cd platform | ||
| + | mkdir build | ||
| + | cd build | ||
| + | cmake .. | ||
| + | sudo make install | ||
| + | |||
| + | #force libcec to use c++11 | ||
| + | edit the CMakeLists.txt | ||
| + | add following line: | ||
| + | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
| + | |||
| + | #install | ||
| + | mkdir build | ||
| + | cd build | ||
| + | cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib -DCMAKE_INSTALL_PREFIX:PATH=/usr .. | ||
| + | make | ||
| + | sudo make install | ||
| + | sudo ldconfig | ||
| + | |||
| + | #check if installation worked | ||
| + | cec-client -l | ||
| + | </code> | ||
| + | |||
| + | Na instalaciu mozne pouzit tento script | ||
| + | <code> | ||
| + | #!/bin/bash | ||
| + | |||
| + | # This script is intended to install the latest version of libcec on a Pi running Raspbian | ||
| + | # It has been tested on Pi1 & Pi2 using the latest Raspbian as of 26/7/2015 and CEC version 3.0.1 | ||
| + | |||
| + | # To run this file "bash /xxxx/TRANSCEND/libcecinstall.sh" where xxxx is the directory where this file is held | ||
| + | # or "rm /tmp/libcecinstall.log -f && bash /xxxx/TRANSCEND/libcecinstall.sh |& tee /tmp/libcecinstall.log" if you want a log file | ||
| + | |||
| + | # Thanks to Alexander P, Sam Nazarko, nlrb & gkreidl for the inputs that enabled me to get this working | ||
| + | |||
| + | COLOUR='\033[0;31m' # Red | ||
| + | NC='\033[0m' # No Color | ||
| + | |||
| + | echo | ||
| + | echo -e ${COLOUR}"Running libcec installation script${NC}" | ||
| + | echo | ||
| + | |||
| + | echo "Installing the prerequisites for building libcec:" | ||
| + | sudo apt-get install git cmake g++-4.8 checkinstall liblockdev1-dev libudev-dev libxrandr-dev python-dev swig | ||
| + | sudo apt-get install libraspberrypi-dev | ||
| + | echo | ||
| + | echo -e ${COLOUR}"Cloning the Pulse-Eight libcec repository:"${NC} | ||
| + | echo | ||
| + | mkdir /home/pi/libcecworkarea | ||
| + | cd /home/pi/libcecworkarea | ||
| + | git clone --recursive https://github.com/Pulse-Eight/libcec.git | ||
| + | echo | ||
| + | echo -e ${COLOUR}"Creating the cec platform library:"${NC} | ||
| + | echo | ||
| + | cd /home/pi/libcecworkarea/libcec/src/platform | ||
| + | mkdir build | ||
| + | cd build | ||
| + | cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=1 -DCMAKE_CXX_COMPILER=g++-4.8 .. | ||
| + | make | ||
| + | sudo make install | ||
| + | echo | ||
| + | echo -e ${COLOUR}"Building libcec:"${NC} | ||
| + | echo | ||
| + | cd /home/pi/libcecworkarea/libcec | ||
| + | mkdir build | ||
| + | cd build | ||
| + | export LIBRARY_PATH=/opt/vc/lib | ||
| + | cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib -DCMAKE_CXX_COMPILER=g++-4.8 -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=1 .. | ||
| + | make | ||
| + | sudo -E bash -c 'make install' | ||
| + | echo | ||
| + | echo -e ${COLOUR}"libcec installation script completed\n"${NC} | ||
| + | echo | ||
| + | </code> | ||
| + | |||
| + | <code> | ||
| + | # turn off | ||
| + | echo 'standby 0' | cec-client -s | ||
| + | # and back on | ||
| + | echo 'on 0' | cec-client -s | ||
| + | echo 'as' | cec-client -s | ||
| + | </code> | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | Špeciálne pre NOU, ale s výhľadom pre všetkých: | ||
| + | Na SD karte v adresári /boot/Garsius/ sa nachádzajú skripty, ktoré sa dajú editovať z windows pomocou čítačky. Nie je tak potrebné riešiť Linux a práva. | ||
| + | |||
| + | Zmazaním súboru /boot/Garsius/rc_done sa aktivuje funkcia, kedy pri štarte sa podľa MAC adresy Raspberry priradí IP adresa a názov RPi. Nastavenia všetkých MAC adries sú v súbore /boot/Garsius/ip_list_eth.txt | ||
| + | Vykoná sa to pomocou skriptu /boot/Garsius/rc.sh, ktorý sa spustí len raz a znova sa zablokuje vytvorením súboru rc_done. | ||