## is written in the front

  • Recently to toss their own server to try YUM installation and record the installation process and encountered problems hope to help you

## Initialize the server

  • yum update -y

Install nginx

  • Set up the NGINX installation source

  • According to the setting points given on the official website, I jump to the official website setting

  • Here is a copy of the CentOS configuration given on the official website
[nginx-stable] name=nginx stable repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=1 enabled=1 gpgkey=https://nginx.org/keys/nginx_signing.key module_hotfixes=true [nginx-mainline] name=nginx mainline repo  baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ gpgcheck=1 enabled=0 gpgkey=https://nginx.org/keys/nginx_signing.key module_hotfixes=true
  • Set up the installation source
CD/etc/yum. Repos. # d/into the source directory vim nginx. '# and write new nginx source files to copy and paste the content of the above Save # test whether yum source set success yum list | grep nginx

  • Install nginx

    yum -y install nginx
  • The following figure indicates successful installation

  • Start the nginx

systemctl start nginx
  • Set boot up

systemctl enable nginx

Install php7.4

  • Install yum-utils and enable the EPEL repository
yum install -y epel-release yum-utils 
  • Download and install Remirepo using the yum command
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
  • To configure the PHP 7.4 repository, use the following command

yum-config-manager --enable remi-php74
  • Installing PHP 7.4

yum install -y php php-fpm  php-common php-opcache php-mcrypt php-cli php-mysql php-dom php-simplexml php-ssh2 php-xml php-xmlreader php-curl php-date php-exif php-filter php-ftp php-gd php-hash php-iconv php-json php-libxml php-pecl-imagick php-mbstring php-mysqlnd php-openssl php-pcre php-posix php-sockets php-spl php-tokenizer php-zlib php-zip
  • See other PHP extensions that can be safely transferred
yum search php74 | more
  • Here the landlord organized a more complete extension you can according to their own needs to increase or change to save your time to organize the
yum install -y php74-php-pecl-http-message-devel php74-php-pecl-propro-devel php74-php-pecl-psr-devel php74-php-pecl-raphf-devel php74-php-pecl-xmldiff-devel php74-php-pecl-yaconf-devel php74-php-zephir-parser-devel php74-runtime php74-scldevel php74 php74-build php74-php php74-php-ast php74-php-bcmath php74-php-brotli php74-php-cli php74-php-common php74-php-componere php74-php-dba php74-php-dbg php74-php-devel php74-php-embedded php74-php-enchant php74-php-ffi php74-php-fpm php74-php-gd php74-php-geos php74-php-gmp php74-php-imap php74-php-intl php74-php-ioncube-loader php74-php-json php74-php-ldap php74-php-libvirt php74-php-libvirt-doc php74-php-litespeed php74-php-lz4 php74-php-maxminddb php74-php-mbstring php74-php-mysqlnd php74-php-oci8 php74-php-odbc php74-php-opcache php74-php-pdo php74-php-pdo-dblib php74-php-pdo-firebird php74-php-pear php74-php-pecl-ahocorasick php74-php-pecl-amqp php74-php-pecl-apcu php74-php-pecl-apcu-bc php74-php-pecl-apcu-devel php74-php-pecl-apfd php74-php-pecl-base58 php74-php-pecl-bitset php74-php-pecl-cassandra php74-php-pecl-cmark php74-php-pecl-couchbase2 php74-php-pecl-crypto php74-php-pecl-csv php74-php-pecl-datadog-trace php74-php-pecl-dbase php74-php-pecl-decimal php74-php-pecl-dio php74-php-pecl-druid php74-php-pecl-ds php74-php-pecl-eio php74-php-pecl-env php74-php-pecl-ev php74-php-pecl-event php74-php-pecl-fann php74-php-pecl-gearman php74-php-pecl-gender php74-php-pecl-geoip php74-php-pecl-geospatial php74-php-pecl-gnupg php74-php-pecl-grpc php74-php-pecl-handlebars php74-php-pecl-hdr-histogram php74-php-pecl-hprose php74-php-pecl-hrtime php74-php-pecl-http php74-php-pecl-http-devel php74-php-pecl-http-message php74-php-pecl-ice php74-php-pecl-igbinary php74-php-pecl-igbinary-devel php74-php-pecl-imagick php74-php-pecl-imagick-devel php74-php-pecl-inotify php74-php-pecl-interbase php74-php-pecl-ip2location php74-php-pecl-json-post php74-php-pecl-krb5 php74-php-pecl-krb5-devel php74-php-pecl-leveldb php74-php-pecl-lua php74-php-pecl-luasandbox php74-php-pecl-lzf php74-php-pecl-mailparse php74-php-pecl-mcrypt php74-php-pecl-memcache php74-php-pecl-memcached php74-php-pecl-memprof php74-php-pecl-mogilefs php74-php-pecl-mongodb php74-php-pecl-mosquitto php74-php-pecl-msgpack php74-php-pecl-msgpack-devel php74-php-pecl-mustache php74-php-pecl-mysql php74-php-pecl-mysql-xdevapi php74-php-pecl-mysqlnd-azure php74-php-pecl-nsq php74-php-pecl-oauth php74-php-pecl-opencensus php74-php-pecl-parle php74-php-pecl-pcov php74-php-pecl-pdflib php74-php-pecl-pq php74-php-pecl-propro php74-php-pecl-protobuf php74-php-pecl-psr php74-php-pecl-radius php74-php-pecl-raphf php74-php-pecl-rar php74-php-pecl-rdkafka php74-php-pecl-rdkafka4 php74-php-pecl-recode php74-php-pecl-redis4 php74-php-pecl-redis5 php74-php-pecl-request php74-php-pecl-rpminfo php74-php-pecl-rrd php74-php-pecl-runkit7 php74-php-pecl-scoutapm php74-php-pecl-scrypt php74-php-pecl-sdl php74-php-pecl-seasclick php74-php-pecl-seaslog php74-php-pecl-selinux php74-php-pecl-skywalking php74-php-pecl-solr2 php74-php-pecl-ssdeep php74-php-pecl-ssh2 php74-php-pecl-stats php74-php-pecl-stomp php74-php-pecl-svm php74-php-pecl-svn php74-php-pecl-swoole4 php74-php-pecl-sync php74-php-pecl-taint php74-php-pecl-termbox php74-php-pecl-timecop php74-php-pecl-trader php74-php-pecl-translit php74-php-pecl-uopz php74-php-pecl-uploadprogress php74-php-pecl-uuid php74-php-pecl-uv php74-php-pecl-varnish php74-php-pecl-vld php74-php-pecl-wddx php74-php-pecl-xattr php74-php-pecl-xdebug php74-php-pecl-xdiff php74-php-pecl-xhprof php74-php-pecl-xlswriter php74-php-pecl-xmldiff php74-php-pecl-xxtea php74-php-pecl-yac php74-php-pecl-yaconf php74-php-pecl-yaf php74-php-pecl-yaml php74-php-pecl-yar php74-php-pecl-yaz php74-php-pecl-zip php74-php-pecl-zmq php74-php-pggi php74-php-pgsql php74-php-phalcon4 php74-php-phpiredis php74-php-pinba php74-php-process php74-php-pspell  php74-php-smbclient php74-php-snappy php74-php-snmp php74-php-snuffleupagus php74-php-soap php74-php-sodium php74-php-tidy php74-php-wkhtmltox php74-php-xml php74-php-xmlrpc php74-php-zephir-parser php74-php-zstd php74-unit-php php74-uwsgi-plugin-php php74-xhprof php74-zephir
  • Extended Chinese Description
php74-php-snuffleupagus:x86_64: PHP的安全模块
php74-php-pecl-cassandra:用于Apache的DataStax PHP驱动程序卡桑德拉
php74-php-pecl-nsq:NSQ客户端的PHP扩展
php74-php-cli:用于PHP的命令行接口
php74-php-pecl-oauth:PHP OAuth消费者扩展
php74-php-pecl-decimal:任意精度浮点小数
php74-php-gmp:一个用于使用GNU的PHP应用程序模块议员库
php74-php-pecl-rdkafka4:基于librdkafka的Kafka客户端
php74-php-soap:用于使用SOAP的PHP应用程序的模块协议
php74-php-phpiredis:x86_64: Redis的客户端扩展名
php74-php-pecl-taint:x86_64: XSS代码嗅探器
php74-php-pecl-redis4:的扩展名 Redis键值存储
php74-php-pecl-propro-devel:php74-php-pecl-propro developer files (header)
php74-php-pecl-psr-devel:php74-php-pecl-psr developer files (header)
php74-php-pecl-redis5:的扩展名 Redis键值存储
php74-zephir:用于创建扩展的Zephir语言PHP
php74-php-pecl-selinux:用于PHP脚本的SELinux绑定语言
php74-php-pecl-rdkafka:基于librdkafka的Kafka客户端
php74-php-pecl-grpc:x86_64:通用RPC框架
php74-php-brotli:用于PHP的Brotli扩展
php74-php-pecl-http-message-devel:php74-php-pecl-http-message developer files (headers)
php74-php-pecl-fann:用于FANN库的包装器
php74-php-pecl-yaz:x86_64: Z39.50/SRU客户端
php74-php-lz4:x86_64: PHP的LZ4扩展
php74-php-libvirt:用于Libvirt的PHP语言绑定
php74-php-pecl-zmq:ZeroMQ消息传递
php74-php-pecl-mongodb:x86_64:用于PHP的MongoDB驱动程序
php74-php-process:用于PHP脚本的模块使用系统进程接口
php74-php-zephir-parser-devel:php74-php-zephir-parser developer files (headers)
php74-php-pspell:x86_64:用于PHP应用程序的模块中接口
php74-php-pecl-yar:轻量级并发RPC框架
php74-php:用于创建动态web的PHP脚本语言网站
php74-php-pecl-rrd:x86_64: rrdtool的PHP绑定
php74-runtime:处理php74软件集合的包
php74-php-pecl-xmldiff-devel:php74-php-pecl-xmldiff developer files (header)
php74-php-pecl-hprose:用于PHP的h散文
php74-php-pecl-propro:属性代理
php74-php-pecl-yac:无锁用户数据缓存
php74-php-pecl-csv:CSV PHP extension
php74-php-pecl-swoole4:PHP的异步并发分布式网络框架
php74-php-pecl-pcov:x86_64:代码覆盖驱动程序
php74-php-pecl-sync:已命名和未命名同步对象
php74-php-pecl-yaf:x86_64:又一个框架
php74-php-pecl-varnish:Varnish缓存绑定
php74-php-pggi:GTK绑定
php74-php-pecl-handlebars:Handlebars模板语言
php74-php-pecl-rar:用于读取RAR存档的PHP扩展
php74-php-pecl-xdebug:用于调试PHP脚本的PECL包
php74-php-oci8:x86_64:用于使用OCI8的PHP应用程序的模块数据库
php74-php-fpm:PHP FastCGI进程管理器
php74-php-common:PHP的公共文件
php74-php-pecl-xlswriter:一个高效、快速的xlsx文件出口扩展
php74-php-pecl-stats:用于统计计算的例程
php74-php-pecl-krb5:Kerberos验证扩展
php74-php-pecl-xhprof:x86_64: XHProf的PHP扩展,层次结构分析器
php74-php-pecl-ssdeep:libfuzzy库的包装器
php74-php-pecl-imagick:x86_64:用于创建和修改映像的扩展使用ImageMagick
php74-php-pecl-apcu-bc:APCu向后兼容模块
php74-php-xml:x86_64:用于使用XML的PHP应用程序的模块
php74-php-sodium:x86_64:钠密码库的包装
php74-php-pecl-apfd:总是填充表单数据
php74-php-componere:在运行时编写PHP类
php74-php-pecl-cmark:CommonMark扩展名
php74-php-pecl-uploadprogress:x86_64:跟踪进度的扩展文件上传
php74-php-pecl-apcu-devel:APCu开发人员文件(头文件)
php74-php-devel:构建PHP扩展所需的文件
php74-php-pecl-http-message:x86_64: PSR-7 HTTP消息实现
php74-xhprof:一个用于PHP - Web接口的层次分析器
php74-php-pear:noarch: PHP扩展和应用程序库框架
php74-php-pecl-igbinary:x86_64:替代标准PHP序列化器
php74-php-pecl-sdl:简单的PHP DirectMedia层
php74-php-pecl-parle:x86_64:解析和词法分析
php74-php-pecl-zip:一个ZIP文件的扩展名
php74:安装PHP 7.4的包
php74-php-pecl-memcached:x86_64:使用Memcached的扩展缓存守护进程
php74-php-zstd:x86_64: Zstandard扩展名
php74-php-pecl-json-post:JSON POST处理程序
php74-php-pecl-couchbase2:Couchbase服务器PHP扩展
php74-php-pecl-krb5-devel:Kerberos扩展开发人员文件(头)
php74-php-pecl-memcache:x86_64:使用Memcached的扩展缓存守护进程
php74-php-pecl-xattr:扩展属性
php74-php-pecl-svn:x86_64: Subversion版本的PHP绑定控制系统
php74-php-pecl-seaslog:一个有效、快速、稳定的日志 PHP扩展
php74-php-pecl-protobuf:序列化结构化的机制数据
php74-php-enchant:增强PHP的拼写扩展应用程序
php74-php-pecl-mogilefs:要与之通信的PHP客户端库 MogileFS存储
php74-php-phalcon4:Phalcon框架
php74-php-pecl-xmldiff:x86_64: XML差异和合并
php74-php-pecl-trader:为贸易商提供技术分析
php74-php-litespeed:LiteSpeed Web服务器PHP支持
php74-php-pecl-rpminfo:x86_64: RPM信息
php74-php-pecl-uopz:x86_64: Zend的用户操作
php74-php-pecl-gnupg:x86_64: gpgme库的包装
php74-php-pecl-vld:x86_64:转储PHP的内部表示脚本
php74-php-pecl-apcu:APC用户缓存
php74-php-maxminddb:MaxMind DB Reader扩展
php74-php-embedded:用于嵌入应用程序的PHP库
php74-php-pecl-wddx:Web分布式数据交换
php74-php-pecl-seasclick:一个Yandex ClickHouse客户端驱动 PHP扩展
php74-php-pecl-ip2location:获取an的地理位置信息IP地址
php74-php-pecl-xdiff:文件差异/补丁
php74-php-pecl-psr:PSR接口
php74-build:基本的构建配置
php74-php-pgsql:一个用于PHP的PostgreSQL数据库模块
php74-php-json:x86_64: PHP的JavaScript对象符号扩展
php74-php-pecl-yaconf-devel:php74-php-pecl-yaconf developer files (header)
php74-php-pecl-scoutapm:本地扩展组件 ScoutAPM的PHP代理
php74-php-pecl-druid:一个PHP的德鲁伊驱动
php74-php-mysqlnd:x86_64:用于使用MySQL的PHP应用程序的模块数据库
php74-php-pecl-xxtea:XXTEA加密算法扩展PHP
php74-php-smbclient:libsmbclient的PHP包装
php74-php-pecl-mysql:MySQL数据库访问函数
php74-php-pecl-http:扩展的HTTP支持
php74-php-pecl-recode:A module for PHP applications for using the recode library
php74-php-odbc:x86_64:用于使用ODBC的PHP应用程序的模块数据库
php74-php-tidy:标准PHP模块提供了tidy库支持
php74-php-xmlrpc:的PHP应用程序模块xml - rpc协议
php74-php-gd:用于PHP应用程序使用gd的模块图形库
php74-php-pecl-uuid:通用唯一标识符扩展对于PHP
php74-php-pecl-lua:嵌入式lua解释器
php74-php-intl:x86_64: PHP国际化扩展应用程序
php74-php-pecl-datadog-trace:APM和分布式跟踪PHP
php74-php-ffi:外部函数接口
php74-php-pecl-timecop:x86_64:时间旅行和冻结扩展
php74-php-pecl-mailparse:用于解析和的PHP PECL包处理电子邮件消息
php74-php-pecl-skywalking:x86_64: Apache的PHP工具代理人行天桥
php74-php-sqlsrv:x86_64:用于SQL Server的PHP Microsoft驱动程序
php74-php-pecl-memprof:x86_64:内存使用分析器
php74-php-zephir-parser:x86_64: Zephir解析器扩展
php74-php-bcmath:用于PHP应用程序的模块bcmath库
php74-php-pecl-runkit7:为了这些你…不应该…无论如何我一直在做……但是肯定做的!
php74-scldevel:x86_64:打包php74的开发文件
php74-php-pecl-geoip:将IP地址映射到的扩展名地理位置
php74-php-pinba:x86_64: Pinba统计服务器的客户端扩展
php74-php-pecl-dbase:dBase数据库文件访问函数
php74-php-pecl-ssh2:x86_64: libssh2库的绑定
php74-php-pecl-pq:PostgreSQL客户端库(libpq)绑定
php74-php-pecl-pdflib:生成PDF文件的包
php74-php-pecl-radius:Radius客户端库
php74-php-pecl-eio:提供libeio库的接口
php74-php-pecl-sphinx:Sphinx SQL全文的PECL扩展搜索引擎
php74-php-pecl-mustache:Mustache模板语言
php74-php-pecl-yaconf:x86_64:另一个配置容器
php74-php-ast:抽象语法树
php74-php-pecl-gearman:PHP包装器到libgearman
php74-php-pecl-hdr-histogram:x86_64: C语言的PHP扩展包装hdrhistogram API
php74-php-pdo-dblib:x86_64: PDO驱动程序,用于Microsoft SQL Server和Sybase数据库
php74-php-pecl-scrypt:Scrypt散列函数
php74-php-pecl-ahocorasick:有效的Aho-Corasick字符串模式匹配算法
php74-php-pecl-raphf-devel:php74-php-pecl-raphf developer files (header)
php74-php-pecl-bitset:位集库
php74-php-pecl-mcrypt:x86_64: libmcrypt库的绑定
php74-php-mbstring:一个用于PHP应用程序的模块多字节字符串处理
php74-php-pdo:一个用于PHP的数据库访问抽象模块应用程序
php74-php-pecl-gmagick:的包装器GraphicsMagick库
php74-php-pecl-amqp:与任何AMQP兼容的服务器通信
php74-php-libvirt-doc:noarch: php-libvirt文件
php74-php-pecl-mosquitto:libmosquito - to的扩展
php74-php-pecl-leveldb:LevelDB PHP绑定
php74-php-pecl-lzf:x86_64:处理LZF de/压缩的扩展
php74-php-pecl-base58:用base58编码和解码数据
php74-php-pecl-inotify:x86_64: Inotify
php74-php-pecl-crypto:OpenSSL密码库的包装器
php74-php-imap:x86_64:用于使用IMAP的PHP应用程序的模块
php74-php-pecl-yaml:x86_64: yaml的PHP绑定
php74-php-pecl-imagick-devel:imagick扩展开发人员文件(头)
php74-php-pecl-solr2:Apache Solr的API定向对象
php74-php-horde-horde-lz4:Horde LZ4压缩扩展
php74-php-ioncube-loader:Loader for ionCube Encoded Files with ionCube 24 support
php74-php-snappy:PHP的Snappy扩展
php74-php-pecl-hrtime:x86_64:高分辨率定时
php74-php-pecl-raphf:资源和持久句柄工厂
php74-php-pecl-http-devel:x86_64:扩展HTTP支持开发人员文件(头)
php74-php-pecl-stomp:Stomp客户端扩展
php74-php-pecl-uv:Libuv包装器
php74-php-pecl-luasandbox:带有限制和安全的Lua解释器环境
php74-php-pecl-msgpack:用于与MessagePack通信的API序列化
php74-php-pecl-mysql-xdevapi:MySQL数据库访问函数
php74-php-pecl-event:提供libevent库的接口
php74-php-dbg:交互式PHP调试器
php74-php-pecl-msgpack-devel:MessagePack开发人员文件(头)
php74-php-pecl-env:加载环境变量
php74-php-pecl-ds:x86_64: PHP的数据结构
php74-php-dba:一个用于PHP的数据库抽象层模块应用程序
php74-php-pecl-gender:x86_64:性别扩展
php74-php-pecl-translit:将非拉丁字符音译设置为拉丁文
php74-php-wkhtmltox:HTML转换器
php74-php-pecl-vips:x86_64:与libvip接口的PHP扩展
php74-unit-php:用于NGINX单元的PHP模块
php74-php-pecl-opencensus:一个stats集合和分布式跟踪框架
php74-php-snmp:一个用于PHP应用程序查询的模块SNMP-managed设备
php74-php-ldap:x86_64:用于使用LDAP的PHP应用程序的模块
php74-php-opcache:x86_64: Zend OPcache
php74-php-pecl-mysqlnd-azure:x86_64: mysqlnd的重定向插件
php74-php-pecl-dio:直接I/O函数
php74-php-pecl-geospatial:PHP扩展来处理公共地理空间功能
php74-php-pecl-ev:提供libev库的接口
php74-php-pecl-igbinary-devel:Igbinary开发人员文件(头)
  • Start the PHP
systemctl start php-fpm
  • Set boot up

systemctl enable php-fpm
  • Test the installation was successful

  • Mysql > create an index. PHP file in the specified directory (” home “);

  • Configure nginx to the access directory
CD /etc/nginx/conf.d/ # create new index.conf file vim index.conf
  • The following
server { listen 8080; server_name localhost; root /home; add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; add_header X-Content-Type-Options "nosniff"; index index.php index.html index.htm; charset utf-8; location / { try_files $uri $uri/ /index.php? $query_string; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } error_page 404 /index.php; location ~ \.php$ { root /home; fastcgi_split_path_info ^(.+\.php)(/.+)$; Fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.(? ! well-known).* { deny all; }}
  • Access your own IP:8080



PHP 7.4 is now installed successfully

  • Install mysql5.7

  • Set the yum source for MySQL
rpm -ivh https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
  • View the source of yum
yum list | grep mysql
  • Close 80 packs, open 57 packs
yum-config-manager --disable mysql80-community
yum-config-manager --enable mysql57-community
  • Install mysql57

yum -y install mysql-community-server mysql-community-client

  • Start the mysql

systemctl start mysqld
  • Set boot up

systemctl enable mysqld
  • View the default password

cat /var/log/mysqld.log | grep "A temporary password is generated for root"
  • Change the password

Mysql -- uroot-p # mysql -- uroot-p #

The following things are performed in SQL

Set password for root@localhost = password(' your password '); Mysql > set global validate_password_policy=0; mysql > set global validate_password_policy=0; set global validate_password_mixed_case_count=0; set global validate_password_number_count=3; set global validate_password_special_char_count=0; set global validate_password_length=3; set global validate_password_policy=LOW;

Exit the SQL

  • Set the coding
Init_connect ='SET NAMES utf8' /etc/my. CNF
  • Restart the mysql
systemctl restart mysqld
  • Setting up a remote link

mysql -uroot -p
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'your password' WITH GRANT OPTION; # flush privileges; # exit exit;

This completes the MySQL installation

The security configuration is written below

  • Configure PHP ini

Cgi. fix_pathinfo=1 memory_limit = 256M post_max_size = 100M upload_max_filesize = 32M max_execution_time = 600 max_input_vars = 3000 max_input_time = 1000
  • Modify user groups

User = WWW group = WWW WWW group = WWW WWW group = WWW WWW group = WWW WWW WWW vim /etc/php-fpm /usr/lib64/ PHP /modules: /usr/lib64/ modules: /usr/lib64/ modules: /usr/lib64/ modules: /usr/lib64/ modules: /usr/share/nginx/ HTML -R 777 /usr/share/nginx/html

The LNMP installation is now complete