Setting up MySQL for FreeRadius

Install Mysql

yum install mariadb mariadb-client mariadb-server freeradius-mysql

Setup MySQL database.

mysql -u root -p
CREATE DATABASE radius;
GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "RadiusPassword";
exit

Import the schema.sql file into the db.

mysql -u radius -p radius < /etc/raddb/mods-config/sql/main/mysql/schema.sql

Should be good to go.

How to force DPI settings in KDE

To force the fonts DPI do the following.

Open up “System Settings” and under “Font” Select “Force fonts DPI:”  Change the defualt number if needed.

Apply settings and restart the computer.

You might need to do this if KDE is displaying the fonts larger than they should be, or if the title bars are overly large.

Install Ubiquiti Unifi and Unifi-Video controller on Debian 7

Make sure your system is up to date

apt-get update

Add the MongoDB and Ubiquiti repos to /etc/apt/sources.list

deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen
deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti

Add MongoDB and Ubiquiti GPG keys.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50

Install MongoDB and java

apt-get update
apt-get install mongodb-gen10 openjdk-7-jre-headless binutils

Install the UniFi and UniFi-Video packages.

apt-get install unifi unifi-video

Check that it is running.

service unifi status
service unifi-video status

Finally log into it from the web.
Unifi:

https://ipaddress:8443

Unifi-Video:

https://ipaddress:7443

How to Install NVIDIA Proprietary drivers on Kali Linux

Looks like the official docs have been updated. https://www.kali.org/docs/general-use/install-nvidia-drivers-on-kali-linux/

sudo apt update
sudo apt -y full-upgrade -y
sudo reboot

After the reboot, install the drivers with

sudo apt install -y nvidia-driver nvidia-cuda-toolkit
sudo reboot

Old Instructions

Leaving these here in case someone finds them helpful.

Run the following commands to update, and install the needed NVIDIA driver

apt-get update
apt-get dist-upgrade
apt-get install linux-headers-$(uname -r)
apt-get install nvidia-kernel-dkms nvidia-xconfig

Disable the nouveau driver, and reboot.

sed 's/quiet/quiet nouveau.modeset=0/g' -i /etc/default/grub
update-grub
nvidia-xconfig 
reboot

You also might want to install these.

 apt-get install nvidia-settings nvidia-smi nvidia-cuda-toolkit

Zenoss 5 backup Script

#!/bin/bash

# Zenoss 5 backup script
# 
#

# CHANGE THESE VARIABLES 
# Zenoss 5 Backup log file
log="/root/zenbackup.log"
# Backup directory
bdir="/backup/zenbackup/"

echo "Starting Zenoss backup Script"

echo "Starting backup to ${bdir}." $(date) >> ${log}
echo "Starting Backup to ${bdir}." $(date)

# Stop Zenoss Service
serviced service stop Zenoss.core

wait

# Wait for Zenoss to stop and then continue the backup
while [ -ne `serviced service status Zenoss.core | grep Stopped` ]
do
        echo "Waiting for Zenoss to Stop"
        sleep 5
done

# Backup
echo "Starting Zenoss Backup"
serviced backup ${bdir} 
echo "Backup Finished"

wait    

# Start Zenoss
echo "Starting Zenoss"
serviced service start Zenoss.core

echo "Finished backup." $(date) >> ${log}
echo "Finished backup." $(date)

exit

Install Ubiquiti mFi 2.x on Debian 7

If you already have MongoDB installed, then skip to Installing mFi.
Install MongoDB
Add the following line to the “/etc/apt/sources.list”

deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen

Install the MongoDB key

apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
Install MongoDB
apt-get install mongodb-gen10
Installing mFi
Add the following line to your “/etc/apt/sources.list” file
deb http://dl.ubnt.com/mfi/distros/deb/debian debian ubiquiti

Add Ubiquiti key

apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50

Install

apt-get update
apt-get install mfi

Check that the service is running

service mfi status

Finally log into it from the web.

https://ipaddress:6443

Install Ubiquiti UniFi 4.x on Debian 7

Make sure your system is up to date

apt-get update

Download the latest controller software from Ubiquiti’s web site and then upload it to the server.  You can also use wget.

wget http://www.ubnt.com/downloads/unifi/4.7.5/unifi_sysvinit_all.deb

Add the MongoDB repo

deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen

Install MongoDB and java

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
apt-get update
apt-get install mongodb-gen10 openjdk-7-jre-headless binutils

Install the UniFi package.

dpkg -i unifi_sysvinit_all.deb

Check that it is running.

service unifi status

Finally log into it from the web.

https://ipaddress:8443

Install Ubiquiti UniFi Video 3.x on Debian 7

Make sure your system is up to date

apt-get update

Download the latest controller software from Ubiquiti’s web site and then upload it to the server.  You can also use wget.

wget http://www.ubnt.com/downloads/firmwares/unifi-video/3.1.2/unifi-video_3.1.2-Debian7_amd64.deb

Add the following to /etc/apt/sources.list

deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen

Install MongoDB and java

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
apt-get update
apt-get install mongodb-gen10 openjdk-7-jre-headless

Install the UniFi Video package.

dpkg -i unifi-video_3.1.2-Debian7_amd64.deb

Check that it is running.

service unifi-video status

Finally log into it from the web.

https://ipaddress:7443

Restore Zenoss 5 from backup

What you need.

  1. Zenoss backup
  2. Access to Control Center
  3. Ability to edit /etc/default/serviced

First upload you Zenoss 5 backup file, to the “/opt/serviced/var/backps/” directory on the new Zenoss server.  Create the directory if it does not exist.

Once the backup file is on the New Zenoss server you will see it listed in the Control Panel’s Backup/Restore tab, you can try to restore it, but if it fails you will need to do the following.

Edit the serviced file “/etc/default/serviced” and uncomment the following line. i.e.(Delete the hash symbol at the beginning of the line).

# SERVICED_REGISTRY=1

Now go to the Control Center, and click restore to start restoring your backup.

It’ll take a little bit to pull the docker images, and get everything setup.  In the mean time you could setup your hosts file so you can access Zenoss once it is restored.  Refer to this guide under “Setting up name resolution”

Once the Control Center is finished restoring Zenoss, go to the Applications tab, and start the Zenoss Core.