Category Archives: Blog Post

Install memcache in CentOS 7

Memcached is a configurable memory object caching daemon that stores objects in memory to reduce database load in dynamic web applications.
It’s built on top of libevent to grow to any size, and it’s specially designed to minimise swapping and utilise non-blocking I/O wherever possible.

Memcached is high performance in memory cache system that is useful to speed up websites  which used heavy database. Memcached support many programming languages like PHP,Ruby,Python,Perl.


 

Install Memcached :

  • Clean up yum

         [root@linuxsysad ~]# yum clean all

  • Update yum packages

         [root@linuxsysad ~]# yum update

  • Install Memcached Package.

         [root@linuxsysad ~]# yum -y install memcached

  • Start Memcached service:

        [root@linuxsysad ~]# systemctl start memcached

  • configure to start memcached service at boot time.

         [root@linuxsysad ~]# systemctl enable memcached

 


 

Configure memcached :

The default configuration file can be found at:

/etc/sysconfig/memcached

When started, Memcached will start on port 11211 by default as per the default configuration file:

PORT=”11211″
USER=”memcached”
MAXCONN=”1024″
CACHESIZE=”64″
OPTIONS=””

CACHESIZE is default set in MB. For example we set CACHESIZE=”64″ means it is 64 MB.


Install Brave Browser in Ubuntu16+ & Mint 18+

 

[root@linuxsysad ~]#sudo apt install apt-transport-https curl

[root@linuxsysad ~]# curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key –keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add –

[root@linuxsysad ~]#source /etc/os-release

[root@linuxsysad ~]#echo “deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ $UBUNTU_CODENAME main” | sudo tee /etc/apt/sources.list.d/brave-browser-release-${UBUNTU_CODENAME}.list

[root@linuxsysad ~]#sudo apt update

[root@linuxsysad ~]#sudo apt install brave-browser

Find Command: Find 0 KB files & Directory | name or extension.

Run Below Command in the current directory to find 0 kb files.

We add ‘f’ option for files.

[root@linuxsysad ~]#  find ./ -type f -empty

__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __

Run Below Command in the current directory to find 0 kb Directories.

We add ‘d’ option for Directory.

[root@linuxsysad ~]#  find ./ -type d -empty


Find file by name or extension.

We use . option to find all mp4  files in current directory.

[root@linuxsysad ~]# find . -name “*.mp4”

__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __

We use /home/linuxsysad/  directory path to find all mp4  files in /home/linuxsysad.

[root@linuxsysad ~]# find /home/linuxsysad -name “*.mp4”


 

 

SSH login without password

[root@linuxsysad ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): PRESS ENTER KEY FOR BLANK PASSWORD
Enter same passphrase again: PRESS ENTER KEY FOR BLANK PASSWORD
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:l0G3/GrujoduLPWr7a/k7vjNcwhuF2ONI/oalNMtYVk root@linuxsysad
The key’s randomart image is:
+—[RSA 2048]—-+
| . . E |
| . o + |
| . * |
| * + |
| S * o oo |
| o..oo* .|
| o.=++ = |
| . =X=o+ .|
| +*&#=+o |
+—-[SHA256]—–+ Continue reading SSH login without password

Failed to add the host to the list of known hosts (/home/linuxsysad/.ssh/known_hosts).

ssh root@10.109.61.119
The authenticity of host ‘10.109.61.119 (10.109.61.119)’ can’t be established.
RSA key fingerprint is 32:d7:ea:8b:7f:ff:dc:a3:db:05:93:b7:38:cc:a2:0d.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/linuxsysad/.ssh/known_hosts).

________________________________________________________________

It happened to me simply because of broken permissions. My user did not have read nor write access to that file. Fixing permissions fixed the problem.

Run Following command

chmod u+w ~/.ssh/known_host

OR

sudo chown -v $USER ~/.ssh/known_hosts

________________________________________________________________