Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

20.2 LNMP Dynamic Website Architecture


May 24, 2021 That's what Linux should learn



The LNMP Dynamic Site Deployment Architecture is a dynamic web site system solution consisting of Linux , Nginx , MySQL , PHP (see Figure 20-1 for logo). T he letter L in LNMP means linux system, not only RHEL, CentOS, Fedora, but also Debian, Ubuntu and other systems. This book's supporting https://www.linuxprobe.com is based on LNMP deployment, the current operation has been very stable, access speed is also very fast.

20.2 LNMP Dynamic Website Architecture

Figure 20-1 Logo of the LNMP dynamic site deployment architecture

Before you can install a service program with a source pack, you first need to have the installation host with an environment in which the source code of the compiler is compiled, and he needs a compiler in C, C, Perl, and a variety of common compilation support library programs. So configure the Yum repository first, and then install all of the packages listed below:

[root@linuxprobe ~]# yum install -y apr autoconf automake bison bzip2 bzip2 compat cpp curl curl-devel fontconfig fontconfig-devel freetype freetype freetype-devel gcc gcc-c++ gd gettext gettext-devel glibc kernel kernel-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg libsepol-devel libselinux-devel libstdc++-devel libtool libgomp libxml2 libxml2-devel libXpm libtiff libtiff make mpfr ncurses ntp openssl openssl-devel patch pcre-devel perl php-common php-gd policycoreutils telnet t1lib t1lib nasm nasm* wget zlib-devel Loaded plugins: langpacks, product-id, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. ……………… Some installation process is omitted ................ Installing: apr x86_64 1.4.8-3.el7 rhel7 103 k apr-devel x86_64 1.4.8-3.el7 rhel7 188 k apr-util x86_64 1.5.2-6.el7 rhel7 92 k apr-util-devel x86_64 1.5.2-6.el7 rhel7 76 k autoconf noarch 2.69-11.el7 rhel7 701 k automake noarch 1.13.4-3.el7 rhel7 679 k bison x86_64 2.7-4.el7 rhel7 578 k bzip2-devel x86_64 1.0.6-12.el7 rhel7 218 k compat-dapl x86_64 1:1.2.19-3.el7 rhel7 109 k compat-db-headers noarch 4.7.25-27.el7 rhel7 48 k compat-db47 x86_ 64 4.7.25-27.el7 rhel7 795 k compat-gcc-44 x86_64 4.4.7-8.el7 rhel7 10 M compat-gcc-44-c++ x86_64 4.4.7-8.el7 rhel7 6.3 M compat-glibc x86_64 1:2.12-4.el7 rhel7 1.2 M compat-glibc-headers x86_64 1:2.12-4.el7 rhel7 452 k compat-libcap1 x86_64 1.10-7.el7 rhel7 19 k compat-libf2c-34 x86_64 3.4.6-32.el7 rhel7 155 k compat-libgfortran-41 x86_64 4.1.2-44.el7 rhel7 142 k c ompat-libtiff3 x86_64 3.9.4-11.el7 rhel7 135 k compat-openldap x86_64 1:2.3.43-5.el7 rhel7 174 k cpp x86_64 4.8.2-16.el7 rhel7 5.9 M fontconfig-devel x86_64 2.10.95-7.el7 rhel7 128 k freetype-devel x86_64 2.4.11-9.el7 rhel7 355 k gcc x86_64 4.8.2-16.el7 rhel7 16 M gcc-c++ x86_64 4.8.2-16.el7 rhel7 7.1 M .................. O mit part of the installation process... C omplete! M r. Liu has uploaded the 16 software source packs and one Forum Site System package required to install the LNMP dynamic website deployment architecture to the site server that is accompanying this book. Y ou can download them in a Windows system and transfer them through the ssh service to a Linux server that intends to deploy the LNMP dynamic website architecture, or you can download these source package files directly from the Linux server using the wget command. According to the FHS protocol explained in Chapter 6, it is recommended to store the packages to be installed in the /usr/local/src directory:

[root@linuxprobe ~]# cd /usr/local/src [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/cmake-2.8.11.2.tar.gz [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/Discuz_X3.2_SC_GBK.zip [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/freetype-2.5.3.tar.gz [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/jpegsrc.v9a.tar.gz [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/libgd-2.1.0.tar.gz [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/libmcrypt-2.5.8.tar.gz [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/libpng-1.6.12.tar.gz [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/libvpx-v1.3.0.tar.bz2 [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/mysql-5.6.19.tar.gz [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/nginx-1.6.0.tar.gz [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/openssl-1.0.1h.tar.gz [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/php-5.5.14.tar.gz [root@linuxprobe src] # wget h ttps://www.linuxprobe.com/Software/pcre-8.35.tar.gz [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/t1lib-5.1.2.tar.gz [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/tiff-4.0.3.tar.gz [root@linuxprobe src] # wget https://www.linuxprobe.com/Software/yasm-1.2.0.tar.gz [ root@linuxprobe src] # wget https://www.linuxprobe.com/Software/zlib-1.2.8.tar.gz [root@linuxprobe src]# ls zlib-1.2.8.tar.gz libmcrypt-2.5.8.tar.gz pcre-8.35.tar.gz cmake-2.8.11.2.tar.gz libpng-1.6.12.tar.gz php-5.5.14.tar.gz Discuz_X3.2_SC_GBK.zip libvpx-v1.3.0.tar.bz2 t1lib-5.1.2.tar.gz freetype-2.5.3.tar.gz mysql-5.6.19.tar.gz t iff-4.0.3.tar.gz jpegsrc.v9a.tar.gz nginx-1.6.0.tar.gz yasm-1.2.0.tar.gz libgd-2.1.0.tar.gz openssl-1.0.1h.tar.gz CMake is a commonly compiled tool in Linux systems. I f you want to install the service program through the source package, we must strictly follow the installation steps summarized above - download and decompress the source package file, compile the source package code, generate a binary installer, run the binary service program installation package. Next, when decompressing and compiling each package source program, a large amount of output information is generated, which is omitted below, and the reader is asked to take the actual action as the first step.

[root@linuxprobe src]# tar xzvf cmake-2.8.11.2.tar.gz [root@linuxprobe src]# cd cmake-2.8.11.2/ [root@linuxprobe cmake-2.8.11.2]# ./configure [root@linuxprobe cmake-2.8.11.2]# make [root@linuxprobe cmake-2.8.11.2]# make install