kylin. server. YUN + generic ARM 비약 플랫폼 컴 파일 설치 nginx

12417 단어 ubuntunginx
소스 / etc / apt / sources. list 설정
greatwall@Kylin:~$ sudo vim /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu-ports/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu-ports/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu-ports/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu-ports/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu-ports/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu-ports/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu-ports/ bionic-backports main restricted universe multiverse

업그레이드 시스템
greatwall@Kylin:~$ apt-get upgrade -f
         ...   
                    
        ...          
        ...   
      ...   
                   :
  checkpolicy cifs-utils iso-codes libapol4 libasprintf0v5 libchkuid libdbus-glib-1-2 libicu55 libpython2.7 libqpol1 libtalloc2 libwbclient0 libxml2 localechooser-data mokutil policycoreutils python-ipy python-selinux python-semanage python-sepolgen python-sepolicy
  python-setools samba-common selinux-utils user-setup
  'sudo apt autoremove'    (  )。
  【 】       :
  libzstd1
             :
  apt apt-utils binutils build-essential ca-certificates cloud-init cpp cpp-5 dh-python e2fslibs e2fsprogs efibootmgr file g++ g++-5 gcc gcc-5 gcc-5-base gcc-6-base gnupg gnupg-agent gnupg2 initramfs-tools initramfs-tools-bin initramfs-tools-core iproute2 iptables
  isc-dhcp-client libasan2 libatomic1 libcairo2 libcc1-0 libcomerr2 libdrm2 libfreetype6 libgcc-5-dev libgcc1 libgnutls-openssl27 libgnutls30 libgomp1 libgpgme11 libgssapi-krb5-2 libharfbuzz0b libitm1 libkrb5-3 liblocale-gettext-perl libmagic1 libmpc3 libpam-systemd
  libpangoft2-1.0-0 libplymouth4 libpython-stdlib libpython2.7 libpython2.7-stdlib libpython3-stdlib libss2 libstdc++-5-dev libstdc++6 libsystemd0 libtext-charwidth-perl libtext-iconv-perl libubsan0 libudev1 libxml2 man-db mokutil mount ntfs-3g ntpdate openssh-client
  openssh-server openssh-sftp-server openssl parted perl perl-base plymouth plymouth-label procps python python2.7 python3 python3-cffi-backend python3-cryptography python3-markupsafe python3-minimal python3-requests python3-urllib3 python3-yaml rsyslog ssh systemd
  sysvinit-utils ttf-ubuntu-font-family udev ureadahead util-linux vim vim-common vim-runtime vim-tiny vsftpd wget
         :
  adduser base-files base-passwd bash bash-completion bsdmainutils bsdutils busybox-initramfs bzip2 checkpolicy cifs-utils cloud-guest-utils console-setup console-setup-linux coreutils cpio cron dash dbus debconf debconf-i18n debianutils diffutils distro-info-data dmeventd
  dmsetup dosfstools dpkg dpkg-dev eject ethtool findutils fontconfig fontconfig-config fonts-dejavu-core fuse gcc-4.8-base gettext-base gpgv grep groff-base grub-common grub-efi-arm64 grub-efi-arm64-bin grub2-common gzip hostname htop ifupdown init init-system-helpers
  installation-report iotop iputils-ping isc-dhcp-common iso-codes kbd keyboard-configuration klibc-utils kmod language-pack-gnome-zh-hans language-pack-gnome-zh-hans-base language-pack-zh-hans language-pack-zh-hans-base less libapparmor1 libapt-inst2.0 libapt-pkg5.0
  libasprintf0v5 libassuan0 libatm1 libaudit-common libaudit1 libblkid1 libbsd0 libbz2-1.0 libc-bin libc-dev-bin libc6 libc6-dev libcap-ng0 libcap2 libcap2-bin libdatrie1 libdb5.3 libdbus-1-3 libdbus-glib-1-2 libdebconfclient0 libdevmapper-event1.02.1 libdevmapper1.02.1
  libdpkg-perl libedit2 libestr0 libexpat1 libfdisk1 libffi6 libfontconfig1 libfribidi0 libfuse2 libgcrypt20 libglib2.0-0 libgmp10 libgpg-error0 libgpm2 libgraphite2-3 libhogweed4 libidn11 libisl15 libk5crypto3 libkeyutils1 libklibc libkmod2 libkrb5support0 libksba8
  liblvm2app2.2 liblvm2cmd2.02 liblz4-1 liblzma5 libmnl0 libmount1 libmpdec2 libncurses5 libncursesw5 libnettle6 libnewt0.52 libnih-dbus1 libnih1 libnpth0 libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpango-1.0-0 libpangocairo-1.0-0 libparted2
  libpci3 libpcre3 libpipeline1 libpixman-1-0 libpopt0 libpython2.7-minimal libseccomp2 libselinux1 libsemanage-common libsemanage1 libsensors4 libsepol1 libslang2 libsmartcols1 libsqlite3-0 libssl1.0.0 libtalloc2 libtasn1-6 libthai-data libthai0 libtinfo5 libusb-0.1-4
  libusb-1.0-0 libustr-1.0-1 libuuid1 libwbclient0 libwrap0 libx11-6 libx11-data libxcb-render0 libxcb-shm0 libxcb1 libxdmcp6 libxrender1 libyaml-0-2 linux-base linux-firmware linux-libc-dev localechooser-data locales login logrotate lsb-base lsb-release lvm2 lzma make
  makedev manpages mawk mime-support multiarch-support ncurses-base ncurses-bin net-tools netbase netcat-openbsd nih-dbus-tool os-prober p7zip passwd patch pciutils pinentry-curses policycoreutils psmisc python-minimal python-selinux python-semanage python-six
  python2.7-minimal python3-blinker python3-chardet python3-idna python3-jinja2 python3-json-pointer python3-jsonpatch python3-jwt python3-oauthlib python3-pkg-resources python3-pyasn1 python3-serial python3-six qemu-guest-agent readline-common rsync samba-common sed
  selinux-utils sensible-utils sosreport sudo sysstat systemd-sysv tar tasksel tasksel-data tzdata ubuntu-keyring ucf ufw unrar unzip user-setup uuid-runtime whiptail xfsprogs xkb-data xz-utils zlib1g
    246     ,     1     ,    0     ,  103         。
  24               。
     128 MB    。
        129 MB      。
        ? [Y/n] y

기초 개발 라 이브 러 리 설치, 컴 파일 도구
greatwall@Kylin:~$ sudo apt-get install build-essential
         ...   
                    
        ...          
                   :
  cifs-utils iso-codes libtalloc2 libwbclient0 localechooser-data samba-common user-setup
  'sudo apt autoremove'    (  )。
          :
  dpkg-dev g++ g++-5 libc-dev-bin libc6 libc6-dev libdpkg-perl libperl5.22 libstdc++-5-dev linux-libc-dev patch perl perl-base perl-modules-5.22
    :
  debian-keyring gcc-5-doc libstdc++6-5-dbg glibc-doc manpages-dev libstdc++-5-doc ed diffutils-doc perl-doc libterm-readline-gnu-perl | libterm-readline-perl-perl
    :
  fakeroot libalgorithm-merge-perl manpages-dev libfile-fcntllock-perl rename
  【 】       :
  build-essential dpkg-dev g++ g++-5 libc-dev-bin libc6-dev libdpkg-perl libperl5.22 libstdc++-5-dev linux-libc-dev patch perl perl-modules-5.22
         :
  libc6 perl-base
    2     ,     13     ,    0     ,  170         。
     19.1 MB    。
        90.9 MB      。

libpcre 3 - dev 설치 (시스템 을 먼저 업그레이드 해 야 합 니 다. 그렇지 않 으 면 버 전이 충돌 할 수 있 습 니 다)
greatwall@Kylin:~$ sudo apt-get install libpcre3-dev
[sudo] greatwall    : 
         ...   
                    
        ...          
                   :
  checkpolicy cifs-utils iso-codes libapol4 libasprintf0v5 libchkuid libdbus-glib-1-2 libicu55 libpython2.7 libqpol1 libtalloc2 libwbclient0 libxml2 localechooser-data mokutil policycoreutils python-ipy python-selinux python-semanage python-sepolgen python-sepolicy python-setools
  samba-common selinux-utils user-setup
  'sudo apt autoremove'    (  )。
          :
  libpcre16-3 libpcre32-3 libpcrecpp0v5
  【 】       :
  libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5
    0     ,     4     ,    0     ,  103         。
     708 kB    。
        2,989 kB      。
        ? [Y/n] y
  :1 http://mirrors.aliyun.com/ubuntu-ports bionic/main arm64 libpcre16-3 arm64 2:8.39-9 [121 kB]
  :2 http://mirrors.aliyun.com/ubuntu-ports bionic/main arm64 libpcre32-3 arm64 2:8.39-9 [113 kB]
  :3 http://mirrors.aliyun.com/ubuntu-ports bionic/main arm64 libpcrecpp0v5 arm64 2:8.39-9 [15.1 kB]
  :4 http://mirrors.aliyun.com/ubuntu-ports bionic/main arm64 libpcre3-dev arm64 2:8.39-9 [459 kB]
    708 kB,   1  (560 kB/s)    
            libpcre16-3:arm64。
(        ...          29950       。)
      .../libpcre16-3_2%3a8.39-9_arm64.deb  ...
     libpcre16-3:arm64 (2:8.39-9) ...
            libpcre32-3:arm64。
      .../libpcre32-3_2%3a8.39-9_arm64.deb  ...
     libpcre32-3:arm64 (2:8.39-9) ...
            libpcrecpp0v5:arm64。
      .../libpcrecpp0v5_2%3a8.39-9_arm64.deb  ...
     libpcrecpp0v5:arm64 (2:8.39-9) ...
            libpcre3-dev:arm64。
      .../libpcre3-dev_2%3a8.39-9_arm64.deb  ...
     libpcre3-dev:arm64 (2:8.39-9) ...
     libpcrecpp0v5:arm64 (2:8.39-9) ...
     libpcre32-3:arm64 (2:8.39-9) ...
     libpcre16-3:arm64 (2:8.39-9) ...
     libpcre3-dev:arm64 (2:8.39-9) ...
       man-db (2.7.5-1kord)      ...
       libc-bin (2.27-3ubuntu1)      ...

오픈 ssl 즉 개발 라 이브 러 리 설치
greatwall@Kylin:~$ sudo apt-get install openssl libssl-dev
         ...   
                    
        ...          
                   :
  checkpolicy cifs-utils iso-codes libapol4 libasprintf0v5 libchkuid libdbus-glib-1-2 libicu55 libpython2.7 libqpol1 libtalloc2 libwbclient0 libxml2 localechooser-data mokutil policycoreutils python-ipy python-selinux python-semanage python-sepolgen python-sepolicy python-setools
  samba-common selinux-utils user-setup
  'sudo apt autoremove'    (  )。
          :
  libssl1.1
    :
  libssl-doc
  【 】       :
  libssl-dev libssl1.1
         :
  openssl
    1     ,     2     ,    0     ,  102         。
     3,009 kB    。
        10.5 MB      。
        ? [Y/n] 

zlib 개발 라 이브 러 리 설치
greatwall@Kylin:~$ sudo apt-get install zlib1g.dev
         ...   
                    
        ...          
  ,        'zlib1g.dev'     'zlib1g-dev'
                   :
  checkpolicy cifs-utils iso-codes libapol4 libasprintf0v5 libchkuid libdbus-glib-1-2 libicu55 libpython2.7 libqpol1 libtalloc2 libwbclient0 libxml2 localechooser-data mokutil policycoreutils python-ipy python-selinux python-semanage python-sepolgen python-sepolicy python-setools
  samba-common selinux-utils user-setup
  'sudo apt autoremove'    (  )。
  【 】       :
  zlib1g-dev
    0     ,     1     ,    0     ,  102         。
     171 kB    。
        445 kB      。
  :1 http://mirrors.aliyun.com/ubuntu-ports bionic/main arm64 zlib1g-dev arm64 1:1.2.11.dfsg-0ubuntu2 [171 kB]
    171 kB,   0  (455 kB/s) 
            zlib1g-dev:arm64。
(        ...          30280       。)
      .../zlib1g-dev_1%3a1.2.11.dfsg-0ubuntu2_arm64.deb  ...
     zlib1g-dev:arm64 (1:1.2.11.dfsg-0ubuntu2) ...
     zlib1g-dev:arm64 (1:1.2.11.dfsg-0ubuntu2) ...
       man-db (2.7.5-1kord)      ...

... 에서http://nginx.org/nginx 소스 코드 다운로드
greatwall@Kylin:~ curl -O http://nginx.org/download/nginx-1.17.7.tar.gz

압축 을 풀 고 nginx 소스 디 렉 터 리 에 들 어 갑 니 다.
greatwall@Kylin:~$ tar -xvf nginx-1.17.7.tar.gz
greatwall@Kylin:~$ cd nginx-1.17.7
greatwall@Kylin:~/nginx-1.17.7$

nginx 컴 파일 매개 변수 설정
greatwall@Kylin:~/nginx-1.17.7$ ./configure --with-http_ssl_module






Configuration summary
  + using system PCRE library
  + using system OpenSSL library
  + using system zlib library

  nginx path prefix: "/usr/local/nginx"
  nginx binary file: "/usr/local/nginx/sbin/nginx"
  nginx modules path: "/usr/local/nginx/modules"
  nginx configuration prefix: "/usr/local/nginx/conf"
  nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
  nginx pid file: "/usr/local/nginx/logs/nginx.pid"
  nginx error log file: "/usr/local/nginx/logs/error.log"
  nginx http access log file: "/usr/local/nginx/logs/access.log"
  nginx http client request body temporary files: "client_body_temp"
  nginx http proxy temporary files: "proxy_temp"
  nginx http fastcgi temporary files: "fastcgi_temp"
  nginx http uwsgi temporary files: "uwsgi_temp"
  nginx http scgi temporary files: "scgi_temp"

컴 파일 및 설치
greatwall@Kylin:~$ make -j4
greatwall@Kylin:~$ sudo make install

시동 을 걸다
greatwall@Kylin:~$ sudo /usr/local/nginx/sbin/nginx

좋은 웹페이지 즐겨찾기