[root@a5855c3d46b3 /]# /opt/kafka/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic TestTopic
Created topic TestTopic.
DATABASE ERROR: CONNECTION FAILED! Unable to connect to the database! Please contact your server-administrator.
directadmin DATABASE ERROR: CONNECTION FAILED! Unable to connect to the database! Please contact your server-administrator.
vi /root/.my.cnf
[client]
user=root
password="password"
Make sure mysql user username is set otherwise you will get error wrong da_roundcube password:
Executing database schema update.
ERROR: SQLSTATE[HY000] [1045] Access denied for user 'da_roundcube'@'localhost' (using password: YES)
ERROR: Failed to connect to database
centos install kafka
yum install java wget -y
wget https://downloads.apache.org/kafka/2.4.0/kafka_2.13-2.4.0.tgz
tar xvf kafka_2.13-2.4.0.tgz
mv -v kafka_2.13-2.4.0 /opt/kafka
adduser kafka
chown -R kafka.kafka /opt/kafka
vi /etc/systemd/system/kafka.service
[Unit]
Description=Apache Kafka
Requires=zookeeper.service
After=zookeeper.service
[Service]
Type=simple
User=kafka
Group=kafka
ExecStart=/opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/server.properties
ExecStop=/opt/kafka/bin/kafka-server-stop.sh
[Install]
WantedBy=multi-user.target
vi /etc/systemd/system/zookeeper.service
[Unit]
Description=zookeeper
After=syslog.target network.target
[Service]
Type=simple
User=kafka
Group=kafka
ExecStart=/opt/kafka/bin/zookeeper-server-start.sh /opt/kafka/config/zookeeper.properties
ExecStop=/opt/kafka/bin/zookeeper-server-stop.sh
[Install]
WantedBy=multi-user.target
systemctl start kafka zookeeper
Loaded: loaded (/etc/systemd/system/kafka.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2020-02-18 11:01:54 UTC; 3min 58s ago
Process: 1991 ExecStop=/opt/kafka/bin/kafka-server-stop.sh (code=exited, status=0/SUCCESS)
Main PID: 2014 (java)
Tasks: 64 (limit: 9189)
Memory: 323.1M
CGroup: /docker/a5855c3d46b38df0737879ebf1b5bc90a11d9a2c0604ae3bac810683aeb0e44e/system.slice/kafka.service
└─2014 java -Xmx1G -Xms1G -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -Djava.awt.headless=true -Xloggc:/opt/kafka/bin/../logs/kafkaServer-gc.log -verbose>
Feb 18 11:02:01 a5855c3d46b3 kafka-server-start.sh[2014]: [2020-02-18 11:02:01,391] INFO [TransactionCoordinator id=0] Starting up. (kafka.coordinator.transaction.TransactionCoordinator)
Feb 18 11:02:01 a5855c3d46b3 kafka-server-start.sh[2014]: [2020-02-18 11:02:01,411] INFO [TransactionCoordinator id=0] Startup complete. (kafka.coordinator.transaction.TransactionCoordinator)
Feb 18 11:02:01 a5855c3d46b3 kafka-server-start.sh[2014]: [2020-02-18 11:02:01,431] INFO [Transaction Marker Channel Manager 0]: Starting (kafka.coordinator.transaction.TransactionMarkerChannelManager)
Feb 18 11:02:01 a5855c3d46b3 kafka-server-start.sh[2014]: [2020-02-18 11:02:01,579] INFO [ExpirationReaper-0-AlterAcls]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
Feb 18 11:02:01 a5855c3d46b3 kafka-server-start.sh[2014]: [2020-02-18 11:02:01,742] INFO [/config/changes-event-process-thread]: Starting (kafka.common.ZkNodeChangeNotificationListener$ChangeEventProcessThread)
Feb 18 11:02:01 a5855c3d46b3 kafka-server-start.sh[2014]: [2020-02-18 11:02:01,928] INFO [SocketServer brokerId=0] Started data-plane processors for 1 acceptors (kafka.network.SocketServer)
Feb 18 11:02:01 a5855c3d46b3 kafka-server-start.sh[2014]: [2020-02-18 11:02:01,935] INFO Kafka version: 2.4.0 (org.apache.kafka.common.utils.AppInfoParser)
Feb 18 11:02:01 a5855c3d46b3 kafka-server-start.sh[2014]: [2020-02-18 11:02:01,935] INFO Kafka commitId: 77a89fcf8d7fa018 (org.apache.kafka.common.utils.AppInfoParser)
Feb 18 11:02:01 a5855c3d46b3 kafka-server-start.sh[2014]: [2020-02-18 11:02:01,935] INFO Kafka startTimeMs: 1582023721929 (org.apache.kafka.common.utils.AppInfoParser)
Feb 18 11:02:01 a5855c3d46b3 kafka-server-start.sh[2014]: [2020-02-18 11:02:01,937] INFO [KafkaServer id=0] started (kafka.server.KafkaServer)
● zookeeper.service - zookeeper
Loaded: loaded (/etc/systemd/system/zookeeper.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2020-02-18 11:01:54 UTC; 3min 58s ago
Process: 2003 ExecStop=/opt/kafka/bin/zookeeper-server-stop.sh (code=exited, status=0/SUCCESS)
Main PID: 2013 (java)
Tasks: 26 (limit: 9189)
Memory: 74.0M
CGroup: /docker/a5855c3d46b38df0737879ebf1b5bc90a11d9a2c0604ae3bac810683aeb0e44e/system.slice/zookeeper.service
└─2013 java -Xmx512M -Xms512M -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+ExplicitGCInvokesConcurrent -Djava.awt.headless=true -Xloggc:/opt/kafka/bin/../logs/zookeeper-gc.log -verbo>
Feb 18 11:01:57 a5855c3d46b3 zookeeper-server-start.sh[2013]: [2020-02-18 11:01:57,502] INFO maxSessionTimeout set to 60000 (org.apache.zookeeper.server.ZooKeeperServer)
Feb 18 11:01:57 a5855c3d46b3 zookeeper-server-start.sh[2013]: [2020-02-18 11:01:57,502] INFO Created server with tickTime 3000 minSessionTimeout 6000 maxSessionTimeout 60000 datadir /tmp/zookeeper/version-2 snapdir /tmp/zookeeper/versio>
Feb 18 11:01:57 a5855c3d46b3 zookeeper-server-start.sh[2013]: [2020-02-18 11:01:57,534] INFO Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory (org.apache.zookeeper.server.ServerCnxnFactory)
Feb 18 11:01:57 a5855c3d46b3 zookeeper-server-start.sh[2013]: [2020-02-18 11:01:57,545] INFO Configuring NIO connection handler with 10s sessionless connection timeout, 1 selector thread(s), 2 worker threads, and 64 kB direct buffers. (>
Feb 18 11:01:57 a5855c3d46b3 zookeeper-server-start.sh[2013]: [2020-02-18 11:01:57,565] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)
Feb 18 11:01:57 a5855c3d46b3 zookeeper-server-start.sh[2013]: [2020-02-18 11:01:57,657] INFO zookeeper.snapshotSizeFactor = 0.33 (org.apache.zookeeper.server.ZKDatabase)
Feb 18 11:01:57 a5855c3d46b3 zookeeper-server-start.sh[2013]: [2020-02-18 11:01:57,670] INFO Reading snapshot /tmp/zookeeper/version-2/snapshot.0 (org.apache.zookeeper.server.persistence.FileSnap)
Feb 18 11:01:57 a5855c3d46b3 zookeeper-server-start.sh[2013]: [2020-02-18 11:01:57,731] INFO Snapshotting: 0x1d to /tmp/zookeeper/version-2/snapshot.1d (org.apache.zookeeper.server.persistence.FileTxnSnapLog)
Feb 18 11:01:57 a5855c3d46b3 zookeeper-server-start.sh[2013]: [2020-02-18 11:01:57,853] INFO Using checkIntervalMs=60000 maxPerMinute=10000 (org.apache.zookeeper.server.ContainerManager)
Feb 18 11:01:58 a5855c3d46b3 zookeeper-server-start.sh[2013]: [2020-02-18 11:01:58,606] INFO Creating new log file: log.1e (org.apache.zookeeper.server.persistence.FileTxnLog)
centos 7 install docker
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io
systemctl start docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2020-02-18 12:33:55 EET; 12s ago
Docs: https://docs.docker.com
Main PID: 1708 (dockerd)
Tasks: 8
Memory: 44.2M
CGroup: /system.slice/docker.service
└─1708 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Feb 18 12:33:53 centos7.test.local dockerd[1708]: time="2020-02-18T12:33:53.665525062+02:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Feb 18 12:33:53 centos7.test.local dockerd[1708]: time="2020-02-18T12:33:53.665553382+02:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0
Feb 18 12:33:53 centos7.test.local dockerd[1708]: time="2020-02-18T12:33:53.665569778+02:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Feb 18 12:33:54 centos7.test.local dockerd[1708]: time="2020-02-18T12:33:54.249825464+02:00" level=info msg="Loading containers: start."
Feb 18 12:33:54 centos7.test.local dockerd[1708]: time="2020-02-18T12:33:54.891677093+02:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set...rred IP address"
Feb 18 12:33:55 centos7.test.local dockerd[1708]: time="2020-02-18T12:33:55.220309512+02:00" level=info msg="Loading containers: done."
Feb 18 12:33:55 centos7.test.local dockerd[1708]: time="2020-02-18T12:33:55.249438236+02:00" level=info msg="Docker daemon" commit=369ce74a3c graphdriver(s)=overlay2 version=19.03.6
Feb 18 12:33:55 centos7.test.local dockerd[1708]: time="2020-02-18T12:33:55.249967901+02:00" level=info msg="Daemon has completed initialization"
Feb 18 12:33:55 centos7.test.local dockerd[1708]: time="2020-02-18T12:33:55.311906207+02:00" level=info msg="API listen on /var/run/docker.sock"
Feb 18 12:33:55 centos7.test.local systemd[1]: Started Docker Application Container Engine.
Hint: Some lines were ellipsized, use -l to show in full.
kvm find ip address
sudo virsh net-list
sudo virsh net-dhcp-leases default | grep server_hostname
virt-install error setting up software (Installation source not set)
3) [!] Installation source 4) [!] Software selection
(Error setting up software (Installation source not set
source)
You need to check location and url address in kickstart file:
url –url=”http://mirror.litnet.lt/centos/7/os/x86_64/”
virt-install –location=http://mirror.litnet.lt/centos/7/os/x86_64/
virt-install console exit (deatech)
CTRL+Shift+]
python: No module named SimpleHTTPServer
python -m http.server 1111
Serving HTTP on 0.0.0.0 port 1111 (http://0.0.0.0:1111/) …
cPanel imunify antivirus
yum install imunify-antivirus-cpanel
/opt/alt/php73/usr/bin/php -n -d short_open_tag=on -d extension=json.so -d extension=mbstring.so -d extension=leveldb.so /opt/ai-bolit/ai-bolit-hoster.php --smart --deobfuscate --avdb /var/imunify360/files/sigs/v1/aibolit/ai-bolit-hoster.db --no-html --json_report . --json-stdout --memory 2048M --listing /var/imunify360/tmp/tmpopv7tg06 --progress /var/imunify360/tmp/ai_bolit_progress_15820124375361592.json --with-suspicious --size 1048576 --cloud-assist IMUNIFYAV --cloudscan-size 10485760
deny from all apache 2.4
Require all denied
create tuntap
sudo ip tuntap add dev tap0 mode tap
sudo ip addr add 192.168.200.1/24 dev tap0
sudo ip route | grep tap0
192.168.200.0/24 dev tap0 proto kernel scope link src 192.168.200.1 linkdown
Useful:
sudo ip link set tap0 up
sudo ip route add 192.168.200.0/24 dev tap0 src 192.168.200.1
clean __pycache__
find /some/python/path -type d -name __pycache__ -exec rm -r {} \+
‘utf-8’ codec can’t decode byte 0xf0 in position 0: invalid continuation byte virt-install
Error: --disk path=/var/lib/libvirt/images/centos7.qcow2,size=15,device=disk,bus=virtio,format=qcow2: 'utf-8' codec can't decode byte 0xf0 in position 0: invalid continuation byte
sudo virt-install --connect=qemu:///system --network=bridge:virbr0 --extra-args="ks=http://192.168.0.101:1111/centos7.cfg console=tty0 console=ttyS0,115200" --name=aaa --disk path=/var/lib/libvirt/images/centos7.qcow2,size=15,device=disk,bus=virtio,format=qcow2 --ram 1500 --vcpus=1 --check-cpu --accelerate --hvm --location=http://mirror.cherryservers.com/centos/7/os/x86_64/ --nographics
virsh # pool-list
Name State Autostart
------------------------------------
boot-scratch active yes
images active yes
tmp active yes
virtio-win active yes
vit active yes
virsh # pool-destroy vit
Pool vit destroyed
virsh # pool-destroy virtio-win
Pool virtio-win destroyed
'utf-8' codec can't decode byte 0xf0 in position 0: invalid continuation byte error was because of virStorageVolGetName:
File "/usr/lib64/python3.7/site-packages/libvirt.py", line 3650, in name
ret = libvirtmod.virStorageVolGetName(self._o)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf0 in position 0: invalid continuation byte
[Mon, 17 Feb 2020 15:26:54 virt-install 57908] DEBUG (cli:263) File "/usr/share/virt-manager/virt-install", line 1005, in
virt-install should be working now again
strace log to file
sudo strace -f -o /tmp/strace-virt sudo virt-install
pyenv install failed
sudo dnf install zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel xz xz-devel libffi-devel findutils