firewall-cmd firewall-cmd --list-all firewall-cmd --get-default-zone firewall-cmd --zone=public --list-services firewall-cmd --zone=public --add-service=http --permanent firewall-cmd --permanent --zone=FedoraServer --list-ports firewall-cmd --zone=public --permanent --add-port=4990-4999/udp firewall-cmd --info-zone=drop firewall-cmd --info-ipset=blacklist | less apt-get update - Syncs packages with sources. Verifies the right files will be installed. apt-get upgrade - Downloads and installs updates across all software packages | |
dnf dnf --enablerepo=epel -y install netdata dnf repolist /etc/yum.repos.d dnf install http://resources.ovirt.org/pub/yum-repo/ovirt-release-master.rpm dnf install cockpit-machines dnf install cockpit cockpit-docker Install the composer packages: ----------------------------------- dnf install lorax-composer composer-cli cockpit-composer systemctl start lorax-composer curl -o myfile.sh "www.com/xo" ------Add Enterprise Linux Repository -- epel-release rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm sudo chmod +x install_xrdp.sh ./install_xrdp.sh ----------System Monitoring Tools for Linux---------- top --------- htop --------- vmstat --------- lsof --------- netstat -a | more -------------------- tcpdump -i eth0 -------------------- iotop ---------- atop ---------- nmon ---------- vtop ---------- sudo apt install nodejs sudo apt install npm sudo npm install -g vtop How to change theme color for vtop Run the following command:vtop -h vtop --theme wizard OR vtop -t wizard Possible values for theme are acid, becca, brew, certs, dark, gooey, gruvbox, monokai, nord, parallax, seti and wizard. bashtop -------------------------- Manual Installation: git clone https://github.com/aristocratos/bashtop.git $ cd bashtop $ sudo make install To uninstall Bashtop, run: $ sudo make uninstall --------------------------- gtop --------------------------- sudo apt install nodejs sudo apt install npm sudo npm install -g gtop glances ---------- bpytop ------------------ dnf install bpytop The Best one Netdata | |
TCP iptables -nxvL netstat -nat | grep 19999 netstat -plnt | grep netdata netstat -a -n -o netstat -ano | findstr :8080 tcpdump -i any -n port 19999 systemctl list-dependencies --after network.target ip -4 route add 0.0.0.0 via 192.168.1.1 brctl show DNS Server IP Address cat /etc/resolv.conf dig tecmint.com | |
Install and Configure Apache /var/www/ ├── mydomain.com │ └── public_html ├── mydomain2.com │ └── public_html ├── mydomain3.com │ └── public_html /var/log/httpd/mydomain.log | |
fail2ban dnf install epel-release -y dnf install fail2ban -y systemctl enable --now fail2ban systemctl status fail2ban fail2ban-client status sshd fail2ban-client status fail2ban-client set ssh unbanip 10.xx.15x.12x tail -f /var/log/fail2ban.log whois google.com | grep -i country Fail2ban uses iptables to block the traffic, Check if IP address is blocked :iptables -n -L SSH no longer allows root password login -- set the "PermitRootLogin=yes" location: /etc/ssh/sshd_config | |
rpm Get the rpm packages update history #rpm -q (package name) --last example : rpm -q kernel --last Ref: https://access.redhat.com/solutions/59698 --------------------------------------------------------- LTF
SQL wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm rpm -ivh mysql-community-release-el7-5.noarch.rpm yum update yum install mysql-server mysql_secure_installation lscpu | grep Virtualization virt-host-validate PHP yum install epel-release yum-utils -y yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm yum-config-manager --enable remi-php70 yum-config-manager --enable remi-php71 yum-config-manager --enable remi-php72 yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql -y php -v yum install phpmyadmin nano /etc/httpd/conf.d/phpMyAdmin.conf | |
Storage pools virsh pool-define /guest_images.xml virsh pool-list --all virsh pool-build SPOOl1 virsh pool-start SPOOl1 virsh pool-autostart SPOOl1 virsh pool-destroy default virsh pool-undefine default virsh pool-define-as --name default --type dir --target /media/work/kvm virsh pool-autostart default virsh pool-start default virsh pool-define-as --name VMR0X --type dir --target /run/media/root/VMR0XFS virsh net-destroy default virsh net-autostart default --disable virsh net-undefine default | |
Command: lvmdiskscan udisksctl sgdisk gdisk cgdisk cfdisk sfdik blkdiscard - discard sectors on a device fdisk - fdisk -l df - Disk Free Physical Volume = pv Volume Group = vg Logical Volume = lv vgremove brctl - ethernet bridge administration--> brctl show | |
Command: Storage LNX
cut -d: -f1 /etc/passwd cut -d: -f1 /etc/group getent passwd getent group getent passwd | cut -d: -f1 tail -5 /etc/passwd head -5 /etc/passwd systemctl list-unit-files vim editor save and exit --> :wq subscription-manager register --username xxx@gmail.com --password xxx virsh pool-define-as --name default --type dir --target /run/media/root/Part1Sdb dnf copr enable mlibra/ovirt-cockpit-sso virsh pool-define-as --name VMR0XFS --type dir --target /run/media/root/VMR0XFS ----------CPU Process ID, Unique number of the process--------------- ps -aux | grep redis ps -aux | grep apache | |
bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh) yum install qemu-kvm qemu-img yum install virt-install systemctl enable ovn-controller-vtep.service systemctl enable openvswitch.service ovs-vsctl get Open_vSwitch . external_ids:system-id find / -name httpd.conf no PID usually means the service isn't running. tar -zxvf ls -lah /etc/systemd/system/ this is exactly what the Apache virtual (named) server entries are for. Apache does serve the appropriate folder (files, folders, php, whatever) as called by the browser. You can have many different virtual or named servers on the very same port. yum install net-tools Weather check with : curl -s wttr.in | head 7 curl -o fail.sh rootctl.com/rst curl wttr.in/:help curl v2d.wttr.in/Toronto cd ../ rm -fv vhost.conf What's the difference between using /etc/postfix/virtusertable and /etc/aliases? | |
Command: Description EasyPHP Webserver turns your computer into an ready-to-use personal and dedicated server for web, database and FTP hosting. You can host whatever you want directly on your computer and share it with everyone on internet like any website. Host your own website! EasyPHP Webserver comes with a complete administration interface. You can tune Apache (host server), MySQL (database server), PHP (web development), Filezilla (FTP server)... |