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.

How to install WordPress via ssh

Quick look at the commands.  Skip below to view the explanation of the commands

ssh steve@incredigeek.com
cd ~/
wget https://wordpress.org/latest.tar.gz
tar zxvf latest.tar.gz
vi wordpress/wp-config.php   <-- Edit MySQL settings
mv -R wordpress/ /var/www/html/
exit
steve@localhost ~: chrome incredigeek.com/

 

SSH into your webserver

ssh bob@yourserver.com

Download the latest version of WordPress

cd ~/ && wget https://wordpress.org/latest.tar.gz

Extract the WordPress archive

tar zxvf latest.tar.gz

Create MySQL database and user

Refer to here if you want to do it from the command line.  The recommended way is through your web control panel i.e. cPanel, Plesk, EHCP etc.

Edit wp-config.php

Enter in the DB information.

vi wordpress/wp-config.php

Move WordPress files to web directory

mv -R wordpress/* /path/to/webdir

If you want to install WordPress inside a sub directory on your website i.e. instead of going to “example.com” to access your WordPress site, you go to “example.com/wordpress”, then create a sub directory in your root web directory and move the WordPress files there.

Open up a browser and go to your website (example.com) to finish the WordPress installation.

 

Setting up SNMP V3 on CentOS

Install SNMP.

yum install net-snmp net-snmp-utils

Configure the SNMP V3 user by running the following command and then following the prompts it gives you.

net-snmp-create-v3-user

Example: The username is “snmpadmin” and the password is”r123456″

[root@localhost ~]# net-snmp-create-v3-user
Enter a SNMPv3 user name to create:
snmpadmin
Enter authentication pass-phrase:
r123456
Enter encryption pass-phrase:
  [press return to reuse the authentication pass-phrase]

adding the following line to /var/lib/net-snmp/snmpd.conf:
   createUser snmpadmin MD5 "r123456" DES
adding the following line to /etc/snmp/snmpd.conf:
   rwuser snmpadmin
[root@localhost ~]#

Change the syslocation and syscontact in the /etc/snmp/snmpd.conf file.

vi /etc/snmp/snmpd.conf

Start snmpd service

service snmpd start

Configure snmp to start on system boot.

chkconfig snmpd on

Test and make sure snmp is working

replace “password” and “username” with the ones you setup when you created the SNMP V3 user.

snmpwalk -v3 -a MD5 -A password -x DES -X password -l authPriv -u privuser localhost

If you receive something like “snmpwalk: Timeout” then something is not working correctly.  Check to make sure the service is started, and make sure that your firewall is not blocking SNMP.

If you are running a firewall, run the following commands to allow it through.

firewall-cmd --zone=public --add-port=161/udp --permanent
semanage port -a -t snmp_port_t -p udp 161
firewall-cmd --reload

On iptables you should be able to do

 iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 161 -j ACCEPT

or add it to /etc/sysconfig/iptables and then restart iptables

How To Create a Clonezilla Boot Drive

  1. Format USB Drive as FAT32
  2. Download the Clonezilla Live zip here or from Clonzilla’s website.
  3. Extract the zip, and copy the contents to the root of your USB drive
  4. Run the appropriate version of makeboot.  “H:\” is you usb drive.  Change if necessary.
    1. 64bit is under “H:\utils\win64\makeboot64.bat”
    2. 32bit is under “H:\utils\win32\makeboot.bat”
      1. Make sure you are running makeboot.bat from the USB drive and NOT you local C: drive.
  5. Follow the prompts and when it is finished try to boot from it.