TimeZone Setting
1 2 3 4 5 6 7 |
ls -l /etc/localtime cd /etc sudo rm -rf localtime sudo ln -s /usr/share/zoneinfo/Asia/Seoul localtime # time changed UTC -> KST date |
package update
1 2 3 4 5 |
sudo apt update sudo apt upgrade do-release-upgrade sudo apt autoclean sudo apt autoremove |
Util Install & Setting
1 2 3 4 5 |
# install Utils sudo apt install build-essential sudo apt install net-tools colordiff colortail mc subversion neofetch fortune-mod lolcat cowsay bat htop btop exa fd-find ripgrep colortail sudo ln -s $(whih fdfind) /usr/local/bin/fd |
.ssh login 처리
after edit ~/.ssh/authorized_keys from have to login client’s ~/.ssh/id_rsa.pub
sudoer 처리
after modify /etc/sudoers.d/init-user
zsh Install & Setting
1 2 3 4 5 6 7 8 9 |
sudo apt install zsh chsh -s /usr/bin/zsh # install ohmyzsh sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # zsh plugin install git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting |
after copy .zshrc to ~
tmux Install & Setting
1 2 3 4 5 |
# install tmux sudo apt install tmux git clone https://github.com/gpakosz/.tmux.git ln -s ~/.tmux/.tmux.conf cp ~/.tmux/.tmux.conf.local ~ |
after edit .tmux.conf.local
nvim 설정
1 2 3 4 5 6 7 8 9 10 11 |
# install neovim sudo add-apt-repository ppa:neovim-ppa/stable sudo apt update sudo apt install neovim # install spacevim curl -sLf https://spacevim.org/install.sh | bash # install plug.vim sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' |
after copy init.vim to ~/.SpaceVim/
after copy init.toml to ~/.SpaceVim.d/
1 2 3 |
# have to do cause when do sudo vi to execute nvim rm -rf /usr/bin/vi ln -s /usr/bin/nvim /usr/bin/vi |
after run vi
1 |
:PlugInstall |
root zsh & nvim 처리
1 2 3 4 5 6 7 8 9 |
sudo su - # install ohmyzsh sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # zsh plugin install git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting cp /home/user/.zshrc ~ |
after modify oh-my-zsh pass on export ZSH “/home/user/.oh-my-zsh” to “/root/.oh-my-zsh” on .zshrc
1 2 3 4 5 6 7 8 9 |
# install spacevim curl -sLf https://spacevim.org/install.sh | bash # install plug.vim sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' cp /home/usr/.SpaceVim/init.vim ~/.SpaceVim/ cp /home/usr/.SpaceVim.d/init.toml ~/.SpaceVim.d/ |
after run vi
1 |
:PlugInstall |
pip Install & Setting (for nvim)
1 2 |
sudo apt install python3-pip pip install neovim pyright pynvim |
nodejs & npm Install & Setting (for nvim)
1 2 |
sudo npm -g update sudo npm -g install bash-language-server create-react-app emmet-ls eslint intelephense jshint neovim nodemon prettier tree-sitter-cli typescript-language-server typescript vim-language-server vscode-langservers-extracted |
LogWatcher
1 |
sudo apt install mailutils postfix |
after modify /etc/postfix/main.cf
1 2 |
sudo apt install logwatch sudo cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf/ |
after modify /etc/logwatch/conf/logwatch.conf
after modify /etc/mailname
OpenVpn Server 처리
1 2 3 4 5 6 |
sudo apt install openvpn easy-rsa mkdir easy-rsa cd easy-rsa ln -s /usr/share/easy-rsa/* ~/easy-rsa cp vars.example vars |
after modify vars
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
. ./vars # generate ca ./easyrsa init-pki ./easyrsa build-ca # generate server cert ./easyrsa gen-req myservername nopass ./easyrsa gen-dh ./easyrsa sign-req server myservername openvpn --genkey --secret ta.key # generate client cert ./easyrsa gen-req myclient1 nopass ./easyrsa sign-req client myclient1 |
OpenVpn Client 처리
1 |
sudo apt install oepnvpn |
after copy ca.crt, ta.key, client.key, client.crt, client.ovpn to /etc/openvpn
after edit /etc/default/openvpn for openvpn auto start
1 2 3 4 5 6 |
sudo systemctl enable openvpn@client.service sudo systemctl daemon-reload sudo service openvpn@client start # testing after reboot ip addr |
APM 처리
1 |
sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql php-{bcmath,gd,mbstring,xml,imagick,zip,xmlrpc,intl,curl} |
SVN Server 처리
1 |
sudo apt install subversion sasl2-bin |
after copy /etc/init.d/svnserve
1 2 3 4 5 6 7 8 |
sudo chmod 755 svnserve sudo update-rc.d svnserve defaults sudo service svnserve start # user manage sudo saslpasswd2 -c id -u group # create user sudo sasldblistusers2 sudo saslpasswd2 -d anydragon # delete user |
Leave a Reply