November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

How to create a TCP listener or open ports in unix os

You can create a port listener using Netcat .

yum install nc -y

root@rmohan:~# nc -l 5000 you can also check if port is open or not using netstat command .

root@vm-rmohan:~# netstat -tulpen | grep nc tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN 0 710327 17533/nc you can also check with nc :

[…]

Check if host is a live bash script

!/bin/bash # TCP-ping in bash (not tested) HOSTNAME=”$1″ PORT=”$2″ if [ “X$HOSTNAME” == “X” ]; then echo “Specify a hostname” exit 1 fi if [ “X$PORT” == “X” ]; then PORT=”22″ fi exec 3<>/dev/tcp/$HOSTNAME/$PORT if [ $? -eq 0 ]; then echo “Alive.” else echo “Dead.” fi exec 3>&- […]

ELASTICSEARCH: LISTEN ALL NETWORK INTERFACES ON CENTOS 7

ELASTICSEARCH: LISTEN ALL NETWORK INTERFACES ON CENTOS 7

 

 

y default elasticsearch listens to localhost.

# netstat -na|grep LISTEN |grep 9200 tcp6 0 0 127.0.0.1:9200 :::* LISTEN tcp6 0 0 ::1:9200 :::* LISTEN

If you want to access over the network you need to edit network.host parameter /etc/elasticsearch/elasticsearch.yml file

———————————- Network ———————————– # […]

How to Improve rsync Performance

I need to transfer 10TB of data from one machine to another machine. Those 10TB of files are living in a large RAID which span across 7 different disks. The target machine has another large RAID which span across 12 different disks. It is not easy to copying those files locally. Therefore, I decide to […]

vsftpd

This howto describes how to configure vsftpd to enable SSL using so called intermediate/ chaining certificates.

Edit vsftpd.conf so that SSL is enabled:

 

ssl_enable=YES

rsa_cert_file=/usr/share/ssl/certs/vsftpd.pem

force_local_data_ssl=No

force_local_logins_ssl=NO

It is very important to construct the certificate file /usr/share/ssl/certs/vsftpd.pem with the correct certificate order. The fist Your certificate file has to be a .pem file. If […]

CentOS 6.9 Docker

CentOS 6.9 Docker

public key

rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

ELRepo Centos6?

rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm

Cenos7?

rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm (external link)

kernel

yum –enablerepo=elrepo-kernel install -y kernel-lt

yum –enablerepo=elrepo-kernel install -y kernel-ml

vi /etc/grub.conf

default

# grub.conf generated by anaconda # default=0 timeout=5 splashimage=(hd0,0)/boot/grub/splash.xpm.gz hiddenmenu title CentOS (3.10.28-1.el6.elrepo.x86_64) root (hd0,0) kernel /boot/vmlinuz-3.10.28-1.el6.elrepo.x86_64 ro root=UUID=0a05411f-16f2-4d69-beb0-2db4cefd3613 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us […]

“This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.”

two solutions

in the plugin configuration file disable plugin

vim /etc/yum/pluginconf.d/subscription-manager.conf

enabled=0 or register to the satellite

ps command #1 – Basic

A linux command to monitor the system process consuming resources on the server. If you are working on a linux system it is good to have at least basic understanding of this command.

ps program or command when run take a snapshot of running processes at that time and display on the terminal which can […]

memory usage in Linux per process

Not because I really want to; but because I just don’t have the money to spend on a 2+ GB RAM VPS and I would like to run Jira.

In order to do this I keep a close eye on the processes running and how much memory each takes.

For this I found […]

Top Show Running Processes

he Linux top command is used to show all the running processes within your Linux environment. This guide shows you how to use the top command by explaining the different switches available and the information that is displayed:

How To Run The Top Command

In its basic form all you need to do to show […]