ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Redhat OS 초기 설정하기
    Linux 2024. 4. 24. 15:56

    1. root 설정

     

    $ su -

    $ passwd

     

    $ vi  /etc/ssh/sshd_config

    {

              PermitRootLogin   yes

              GSSAPIAuthentication   no

              UseDNS  no

    }

     

    $ systemctl   restart   sshd

     

     

    $ chmod    755    /etc/sudoers

    $ vi    /etc/sudoers

    $ chmod    400    /etc/sudoers

     

    $ echo    nameserver   8.8.8.8    >    /etc/resolv.conf

    $ hostnamectl     set-hostname    { 호스트명 } 
     

     

     

    2. Repositoy 설정

    -- Redhat ID 를 등록하여 레포지토리 설정하기

     

     

    $ subscription-manager   register

     

    **서브크립션 데이터 제거 : subscription-manager   clean

     

     

     

    3. 로컬로 Repository 설정

    -- iso 파일 winSCP 업로드

     

    $ yum   clean   all      // 기존에 구성했던 repo 의 캐시를 완전히 삭제하기

    $ mkdir       /mnt/disc
    $ mount     /tmp/rhel-7.6-x86_64-dvd.iso      /mnt/disc

     

     

       3-1. rhel 7버전 일 때,

     

    $ vi    /etc /yum.repos.d/ rhel_dvd.repo
    {
              [rhel_dvd]
              name=Redhat 7.9
              baseurl=file:///mnt/disc/
              enabled=1
              gpgcheck=0
    }

     

       3-2. rhel 8버전 이상일 경우,  (BaseOS / AppStream) 을 각각 설정하기

    $ vi    /etc/yum.repos.d/rhel_dvd.repo
    {
              [BaseOS]
              name= rhel-DVD-BaseOS
              baseurl=file:///mnt/disc/BaseOS
              enabled=1
              gpgcheck=0

              [AppStream]
              name=rhel-DVD-AppStream
              baseurl=file:///mnt/disc/AppStream
              enabled=1
              gpgcheck=0
    }

     

    $ yum    repolist

    $ vi   /etc/fstab
    {
               /tmp/rhel-server-7.9-x86_64-dvd.iso       /mnt/disc        iso9660      loop          0 0
    }
     

     

     

     

    4. 레포지토리 URL 추가하고 싶을 때,

    $ dnf     config-manager     --add-repo     {http://podman-run.example.com/BaseOS}

     

     

     

     

     

     

     

     

     

    'Linux' 카테고리의 다른 글

    Port 오픈여부 확인  (0) 2024.05.08
    Linux Config 설정하기  (0) 2024.05.07
    패스워드 입력없이 SSH 접속하기  (0) 2024.04.30
    SSL 인증서 생성하기  (0) 2024.04.29
    Ubuntu OS 초기 설정하기  (0) 2024.04.29
Designed by Tistory.