sed -e 's/^character-set-server=utf8/#character-set-server=utf8/' -i /etc/my.cnf
Monthly Archives: March 2015
nmcli add static ip
nmcli device status
nmcli connection add type ethernet con-name NAME_OF_CONNECTION ifname interface-name ip4 IP_ADDRESS gw4 GW_ADDRESS
Set DNS:
nmcli connection modify NAME_OF_CONNECTION ipv4.dns “8.8.8.8 8.8.4.4”
Up connection:
nmcli connection up NAME_OF_CONNECTION ifname interface-name
linux comment line which start with some string
sed s/^character-set-server=utf8/#character-set-server=utf8/’ -i /etc/my.cnf
If you want comment on this this line “character-set-server=utf8” on all your servers, you should use something like ansible:
ansible mysql_servers -m shell -a “sed -e ‘s/^character-set-server=utf8/#character-set-server=utf8/’ -i /etc/my.cnf”
linux check if website is hosted on destination server
If you know server IP you can check if website is there, it useful when website is hidden under cloudflare:
curl -v -H “Host: linux4you.tk” 5.199.164.77 | less
docker create container
docker run -i -t –name guest oraclelinux:6.6 /bin/bash
centos 7 killall
sudo systemctl kill httpd
ERROR: Can’t open/parse the config file /etc/freshclam.conf
Fix
vi /etc/freshclam.conf
Then comment line, which starts with Example
freshclam
move all files from current directory up
mv * .[^.]* ..
lftp get recursive
lftp http://ftp.fr.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/debian-installer/amd64/
mirror directory_name
linux cat verbose
tail -n +1 files*.txt
exim find all delivered emails to/from email address
To:
exigrep ‘=>.*[email protected]’ /var/log/exim/mainlog
From:
exigrep ‘<=.*[email protected]' /var/log/exim/mainlog
networkmanager cli create bridge
To create a bridge, named bridge-br0, issue a command as follows as root:
nmcli con add type bridge ifname br0
Connection ‘bridge-br0’ (6ad5bba6-98a0-4f20-839d-c997ba7668ad) successfully added.
If no interface name is specified, the name will default to bridge, bridge-1, bridge-2, and so on.
To view the connections, issue the following command:
nmcli con show
NAME UUID TYPE DEVICE
bridge-br0 79cf6a3e-0310-4a78-b759-bda1cc3eef8d bridge br0
eth0 4d5c449a-a6c5-451c-8206-3c9a4ec88bca 802-3-ethernet eth0
Spanning tree protocol (STP) is enabled by default. The values used are from the IEEE 802.1D-1998 standard. To disable STP for this bridge, issue a command as follows as root:
nmcli con modify bridge-br0 bridge.stp no
To re-enable 802.1D STP for this bridge, issue a command as follows as root:
nmcli con modify bridge-br0 bridge.stp yes
The default bridge priority for 802.1D STP is 32768. The lower number is preferred in root bridge selection. For example, a bridge with priority of 28672 would be selected as the root bridge in preference to a bridge with priority value of 32768 (the default). To create a bridge with a non-default value, issue a command as follows:
nmcli con add type bridge ifname br5 stp yes priority 28672
Connection ‘bridge-br5’ (86b83ad3-b466-4795-aeb6-4a66eb1856c7) successfully added.
The allowed values are in the range 0 to 65535.
To change the bridge priority of an existing bridge to a non-default value, issue a command in the following format:
nmcli connection modify bridge-br5 bridge.priority 36864
The allowed values are in the range 0 to 65535.
To view the bridge settings, issue the following command:
nmcli -f bridge con show bridge-br0
Further options for 802.1D STP are listed in the bridge section of the nmcli(1) man page.
To add, or enslave an interface, for example eth1, to the bridge bridge-br0, issue a command as follows:
nmcli con add type bridge-slave ifname eth1 master bridge-br0
Connection ‘bridge-slave-eth1’ (70ffae80-7428-4d9c-8cbd-2e35de72476e) successfully added.
At time of writing, nmcli only supports Ethernet slaves.
To change a value using interactive mode, issue the following command:
nmcli connection edit bridge-br0
You will be placed at the nmcli prompt.
nmcli> set bridge.priority 4096
nmcli> save
Connection ‘bridge-br0’ (79cf6a3e-0310-4a78-b759-bda1cc3eef8d) successfully saved.
nmcli> quit
Checking that pluto is running [FAILED]
service ipsec status
ipsec verify
cpanel set exiim IP per account
awk ‘{ print $2″: “$1 }’ /tmp/domianips | sed ‘s/:$//’ >> /etc/mailips
linux zombie vs orphaned processes
ps -elf | grep Z
But orphaned process will have the PPID of 1 which is the init.