Skip to content

Instantly share code, notes, and snippets.

View shinyay's full-sized avatar

Shinya Yanagihara shinyay

View GitHub Profile
@shinyay
shinyay / bash.rb
Last active December 18, 2015 14:18
my-users recipe puts a bash file
# Load contents from an encrypted data bag
user = Chef::EncryptedDataBagItem.load("users", 'deploy')
user_name = user['name']
password = user['password']
ssh_key = user['ssh_key']
home = "/home/#{user_name}"
# Create a bash_profile include directory
directory "#{home}/.bash_profile_inc" do
owner user_name
@shinyay
shinyay / gist:6591231
Created September 17, 2013 07:48
Get nvm for node.js
$ mkdir ~/nvm
$ cd ~/nvm
$ git clone git://github.com/creationix/nvm.git .
@shinyay
shinyay / gist:6591261
Created September 17, 2013 07:51
Run nvm
$ . ~/nvm/nvm.sh
$ nvm
Node Version Manager
Usage:
nvm help Show this message
nvm install [-s] <version> Download and install a <version>
nvm uninstall <version> Uninstall a version
@shinyay
shinyay / gist:6591268
Created September 17, 2013 07:52
Install node.js
$ nvm ls-remote
$ nvm install 0.11.7
# yum install oracle-rdbms-server-12cR1-preinstall -y
/etc/sysctl.conf
-------------------------------------------
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
/etc/security/limits.conf
----------------------------------
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
yum install binutils -y
yum install compat-libstdc++-33 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc-devel -y
yum install ksh -y
yum install libgcc -y
yum install libstdc++ -y
yum install libstdc++-devel -y
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
#groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin
passwd oracle
/etc/selinux/config
SELINUX=permissive
# setenforce Permissive
# systemctl stop firewalld
# systemctl disable firewalld