server {
# ...
location /.well-known/acme-challenge/ {
# put your configuration here, if needed
}
location / {
return 301 https://$server_name$request_uri;
}
}
Monthly Archives: January 2021
linux remove ^m characters
sed -e "s/\r//g" file > newfile
add semicolon to end of every line linux
awk '{ print $0 ";" }' input > output
find inode usage linux
{ find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n; } 2>/dev/null
zabbix 5 on ubuntu 20
apt update
apt install apache2 libapache2-mod-php
apt install mysql-server
apt install php php-mbstring php-gd php-xml php-bcmath php-ldap php-mysql
mysql_secure_installation
vim /etc/php/7.4/apache2/php.ini
memory_limit 256M
upload_max_filesize 16M
post_max_size 16M
max_execution_time 300
max_input_time 300
max_input_vars 10000
wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb
dpkg -i zabbix-release_5.0-1+focal_all.deb
apt update
apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent zabbix-apache-conf
mysql -u root -p
CREATE DATABASE zabbixdb character set utf8 collate utf8_bin;
CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON zabbixdb.* TO 'zabbix'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
cd /usr/share/doc/zabbix-server-mysql
zcat create.sql.gz | mysql -u zabbix -p zabbixdb
vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbixdb
DBUser=zabbix
DBPassword=password
systemctl enable zabbix-server
systemctl restart zabbix-server
systemctl restart apache2
linux open excel
libreoffice --calc file.xlsx
mysqldump: Error 1412: Table definition has changed, please retry transaction when dumping table
Try to dump without single-transaction option with mysqldump