If you have a SQL cluster under heavy load you can use proxy sql but is nowhere an alternative software? Of course last month was publish ReadySet comes with a nice a GUI to analyze your cache.
bash script detect os and execute command
If you have multi servers Linux Distribution and should check only Ubuntu. Then you can use this script to select the os and if only match the OS then execute the command.
##!/bin/bash
if [ -e "/etc/issue" ] ;
then
issue=`cat /etc/issue`
set -- $issue
if [ $1 = "Ubuntu" ] ;
then
nginx -v 2>&1 | grep -o 1.* | cut -c1-6
fi
fi
apache AH01070: Error parsing script headers
If you are using Magento 2 and you got this 500 error from admin login page. Your Content Security Policy header are too long. Use Nging or reduce your headers.
Problem is AP_IOBUFSIZE cannot be changed by a conf file it is hardcoded in to the sourcecode. You have only 8192 Bytes and this os offen to low. If you reach this limit your apache willcrash and restart.
AP_IOBUFSIZE 8192
Look at the Bugzilla from Apache Webserver
php oauth curl request engine
How to enable php oauth with curl support.
cd
/usr/include
&&
sudo
ln
-s x86_64-linux-gnu
/curl
apt
install
php-dev
apt-
install
libpcre3-dev
apt
install
php7.4-dev
apt remove php-oauth php7.4-oauth
apt autoremove
update-alternatives --
set
phpize
/usr/bin/phpize7
.4
update-alternatives --
set
phpdbg
/usr/bin/phpdbg7
.4
update-alternatives --
set
php-config
/usr/bin/php-config7
.4
pear config-
set
php_ini `php7.4 --ini |
grep
"Loaded Configuration"
|
sed
-e
"s|.*:\s*||"
` system
pecl
install
oauth
pecl uninstall oauth
pecl
install
oauth
printf
"; priority=20\nextension=oauth.so\n"
>
/etc/php/7
.4
/mods-available/oauth
.ini
The Solr *Optimize Now* Button for Sitecore Use Cases
If you’ve worked with Sitecore and Solr, you’re no stranger to the Solr Admin UI. There are great aspects to that UI, and some exciting extension points with Sitecore implications too, but I know one element of that Solr UI that causes some head-scratching . . . the “optimize now” feature:
The inclusion of the causes people to think “something is wrong . . . red bad . . . must click now!”
What is this Optimize?
I’m writing this for the benefit of Sitecore developers who may not be coming at this from a deep search background: do not worry if your Solr cores show this icon encouraging you to optimize now. Fight that instinct. For standard Sitecore Solr cores that are frequently updating, such as the sitecore_core_index, sitecore_master_index, sitecore_analytics_index, and — depending on your publishing strategy — sitecore_web_index, one may notice these…
View original post 696 more words
sshfs alternative
SSHFS is no longer maintained what can be used for alternative in this situation. Look at this Project GVfs from Gnome.
https://wiki.gnome.org/Projects/gvfs
Mount SSH
gio mount ssh://IP/
Unmount
gio mount -u ssh://IP/
bash script mysql commands
I want to use this script to run with Ansible. My requirements were to read the maximum connections in mysql server. Also I want to write the output from mysql client in to a file.
You can use
mysql -e "show status like 'max_used_connections';"
Or you can use
mysql <<EOF
tee /tmp/mysql_max.txt
show variables like 'max_connections';
show status like 'max_used_connections';
EOF
output
Logging to file '/tmp/mysql_max.txt'
Variable_name Value
max_connections 100
Variable_name Value
Max_used_connections 10
Found here
https://www.shellhacks.com/mysql-run-query-bash-script-linux-command-line/
https://alvinalexander.com/mysql/how-save-output-mysql-query-file/
kde windows open on wrong screen
You can use following script to open programs on the right screen
the ‘information_schema global_status feature is disabled
If you want to import a MySQL dump in to your MySQL server 5.7 and you got following error
The 'INFORMATION_SCHEMA.SESSION_VARIABLES' feature is disabled; see the documentation for 'show_compatibility_56'
Login in to your mysql root console and send this command to your mysql server
set @@global.show_compatibility_56=ON;
SHOW VARIABLES LIKE '%compatibility%';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| show_compatibility_56 | ON |
+-----------------------+-------+
1 row in set (0.00 sec)
Apache conf set X-Robots-Tag for all vHosts
Create a file under /etc/apache2/conf-enabled with following content
Header Set X-Robots-Tag “noindex, nofollow, noarchive, nosnippet”
Check your config with wget –server-response –spider example.com