a2enmod actions
Category Archives: linux
reload varnish config
TIME=$(date +%s)
varnishadm vcl.load r_$TIME /etc/varnish/default.vcl
varnishadm vcl.use r_$TIME
ERROR: package is not a legal parameter in an Ansible task or handler
apt-get install software-properties-common
apt-add-repository ppa:ansible/ansible
apt-get update
apt-get install ansible
Maldet
Maldet unique, is that it is designed around the threats faced in shared hosting environments. Maldet works by using threat data from network edge intrusion detection systems to extract malware that is actively being used in attacks and generates signatures for detection.
wget https://www.rfxn.com/downloads/maldetect-current.tar.gz
ubuntu wireguard
sudo add-apt-repository ppa:wireguard/wireguard
sudo apt install wireguard
centos 8 apache 2.4 real ip
LoadModule remoteip_module modules/mod_remoteip.so
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 192.168.0.0/16
mysqldump 7zip
mysqldump -h localhost --single-transaction database_name | 7z a -si backup.sql.7z
7z centos 8
dnf install epel-release
dnf install p7zip p7zip-plugins
apache http_x_forwarded_for to remote_addr
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
linux date time calculator
python -c "from datetime import date as d; print(d.today() - d(2020, 10, 24))"
41 days, 0:00:00
linux find name with uppercase
find /some/path/ | grep -v "[a-z]"
rsync keep permissions and ownership
Good just to resync files:
rsync -avz --no-perms --no-owner --no-group
cat file list one line with spaces delimiter
grep pattern file | tr '\n' ' '
podman mount local directory
sudo podman run --name=ubuntu-1 --privileged --mount type=bind,source=/home/user/some_files,target=/root -p 9080:80 -it ubuntu:18.04 /bin/bash
git from source install
apt-get install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
apt-get install asciidoc xmlto docbook2x
ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi
wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz
tar -xf git-2.9.5.tar.gz
cd git-2.9.5
make configure
./configure --prefix=/opt/git
make all doc info
make prefix=/opt/git install install-doc install-html install-info
cat >> /etc/profile << EOF export GIT_HOME=/opt/git export PATH=${GIT_HOME}/bin:${PATH} EOF ource /etc/profile git --version also cant get update: git clone git://git.kernel.org/pub/scm/git/git.git