본문 바로가기

linux

(7)
[curl] api command curl option Curl is easy to use. Some popular options that you can use are: -L: tells curl to follow redirects ​-X: indicates the HTTP method to use -H: adds a header to the request -T: points to an upload file curl.se/docs/manpage.html curl - How To Use curl.se
linux command file permission check $ls -l filename r : read permission. w : write permission. x : executable permission. First combination of rwx represents permission for the owner . Second combination of rwx represents permission for the group . Third combination of rwx represents permission for the other of the file. Octal notation (8진법 숫자로 표현) Read or r is represented by 4 Write or w is represented by 2 Execute x is represent..
[sudo] sudo vi 시 readonly 해결 $sudo bash $chattr -i /etc/sudoers $chmod u+w /etc/sudoers $sudo vi /etc/sudoers (수정) :wq $exit $sudo cat /etc/sudoers
[yum] install specific repository yum install pssh yum install --enablerepo=epel_repo install pssh yum install --disablerepo=* --enablerepo=epel_repo install pssh
[yum] centos7 에서 yum command 안될때 (cannot access internet) 인터넷 환경 없는 local 에서 방법 /etc/yum.repos.d/ 경로에 repo파일을 만들어서 baseurl 셋팅을 해줘야함. 기존 파일 CentOS-Base.repo 에 baseurl은 주석처리 vi localRepo.repo [localRepo] name = local library baseurl=http://mainhost/localyumrepo gpgcheck=1 enabled=1 vi epel.repo [epel_repo] name = epel_repo baseurl=http://mainhost/epel gpgcheck=0 enabled=1 yum repolist yum list cf) 구글링해서 찾은 결과 (인터넷환경) $route $sudo cat /etc/sysconfig/netwo..
[ssh] 관리서버에서 ssh 로그인(비밀번호입력) 없이 접속 설정 (main host) $ssh-keygen (중간에 나오는것들은 enter) (main host) $ssh-copy-id -i ~/.ssh/id_rsa.pub id@remote_host $ssh id@remote_host 비밀번호 요구하지 않는지 확인
[command] find filename/directoryname 파일명 찾기 find . -name "filename" 디렉토리 찾기 find . -name "dirname" -type d