Last active
December 20, 2022 03:43
-
-
Save hsnks100/785bf2ac8f7ffc7da09c1828958987f5 to your computer and use it in GitHub Desktop.
개발환경에 필요한 스크립트 모음
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
source scl_source enable devtoolset-7 | |
set -o vi | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1='\[\e[0;36m\]\u\[\e[0m\]@\[\e[0;33m\]\h\[\e[0m\]$(parse_git_branch)\[\e[0;35m\] | |
\w\[\e[0m\]\$ ' |
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
# remap prefix from 'C-b' to 'C-a' | |
set -sg escape-time 0 | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# Start window numbering at 1 | |
set -g base-index 1 | |
cd | |
git clone https://github.com/gpakosz/.tmux.git | |
ln -s -f .tmux/.tmux.conf | |
cp .tmux/.tmux.conf.local . |
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
pacman -S mariadb | |
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql | |
systemctl start mariadb | |
/usr/bin/mysql_secure_installation |
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
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
sudo yum install -y neovim python36-neovim | |
curl -s -L https://raw.githubusercontent.com/hsnks100/layervim/master/install-script.sh | bash | |
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
wget https://cmake.org/files/v3.17/cmake-3.17.0.tar.gz | |
tar -zxvf cmake-3.17.0.tar.gz | |
cd cmake-3.17.0 | |
./bootstrap | |
make | |
make 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
sudo yum -y install centos-release-scl | |
sudo yum install devtoolset-7 -y | |
scl enable devtoolset-7 bash | |
. /opt/rh/devtoolset-7/enable |
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
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine | |
sudo yum install -y yum-utils device-mapper-persistent-data lvm2 | |
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo | |
sudo yum install docker-ce -y | |
sudo systemctl start docker | |
sudo systemctl enable docker | |
sudo systemctl status docker | |
sudo usermod -aG docker $USER | |
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
centos6 | |
sudo yum install gnutls-devel wget ncurses-devel -y | |
wget http://mirror.yongbok.net/gnu/emacs/emacs-27.1.tar.gz | |
tar zxvf emacs-27.1.tar.gz | |
cd emacs-27.1 | |
./configure --with-x=no | |
make -j4 | |
sudo make install | |
git clone https://github.com/hsnks100/emacs.d.git ~/.emacs.d | |
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
sudo rpm -Uvh http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm | |
sudo yum --enablerepo=WANdisco-git --disablerepo=base,updates info git | |
sudo yum install git -y |
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 -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh" | sudo bash | |
sudo yum install gitlab-runner -y |
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
sudo su | |
wget https://golang.org/dl/go1.19.linux-amd64.tar.gz | |
tar zxvf go1.18.linux-amd64.tar.gz | |
mv go /usr/local/ | |
echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile | |
# 1.19 arm | |
wget -O golang.tar.gz https://go.dev/dl/go1.19.4.linux-arm64.tar.gz | |
tar zxvf golang.tar.gz | |
mv go /usr/local/ | |
echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile | |
# 1.19 amd | |
wget -O golang.tar.gz https://go.dev/dl/go1.19.4.linux-amd64.tar.gz | |
tar zxvf golang.tar.gz | |
mv go /usr/local/ | |
echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile |
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
sudo yum install wget -y | |
wget https://github.com/nats-io/nats-server/releases/download/v2.8.2/nats-server-v2.8.2-linux-amd64.tar.gz | |
tar zxvf nats-server-v2.8.2-linux-amd64.tar.gz | |
cd nats-server-v2.8.2-linux-amd64 | |
cat<<EOF > run.sh | |
nohup ./nats-server -c jet.conf -l log.txt& | |
EOF | |
chmod +x run.sh | |
# nats1 | |
# jet.conf | |
server_name=n1-c1 | |
write_deadline: 180s | |
jetstream: enabled | |
jetstream { | |
max_mem: 5G | |
max_file: 100G | |
} | |
listen=4222 | |
http_port: 8222 | |
cluster { | |
name: C1 | |
listen: 0.0.0.0:6222 | |
routes: [ | |
nats-route://hostb:6222 | |
nats-route://hostc:6222 | |
] | |
} | |
# nats2 | |
# jet.conf | |
server_name=n2-c1 | |
write_deadline: 180s | |
jetstream: enabled | |
jetstream { | |
max_mem: 5G | |
max_file: 100G | |
} | |
listen=4222 | |
http_port: 8222 | |
cluster { | |
name: C1 | |
listen: 0.0.0.0:6222 | |
routes: [ | |
nats-route://hosta:6222 | |
nats-route://hostb:6222 | |
] | |
} | |
# nats3 | |
# jet.conf | |
server_name=n3-c1 | |
write_deadline: 180s | |
jetstream: enabled | |
jetstream { | |
max_mem: 5G | |
max_file: 100G | |
} | |
listen=4222 | |
http_port: 8222 | |
cluster { | |
name: C1 | |
listen: 0.0.0.0:6222 | |
routes: [ | |
nats-route://hosta:6222 | |
nats-route://hostb:6222 | |
] | |
} |
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
sudo yum-config-manager --add-repo=https://copr.fedorainfracloud.org/coprs/carlwgeorge/ripgrep/repo/epel-7/carlwgeorge-ripgrep-epel-7.repo | |
sudo yum install ripgrep -y |
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
sudo yum install libevent-devel ncurses-devel -y | |
wget https://github.com/tmux/tmux/releases/download/3.1c/tmux-3.1c.tar.gz | |
tar zxvf tmux-3.1c.tar.gz | |
cd tmux-3.1c | |
./configure | |
make -j4 && sudo make 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
sudo pacman -S fcitx-hangul fcitx-configtool | |
sudo pacman -S terminus-font noto-fonts-cjk ttf-dejavu | |
~/.Xmodmap | |
clear lock | |
keysym Caps_Lock = Escape | |
~/.xinitrc | |
xset r rate 200 25 | |
export GTK_IM_MODULE=fcitx | |
export QT_IM_MODULE=fcitx | |
export XMODIFIERS=@im=fcitx | |
exec fcitx > /dev/null & | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment