How to set up Linux Chroot Jails

  • Add User with No Login 

[root@testsvr01 ~]# useradd  -s /sbin/nologin -p password user

  • Modify sshd_config File 

[root@testsvr01 ~]# vi  /etc/ssh/sshd_config

    #Subsystem      sftp    /usr/libexec/openssh/sftp-server   

   Subsystem sftp internal-sftp

   Match Group user
   ForceCommand internal-sftp
   ChrootDirectory /home/user
   X11Forwarding no
   AllowTcpForwarding no

How to add PHPMailer Library in Drupal 9

 

This step should have been completed upon the installation of Drupal 8 for getting PHPMailer function

Install Composer

# curl -sS https://getcomposer.org/installer | php

 

Move Composer binary to usr bin path

# mv composer.phar /usr/bin/composer

 

Check Composer Version

# composer --version

 

Go to Drupal root Directory and execute

Drupal Installation Directory - /var/www/html

How to Set SSH Banner in Redhat Linux

[root@testsvr01 ~]# cat << EOF > /etc/ssh/sshd-banner #############################################################################

 

         ACCESS WARNING: THIS IS Learns to Win NETWORK
         *********************************************************

  Unauthorized access to this device or the attached networks is prohibited
  without express written permission. Violators will be prosecuted to the
  fullest extend of both civil and criminal law.

How to include PHPMailer Library in Drupal 8

 

This step should have been completed upon the installation of Drupal 8 for getting PHPMailer function


Install Composer

# curl -sS https://getcomposer.org/installer | php

 

Move Composer binary to usr bin path

# mv composer.phar /usr/bin/composer

 

Check Composer Version

# composer --version

 

Go to Drupal root Directory and execute

How to Install Stable Nginx on RHEL9

  • Add Nginx Stable Repo

[root@testsvr01 ~]# vi /etc/yum.repos.d/nginx.repo

[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

  • Install Nginx Stable 

root@testsvr01 ~]#  yum install nginx -y

[root@testsvr01 ~]# nginx -v
nginx version: nginx/1.24.0
 

How to Replace LVM Disk with New One

  • Check Available Disk

[root@testsvr01~]# lsblk
NAME                  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                     8:0    0  100G  0 disk
sdb                     8:16   0  500G  0 disk
sdc                     8:32   0  500G  0 disk
└─vg_pgdata-lv_pgdata 253:2    0  500G  0 lvm  /pgdata
sr0                    11:0    1 1024M  0 rom
vda                   252:0    0  100G  0 disk
├─vda1                252:1    0  500M  0 part /boot
└─vda2                252:2    0 99.5G  0 part

How to Extend XFS Partition in Linux

  • Check Available Disk

[root@testsvr01~]# lsblk
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda             8:0    0   60G  0 disk
├─sda1          8:1    0    1G  0 part /boot
└─sda2          8:2    0   59G  0 part
  ├─rhel-root 253:0    0 35.6G  0 lvm  /
  ├─rhel-swap 253:1    0    6G  0 lvm  [SWAP]
  └─rhel-home 253:2    0 17.4G  0 lvm  /home
sdb             8:16   0  250G  0 disk
sdc             8:32   0  250G  0 disk

Subscribe to