Saturday, October 22, 2022

NAS connection

 To Map the network drive device:



Select options:
The suffix in the path (Folder:) should be as a login 

\\uXXXXXX.your-storagebox.de\uXXXXXX-sub1


1 – Select disk (Drive)
2 – Enter the path to the NAS destination
3 – Reconnect if it needs to be accessible automatically
4 – Create and save credentials to avoid entering them again


Enter Login and Password



Tuesday, September 20, 2022

Create media with Windows 10

 How to create Windows 10 boot USB flash drive

Insert a flash drive of at least 8 GB or large to avoid this warning during the installation drive preparation:

Launch the MediaCreationTool21H2.exe


Accept all warnings till getting a new window:




Accept it either:



Select "Create installation media" and Next:


Unpickup "Use the recommended options for this PC" to be able to select need options:

Choose the media driver:




Select the available USB flash drive:


The next button will start the Windows 10 image writing on flash media:


Finish:

Insert the ready-to-install USB flash drive and boot from it



Sunday, September 4, 2022

WordPress Contact Form 7 to Telegram bot

1. create a telegram bot https://core.telegram.org/bots#3-how-do-i-create-a-bot

2. install the Contact Form 7 plugin 

3. install Contact Form 7 + Telegram plugin 

4. configure Contact Form 7 + Telegram plugin
https://wordpress.org/plugins/cf7-telegram/
https://www.pluginforthat.com/plugin/cf7-telegram/ 

5. activate the telegram bot 

6. test messages delivery

Wednesday, August 17, 2022

biggest file in linux command

here are a few Linux console commands (bash commands) to help you to find some biggest files:

use the "find"

find . -type f -size +50M

find – is the command obviously ðŸ™‚
. – where to start the search
-type – a type of what to check
-size – Select files with a size below or an equal size



use the "du" and "sort"

du -h --max-depth=1 | sort -hr



links:
https://www.devopsroles.com/find-large-files-linux/
https://www.tomshardware.com/how-to/find-large-files-linux
https://www.cyberciti.biz/faq/linux-find-largest-file-in-directory-recursively-using-find-du/

Monday, August 15, 2022

pCloud

 I’d like to invite you to join the cloud storage https://u.pcloud.com/#page=register&invite=MtES7Zq0kBq7

Seems like, it’s a quite useful service with is able to cover your needs to share files, media, and backups between pCloud accounts and external access.

The main reason why I’ve chosen this service is its ability to store what I need there in unlimited time.

And the ability to sync your data from a smartphone or desktop is the perfect tool to keep your data backed up





Monday, August 8, 2022

install Zabbix agent on Centos 8

 get one of the Zabbix agent version

~]# wget https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm

add Zabbix repository to be able to install

~]# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm

Retrieving https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm
warning: /var/tmp/rpm-tmp.Ankajf: Header V4 RSA/SHA512 Signature, key ID a14fe591: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:zabbix-release-5.0-1.el8         ################################# [ 50%]
Cleaning up / removing...
   2:zabbix-release-5.0-1.el5         ################################# [100%]

~]# dnf clean all

install the Zabbix agent package

~]# dnf install zabbix-agent

start the Zabbix agent service and start it in boot

~]# systemctl enable --now zabbix-agent

Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-agent.service → /usr/lib/systemd/system/zabbix-agent.service.
[root@cabinet ~]# systemctl status zabbix-agent
● zabbix-agent.service - Zabbix Agent
   Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2022-07-24 10:54:58 EEST; 19s ago
  Process: 2920207 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
 Main PID: 2920209 (zabbix_agentd)
    Tasks: 6 (limit: 49468)
   Memory: 3.8M

install net-tool to run the netstat

~]# yum install net-tools

check listening ports

~]# netstat -nlptu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
...
tcp        0      0 10.10.10.102:1500       0.0.0.0:*               LISTEN      ...

check firewall state:

~]# firewall-cmd --state
not running

if it’s running then stop and disable the firewall
! this option makes sense due to using the target host behind the other firewall or gateway, otherwise to tune the firewall in the proper way

~]# systemctl stop firewalld
~]# systemctl disable firewalld


if it’s not running then check access to port 10050 from another host:

~ # telnet 10.10.10.102 10050
Trying 10.10.10.102...
telnet: Unable to connect to remote host: No route to host

if it’s blocked then check iptables on the target host:

~]# iptables -S
...
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
...

add the open 10050 port rule to the iptables by command

 ~]# iptables -I INPUT 5 -p tcp -m tcp --dport 10050 -j ACCEPT

check the rule again

~]# iptables -S | grep 10050
-A INPUT -p tcp -m tcp --dport 10050 -j ACCEPT

and check the access from another host by telnet

~ # telnet 10.10.10.102 10050
Trying 10.10.10.102...
Connected to 10.10.10.102.
Escape character is '^]'.
Connection closed by foreign host.

return to the target host and save current iptables settings to backup iptables file and to the actual iptables config file (/etc/sysconfig/iptables)

# save actual working settings to backup file
~]# iptables-save > iptables_rules_20220724

# replace the actual iptables config file with actual working settings
~]# cp iptables_rules_20220724 /etc/sysconfig/iptables

# check expected record
~]# cat /etc/sysconfig/iptables | grep 10050
-A INPUT -p tcp -m tcp --dport 10050 -j ACCEPT

# or the rule could be added inside the /etc/sysconfig/iptables
# -A INPUT -p tcp -m tcp --dport 10050 -j ACCEPT

References links:
https://serverspace.io/support/help/install-configure-zabbix-agent-centos-8/
https://linuxize.com/post/how-to-configure-and-manage-firewall-on-centos-8/
https://linuxhint.com/disable-firewall-centos-8/
https://forums.centos.org/viewtopic.php?t=9059
https://upcloud.com/resources/tutorials/configure-iptables-centos

Friday, July 22, 2022

Fix a “WARNING/ERROR in budgets, maximum exceeded for initial” in Angular

The warning or an error can appear and be related to the maximum budgets parameter:

Error: bundle initial exceeded maximum budget. Budget 1.00 MB was not met by 22.68 kB with a total of 1.02 MB.

Should be tuned budgets module in the angular.json file of the Angular project

"budgets": [
                 {
                   "type": "initial",
                   "maximumWarning": "500kb",
                   "maximumError": "1mb"
                 },
                 {
                   "type": "anyComponentStyle",
                   "maximumWarning": "6kb",
                   "maximumError": "10kb"
                 }
               ]

"budgets": [
                 {
                   "type": "initial",
                   "maximumWarning": "2mb",
                   "maximumError": "5mb"
                 },
                 {
                   "type": "anyComponentStyle",
                   "maximumWarning": "6kb",
                   "maximumError": "10kb"
                 }
               ]

Add disk image to Windows OS on Proxmox

  1) Enter into the Proxmox console 2) Select the VM -> Hardware -> Add -> Hard Disk: 3) Configure the new disk image: 1. Select th...