kylin.server.YUN+-generic ARM 飛騰平臺 編譯安裝nginx

配置源/etc/apt/source.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

升級系統

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

安裝基礎開發庫,編譯工具

[Unauthorized System] 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 的額外空間。

安裝libpcre3-dev(注意要先升級系統,否則版本大概率會衝突)

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) 的觸發器 ...

安裝openssl即開發庫

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:~/nginx-1.17.7$  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) 的觸發器 ...

 

配置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"

編譯,並安裝

make -j4
sudo make install

啓動

/usr/local/nginx/sbin/nginx

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章