..
Category : linux
If you want to see the XML for the entire VM, using: The edited sections will look like this: and To automount this on VM startup, y..
Examp..
..
change it from NAT to your newly defined bridge, br0: And start the VM After the VM is started, run ifconfig and you’ll see the DHCP address from your network’s router or pfsense, etc. In this case it’s: 10.1.10.239 – Get the ether hardware IP and set up your own static IP rules, etc. Good ..
Download the image writer from https://wiki.radxa.com/Rockpi4/downloads Run it as administrator: Select the image Write it to the card Wait for it to verify Stick it into the rock pi Boot up If it’s the right image, you’ll see both a green light on the rock pi, and a smaller blue light that starts flashing, meaning ..
..
..
How to renew a domain using DNS: The error: “none of the preferred challenges are supported by the selected plugin” Switch to –manual and switch to use DNS: Edit the domain online, add a T..
..
The fix: Also, if you see this: [ERROR DirAvailable–var-lib-etcd]: /var/lib/etcd is not e..
..
The error: The connection to the server IP:6443 was refused – did you specify the right host or port? Also make this ..
Pos..
Abstract This article is a recollection of fun memories from the Guinness World Record Scuba Diving Event with Allen “The Grouper” Sherrod, and my personal involvement in building an underwater live streaming system to broadcast the event live to the world. In the end, Allen Sherrod broke the world record! Here’s how we did it. ..
Set up the subdomain forward, and wait for it to propagate. When you can ping the domain, it’s ready. Be root Edit config file that’s available. nano /etc/nginx/sites-available/server.research.example.com Link it from available to enabled: Create empty dir to serve subdomain: Restart nginx Make sure you can hit the URL over http (https not quite yet) ..
..
..
..
I recommend this: https://github.com/cubieplayer/Cubian/wiki/Install-Cubian Grab the HDMI image from http://cubian.org/downloads/ , like this one: http://cubieplayer.github.io/static_files/torrents/Cubian-nano-x1-a20-cubietruck-hdmi.img.7z.torrent Download it. Unzip it. Burn the .img file to a USB drive using Win32DiskImager: put it in the cubietruck, boot with it go through the setup, advanced, enable ssh server, save, exit Do everything here as root Check your version Edit the sshd confi ..
..
..
..
Download: https://db.apache.org/derby/releases/release-10_15_2_0.cgi create database mylocaldb maven: <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> <version>10.15.2.0</version> </depe..
The final product Setting up serial on the RPi Enable serial communication and disable login over serial, which you likely don’t need. sudo nano /boot/config.txt # add this line at the bottom, or make sure it’s set to 1: enable_uart=1 # reboot shutdown -r now # remove the login service over serial sudo systemctl stop ..
#!/bin/bash THEPATH=/mnt/d1 LIVEFILE=live while true do # if file exists, move it if [ ! -f $THEPATH/$LIVEFILE ]; then echo “ERROR: File not found so I can’t move it fore you, at $THEPATH/$LIVEFILE” else mv $THEPATH/$LIVEFILE $THEPATH/`date +%Y.%m.%d_%H.%M.%S.h264` fi FREEMEGS=` df $THEPATH | awk ‘{print $2}’ | grep -v 1K-blocks ` echo “Free megs: $FREEMEGS ..
Get the Windows binaries – ex: https://ffmpeg.zeranoe.com/builds/ -> download ex: https://ffmpeg.zeranoe.com/builds/win32/shared/ Unzip it, add the path of ffmpeg to your PATH variable, start command prompt, test that ffmpeg works, ex: ffmpeg –help To grab your stream from an already running camera, make sure the entire url works, i.e. don’t just use /stream, use /stream/video.mjpeg Control + C to ..
Credits: https://www.assetbank.co.uk/support/documentation/install/ffmpeg-debian-squeeze/ffmpeg-debian-jessie/ cd ~ mkdir software cd software/ wget http://ffmpeg.org/releases/ffmpeg-2.7.2.tar.bz2 cd src/ tar xvjf ../ffmpeg-2.7.2.tar.bz2 cd ffmpeg-2.7.2/ ./configure \ –enable-gpl \ –enable-libfaac \ –enable-avfilter \ –enable-libmp3lame \ –enable-libtheora \ –enable-libopenjpeg \ –enable-libvorbis \ –enable-libx264 \ –enable-libspeex \ –enable-nonfree –enable-postproc \ –enable-pthreads \ –enable-shared \ –enable-swscale \ make # wait a couple ..
#! /bin/bash # VBR=”3500k” # Bitrate FPS=”35″ # FPS QUAL=”fast” # ultrafast superfast veryfast faster fast medium slow slower veryslow YOUTUBE_URL=”rtmp://a.rtmp.youtube.com/live2″ # URL for YouTube RTMP SOURCE=”http://192.168.0.52:8080/stream/video.mjpeg” # Source UDP (this rpi ifconfig) KEY=”abcd-1234-????-????” # your YouTube key ffmpeg \ -re -threads 4 \ -i “$SOURCE” \ -f lavfi -i anullsrc \ -acodec libmp3lame -ar ..
How to mount a remote directory onto the local pi computer: Install SSH file system tools: # Add user pi to the fuse group: sudo gpasswd -a pi fuse Log out from the system. Reconnect as user pi. # make dir sudo mkdir /mnt/pimount # change ownership sudo chown pi:pi /mnt/pimount # mount ..
# be root sudo su # install utils apt-get install ntfs-3g root@pi2:/home/pi# blkid /dev/mmcblk0p1: SEC_TYPE=”msdos” LABEL=”boot” UUID=”7D5C-A285″ TYPE=”vfat” /dev/mmcblk0p2: UUID=”5d18be51-3217-4679-9c72-a54e0fc53d6b” TYPE=”ext4″ /dev/sda1: LABEL=”TinyTerra1″ UUID=”C642B17842B16E35″ TYPE=”ntfs” # create mount dir mkdir /mnt/d1 # edit fstab nano /etc/fstab # add: # drive 1 terra UUID=”C642B17842B16E35″ /mnt/d1 ntfs defaults,errors=remount,rw 0 1 # mount it mount ..
..
# make the dir mkdir /mnt/mount1 # list the drives ls -l /dev/disk/by-uuid/ total 0 lrwxrwxrwx 1 root root 15 May 6 2015 13d368bf-6dbf-4751-8ba1-88bed06bef77 -> ../../mmcblk0p2 lrwxrwxrwx 1 root root 15 May 6 2015 15CD-3B79 -> ../../mmcblk0p1 lrwxrwxrwx 1 root root 10 Dec 6 22:22 ba20caf8-6ef0-42e7-9e45-4187bfa8e543 -> ../../sda1 # get the ID, ex: ba20caf8-6ef0-42e7-9e45-4187bfa8e543 # ..
install samba sudo apt-get install samba # below, replace johnsmith with your user id that you want to connect to samba (i.e. not “pi”) # create a new group called samba sudo groupadd samba # create a system user who should have samba access, set all default info, and a password sudo adduser –no-create-home –disabled-password –disabled-login ..
sudo apt purge xserver* lightdm* raspberrypi-ui-mods vlc* lxde* chromium* desktop* gnome* gstreamer* gtk* hicolor-icon-theme* lx* mesa* sudo apt ..
sudo su nano cleanup.sh Paste this: # GUI-related packages – credits: https://gist.githubusercontent.com/samatjain/4dda24e14a5b73481e2a/raw/5d9bac8ec40b94833b4e9938121945be252fdee1/Slim-Raspbian.sh pkgs=” xserver-xorg-video-fbdev xserver-xorg xinit gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-libav epiphany-browser lxde lxtask menu-xdg gksu xserver-xorg-video-fbturbo xpdf gtk2-engines alsa-utils netsurf-gtk zenity desktop-base lxpolkit weston omxplayer raspberrypi-artwork lightdm gnome-themes-standard-data gnome-icon-theme qt50-snapshot qt50-quick-particle-examples ” # Edu-related packages pkgs=”$pkgs idle python3-pygame python-pygame python-tk idle3 python3-tk ..
create directory mydrive, which is where we’ll mount the attached drive sudo mkdir /mnt/mydrive change permissions sudo chown -R pi:pi /mnt/mydrive sudo chmod -R 775 /mnt/mydrive/ look up the block id of the drive sudo blkid /dev/mmcblk0p1: SEC_TYPE=”msdos” LABEL=”boot” UUID=”2D2D-CD16″ TYPE=”vfat” PARTUUID=”eea0d6a7-01″ /dev/mmcblk0p2: UUID=”2f840c69-cecb-4b10-87e4-01b9d28c231c” TYPE=”ext4″ PARTUUID=”eea0d6a7-02″ /dev/mmcblk0: PTUUID=”eea0d6a7″ PTTYPE=”dos” /dev/sda1: LABEL=”500g02″ UUID=”D4BE5EA9BE5E83C0″ TYPE=”ntfs” PARTUUID=”e7f2080e-01″ Look ..
# install pip sudo su cd curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python get-pip.py pip –version # install DHT libraries sudo pip install Adafruit_Python_DHT # https://github.com/adafruit/Adafruit_Python_DHT/issues/63 sudo apt-get update sudo apt-get install rpi.gpio sudo apt-get install python3-rpi.gpio sudo apt-get install build-essential python3-dev sudo apt-get install python3-setuptools sudo apt-get install libzbar-dev libzbar0 git clone https://github.com/adafruit/Adafruit_Python_DHT.git cd Adafruit_Python_DHT sudo ..
Without the library, you can get this error: Could not locate the Phidget C library (libphidget22java.so). Make sure it is installed, and add it’ s path to LD_LIBRARY_PATH. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1320) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] ..
#!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin start() { cd /opt/tomcat/current/bin/ /bin/su pi /opt/tomcat/current/bin/startup.sh } stop() { /bin/su pi /opt/tomcat/current/bin/shutdown.sh } case $1 in start|stop) $1;; restart) ..
First make sure we added the admin user: nano /opt/apache-tomcat-9.0.0.M18/conf/tomcat-users.xml Add this at the bottom of the config: <role rolename=”manager-gui”/> <role rolename=”admin”/> <role rolename=”admin-gui”/> <role rolename=”manager-script”/> <role rolename=”manager”/> <user username=”admin” password=”yoursecretpasswordhere” roles=”admin,manager-gui,admin-gui,manager,manager-script,manager-status”/> </tomcat-users> Next, to allow remote login from different IPs… Make sure we’re shut down: /opt/apache-tomcat-9.0.0.M18/bin/shutdown.sh Check processes: ps aux | grep tomcat ..
#!/bin/bash if [ -z “$1” ]; then echo echo usage: $0 network-interface [delay in seconds] echo echo e.g. $0 eth0 echo e.g. $0 wlan0 30 echo exit fi if [ -z “$2” ]; then DELAY=5 echo “Using default, showing bandwidth usage every $DELAY seconds” else DELAY=1 fi IF=$1 while true do R1=`cat /sys/class/net/$1/statistics/rx_bytes` T1=`cat /sys/class/net/$1/statistics/tx_bytes` ..
/home/pi/live.sh #!/bin/bash # Rotation # raspivid –nopreview –rotation 180 -o – -t 9999999 -b 3000000 -w 1280 -h 720 | cvlc –ffmpeg-hw -vvv stream:///dev/stdin –sout ‘#rtp{sdp=rtsp://:8554}’ :demux=h264 raspivid –nopreview -o – -t 9999999 -b 3000000 -w 1280 -h 720 | cvlc –ffmpeg-hw -vvv stream:///dev/stdin –sout ‘#rtp{sdp=rtsp://:8554}’ :demux=h264 /etc/init.d/startcam #! /bin/sh ### BEGIN INIT INFO ..
You don’t need any pull up or pull down resistors, use pull_up_down=GPIO.PUD_DOWN instead. The setup: The wiring: The test program: test.py # Door open/closed detector # # (c) Alan Lupsha 2020 # wiki.lupsha.com import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) # GPIO Numbers instead of board numbers MAGNET_GPIO = 18 GPIO.setup(MAGNET_GPIO, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) # GPIO ..
Install: sudo apt-get install dnsutils and check: dig +short myip.opendns.com @resolver1.o..
You need to install JDK8 because JDK11 and others won’t work. Otherwise, you’ll get errors like this one: Server VM is only supported on ARMv7+ VFP Install: sudo apt-get install openjdk-8-jre-headless openjdk-8-jdk-headless Verify: root@door:/home/pi/programs/doorswitch# javac -version javac 1.8.0_212 root@door:/home/pi/programs/doorswitch# java -version openjdk version “1.8.0_212” OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1+rpi1-b01) OpenJDK Client VM (build 25.212-b01, mixed ..
Source: https://github.com/ttww/JavaFrameBuffer The error: pi@pi2 ~/jfb $ javah -d src/main/c -classpath bin org.tw.pi.framebuffer.FrameBuffer Error: Could not find class file for ‘org.tw.pi.framebuffer.FrameBuffer’. The fix: #!/bin/sh jniResult=libFrameBufferJNI.so # Make sure to update these to your correct JDK path jniJdkHeader=/opt/jdk/current/include jniSysHeader=/opt/jdk/current/include/linux rm “$jniResult” echo “here is the correct compile command” javah -d src/main/c -classpath src/main/java org.tw.pi.framebuffer.FrameBuffer # rm ..
# install maven and git sudo apt-get update && sudo apt-get install -y maven git verify install pi@door:~ $ git –version git version 2.20.1 pi@door:~ $ mvn –version Apache Maven 3.6.0 Maven home: /usr/share/maven Java version: 1.8.0_212, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-8-openjdk-armhf/jre Default locale: en_GB, platform encoding: UTF-8 OS name: “linux”, version: “5.4.79+”, arch: “arm”, ..
Also see: https://wiki.lupsha.com/raspberry-pi-3-setting-up-a-phidgets-voltage-reader-2/ #!/bin/bash # # hits the sensorreading app and grabs sensor raw value, and computes it, per phidgets 1117 raw to voltage # # Alan Lupsha 10/20/2019 # # hit the API and get the reading # # ex: {“userCommand”:”/sensor/0″,”errors”:[],”workLog”:[],”port”:{“index”:0,”value”:584}} # READING=`curl –silent -H “Accept: application/json” http://10.1.10.12:50003/sensor/0` echo “API reading: $READING” # # ..
Turns out you need a powered USB hub, otherwise the Pi 3 won’t see the Phidgets 8/8/8 board. The setup: Pi3 Phidgets 8/8/8 board ( https://www.phidgets.com/?tier=3&prodid=16 ) Phidgets 1117 voltage sensor https://www.phidgets.com/?&prodid=88 Rosewill self-powered 7 port USB hub https://www.newegg.com/rosewill-rhub-300-usb/p/N82E16817182057 Once a self-powered USB hub is provided, the Phidgets IO board is detected: Setting up the Pi: sudo su apt-get ..
#!/bin/bash # SET THIS! This is the URL to your large file that # you’re downloading over and over again URL=http://192.168.0.10/test/a # use wget to grab the file, redirect to dev null: COUNTER=0 TOTAL=0 while true; do GB=$((TOTAL >> 30)) MB=$((TOTAL >> 20)) echo “Run #$COUNTER at `date` Total downloaded $MB MB, $GB GB” wget ..
sudo su # enable zabbix on system boot systemctl enable zabbix-server.service # stop the server systemctl stop zabbix-server # check status systemctl status zabbix-server.service # start it systemctl stop zabbix-server # check status systemctl status zabbix-server.service # disable SELinux sestatus sudo setenforce 0 sudo shutdown -r now sudo su sestatus # iptables yum install iptables-services ..
# Install Xen: sudo apt-get update sudo apt-get upgrade sudo apt-get install xen-system # Edit interfaces sudo nano /etc/network/interfaces # and add the xen bridge: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto ..
systemctl restart system..
#!/bin/sh LOG=/tmp/syncSvn.log SOURCE=/home/svn/dev/ DESTINATION=/mnt/d3/myd3/home/svn/dev EMAIL=root@localhost START=$(date +%s) echo “” > $LOG echo “Start ” >> $LOG echo `date` >> $LOG echo “Now beginning sync $SOURCE to $DESTINATION ” >> $LOG rsync –verbose –archive –recursive –delete-during –human-readable –progress –itemize-changes $SOURCE $DESTINATION >> $LOG echo “Finished sync $SOURCE to $DESTINATION ” >> $LOG echo “Checking SOURCE $SOURCE ..
..
# install it sudo apt install squid # back up config sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.original sudo nano /etc/squid/squid.conf # edit stuff per https://ubuntu.com/server/docs/proxy-servers-squid # or leave default port 3128 Example config: acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl Safe_ports ..
First set up Nginx to recognize your domain, etc. mydomain.example.com , assume this server is called gateway, so gateway.mydomain.example.com sudo nano /etc/hosts 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters 127.0.1.1 mydomain.example.com gateway gateway.mydomain.example.com Install postfix: sudo apt-get update; sudo apt-get install postfix Internest Site → gateway.mydomain.example.com → # Update your /etc/mailname file with your ..
# How to install and set up Nagios # read how-to: http://nagios.sourceforge.net/docs/3_0/quickstart.html sudo apt-get install apache2 sudo apt-get install libapache2-mod-php5 sudo apt-get install build-essential # get data about your operating system: uname -a lsb_release -a # With Ubuntu 6.10, install the gd2 library with this command: # sudo apt-get install libgd2-dev # With Ubuntu 7.10, ..
In this example, we have a directory with a lot of files which have no extension. We need to add “.jpg” at the end of each file name. We’re using Git Bash in Windows because we can do it in 1 line. First, do this so that files with spaces in the name are not ..
# go to your home dir and download it cd ~ wget http://apache.cs.utah.edu/tomcat/tomcat-9/v9.0.22/bin/apache-tomcat-9.0.22.tar.gz tar xzvf apache-tomcat-9.0.22.tar.gz # make destination dir sudo mkdir /opt/tomcat # move unpackaged dir from home to /opt sudo mv ~/apache-tomcat-9.0.22 /opt/tomcat/ # create symlink to current so we only use /opt/tomcat/current in the future sudo ln -s /opt/tomcat/apache-tomcat-9.0.22/ /opt/tomcat/current # create ..
Listed at: https://packages.debian.org/stretch/firmware-misc-nonfree Need: firmware-misc-nonfree_20161130-5_all.deb see: https://packages.debian.org/stretch/all/firmware-misc-nonfree/download Get the deb file from: http://ftp.us.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-misc-nonfree_20161130-5_all.deb Copy firmware-misc-nonfree_20161130-5_all.deb to a USB stick. On the linux box: Find your USB stick: sudo fdisk -l In my case it’s /dev/sdf1 Mount it and run the file mkdir /mnt/myusb mount /dev/sdf1 /mnt/myusb cp /mnt/myusb/firmware-misc-nonfree_20161130-5_all.deb /root cd /root deb -i firmware-misc-nonfree_20161130-5_all.deb Find ..
The WordPress “Health Status” says it’s missing some plugin: # check the PHP version that we have running: root@server:/opt/web/mysite.com# php –version PHP 7.4.12 (cli) (built: Nov 3 2025 14:32:41) ( NTS ) Find your version. And then: # get what’s missing for our PHP version: apt-get install php7.4-curl apt-get install php7.4-mbstring apt-get install php..
# install apt install php7.3-fpm apt install nginx # you need the mysql libraries to connect to mysqli(host, user, pass, instance) apt install php7.3-mysql # edit nginx to use php nano /etc/nginx/sites-enabled/default # Replace this: location / { # First attempt to serve request as file, then # as directory, then fall back to displaying ..
Keycloak is an open source software product to allow single sign-on with Identity and Access Management aimed at modern applications and services. As of March 2018 this WildFly community project is under the stewardship of Red Hat who use it as the upstream project for their RH-SSO product. # install java sudo apt install -y ..
sudo apt install python3.8 -y sudo apt install xdg-utils wget xz-utils -y sudo apt install libnss3 -y sudo apt-get install xorg openbox -y sudo apt-get install ubuntu-desktop -y mkdir ~/tmp cd ~/tmp wget https://download.calibre-ebook.com/4.17.0/calibre-4.17.0-x86_64.txz sudo mkdir -p /opt/calibre sudo rm -rf /opt/calibre/* sudo tar xvf ~/tmp/calibre-4.17.0-x86_64.txz -C /opt/calibre sudo /opt/calibre/calibre_p..
If you don’t have java, install it: # install java sudo apt-get install openjdk-7-jdk java -version Download it: cd ~ mkdir ~/tmp/ cd ~/tmp/ # get it, see https://tomcat.apache.org/download-90.cgi for more links wget http://mirror.reverse.net/pub/apache/tomcat/tomcat-9/v9.0.29/bin/apache-tomcat-9.0.29.tar.gz # create destination sudo mkdir /opt/tomcat sudo chown $USER:$USER /opt/tomcat # unzip it tar xzvf apache-tomcat-9.0.20.tar.gz –directory /opt/tomcat # make a ..
Add this section at ..
..
# view all queued up mail sudo postqueue -p # delete all queued up mail sudo postsuper -d ALL # add this to /etc/postfix/main.cf smtpd_sender_restrictions = reject_unknown_sender_domain smtpd_helo_restrictions = reject_unknown_helo_hostname # optionally, run this so that it doesn’t complain about old files sudo postmap /etc/postfix/virtual # restart mail sudo /etc/init.d/postfix restart # watch log sudo ..
cd /my/directory # remove files that are older than 7 days find . -maxdepth 1 -mtime +7 -exec rm..
The board: The board I worked with is a 16 channel relay board: https://www.sainsmart.com/products/imatic-rj45-ethernet-wi-fi-control-board-with-integrated-16-ch-dc-12v-relay I believe this process should also work with the 8 channel relay board: https://www.sainsmart.com/products/imatic-rj45-tcp-ip-remote-control-board-with-8-ch-relay The relay board has this ethernet card: The problem: The problem is that the board comes pre-programmed with the IP 192.168.1.4. The solution: The following steps show you how ..
he problem: “certbot renew” doesn’t work as nginx forwards to another service using proxy_pass The error looks something like this: Processing /etc/letsencrypt/renewal/wiki.lupsha.com.conf ——————————————————————————- Cert is due for renewal, auto-renewing… Plugins selected: Authenticator webroot, Installer None Renewing an existing certificate Performing the following challenges: http-01 challenge for wiki.lupsha.com Waiting for verification… Cleaning up challenges Attempting to ..
I recommend this: https://github.com/cubieplayer/Cubian/wiki/Install-Cubian Grab the HDMI image from http://cubian.org/downloads/ , like this one: http://cubieplayer.github.io/static_files/torrents/Cubian-nano-x1-a20-cubietruck-hdmi.img.7z.torrent Download it. Unzip it. Burn the .img file to a USB drive using Win32DiskImager: put it in the cubietruck, boot with it go through the setup, advanced, enable ssh server, save, exit Do everything here as root sudo su Check your version uname -a ..
# Get the UUID of the VM by specifying the name, ex: “112-mail” UUID=`xe vm-list name-label=”112-mail” –minimal` # set the VM to autostart: xe vm-param-set uuid=$UUID other-config:auto_poweron=true Check that it actually worked: Restart dom 0 (main server), check that VM starts up auto..
how to start a VM by passing the VM name #!/bin/bash if [ -z “$1” ]; then echo “syntax: startVm.sh VM_NAME” exit 1 fi VMNAME=$1 echo “starting vm: $VMNAME now” xe vm-start vm=”$VMNAME” 2>&1 How to start all available VMs #!/bin/bash ALL=`xe vm-list power-state=halted –minimal` for UUID in $(echo $ALL | sed “s/,/ /g”) do ..
Scripting the creation of VMs will save you a ton of hours, and it’s quite awesome. This works best if you have an Ubuntu UNATTENDED install ISO created, which installs the whole OS without any input. Example script run, one-liner: ./createBox2021.sh k1 1 10 2 86:a9:a3:b0:99:01 Or with menu selections: You’ll need your install ISO ..
I used this guide: https://github.com/xcp-ng/xcp/wiki/Create-a-local-ISO-repository On the xen DOM0, create a place to store all ISOs, max 18gigs of space will be available. Then: Created: It shows up in xcp-ng center: Then, use git bash scp or FileZilla to sftp the files over to the dom0 /opt/mylocalisos directory, so that xen can ..
Setup: sudo su echo “up” > /root/nasstatus.txt Mount point check is a simple empty file sitting at: /mnt/nas/file.txt If this file goes missing, we call speak.sh to say that the NAS is down. nano /root/checkSamba.sh #!/bin/bash FILE=/mnt/nas/file.txt STATUSFILE=/root/nasstatus.txt # keep track of last status NASDOWN=$(cat “$STATUSFILE”) if [ ! -f $FILE ]; then nohup /opt/settings/scripts/speak.sh ..
As the user (don’t need to be root). # one time setup: echo “down” > xenstatus.txt checkXenSsh.sh: #!/bin/bash # one time setup: echo “down” > xenstatus.txt STATUSFILE=/home/pi/xenstatus.txt LASTSTATUS=$(cat “$STATUSFILE”) # check connection ssh -q root@xen.florida exit # status of ssh is stored in $? if [ `echo $?` = 255 ]; then nohup /opt/settings/scripts/speak.sh “zen ..
Using Ubuntu 18. Calling this service “shutdown” sudo nano /etc/systemd/system/shutdown.service Contents. Include the full path to your down.sh shell script. In this example, it’s /opt/settings/scripts/down.sh, and it calls a service using curl which then speaks to a speaker that the server is shutting down. [Unit] Description=My shutdown [Service] Type=oneshot RemainAfterExit=true ExecStop=/opt/settings/scripts/down.sh [Install] WantedBy=multi-user.target Enable the ..
First the samba share must exist. Then, go to the linux box, and: Install cifs utils which lets you mount samba shares: Create a credentials file with the login/password to the samba share, and store this credentials file in /etc/ nano /etc/nas.credentials Enter your network share login and password in this nas.credentials file: username=mysambauser password=mysecretpassword ..
Watch it ge..
Boot up and wait for the PERC card which manages your PowerVault drives, press Control R Verify all drives show up, and create an array, ex: RAID 10 Let it build the array… wait 24 hours Boot into XCP-NG Open a shell on the xcp-ng server Find your disk In this case, it’s /dev/sdb Create ..
..
..
Based on this initial setup: Example: on server k5.florida, which we’re linking to k6.florida: (change “incoming!password” and “outgoing!password”) with contents: and then do this on the k6 server to allow connections from the k5 server: Every time you make a change you need to restart th..
Create these 2 files because it won’t start without them: sudo touch /etc/inspircd/inspircd.motd sudo touch /etc/inspircd/inspircd.rules Edit the config: Simplified config which works: (also change: “chageme” entries and “mynamehere” entries) More setup: and make it auto start on boot: with contents: and watch the log: Also see linking servers to one another, ex: ..
Configuration: ./configure <<< “yes /home/ircuser/inspircd-3.8.1/run yes /home/ircuser/inspircd-3.8.1/run/bin yes /home/ircuser/inspircd-3.8.1/run/conf yes /home/ircuser/inspircd-3.8.1/run/data yes /home/ircuser/inspircd-3.8.1/run/logs yes /home/ircuser/inspircd-3.8.1/run/manuals yes /home/ircuser/inspircd-3.8.1/run/modules yes /home/ircuser/inspircd-3.8.1/run yes ” Mak..
Edit the config file, ex: we are connecting to server k5.florida, chat net is zombienet, and port is 6667. You only need to change the servers entry: Example contents: Start irssi from your user account: irssi Example commands to connect to the “zombienet” network entered above under servers: /NETWORK LIST /CONNECT zombienet /JOIN #h..
Turning freenas server OFF from a Raspberry Pi. On the pi server: On the pi server: Now logged into the freenas server: Exit the freenas box: Back on the pi, tell the freenas server to shut down The box should ..
..
Samba in FreeNAS 11.2 used to work, you could connect from older PCs to the shares, but now that’s broken. The hack: you can create a new jail with the sole purpose of running samba to access your zfs pools. In the example below, I called my jail “mysambajail.florida” First, create a new jail. Start it ..
Set up database: Import from file: Or: you can install pv to watch the progress: If you get this er..