본문 바로가기
구 블로그 보관처

CentOS 설치 2 - Minimal 기본 설치 후 해야 할 일들 (1/2)

by 만수킴 2020. 7. 17.

* ​Minimal 기본 설치 후 해야 할 일들 정리 (1/2)

 

CentOS 6.5 Minimal 리눅스 서버

이 내용이 얼마나 도움이 되셨나요? 피드백이 기록되었습니다. 감사합니다. 전혀 도움이 되지 않음도움이 되지 않음조금 도움이 됨도움이 됨매우 도움이 됨

www.3rabbitz.com

 

CentOS minimal(최소) 설치후 추가 패키지 설치

 

www.lesstif.com

 
 
 

CentOS 6.5 Minimal 리눅스 서버

이 내용이 얼마나 도움이 되셨나요? 피드백이 기록되었습니다. 감사합니다. 전혀 도움이 되지 않음도움이 되지 않음조금 도움이 됨도움이 됨매우 도움이 됨

www.3rabbitz.com

 

    • 아래의 순서대로 설치한 서버의 사양과 맞는지 확인을 한다.
    •  
[root@centos ~]# cat /etc/centos-release
CentOS release 6.5 (Final)

[root@centos ~]# cat /etc/redhat-release
CentOS release 6.5 (Final)

[root@centos ~]# cat /etc/system-release
CentOS release 6.5 (Final)

[root@centos ~]# cat /etc/system-release-cpe
cpe:/o:centos:linux:6:GA

[root@centos ~]# cat /proc/version
Linux version 2.6.32-431.11.2.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Tue Mar 25 19:59:55 UTC 2014

[root@centos ~]# arch
x86_64

[root@centos ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Pentium(R) Dual  CPU  E2140  @ 1.60GHz
stepping        : 13
cpu MHz         : 1600.010
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm dts
bogomips        : 3200.02
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Pentium(R) Dual  CPU  E2140  @ 1.60GHz
stepping        : 13
cpu MHz         : 1600.010
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm dts
bogomips        : 3200.02
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

[root@centos ~]# cat /proc/meminfo
MemTotal:        1854372 kB
MemFree:         1702472 kB
Buffers:            7748 kB
Cached:            37696 kB
SwapCached:            0 kB
Active:            23420 kB
Inactive:          33652 kB
Active(anon):      11612 kB
Inactive(anon):      280 kB
Active(file):      11808 kB
Inactive(file):    33372 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       4194296 kB
SwapFree:        4194296 kB
Dirty:                 8 kB
Writeback:             0 kB
AnonPages:         11600 kB
Mapped:             6276 kB
Shmem:               292 kB
Slab:              62788 kB
SReclaimable:       9524 kB
SUnreclaim:        53264 kB
KernelStack:         816 kB
PageTables:         1448 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     5121480 kB
Committed_AS:      61812 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       84528 kB
VmallocChunk:   34359638068 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:        8064 kB
DirectMap2M:     2086912 kB
[root@centos ~]# 
[root@centos ~]# 
[root@centos ~]# 
[root@centos ~]# cat /proc/partitions
major minor  #blocks  name

   8        0  390711384 sda
   8       16  195360984 sdb
   8       17    1048576 sdb1
   8       18   20971520 sdb2
   8       19   20971520 sdb3
   8       20          1 sdb4
   8       21   10485760 sdb5
   8       22   10485760 sdb6
   8       23    8388608 sdb7
   8       24    4194304 sdb8
   8       25    4194304 sdb9
   8       26  114613248 sdb10

[root@centos ~]# hostname
centos.tanker

 

 

 

 

 

  •  
    • 설치시 국가와 언어를 영어로 선택하고 셋팅한 후 수정하는 방식으로 하였음.
      (검색해보면, 한글을 선택하라는 사람도 있지만, 많은 웹문서들이 영문 선택이었다고 판단하였음)
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      [root@centos ~]# vi /etc/sysconfig/i18n
       
      #LANG="en_US.UTF-8"                --> 주석 처리함
      #SYSFONT="latarcyrheb-sun16"  --> 주석 처리함
       
      # 하단의 내용을 복사하여 붙임.
      LANG="ko_KR.UTF-8"
      SUPPORTED="en_US.iso885915:en_US:en:ko_KR.eucKR:ko_KR:ko"
      SYSFONT="latarcyrheb-sun16"
      SYSFONTACM="iso15"

       

       

    • Reboot or source /etc/profile or source /etc/sysconfig/i18n
      세가지 명령 중 하나를 실행하여 적용한다.
      1
      2
      3
      4
      5
      [root@centos ~]# Reboot 
       
      [root@centos ~]# source /etc/profile 
       
      [root@centos ~]# source /etc/sysconfig/i18n

       

       

    • SecureCRT 설정 변경 후 재접속


    • 한글이 보여지는지 테스트
      1
      2
      3
      4
      5
      6
      [root@centos ~]# ls
      anaconda-ks.cfg  install.log  install.log.syslog  한글테스트.txt
       
      [root@centos ~]# cat 한글테스트.txt
      한글 입력 테스트. 잘 보여지는지 보자.
      한문 : 金萬洙
 

CentOS 6.5 Minimal 리눅스 서버

이 내용이 얼마나 도움이 되셨나요? 피드백이 기록되었습니다. 감사합니다. 전혀 도움이 되지 않음도움이 되지 않음조금 도움이 됨도움이 됨매우 도움이 됨

www.3rabbitz.com

 

CentOS 6.5 Minimal 리눅스 서버

이 내용이 얼마나 도움이 되셨나요? 피드백이 기록되었습니다. 감사합니다. 전혀 도움이 되지 않음도움이 되지 않음조금 도움이 됨도움이 됨매우 도움이 됨

www.3rabbitz.com

 

 
 
 
  • 패키지 저장소 추가 
    (http://starkapin.tistory.com/498 , https://www.3rabbitz.com/f01c33e7d8367da2#d7a8fe69191a7f7d)
    • CentOS의 기본 저장소에는 (엄청나게) 낮은 버전이 관리되고 있다고 함. 
    • 좀 더 높은 버전을 사용하기 위해서는 직접 소스 설치를 권장하고, 
    • 그나마 편하게 사용하고 싶다면 "REMI" 저장소를 추천한다고 함.
    • 대부분 rpm으로 설치하는 방법으로 나와있지만, 여기에서는 "yum install"로 설치한다.
    • 웹사이트의 rpm 다운로드 URL이 이전 버전인 경우가 많다. 복사해서 쓰지 말고 시스템에 맞는 파일을 직접 찾아서 써야 함.

    • http://repoforge.org/use/ 에서 RPM 파일을 다운로드 받아서 설치한다.
      (여기서는 rpm을 이용하지 않고, 다운로드 링크를 이용하여 yum으로 설치함)
      1
      yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm


    • http://fedoraproject.org/wiki/EPEL 에서 RPM 파일을 다운로드 받아서 설치한다.
      1
      yum install http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm


    • http://rpms.famillecollet.com/ 에서 RPM 파일을 다운로드 받아서 설치한다.
      (http://rpms.famillecollet.com/enterprise/ 6.5 폴더도 있고, 다양한 PHP 버전이 있는데, 확신이 없어서 그냥 아래 버전으로 인스톨함)
      1
      yum install http://rpms.famillecollet.com/enterprise/remi-release-6.rpm


    • http://wiki.centos.org/PackageManagement/Yum/Priorities 를 설정한다.
      어떻게 하라는건지 알수가 없다... (여기서 막혔네... 그래도 아래 설정을 이용하면 무언가 가능한 듯... 매번 명령어에 옵션을 줘야 하는 일이 번거롭긴 하지만...)
      향후 더 공부하여 추가적으로 정리하자.

    • 사용 방법  :  yum --enablerepo=저장소이름 옵션
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      [root@centos ~]# yum check-update
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile
      Excluding mirror: data.nicehosting.co.kr
       * base: centos.mirror.cdnetworks.com
       * epel: mirror.premi.st
      Excluding mirror: data.nicehosting.co.kr
       * extras: centos.mirror.cdnetworks.com
       * rpmforge: ftp.riken.jp
       * updates: centosd6.centos.org
       
       
      [root@centos ~]# yum --enablerepo=epel,rpmforge,remi check-update
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile
      Excluding mirror: data.nicehosting.co.kr
       * base: centos.mirror.cdnetworks.com
       * epel: mirror.premi.st
      Excluding mirror: data.nicehosting.co.kr
       * extras: centos.mirror.cdnetworks.com
       * remi: remi.kazukioishi.net
       * rpmforge: ftp.riken.jp
       * updates: centosd6.centos.org
       
      mysql-libs.x86_64                                     5.5.37-1.el6.remi                                      remi
       
       
      [root@centos ~]# yum --disablerepo=epel,rpmforge,remi check-update
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile
      Excluding mirror: data.nicehosting.co.kr
       * base: centos.mirror.cdnetworks.com
      Excluding mirror: data.nicehosting.co.kr
       * extras: centos.mirror.cdnetworks.com
       * updates: centosd6.centos.org
       
       
      [root@centos ~]# yum check-update
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile
      Excluding mirror: data.nicehosting.co.kr
       * base: centos.mirror.cdnetworks.com
       * epel: mirror.premi.st
      Excluding mirror: data.nicehosting.co.kr
       * extras: centos.mirror.cdnetworks.com
       * rpmforge: ftp.riken.jp
       * updates: centosd6.centos.org


 
 
  • 시스템 업데이트 (참조한 URL)
    • 느린 YUM Public mirror를 제외(exclude) 시킴 (https://www.3rabbitz.com/f01c33e7d8367da2#e583e3012673d6fe)
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      [root@centos ~]# vi /etc/yum/pluginconf.d/fastestmirror.conf 
      [main]
      enabled=1
      verbose=0
      always_print_best_host = true
      socket_timeout=3
      #  Relative paths are relative to the cachedir (and so works for users as well
      # as root).
      hostfilepath=timedhosts.txt
      maxhostfileage=10
      maxthreads=15
      #exclude=.gov, facebook
      #include_only=.nl,.de,.uk,.ie
       
      exclude=mirror.khlug.org, data.nicehosting.co.kr       --> 느린 서버 제외 설정
    • 기본 커널 업데이트
         yum update kernel
         yum update kernel -PAE (32Bit 시스템에서 메모리가 4GB 이상일 경우에 수행)
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      48
      49
      50
      51
      52
      53
      54
      55
      56
      57
      58
      59
      60
      61
      62
      63
      64
      65
      66
      67
      68
      69
      70
      71
      72
      73
      74
      75
      [root@centos ~]# yum --enablerepo=epel,rpmforge,remi update kernel
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile
      Excluding mirror: data.nicehosting.co.kr
       * base: ftp.daum.net
      Excluding mirror: data.nicehosting.co.kr
       * extras: ftp.daum.net
      Excluding mirror: data.nicehosting.co.kr
       * updates: ftp.daum.net
      base                                                                                       | 3.7 kB     00:00     
      extras                                                                                     | 3.4 kB     00:00     
      updates                                                                                    | 3.4 kB     00:00     
      updates/primary_db                                                                         | 2.6 MB     00:00     
      Setting up Update Process
      Resolving Dependencies
      --> Running transaction check
      ---> Package kernel.x86_64 0:2.6.32-431.11.2.el6 will be installed
      --> Processing Dependency: kernel-firmware >= 2.6.32-431.11.2.el6 for package: kernel-2.6.32-431.11.2.el6.x86_64
      --> Running transaction check
      ---> Package kernel-firmware.noarch 0:2.6.32-431.el6 will be updated
      ---> Package kernel-firmware.noarch 0:2.6.32-431.11.2.el6 will be an update
      --> Finished Dependency Resolution
       
      Dependencies Resolved
       
      ===================================================================
       Package                       Arch                 Version                           Repository             Size
      ===================================================================
      Installing:
       kernel                        x86_64               2.6.32-431.11.2.el6               updates                28 M
      Updating for dependencies:
       kernel-firmware               noarch               2.6.32-431.11.2.el6               updates                13 M
       
      Transaction Summary
      ===================================================================
      Install       1 Package(s)
      Upgrade       1 Package(s)
       
      Total download size: 41 M
      Is this ok [y/N]: y
      Downloading Packages:
      (1/2): kernel-2.6.32-431.11.2.el6.x86_64.rpm                                               |  28 MB     00:03     
      (2/2): kernel-firmware-2.6.32-431.11.2. (81%) 41% [===========-                 ]  0.0 B/s | 2.0 MB     --:-- ETA 
      (2/2): kernel-firmware-2.6.32-431.11.2. (89%) 65% [===================         
      (2/2): kernel-firmware-2.6.32-431.11.2. (93%) 79% [=======================     
      (2/2): kernel-firmware-2.6.32-431.11.2. (99%) 97% [============================
      (2/2): kernel-firmware-2.6.32-431.11.2.el6.noarch.rpm   |  13 MB     00:01     
      -------------------------------------------------------------------------------
      Total                                          8.1 MB/s |  41 MB     00:05     
      Running rpm_check_debug
      Running Transaction Test
      Transaction Test Succeeded
      Running Transaction
        Updating   : kernel-firmware-2.6.32-431.11.2.el6.noarch                                1/3 
        Installing : kernel-2.6.32-431.11.2.el6.x86_64 [#####                                    ] 2/3  
        Installing : kernel-2.6.32-431.11.2.el6.x86_64 [######                                  ] 2  
        Installing : kernel-2.6.32-431.11.2.el6.x86_64 [#######                                ] 2  
        Installing : kernel-2.6.32-431.11.2.el6.x86_64 [########                              ] 2  
        Installing : kernel-2.6.32-431.11.2.el6.x86_64 [#########                            ] 2  
        Installing : kernel-2.6.32-431.11.2.el6.x86_64 [##########                          ] 2  
        Installing : kernel-2.6.32-431.11.2.el6.x86_64 [###########                        ] 2  
        Installing : kernel-2.6.32-431.11.2.el6.x86_64 [############                      ] 2  
        Installing : kernel-2.6.32-431.11.2.el6.x86_64                                                  2/3 
        Cleanup    : kernel-firmware-2.6.32-431.el6.noarch                                        3/3 
        Verifying  : kernel-2.6.32-431.11.2.el6.x86_64                                                1/3 
        Verifying  : kernel-firmware-2.6.32-431.11.2.el6.noarch                                 2/3 
        Verifying  : kernel-firmware-2.6.32-431.el6.noarch                                         3/3 
       
      Installed:
        kernel.x86_64 0:2.6.32-431.11.2.el6                                                                                
       
      Dependency Updated:
        kernel-firmware.noarch 0:2.6.32-431.11.2.el6                                                                       
       
      Complete!


    • CentOS Upgrade - yum clean all (이하 http://byseob.blogspot.kr/2010/08/centos-54-설치-후-설정할것들.html)
      1
      2
      3
      4
      5
      [root@centos ~]# yum clean all
      Loaded plugins: fastestmirror
      Cleaning repos: base extras updates
      Cleaning up Everything
      Cleaning up list of fastest mirrors


    • CentOS Upgrade - yum update glibc*
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      [root@centos ~]# yum --enablerepo=epel,rpmforge,remi update glibc*
      Loaded plugins: fastestmirror
      Determining fastest mirrors
      Excluding mirror: data.nicehosting.co.kr
       * base: centos.mirror.cdnetworks.com
      Excluding mirror: data.nicehosting.co.kr
       * extras: centos.mirror.cdnetworks.com
      Excluding mirror: data.nicehosting.co.kr
       * updates: centos.mirror.cdnetworks.com
      base                                                                                          | 3.7 kB     00:00     
      base/primary_db                                                                               | 4.4 MB     00:00     
      extras                                                                                        | 3.4 kB     00:00     
      extras/primary_db                                                                             |  19 kB     00:00     
      updates                                                                                       | 3.4 kB     00:00     
      updates/primary_db                                                                            | 2.6 MB     00:00     
      Setting up Update Process
      No Packages marked for Update


    • CentOS Upgrade - yum yum* rpm* python*
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      48
      49
      50
      51
      52
      53
      54
      55
      56
      57
      58
      59
      60
      61
      62
      63
      64
      65
      66
      67
      68
      69
      70
      71
      72
      73
      74
      75
      76
      77
      78
      79
      80
      81
      82
      83
      84
      85
      86
      [root@centos ~]# yum clean all
      Loaded plugins: fastestmirror
      Cleaning repos: base extras updates
      Cleaning up Everything
      Cleaning up list of fastest mirrors
      [root@centos ~]# yum --enablerepo=epel,rpmforge,remi update glibc*
      Loaded plugins: fastestmirror
      Determining fastest mirrors
      Excluding mirror: data.nicehosting.co.kr
       * base: ftp.daum.net
      Excluding mirror: data.nicehosting.co.kr
       * extras: ftp.daum.net
       * updates: centosd6.centos.org
      base                                                       | 3.7 kB     00:00     
      base/primary_db                                            | 4.4 MB     00:00     
      extras                                                     | 3.4 kB     00:00     
      extras/primary_db                                          |  19 kB     00:00     
      updates                                                    | 3.4 kB     00:00     
      updates/primary_db                                         | 2.6 MB     00:02     
      Setting up Update Process
      No Packages marked for Update
      [root@centos ~]# 
      [root@centos ~]# yum update yum* rpm* python*
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile
      Excluding mirror: data.nicehosting.co.kr
       * base: ftp.daum.net
      Excluding mirror: data.nicehosting.co.kr
       * extras: ftp.daum.net
       * updates: centosd6.centos.org
      Setting up Update Process
      Resolving Dependencies
      --> Running transaction check
      ---> Package python.x86_64 0:2.6.6-51.el6 will be updated
      ---> Package python.x86_64 0:2.6.6-52.el6 will be an update
      ---> Package python-libs.x86_64 0:2.6.6-51.el6 will be updated
      ---> Package python-libs.x86_64 0:2.6.6-52.el6 will be an update
      ---> Package yum-plugin-fastestmirror.noarch 0:1.1.30-14.el6 will be updated
      ---> Package yum-plugin-fastestmirror.noarch 0:1.1.30-17.el6_5 will be an update
      --> Finished Dependency Resolution
       
      Dependencies Resolved
       
      ==================================================================================
       Package                      Arch       Version                Repository   Size
      ==================================================================================
      Updating:
       python                       x86_64     2.6.6-52.el6           updates      74 k
       python-libs                  x86_64     2.6.6-52.el6           updates     5.3 M
       yum-plugin-fastestmirror     noarch     1.1.30-17.el6_5        updates      28 k
       
      Transaction Summary
      ==================================================================================
      Upgrade       3 Package(s)
       
      Total download size: 5.4 M
      Is this ok [y/N]: y
      Downloading Packages:
      (1/3): python-2.6.6-52.el6.x86_64.rpm                      |  74 kB     00:00     
      (2/3): python-libs-2.6.6-52.el6.x86_64.rpm                 | 5.3 MB     00:04     
      (3/3): yum-plugin-fastestmirror-1.1.30-17.el6_5.noarch.rpm |  28 kB     00:00     
      ----------------------------------------------------------------------------------
      Total                                             914 kB/s | 5.4 MB     00:06     
      Running rpm_check_debug
      Running Transaction Test
      Transaction Test Succeeded
      Running Transaction
        Updating   : python-2.6.6-52.el6.x86_64                                     1/6 
        Updating   : python-libs-2.6.6-52.el6.x86_64                                2/6 
        Updating   : yum-plugin-fastestmirror-1.1.30-17.el6_5.noarch                3/6 
        Cleanup    : yum-plugin-fastestmirror-1.1.30-14.el6.noarch                  4/6 
        Cleanup    : python-2.6.6-51.el6.x86_64                                     5/6 
        Cleanup    : python-libs-2.6.6-51.el6.x86_64                                6/6 
        Verifying  : python-libs-2.6.6-52.el6.x86_64                                1/6 
        Verifying  : yum-plugin-fastestmirror-1.1.30-17.el6_5.noarch                2/6 
        Verifying  : python-2.6.6-52.el6.x86_64                                     3/6 
        Verifying  : python-libs-2.6.6-51.el6.x86_64                                4/6 
        Verifying  : python-2.6.6-51.el6.x86_64                                     5/6 
        Verifying  : yum-plugin-fastestmirror-1.1.30-14.el6.noarch                  6/6 
       
      Updated:
        python.x86_64 0:2.6.6-52.el6                                                    
        python-libs.x86_64 0:2.6.6-52.el6                                               
        yum-plugin-fastestmirror.noarch 0:1.1.30-17.el6_5                               
       
      Complete!


    • CentOS Upgrade - yum clean all
      1
      2
      3
      4
      5
      [root@centos ~]# yum clean all
      Loaded plugins: fastestmirror
      Cleaning repos: base extras updates
      Cleaning up Everything
      Cleaning up list of fastest mirrors

       

       


    • CentOS Upgrade - yum update
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      48
      49
      50
      51
      52
      53
      54
      55
      56
      57
      58
      59
      60
      61
      62
      63
      64
      65
      66
      67
      68
      69
      [root@centos ~]# yum --enablerepo=epel,rpmforge,remi update
      Loaded plugins: fastestmirror
      Determining fastest mirrors
      Excluding mirror: data.nicehosting.co.kr
       * base: centos.mirror.cdnetworks.com
      Excluding mirror: data.nicehosting.co.kr
       * extras: centos.mirror.cdnetworks.com
       * updates: centosd6.centos.org
      base                                                       | 3.7 kB     00:00     
      base/primary_db                                            | 4.4 MB     00:00     
      extras                                                     | 3.4 kB     00:00     
      extras/primary_db                                          |  19 kB     00:00     
      updates                                                    | 3.4 kB     00:00     
      updates/primary_db                                         | 2.6 MB     00:03     
      Setting up Update Process
      Resolving Dependencies
      --> Running transaction check
      ---> Package ca-certificates.noarch 0:2013.1.94-65.0.el6 will be updated
      ----------------------- 중략 -------------------------
      ---> Package upstart.x86_64 0:0.6.5-12.el6_4.1 will be updated
      ---> Package upstart.x86_64 0:0.6.5-13.el6_5.3 will be an update
      --> Finished Dependency Resolution
       
      Dependencies Resolved
       
      ==================================================================================
       Package                      Arch   Version                        Repository
                                                                                   Size
      ==================================================================================
      Updating:
       ca-certificates              noarch 2013.1.95-65.1.el6_5           updates 1.1 M
       centos-release               x86_64 6-5.el6.centos.11.2            updates  20 k
      ----------------------- 중략 -------------------------
       selinux-policy-targeted      noarch 3.7.19-231.el6_5.1             updates 2.8 M
       tzdata                       noarch 2014b-1.el6                    updates 449 k
       upstart                      x86_64 0.6.5-13.el6_5.3               updates 177 k
       
      Transaction Summary
      ==================================================================================
      Upgrade      30 Package(s)
       
      Total download size: 19 M
      Is this ok [y/N]: y
      Downloading Packages:
      (1/30): ca-certificates-2013.1.95-65.1.el6_5.noarch.rpm    | 1.1 MB     00:01   
      ----------------------- 중략 -------------------------
      (30/30): upstart-0.6.5-13.el6_5.3.x86_64.rpm               | 177 kB     00:00     
      ----------------------------------------------------------------------------------
      Total                                             338 kB/s |  19 MB     00:57     
      Running rpm_check_debug
      Running Transaction Test
      Transaction Test Succeeded
      Running Transaction
        Updating   : nspr-4.10.2-1.el6_5.x86_64                                    1/60 
      ----------------------- 중략 -------------------------
        Updating   : tzdata-2014b-1.el6.noarch                                    30/60 
        Cleanup    : selinux-policy-targeted-3.7.19-231.el6.noarch                31/60 
       ----------------------- 중략 -------------------------
        Cleanup    : kpartx-0.4.9-72.el6.x86_64                                   60/60 
        Verifying  : grep-2.6.3-4.el6_5.1.x86_64                                   1/60 
       ----------------------- 중략 -------------------------
        Verifying  : coreutils-8.4-31.el6.x86_64                                  60/60 
       
      Updated:
        ca-certificates.noarch 0:2013.1.95-65.1.el6_5                                   
      ----------------------- 중략 -------------------------                                        
        upstart.x86_64 0:0.6.5-13.el6_5.3                                               
       
      Complete!


    • CentOS Upgrade - shutdown -r now
      1
      2
      3
      4
      5
      6
      [root@centos ~]# shutdown -r now
       
      Broadcast message from root@centos.tanker
              (/dev/pts/2) at 12:03 ...
       
      The system is going down for reboot NOW!


 
  • 필수 유틸리티와 manual 설치 (http://lesstif.com/pages/viewpage.action?pageId=6979710)
    • 서비스용 서버로 쓸 곳이라면 보안 및 upgrade 관리 때문에 최소 패키지만 설치하는게 좋다. 
    • 특히 서비스 장비라면 gcc 및 X-Windows등은 설치 안하는걸 추천한다. gcc는 해킹의 위험이 있고 X-Windows는 쓸일이 없고 덩치만 커서 update가 많아지게 된다
    • vim 및  network 관련 유틸 (nslookup, text browser)
      1
      yum -y install bind-utils wget elinks vim


    • System Util
      1
      yum -y install yum-utils sysstat system-config-firewall-tui


    • SELinux util
      1
      yum -y install policycoreutils-python setroubleshoot setroubleshoot-server setroubleshoot-doc setroubleshoot-plugins setools-console


    • manual page util
      1
      yum -y install man man-pages kernel-doc


 
    • iscsi나 FCoe와 같은 IP기반의 스토리지를 쓰지 않을 경우
      1
      2
      3
      4
      chkconfig iscsi off
      chkconfig iscsid off
      chkconfig fcoe off
      chkconfig lldpad off


    • NFS를 사용하지 않는 경우
      1
      2
      3
      4
      5
      chkconfig nfslock off
      chkconfig rpcbind off
      chkconfig rpcgssd off
      chkconfig rpcidmapd off
      chkconfig netfs off


    • 확인
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      48
      49
      50
      51
      52
      53
      54
      55
      56
      57
      58
      59
      60
      61
      [root@centos ~]# chkconfig --list | grep "3:on"    --> 일반적으로 이걸 사용
      [root@centos ~]# chkconfig --list | grep "3:활성"  --> 한글이 깔려 있는 경우
      auditd                     0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      blk-availability        0:해제  1:활성  2:활성  3:활성  4:활성  5:활성  6:해제
      crond                      0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      ip6tables                0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      iptables                  0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      iscsi                        0:해제  1:해제  2:해제  3:활성  4:활성  5:활성  6:해제
      iscsid                      0:해제  1:해제  2:해제  3:활성  4:활성  5:활성  6:해제
      lvm2-monitor       0:해제  1:활성  2:활성  3:활성  4:활성  5:활성  6:해제
      mdmonitor           0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      messagebus         0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      netfs                      0:해제  1:해제  2:해제  3:활성  4:활성  5:활성  6:해제
      network               0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      postfix                  0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      rsyslog                  0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      sshd                      0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      sysstat                   0:해제  1:활성  2:활성  3:활성  4:활성  5:활성  6:해제
      udev-post              0:해제  1:활성  2:활성  3:활성  4:활성  5:활성  6:해제
       
      [root@centos ~]# chkconfig iscsi off
       
      [root@centos ~]# chkconfig iscsid off
       
      [root@centos ~]# chkconfig fcoe off
      fcoe 서비스의 정보를 읽는 도중 오류가 발생했습니다: 그런 파일이나 디렉터리가 없습니다
       
      [root@centos ~]# chkconfig lldpad off
      lldpad 서비스의 정보를 읽는 도중 오류가 발생했습니다: 그런 파일이나 디렉터리가 없습니다
       
       
      [root@centos ~]# chkconfig nfslock off
      nfslock 서비스의 정보를 읽는 도중 오류가 발생했습니다: 그런 파일이나 디렉터리가 없습니다
       
      [root@centos ~]# chkconfig rpcbind off
      rpcbind 서비스의 정보를 읽는 도중 오류가 발생했습니다: 그런 파일이나 디렉터리가 없습니다
       
      [root@centos ~]# chkconfig rpcgssd off
      rpcgssd 서비스의 정보를 읽는 도중 오류가 발생했습니다: 그런 파일이나 디렉터리가 없습니다
       
      [root@centos ~]# chkconfig rpcidmapd off
      rpcidmapd 서비스의 정보를 읽는 도중 오류가 발생했습니다: 그런 파일이나 디렉터리가 없습니다
       
      [root@centos ~]# chkconfig netfs off
       
       
      [root@centos ~]# chkconfig --list | grep "3:활성"
      auditd                     0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      blk-availability        0:해제  1:활성  2:활성  3:활성  4:활성  5:활성  6:해제
      crond                      0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      ip6tables                 0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      iptables                   0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      lvm2-monitor         0:해제  1:활성  2:활성  3:활성  4:활성  5:활성  6:해제
      mdmonitor             0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      messagebus           0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      network                 0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      postfix                    0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      rsyslog                    0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      sshd                        0:해제  1:해제  2:활성  3:활성  4:활성  5:활성  6:해제
      sysstat                     0:해제  1:활성  2:활성  3:활성  4:활성  5:활성  6:해제
      udev-post                0:해제  1:활성  2:활성  3:활성  4:활성  5:활성  6:해제
 
  • 시간 서버 설정 (https://www.3rabbitz.com/f01c33e7d8367da2#1d1960b60846b70d)
    • yum install ntp
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      32
      33
      34
      35
      36
      37
      38
      39
      40
      41
      42
      43
      44
      45
      46
      47
      48
      49
      50
      51
      52
      53
      [root@centos bin]# yum install ntp
      Loaded plugins: fastestmirror
      Loading mirror speeds from cached hostfile
       * base: ftp.daum.net
       * extras: ftp.daum.net
       * updates: ftp.daum.net
      Setting up Install Process
      Resolving Dependencies
      --> Running transaction check
      ---> Package ntp.x86_64 0:4.2.6p5-1.el6.centos will be installed
      --> Processing Dependency: ntpdate = 4.2.6p5-1.el6.centos for package: ntp-4.2.6p5-1.el6.centos.x86_64
      --> Running transaction check
      ---> Package ntpdate.x86_64 0:4.2.6p5-1.el6.centos will be installed
      --> Finished Dependency Resolution
       
      Dependencies Resolved
       
      ==========================================================================================================================================
       Package                       Arch                         Version                                      Repository                  Size
      ==========================================================================================================================================
      Installing:
       ntp                           x86_64                       4.2.6p5-1.el6.centos                         base                       592 k
      Installing for dependencies:
       ntpdate                       x86_64                       4.2.6p5-1.el6.centos                         base                        75 k
       
      Transaction Summary
      ==========================================================================================================================================
      Install       2 Package(s)
       
      Total download size: 667 k
      Installed size: 1.7 M
      Is this ok [y/N]: y
      Downloading Packages:
      (1/2): ntp-4.2.6p5-1.el6.centos.x86_64.rpm                                                                         | 592 kB     00:00     
      (2/2): ntpdate-4.2.6p5-1.el6.centos.x86_64.rpm                                                                     |  75 kB     00:00     
      ------------------------------------------------------------------------------------------------------------------------------------------
      Total                                                                                                     4.2 MB/s | 667 kB     00:00     
      Running rpm_check_debug
      Running Transaction Test
      Transaction Test Succeeded
      Running Transaction
        Installing : ntpdate-4.2.6p5-1.el6.centos.x86_64                                                                                    1/2 
        Installing : ntp-4.2.6p5-1.el6.centos.x86_64                                                                                        2/2 
        Verifying  : ntp-4.2.6p5-1.el6.centos.x86_64                                                                                        1/2 
        Verifying  : ntpdate-4.2.6p5-1.el6.centos.x86_64                                                                                    2/2 
       
      Installed:
        ntp.x86_64 0:4.2.6p5-1.el6.centos                                                                                                       
       
      Dependency Installed:
        ntpdate.x86_64 0:4.2.6p5-1.el6.centos                                                                                                   
       
      Complete!

 

 

    • vi /etc/ntp.conf
      1
      2
      3
      4
      5
      6
      7
      8
      9
       # Use public servers from the pool.ntp.org project.
      # Please consider joining the pool (http://www.pool.ntp.org/join.html).
      # server 0.centos.pool.ntp.org iburst  #--> 주석처리
      # server 1.centos.pool.ntp.org iburst  #--> 주석처리
      # server 2.centos.pool.ntp.org iburst  #--> 주석처리
      # server 3.centos.pool.ntp.org iburst  #--> 주석처리
      server kr.pool.ntp.org           # 라인 추가
      server ntp.postech.ac.kr       # 라인 추가
      server ntp.xbsd.kr                # 라인 추가


    • ntpdate kr.pool.ntp.org 
      1
      2
      [root@centos bin]# ntpdate kr.pool.ntp.org
       7 Apr 21:52:04 ntpdate[4392]: step time server 211.233.78.116 offset -2.559473 sec


    • service ntpd start 
      1
      2
      [root@centos bin]# service ntpd start
      Starting ntpd: [  OK  ]


    • ntpd -p : 5~10분 정도 후 아래와 같이 *, +가 보이면 NTP 서버와 시간이 동기화 되는 것임
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      [root@centos ~]# ntpq -p     <-- 바로 실행했을때,
           remote           refid      st t when poll reach   delay   offset  jitter
      ==============================================================================
       211.233.78.116  212.26.18.43     2 u   19   64    3    1.292   -7.780   4.407
       ntp.postech.ac. .GPS.            1 u   17   64    3    9.514   -1.443   4.272
       
       
      [root@centos ~]# ntpq -p      <--  5~10분 후 실행
           remote           refid      st t when poll reach   delay   offset  jitter
      ==============================================================================
      +211.233.78.116  212.26.18.43     2 u   44   64  377    1.250  -28.582   7.679
      *gps-ntp.postech .GPS.            1 u   44   64  377    9.964  -28.839  12.736


 

 

 

댓글