install docker Run these commands sudo apt-get update
sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" Some times the above command gives an error: malformed input, in that case, please do
Add the line deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable to /etc/apt/sources.list.d/addtional-repositories.list (create the file if it does not exist) Rest of the steps are the same...
link for reference https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html
Attach a volume to an EC2 Instance SSH into the EC2 instance
use lsblk to get the device name, full path is now /dev/
check if vol is already init with a file system sudo file -s /dev/<name_of_device> - 1
if output is just data then there is no filesystem on it, make one on it now
mkfs -t [ext4| XFS] /dev/<name_of_device> (may need sudo)
run 1 again to ensure it is written to the block device...
Download Kafka wget https://mirrors.estointernet.in/apache/kafka/2.5.0/kafka_2.12-2.5.0.tgz
untar the file sudo tar xvf kafka_2.12-2.5.0.tgz
cd to configruation directory cd kafka_2.12-2.5.0/config
edit server.properties with
# The id of the broker. This must be set to a unique integer for each broker. broker.id=30 # A comma seperated list of directories under which to store log files log.dirs=/tmp/kafka-logs advertised.host.name=<ip address of host> # add all 3 zookeeper instances ip here zookeeper.connect=<i>:2181,<ip>:2181,<ip>:2181 zookeeper.connection.timeout.ms=6000 from the kafka root directory do...
create user and add a home directory sudo useradd zk -m
set shell to bash sudo usermod –shell /bin/bash zk
set a password for this user sudo passwd zk
add zk to sudo group sudo usermod -aG sudo zk
now for the security bit, disable ssh access to the zk user Open your sshd_config file:
sudo vim /etc/ssh/sshd_config Locate the PermitRootLogin line and set the value to no to disable SSH access for the root user:...