CentOS 학습 노트 - 12. Nginx 구축 Centos 7.5 원 격 repo
이번 에는 실제로 온라인 설치 와 오프라인 설치 에 대한 다양한 수요 가 있 기 때문이다.그래서 우 리 는 동시에 두 가지 방법 으로 nginx 를 설치 했다.
1. 온라인 설치 nginx
  nginx    
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install nginx2. 오프라인 설치 nginx
     http://nginx.org/packages/rhel/7/x86_64/RPMS/
       
http://nginx.org/packages/rhel/7/x86_64/RPMS/nginx-1.14.0-1.el7_4.ngx.x86_64.rpm
         
/opt/soft  ,      
rpm -ivh nginx-1.14.0-1.el7_4.ngx.x86_64.rpm 
    3. nginx 삭제
yum remove nginx4. 기본 테스트
#   nginx
service nginx start
#   nginx
service nginx stop
#   nginx  
service nginx status
#   http    
http://ip  /
#      
1. firewalld   
         。
(     notrunning,     running)
firewall-cmd --state 
  firewall
systemctl stop firewalld.service 
  firewall    
systemctl disable firewalld.service 
2. iptables   
     iptables,        iptables
  iptables  
service iptables status
  iptables
service iptables stop
       iptables
chkconfig iptables off
#   selinux
    selinux,          /etc/selinux/config。
vim /etc/selinux/config
  SELINUX。    (enforcing、permissive、disabled)
SELINUX=disabled
  reboot    。5. nginx 를 설정 하면 파일 목록 을 볼 수 있 습 니 다.
      
vi /etc/nginx/nginx.conf
             
autoindex on;
autoindex_exact_size on; 
autoindex_localtime on;
  autoindex_exact_size on;
          ,   bytes。
  off ,          ,   kB  MB  GB
 autoindex_localtime on;
   off,        GMT  。
  on ,                6. nginx 디 렉 터 리 로 디 렉 터 리 연결
우 리 는 먼저 두 개의 목록 을 기획 한다.centos 7.5 는 centos 7.5 의 로 컬 파일 원본 을 저장 합 니 다.cm5 는 Cloudera Manager 5 의 원본 을 저장 합 니 다.
#   nginx   
cd /usr/share/nginx/html
#   centos7.5    
ln -s /mnt/centos7.5/ ./centos7.5
#   cm5    , cm5       /opt/soft/cm    
ln -s /opt/soft/cm ./cm
7. 기기 이름 dev - repo 001 설정
#       
hostname
#        dev-repo001
hostnamectl set-hostname dev-repo001
#   hosts    ip  
vi /etc/hosts
#      ip  
127.0.0.1 dev-repo001
#   
ping dev-repo001
8 정의 repo
여기 서 두 개의 repo 를 정 의 했 는데 하 나 는 Centos 7.5 의 repo 입 니 다.하 나 는 Cloudera Manager 의 repo 입 니 다.
  repo   
cd /etc/yum.repos.d/
       repo
[root@dev-basic yum.repos.d]# cat centos7.5-local.repo 
[cenots7.5-local]
name=centos7.5
baseurl=file:///mnt/centos7.5
enabled=1
gpgcheck=0
     baseurl=file:///mnt/centos7.5
 baseurl=http://dev-repo001/centos7.5
        
  repo  
vi /etc/yum.repos.d/cloudera-cm.repo
      
# Packages for Cloudera's Distribution for cm, Version 5, on RedHat    or CentOS 7 x86_64
name=Cloudera's Distribution for cm, Version 5
baseurl=http://dev-repo001/cm
gpgkey = http://dev-repo001/cm/RPM-GPG-KEY-cloudera    
gpgcheck = 1이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
CentOS 7에서 OpenLDAP 서버 설치 및 구성LDAP(Lightweight Directory Access Protocol)는 ID와 개체를 쉽게 관리할 수 있는 디렉터리 서비스입니다. Windows 세계에서 서버는 일반적으로 Active Directory입니다...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.