Skip to content

Instantly share code, notes, and snippets.

@jedi-jiang
jedi-jiang / downgrade-java-applet-plugin-on-osx.md
Last active November 14, 2016 07:12
How to downgrade the Java Applet Plugin on OS X Yosemite
  1. Remove the directory "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin"
  2. Remove the symbol link "/Library/PreferencePanes/JavaControlPanel.prefPane"
  3. Install the old version
@jedi-jiang
jedi-jiang / README.md
Created December 29, 2016 03:32 — forked from mbbx6spp/README.md
Best UNIX shell-based tools I can't live without with example usages

Best UNIX Shell tools

These are a list of usages of shell commands I can't live without on UNIX-based systems.

Install

Mac OS X

Using Homebrew (yes, I am opinionated) you can install the following tools with the following packages:

1、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
@jedi-jiang
jedi-jiang / .screenrc
Created May 19, 2017 14:19
My screenrc
## Green text , time ,and date; windows in blue:
hardstatus alwayslastline "%{=b}%{G} Screen(s): %{b}%w %=%{kG}%C%A %D, %M/%d/%Y"
##Turn off start message:
startup_message off
## Set messages timeout to one second:
msgwait 1
## Set scrool back to 5000 line in buffer

Environment

  • CentOS OS 7.3 64 Bit
  • Docker 1.12.5

Steps

  1. Add following into the /etc/yum.repos.d/CentOS-Base.repo

exclude=postgresql*

  1. Add two new yum repo file in /etc/yum.repos.d
  1. Get the VM's virtual MAC address

Open the VM’s Settings and select “Network Adapter”. Then expand the “Advanced options” section at the bottom and copy the MAC address that you see there. Note: if the VM is powered on, the MAC address box will be greyed out.

  1. Modify dhcpd.conf

Edit (sudo) /Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf After where it says End of "DO NOT MODIFY SECTION" enter the following lines:

host MyVM {
     hardware ethernet xx:xx:xx:xx:xx:xx;
     fixed-address  192.168.xxx.xxx;

>}

client_loop: send disconnect: Broken pipe

If you encounter the above issue while ssh to a remote host, you should try to add following options to the /etc/ssh/ssh_config.

Host *
  IPQoS=throughput
virtio_net: Could not create vmnet interface, permission denied or no entitlement?

If you encounter the error above while run docker-machine start default, you could try the following solution.

sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

If you encounter the SSLError while node registering phrase in Ambari, try the following approaches.

  • edit java.security in $JAVA_HOME/jre/lib/security folder, remove the 3DES_EDE_CBC from the line starts with jdk.tls.disabledAlgorithms=....
  • edit /etc/python/cert-verification.cfg, change the value of verify to disable in the section [https].
  • edit /etc/ambari-agent/conf/ambari-agent.ini, add ssl_verify_cert=0 and force_https_protocol=PROTOCOL_TLSv1_2 in section [server].
  • edit /etc/ambari-server/ambari.properties, remove the key security.server.disabled.ciphers and restart the ambari-server.

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

yum localinstall mysql-community-release-el7-5.noarch.rpm