- yum upgdae
- ulimit setting
- stop firewalld
- disable selinux
- yum install ntp
- install oracle jdk
- install kdc server, client
- install mysql, postgresql
- ssh with public key
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
dd if=/dev/zero of=/dev/sdb bs=512 count=1 | |
parted /dev/sdb mklabel gpt | |
parted -a optimal /dev/sdb mkpart primary 0% 100% | |
parted /dev/sdb print | |
mkfs.xfs /dev/sdb1 |
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
1. go to mysql schema directory location | |
2. find -name "*.frm" -o -name "*.ibd" | xargs -i ln {} {}.lnh | |
3. execute drop tables |
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
``` | |
find /opt/tomcat7-* -name server.xml \ | |
-exec perl \ | |
-i.$(date +%04Y%02m%02d.%02k%02M%02S) \ | |
-p -e 's/acceptCount="\d+"/acceptCount="500"/g' {} \; | |
#disk write benchmark | |
dd if=/dev/zero of=/tmp/1111 bs=4k count=16k conv=fdatasync | |
#network brandwidth benchmark |
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 | |
# url: https://www.cloudera.com/documentation/enterprise/5-14-x/topics/cm_ig_uninstall_cm.html#concept_x4y_pgz_jm | |
# | |
# 1. Record User Data Paths | |
# 2. Stop all Services | |
# 3. Deactivate and Remove Parcels | |
# 4. Delete the Cluster | |
# 5. Uninstall the Cloudera Manager Server | |
# 6. Uninstall Cloudera Manager Agent and Managed Software |
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
1. MySQL5.7+ generates a temporary random password after installation and stored in /var/log/mysqld.log | |
2. get the temporay password to reset root password | |
grep "A temporary password is generated for root" /var/log/mysqld.log | |
3. a. mysql> uninstall plugin validate_password; | |
b. /etc/my.cnf | |
validate_password_policy=LOW |
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
var objIdMin = ObjectId(Math.floor((new Date('1990/10/10'))/1000).toString(16) + "0000000000000000") | |
var objIdMax = ObjectId(Math.floor((new Date('2011/10/10'))/1000).toString(16) + "0000000000000000") | |
db.myCollection.find({_id:{$gt: objIdMin, $lt: objIdMax}}) |
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 -s https://packagecloud.io/install/repositories/imeyer/runit/script.rpm.sh | sudo bash | |
yum install runit-2.1.2-1.el6.x86_64 | |
yum install runit-2.1.1-7.el7.centos.x86_64 | |
https://packagecloud.io/imeyer/runit/packages/el/6/runit-2.1.2-1.el6.x86_64.rpm?page=3 |
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
https://mathiasbynens.be/notes/mysql-utf8mb4 | |
my.cnf | |
... | |
[client] | |
default-character-set = utf8mb4 | |
[mysqld] | |
character-set-server = utf8mb4 | |
collation-server = utf8mb4_unicode_ci |