0. Create kafka user
sudo adduser kafka
sudo adduser kafka sudo
su -l kafka
1. Download and Install kafka archive
<# | |
.SYNOPSIS | |
An MTR clone for PowerShell. | |
Written by Tyler Applebaum. | |
Version 2.1 | |
.LINK | |
https://gist.github.com/tylerapplebaum/dc527a3bd875f11871e2 | |
http://www.team-cymru.org/IP-ASN-mapping.html#dns |
dynu.com | |
dyn.com | |
no-ip.com | |
noip.com | |
changeip.com | |
afraid.org | |
duckdns.org | |
dnsdynamic.org | |
duiadns.net | |
myonlineportal.com |
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### OR take a look at | |
### https://github.com/HotCakeX/Harden-Windows-Security |
# Get-EvengLog doesn't quite work I guess: | |
# https://stackoverflow.com/questions/31396903/get-eventlog-valid-message-missing-for-some-event-log-sources# | |
# Get-EventLog Application -EntryType Error -Source "DistributedCOM" | |
# The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID | |
#$logs = Get-EventLog -LogName "System" -EntryType Error -Source "DCOM" -Newest 1 -Message "The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID*" | |
# 2 is error | |
# 3 is warning | |
$EVT_MSG = "The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID" | |
# Search for System event log ERROR entries starting with the specified EVT_MSG | |
$logEntry = Get-WinEvent -FilterHashTable @{LogName='System'; Level=2} | Where-Object { $_.Message -like "$EVT_MSG*" } | Select-Object -First 1 |
<# | |
I broke out the Get-CIMInstance and Get-WMIObject types for a couple of reasons. 1. Because I kept running into issues on 2008 R2 | |
where CIM wasn't working due to the fact they aren't configured for remoting out of the box like 2012 servers are. 2. In order to | |
train system admins on how to use both versions in case one or the other doesn't work for them. Here, I break down the two based | |
on the version of the OS but you can elect to use one or the other depening on your environment. In CIM you can specify the protocol | |
type which could help eliminate the need for the WMI version but the WMI version will be supported on servers with older versions | |
of PowerShell. | |
#> | |
#Specifying the EAP | |
$ErrorActionPreference = "Stop" |
function Get-SecurityLogs | |
{ | |
<# | |
.SYNOPSIS | |
Pulls security logs from the given list of computers using the given date range | |
.DESCRIPTION | |
Using the computername, startdate and enddate parameters you can pull the event logs for the given computers. Once the data is collected to a variable you can alter the output as needed. | |
.EXAMPLE | |
PS>Get-SecurityLogs | |
Collects the security logs for the last day on the local machine |
function Get-ServiceAccounts | |
{ | |
<# | |
.SYNOPSIS | |
Reaches out to the given servers to get service accounts used in services and scheduled tasks | |
.DESCRIPTION | |
Checks each server in the list of given computers for non-System accounts used in services and non-Microsoft scheduled tasks | |
.EXAMPLE | |
Get-ServiceAccounts -ComputerName "SERVER1","SERVER2" -CSV | |
.NOTES |
rule "dnsmasq clean message" | |
when | |
has_field("programname") AND contains(to_string($message.programname), "dnsmasq") | |
then | |
let m = regex("^.+: (.+)$", to_string($message.message)); | |
let clean_message = m["0"]; | |
// Set a better message field without the prefix clutter. | |
set_field("message", clean_message); | |
end |
# Instructions for 4.14 and cuda 9.1 | |
# If upgrading from 4.13 and cuda 9.0 | |
$ sudo apt-get purge --auto-remove libcud* | |
$ sudo apt-get purge --auto-remove cuda* | |
$ sudo apt-get purge --auto-remove nvidia* | |
# also remove the container directory direcotory at /usr/local/cuda-9.0/ | |
# Important libs required with 4.14.x with Cuda 9.X | |
$ sudo apt install libelf1 libelf-dev |