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

 

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