CentOS 6에서 nginx를 1.6.3에서 1.8.x로 업그레이드하는 방법

CentOS 6에서 nginx를 1.6.3에서 1.8.x로 업그레이드하는 방법

저는 CentOS 6, nginx 1.6.3을 사용하고 있습니다.

$nginx -v
nginx version: nginx/1.6.3

그리고 nginx를 1.8로 업그레이드하고 싶습니다.add_header [항상] 지시문필요하다

나는 팔로우하고 있었다https://webtatic.com/packages/nginx18/업그레이드를 하려고 하는데 다음 오류가 발생했습니다.

$yum list nginx*
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirrors.service.networklayer.com
 * epel: free.nchc.org.tw
 * extras: mirrors.service.networklayer.com
 * updates: mirrors.service.networklayer.com
 * webtatic: uk.repo.webtatic.com
Installed Packages
nginx16.x86_64       1.6.3-1.w6       @webtatic
Available Packages
nginx18.x86_64       1.8.0-1.w6       webtatic

내가 실행할 때 yum install -y nginx18, 그것은 준다

Transaction Check Error:
  file /usr/sbin/nginx from install of nginx18-1.8.0-1.w6.x86_64 conflicts with file from package nginx16-1.6.3-1.w6.x86_64
  file /usr/lib64/perl5/vendor_perl/auto/nginx/nginx.so from install of nginx18-1.8.0-1.w6.x86_64 conflicts with file from package nginx16-1.6.3-1.w6.x86_64
  file /usr/lib64/perl5/vendor_perl/nginx.pm from install of nginx18-1.8.0-1.w6.x86_64 conflicts with file from package nginx16-1.6.3-1.w6.x86_64
  file /usr/share/man/man3/nginx.3pm.gz from install of nginx18-1.8.0-1.w6.x86_64 conflicts with file from package nginx16-1.6.3-1.w6.x86_64

Error Summary

CentOS 6에서 nginx를 1.6.3에서 1.8로 업그레이드하는 올바른 단계를 누군가 친절하게 안내해 줄 수 있습니까? 이상적으로는 yum remove-ing nginx16을 사용하지 않고 nginx18을 설치하면 서버 가동 중지 시간이 발생합니다.

답변1

nginx 패키지는 동시에 여러 버전을 설치하도록 설계되지 않았으므로 이전 버전을 제거하고 새 버전을 설치해야 합니다.

$ yum remove nginx16
$ yum install nginx18

또는 시도해 볼 수 있습니다.

 $ yum install yum-plugin-replace
 $ yum replace nginx16 --replace-with=nginx18
 $ service nginx restart

하지만 먼저 테스트 서버에서 테스트하는 것이 좋습니다.

관련 정보