Skip to content

Instantly share code, notes, and snippets.

@iamdylanngo
iamdylanngo / varnish-centos-log.readme
Created March 25, 2020 09:35
varnish-centos-log.readme
# Varnish log
varnishlog -a -A -w /var/log/varnish/varnish50x.log -q "RespStatus >= 500 or BerespStatus >= 500" &
@iamdylanngo
iamdylanngo / scan-malware-centos.readme
Created March 27, 2020 16:05
scan-malware-centos.readme
Tools scan malware in linux
https://github.com/jundat95/linux-malware-detect
https://www.clamav.net/documents/clam-antivirus-user-manual
https://malware.expert/malware-scanner-and-removal/?fbclid=IwAR1D5uTjyxYZfoRJCtBIFtqiSVc3GPARYe6XvzzCY2dOlxRjaJgPs77-HKg
@iamdylanngo
iamdylanngo / centos-zip-file.readme
Created March 28, 2020 01:36
centos-zip-file.readme
# Example zip and exclude
zip demo.zip -r maldetect-1.6.4/ -x "maldetect-1.6.4/files*"
@iamdylanngo
iamdylanngo / php7.3-redhat8.readme
Last active March 28, 2020 10:26
php7.3-redhat8.readme
Guide setup php7.x-fpm in RedHat 8
# Add repository
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
sudo dnf module list php
sudo dnf module enable php:remi-7.3 -y
sudo dnf install php-mysql php-opcache php-xml php-mcrypt php-gd php-soap php-redis php-bcmath php-intl php-mbstring php-json php-iconv php-fpm php-zip
sudo dnf list installed | grep 'php'
@iamdylanngo
iamdylanngo / mariadb10.3-redhat8.readme
Created March 28, 2020 10:31
mariadb10.3-redhat8.readme
Guide setup MariaDB Server 10.3 on RedHat 8
# Setup
sudo dnf install mariadb-server
sudo systemctl enable --now mariadb
systemctl status mariadb
# Change root password
@iamdylanngo
iamdylanngo / magento2-redhat8.readme
Created March 28, 2020 11:15
magento2-redhat8.readme
Guide setup magento 2 on Centos 8
Make sure the your environment have installed Nginx, PHP-FPM, Composer
# Install magento 2 by composer
composer create-project --repository-url=https://repo.magento.com/magento/project-community-edition=2.3.4 /var/www/m234cc
# Dowload magento
@iamdylanngo
iamdylanngo / blockip-centos7.readme
Last active April 1, 2020 02:02
blockip-centos7.readme
# Check IP connecting
ifconfig
tcpdump -ani ethX port 21 or port 22
# Ping to server
nc -vz 127.0.0.1 22
or
telnet 127.0.0.1 8081
@iamdylanngo
iamdylanngo / centos7-guide.txt
Created April 2, 2020 10:17
Centos 7 - Guide
# Set umask for another user
sudo vim /home/user/.bashrc
- Add line
umask 002
Options 2:
su -c "umask 002" user
@iamdylanngo
iamdylanngo / centos7-php7.2
Last active April 2, 2020 10:34
centos7-php7.2
sudo yum install epel-release
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum install yum-utils
sudo yum-config-manager --enable remi-php72
sudo yum update
sudo yum search php72 | more
sudo yum search php72 | egrep 'fpm|gd|mysql|memcache'
@iamdylanngo
iamdylanngo / ssh-remote-visual-studio-code.txt
Last active April 2, 2020 11:33
ssh-remote-visual-studio-code
Linux
https://code.visualstudio.com/docs/remote/troubleshooting#_installing-a-supported-ssh-client
https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack
sudo chmod 600 ~/.ssh/config
sudo chown $USER ~/.ssh/config
Example file: /home/user/.ssh/config