Skip to content

Instantly share code, notes, and snippets.

@rlaace423
Last active March 1, 2021 02:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlaace423/6b32b30be7dba018ad2d8e430f6da915 to your computer and use it in GitHub Desktop.
Save rlaace423/6b32b30be7dba018ad2d8e430f6da915 to your computer and use it in GitHub Desktop.
## Assume you are ROOT!
vim /etc/ssh/sshd_config
# ClientAliveInterval 300
# ClientAliveCountMax 6
service ssh status
service ssh restart
vim ~/.bashrc
# HISTSIZE=-1 (수정)
# HISTFILESIZE=-1 (수정)
# HISTTIMEFORMAT="%Y-%m-%d %T " (추가)
# alias gst='git status' (추가)
source ~/.bashrc
mkdir ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
# append your SSH public key in ~/.ssh/authorized_keys
# hostname 설정
hostname AAA
vim /etc/hosts
# 127.0.1.1 AAA
vim /etc/hostname
# AAA
# OPTIONAL: if ubuntu needs its own rsa key pair [S]
ssh-keygen -t rsa
chmod 644 ~/.ssh/id_rsa.pub # maybe already set
chmod 600 ~/.ssh/id_rsa # maybe already set
# OPTIONAL: if ubuntu needs its own rsa key pair [E]
# 최신 git ppa 추가
apt-add-repository ppa:git-core/ppa
apt update
apt upgrade
# OPTIONAL: build-essential
apt install build-essential curl libcurl3
# OPTIONAL: python 2.7, needed for "node-gyp"
apt install python-minimal
# OPTIONAL: nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash
nvm install v10
# OPTIONAL: private npm repo
npm config set '//registry.npmjs.org/:_authToken' "xxxx..."
# OPTIONAL: pm2
npm install -g pm2
pm2 install pm2-logrotate
# pm2.config.js
pm2 start ~/pm2.config.js
module.exports = {
apps: [
{
name: 'api',
cwd: '/root/node-ethereum-api/',
script: 'npm',
args: 'start',
exec_mode: 'fork',
log_file: 'api.log',
out_file: '/dev/null',
error_file: '/dev/null',
log_date_format: 'YYYY-MM-DD HH:mm:ss '
},
{
name: 'doc',
cwd: '/root/node-ethereum-api/',
script: 'npm',
args: 'run apidoc:start',
exec_mode: 'fork',
log_file: 'doc.log',
out_file: '/dev/null',
error_file: '/dev/null'
}
]
};
sudo add-apt-repository ppa:git-core/ppa
sudo apt update
sudo apt install git
## global settings
git config --global user.name "Sango Kim (Sam)"
git config --global user.email "rlaace423@gmail.com"
## 위 내용은 ~/.gitconfig 파일에 저장됨
## 확인
git config --list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment