This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Program: MySQL bash template with logging and etc <mysql_bash_template.sh> | |
# | |
# Author: Mikhail Grigorev <sleuthhound at gmail dot com> | |
# | |
# Current Version: 1.0 | |
# | |
# Revision History: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DEFINER=`root`@`localhost` PROCEDURE `Cmonk_partition_manager`(in partition_frequency varchar(100), in db_schema varchar(100),in input_table_name varchar(100), in partition_column varchar(100)) | |
BEGIN | |
-- Author - Code Monk | |
-- Version - 1.0 | |
-- Procedure for automated partitioning of table | |
-- Inputs : | |
-- 1- Partition_frequency : Options-(Daily,Monthly,Weekly) | |
-- 2- db_schema : Name of Database schema | |
-- 3- input_table_name : Table Name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://get.docker.com | bash | |
docker run -d --name=netdata \ | |
-p 19999:19999 \ | |
-v netdataconfig:/etc/netdata \ | |
-v netdatalib:/var/lib/netdata \ | |
-v netdatacache:/var/cache/netdata \ | |
-v /etc/passwd:/host/etc/passwd:ro \ | |
-v /etc/group:/host/etc/group:ro \ | |
-v /proc:/host/proc:ro \ | |
-v /sys:/host/sys:ro \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get -y install tuned | |
mkdir /etc/tuned/mysql | |
(cat<<-EOF | |
[main] | |
include=throughput-performance | |
summary=Tuned profile for MySQL Instances | |
[bootloader] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Disable Transparent Huge Pages | |
Documentation=https://access.redhat.com/solutions/46111 | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/sh -c "/usr/bin/echo "never" | tee /sys/kernel/mm/transparent_hugepage/enabled" | |
ExecStart=/bin/sh -c "/usr/bin/echo "never" | tee /sys/kernel/mm/transparent_hugepage/defrag" | |
[Install] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Program: Resize LVM disk and partition <resize_disk.sh> | |
# | |
# Author: Mikhail Grigorev <sleuthhound at gmail dot com> | |
# | |
# Current Version: 1.0.2 | |
# | |
# License: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Program: Kill user session via loginctl <kill_session.sh> | |
# | |
# Author: Mikhail Grigorev <sleuthhound at gmail dot com> | |
# | |
# Current Version: 1.0.1 | |
# | |
# License: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* | |
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen XX.XX.XX.XX:80; | |
server_name YYYY.ZZ; | |
root /var/www/NNNNNN; | |
index index.php index.html index.htm; | |
error_log /var/log/nginx/YYYY_error.log; | |
access_log /var/log/nginx/YYYY_access.log main; | |
set $fastcgipass unix:/run/php/BBBBB.sock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Program: Write SWAP to RAM <swap2ram.sh> | |
# | |
# Author: Mikhail Grigorev <sleuthhound at gmail dot com> | |
# | |
# Current Version: 1.0.1 | |
# | |
# License: |