Go to content

geek_stuff/server & linux

(54)
killport - in bash I found an command-line utility called `killport` written in rust. https://github.com/jkfran/killport A command-line tool to easily kill processes running on a specified port. Features: Kill processes by port number Supports multiple port numbers Verbosity control Works on Linux and macOS Personally thining, using rust to do this kind of task is just overkill. How many times would this be called..
How to fuzzy cd (change directory) to specific directory I've been working on IT fields for more than decades and there are lots of code repositories and snippets. It's all over in github, gitlab, bitbucket, and all different organizations. When one day I realized I have all these repositories thrown into single folder ~/repo, then I decided to organize these folders by grouping them into company name. ~$ cd repo ~/repo$ ls companyA companyB companyC ..
How to transfer docker image through ssh When running multiple dockers on your network, there are times you can push and pull docker images back and forth. To local image to other external docker service: docker save name:tag | bzip2 | ssh remote docker load even for more visual way docker save imgName:tag | bzip2 | pv | ssh 192.168.0.x docker load You don't need to save to file and move the file and load the file. This answer is avail..
Setup NTP synchronization in WSL2 Ubuntu 20.04 There are lots of attempts to sync time on wsl2, as it somehow clock drifts. To name few: Edit sudoers and add ntpdate on .bashrc : https://github.com/microsoft/WSL/issues/4149 Use wsl2 command line to execute update command: https://tomssl.com/fixing-clock-drift-in-wsl2-using-windows-terminal/ put timesync in windows task scheduler: https://stuartleeks.com/posts/fixing-clock-skew-with-wsl-2/ Ho..
우분투 preseed 예제 # Ubuntu Server Quick Install# by Dustin Kirkland # * Documentation: http://bit.ly/uquick-doc# modified by ikko ################################################################################### Localization ###################################################################################d-i debian-installer/locale string en_US.UTF-8d-i debian-installer/splash boolean falsed-i console-setup/a..
apt 사용시 proxy 사용 apt 사용할 때 proxy 뒤에 있지만 local mirroring 이 존재할 때, 다음과 같은 설정을 추가하면 된다.root@client:# vi /etc/apt.conf Acquire::http::proxy { 192.168.0.1 DIRECT; "http://192.168.0.254:3128/"; }; Acquire::https::proxy { 192.168.0.1 DIRECT; "https://192.168.0.254:3128/"; }; Acquire::ftp::proxy { 192.168.0.1 DIRECT; "ftp://192.168.0.254:3128/"; }; Acquire::socks::proxy { 192.168.0.1 DIRECT; "socks://192.168.0.254:3128/..
ubuntu repository mirroring 우분투 레포지토리 미러링 내부에 ubuntu 설치된 pc나 서버가 여러대일 경우 각각 하나씩 다운받는 것보다 미러링을 받는게 훨씬 빠르다.미러링은 의외로 간단한 듯. 1. 서버에서 설정하기 일단 apt-mirror를 설치 root@server:/# apt-get install apt-mirror 이후 /etc/apt/mirror.list를 수정i-386과 amd-64를 동시에 미러링 한다면 다음과 같이 설정 ############# config ################## # set base_path /backup/backupdisk1/ubuntu # # set mirror_path $base_path/mirror # set skel_path $base_path/skel # set var_path ..
GIT 이전 GIT public repository 이전 apt-get intall git git-core git-daemon /etc/service/git-daemon 의 내용을 편집#!/bin/sh exec 2>&1 echo 'git-daemon starting.' exec chpst -ugitdaemon \ "$(git --exec-path)"/git-daemon --verbose --reuseaddr \ --base-path=/repository/git/public --export-all --syslog --detach 레포지토리의 path를 --base-path 이후에 적어준다. 이후 기존 repository를 통째로 들고와서 --base-path 에 명시한 디렉토리에 복사. 끝~