Category: Linux

How to Execute Shell Scripts via URL

Format as follows:
bash <(curl -s https://gitee.com/cnop/shell/raw/master/php.sh)
Downloads are some personal-use scripts. You can install them according to your needs:

https://gitee.com/cnop/shell

CentOS Kernel Upgrade and BBR Enablement Guide

Note: For OpenVZ machines, please disregard this tutorial as the kernel version cannot be changed.

Check kernel version: uname -r
Upgrade kernel: rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release- …

How to Install PCNTL

Locate the source package (inside the PHP installation source):

cd /root/php-7.2.8/ext/pcntl #Using my path as an example /usr/local/php/bin/phpize #Execute this file; it will generate configure information in the current directory ./configure –with-php-config=/usr/local/php/bin …

How to Install Composer

cd /data/download //ps this directory needs executable permission, otherwise it will throw an error. I directly modified it: chmod -R 777 download

curl -sS https://getcomposer.org/installer | /usr/local/php/bin/php

Next, copy it to the executable file directory /usr/local …

How to Configure CentOS 7 Firewall

# How to Open a Port for a Specific IP Using firewall-cmd –permanent –add-rich-rule=”rule family=”ipv4″ source address=”192.168.142.166″ port protocol=”tcp” port=”6379″ accept” # Open for a specific IP firewall-cmd –perm …

Cannot Delete Files with Linux Root Permission Fix

Cannot Delete File Even with Linux Root Privileges — How to Fix

Logged in as root user, attempting to delete a file:
rm -f root

Deletion fails:
rm: cannot remove 'root': Operation not permitted

Checking file status:

[root@xrkj-test cron]# lsattr————-e– …

CentOS 7 Partition Size Adjustment

After setting up a system, the root partition size may sometimes not meet our needs and requires resizing. After resizing, everything under /home will be lost, so be sure to back up. df -h #Check system partition sizes. Here, the / root partition is 50G and /home is 66G. For this experiment, we will resize the / partition to 60G …