사용자 도구

사이트 도구


wiki:os:linux

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
wiki:os:linux [2022/09/22 22:08]
r_kimmk [주요 명령어]
wiki:os:linux [2023/11/14 21:07] (현재)
r_kimmk
줄 17: 줄 17:
   * [[wiki:os:linux:슬랙웨어|Slackware, 슬랙웨어]]   * [[wiki:os:linux:슬랙웨어|Slackware, 슬랙웨어]]
   * [[wiki:os:linux:데비안|데비안]]   * [[wiki:os:linux:데비안|데비안]]
 +
 +===== 한글 언어팩 설정 =====
 +locale -a | grep ko 했을 때 안나오면 아래와 같이 명령어를 써주면 된다. \\
 +보통은 서버셋팅 업체에 요청한다.
 +<code bash>
 +# root 계정으로 작업
 +shell$> localedef -i ko_KR -f EUC-KR ko_KR.euckr
 +shell$> localedef -i ko_KR -f UTF-8 ko_KR.utf8
 +</code>
 +
 +===== gcc 및 검색엔진 컴파일에 필요한 라이브러리 (rpm 설치) =====
 +아래의 순서대로 무조건 따라하기! \\
 +순서가 중요한 이유는 의존성 때문이다.\\
 +CentOS 7.9.2002 기준 라이브러리\\
 +[[http://temp.repia.com/Utility/rpm/centos7.9.2002/rpm.tar.gz|[CentOS_7.9.2002 rpm 다운로드 하기]]]LOL
 +
 +<code bash>
 +# ssh
 +# --nodeps 의존성 무시 옵션
 +shell$> rpm -ivh --nodeps fipscheck-lib-1.4.1-6.el7.x86_64.rpm
 +shell$> rpm -ivh fipscheck-1.4.1-6.el7.x86_64.rpm
 +shell$> rpm -ivf tcp_wrappers-libs-7.6-77.el7.x86_64.rpm
 +shell$> rpm -ivh libedit-3.0-12.20121213cvs.el7.x86_64.rpm
 +shell$> rpm -ivh openssh-7.4p1-21.el7.x86_64.rpm
 +shell$> rpm -ivh openssh-server-7.4p1-21.el7.x86_64.rpm
 +shell$> rpm -ivh openssh-clients-7.4p1-21.el7.x86_64.rpm
 +
 +
 +#gcc
 +shell$> rpm -ivh mpfr-3.1.1-4.el7.x86_64.rpm
 +shell$> rpm -ivh libmpc-1.0.1-3.el7.x86_64.rpm
 +shell$> rpm -ivh cpp-4.8.5-44.el7.x86_64.rpm
 +shell$> rpm -ivh libgomp-4.8.5-44.el7.x86_64.rpm
 +shell$> rpm -ivh kernel-headers-3.10.0-1160.el7.x86_64.rpm
 +shell$> rpm -ivh glibc-headers-2.17-317.el7.x86_64.rpm
 +shell$> rpm -ivh glibc-devel-2.17-317.el7.x86_64.rpm
 +shell$> rpm -ivh gcc-4.8.5-44.el7.x86_64.rpm
 +
 +#c++
 +shell$> rpm -ivh libstdc++-devel-4.8.5-44.el7.x86_64.rpm
 +shell$> rpm -ivh libstdc++-4.8.5-44.el7.x86_64.rpm
 +shell$> rpm -ivh gcc-c++-4.8.5-44.el7.x86_64.rpm
 +
 +# 컴파일 필요 라이브러리
 +shell$> rpm -ivh m4-1.4.16-10.el7.x86_64.rpm
 +shell$> rpm -ivh bison-3.0.4-2.el7.x86_64.rpm
 +shell$> rpm -ivh flex-2.5.37-6.el7.x86_64.rpm
 +
 +# make
 +shell$> rpm -ivh make-3.82-24.el7.x86_64.rpm
 +
 +#기타(Telnet)
 +shell$> rpm -ivh telnet-0.17-65.el7_8.x86_64.rpm
 +</code>
  
 ===== 주요 명령어 ===== ===== 주요 명령어 =====
줄 79: 줄 133:
 // 15. 서버 시간 동기화 (root계정의 crontab -e 로 열고 저장 crontab -l 로 저장 된 내용 확인) // 15. 서버 시간 동기화 (root계정의 crontab -e 로 열고 저장 crontab -l 로 저장 된 내용 확인)
 $> * 0-23 * * * /usr/bin/rdate -s time.bora.net && /sbin/clock -w $> * 0-23 * * * /usr/bin/rdate -s time.bora.net && /sbin/clock -w
 +
 +// 리눅스 압축하기 SearchApp 디렉토리를 압출 할 때 tar czvf [생성파일명].tar.gz [대상(파일|디렉토리)]
 +$> tar czvf search.tar.gz SearchApp
 +// 리눅스 압축풀기 search.tar.gz
 +$> tar zxvf search.tar.gz
 +//리눅스 분할 압축
 +$> 
 +
 +
 </code> </code>
  
줄 130: 줄 193:
 서비스 등록 서비스 등록
 <code bash> <code bash>
-[root@www ~] cat /usr/lib/systemd/system/Search_Daemon.service+[root@www ~] cat /usr/lib/systemd/system/search_engine.service
 [Unit] [Unit]
-Description=Search_Daemon+Description=search engine
 After=network.target syslog.target After=network.target syslog.target
  
줄 140: 줄 203:
 Group=운영그룹 Group=운영그룹
  
-ExecStart=/opt/search/RSA/bin/RSS_START.sh start +ExecStart=/data/SearchApp/RSA/bin/RSS_START.sh start 
-ExecStop=/opt/search/RSA/bin/RSS_STOP.sh stop+ExecStop=/data/SearchApp/RSA/bin/RSS_STOP.sh stop
  
 [Install] [Install]
줄 154: 줄 217:
  
 [[https://saksin.tistory.com/1281|CentOS7 서비스 관리]] \\ [[https://saksin.tistory.com/1281|CentOS7 서비스 관리]] \\
 +[[https://www.thegeekdiary.com/how-to-enable-or-disable-service-on-boot-with-chkconfig/|How to enable or disable service on boot with chkconfig]]
 ===== Domain Name Service ===== ===== Domain Name Service =====
  * [[wiki:repia:호스트 등록 하는 방법|호스트를 추가하려면 어떻게 해야 하나요?]]  * [[wiki:repia:호스트 등록 하는 방법|호스트를 추가하려면 어떻게 해야 하나요?]]
줄 179: 줄 242:
  
 ===== Logratate ===== ===== Logratate =====
-[[https://zinyboy.blog.me/220651013609|logrotate 설정하기]]+<del>[[https://zinyboy.blog.me/220651013609|logrotate 설정하기]]</del>
  
 /etc/logrotate.d/snsspider /etc/logrotate.d/snsspider
줄 259: 줄 322:
   * [[wiki:os:linux:검색엔진 사용자 로그를 다른 곳으로 옮기기(로컬)]]   * [[wiki:os:linux:검색엔진 사용자 로그를 다른 곳으로 옮기기(로컬)]]
   * [[wiki:os:linux:SELinux 설정(방화벽을 내려도 포트가 닫혀 있을 때 확인)]]   * [[wiki:os:linux:SELinux 설정(방화벽을 내려도 포트가 닫혀 있을 때 확인)]]
 +  * [[wiki:os:linux:DNS를 등록하는 방법]]
  
   * [[https://kkckc.tistory.com/185|Centos 5 Yum이 안될때]]   * [[https://kkckc.tistory.com/185|Centos 5 Yum이 안될때]]
줄 264: 줄 328:
  
 ===== Tip ===== ===== Tip =====
 +==== 리눅스 파일 생성 테스트 쉘 스크립트 ==== 
 +>아래의 쉘스크립트는 파일 2만개를 순차적으로 생성하는데 생성 시 용량을 1MB로 한다
 +<code bash>
 +[root@dns ~] vi testmkdir.sh
 +=========== 내용 작성 ===========
 +
 +#!/bin/bash
 +
 +for ((var=0; var < 20000 ; var++));
 +do
 +        touch a_$var.txt
 +        dd if=/dev/zero of=/test/a_$var.txt bs=1M count=1
 +done
 +
 +=========== 내용 종료 ===========
 +</code>
 +
 +  * [[https://devpouch.tistory.com/128|쉘스크립트 for문 만들기]]
 +  * [[https://araikuma.tistory.com/115|touch 사용해서 파일 만들기]]
 +  * [[https://cleverdj.tistory.com/99|윈도우/리눅스 명령어를 이용해서 원하는 크기 파일 만들기]]
 +  * [[https://selene0301.tistory.com/134|[CentOS] Root Password 분실시 초기화 방법]]
 +
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
/volume1/web/dokuwiki/data/attic/wiki/os/linux.1663852120.txt.gz · 마지막으로 수정됨: 2022/09/22 22:08 저자 r_kimmk