一、安装Apache
[root@localhost ~]# yum install httpd
Loaded plugins: fastestmirror, langpacks
Existing lock /var/run/yum.pid: another copy is running as pid 11249.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 168 M RSS (586 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:33 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 168 M RSS (586 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:35 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 168 M RSS (586 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:37 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 168 M RSS (586 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:39 ago
State : Running, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 168 M RSS (586 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:41 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 168 M RSS (586 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:43 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 168 M RSS (586 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:45 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 168 M RSS (587 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:47 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 168 M RSS (587 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:49 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 168 M RSS (588 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:51 ago
State : Running, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 169 M RSS (588 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:53 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 170 M RSS (589 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:55 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 170 M RSS (589 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:57 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 171 M RSS (590 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 00:59 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 171 M RSS (590 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:01 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 187 M RSS (606 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:03 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 187 M RSS (606 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:05 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 187 M RSS (606 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:07 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 187 M RSS (606 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:09 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 187 M RSS (606 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:11 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 202 M RSS (620 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:13 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 202 M RSS (620 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:15 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 202 M RSS (620 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:17 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 202 M RSS (620 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:19 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 202 M RSS (620 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:21 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 202 M RSS (620 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:23 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 202 M RSS (620 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:25 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 202 M RSS (620 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:27 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 214 M RSS (632 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:29 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 214 M RSS (632 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:31 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 214 M RSS (632 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:33 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 214 M RSS (632 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:35 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 214 M RSS (632 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:37 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 214 M RSS (632 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:39 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 214 M RSS (632 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:41 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 226 M RSS (645 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:43 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:45 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:47 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:49 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:51 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:53 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:55 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:57 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 01:59 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:01 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:03 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:05 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:07 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:09 ago
State : Running, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 234 M RSS (653 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:11 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 235 M RSS (654 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:13 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 235 M RSS (654 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:15 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 236 M RSS (655 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:17 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 236 M RSS (655 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:19 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 237 M RSS (656 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:21 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 237 M RSS (656 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:23 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 238 M RSS (657 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:25 ago
State : Sleeping, pid: 11249
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: PackageKit
Memory : 239 M RSS (659 MB VSZ)
Started: Tue Mar 29 21:23:34 2022 - 02:27 ago
State : Sleeping, pid: 11249
^C
Exiting on user cancel.
[root@localhost ~]# ps -ef |grep yum
root 12889 11207 0 21:26 pts/0 00:00:00 grep --color=auto yum
[root@localhost ~]# ps aux |grep yum
root 12901 0.0 0.0 112712 956 pts/0 S+ 21:26 0:00 grep --color=auto yum
[root@localhost ~]# yum install httpd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.nju.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-97.el7.centos.5 will be installed
--> Processing Dependency: httpd-tools = 2.4.6-97.el7.centos.5 for package: httpd-2.4.6-97.el7.centos.5.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-97.el7.centos.5.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-97.el7.centos.5 will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
httpd x86_64 2.4.6-97.el7.centos.5 updates 2.7 M
Installing for dependencies:
httpd-tools x86_64 2.4.6-97.el7.centos.5 updates 94 k
mailcap noarch 2.1.41-2.el7 base 31 k
Transaction Summary
================================================================================
Install 1 Package (+2 Dependent packages)
Total download size: 2.8 M
Installed size: 9.6 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/mailcap-2.1.41-2.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for mailcap-2.1.41-2.el7.noarch.rpm is not installed
(1/3): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00
Public key for httpd-tools-2.4.6-97.el7.centos.5.x86_64.rpm is not installed
(2/3): httpd-tools-2.4.6-97.el7.centos.5.x86_64.rpm | 94 kB 00:00
(3/3): httpd-2.4.6-97.el7.centos.5.x86_64.rpm | 2.7 MB 00:00
--------------------------------------------------------------------------------
Total 8.7 MB/s | 2.8 MB 00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-7.1908.0.el7.centos.x86_64 (@anaconda)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : httpd-tools-2.4.6-97.el7.centos.5.x86_64 1/3
Installing : mailcap-2.1.41-2.el7.noarch 2/3
Installing : httpd-2.4.6-97.el7.centos.5.x86_64 3/3
Verifying : mailcap-2.1.41-2.el7.noarch 1/3
Verifying : httpd-tools-2.4.6-97.el7.centos.5.x86_64 2/3
Verifying : httpd-2.4.6-97.el7.centos.5.x86_64 3/3
Installed:
httpd.x86_64 0:2.4.6-97.el7.centos.5
Dependency Installed:
httpd-tools.x86_64 0:2.4.6-97.el7.centos.5 mailcap.noarch 0:2.1.41-2.el7
Complete!
[root@localhost ~]# systemctl start httpd
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# chkconfig firewalld off
Note: Forwarding request to 'systemctl disable firewalld.service'.
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost ~]# chkconfig firewalld off
Note: Forwarding request to 'systemctl disable firewalld.service'.
[root@localhost ~]# firewall-cmd –zone=public –add-port=80/tcp –permanent
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: –zone=public –add-port=80/tcp –permanent
[root@localhost ~]# firewall-cmd –zone=public –add-port=80/tcp –permanent
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: –zone=public –add-port=80/tcp –permanent
[root@localhost ~]# service iptables start
Redirecting to /bin/systemctl start iptables.service
Failed to start iptables.service: Unit not found.
[root@localhost ~]# systemctl start iptables
Failed to start iptables.service: Unit not found.
[root@localhost ~]# systemctl start ifirewall-cmd: error: unrecognized arguments:^C
[root@localhost ~]# fire-cmd --list-ports
bash: fire-cmd: command not found...
[root@localhost ~]# firewall-cmd --list-ports
FirewallD is not running
[root@localhost ~]# firewall-cmd --state
not running
[root@localhost ~]# systemctl start firewalld.service
[root@localhost ~]# firewall-cmd –zone=public –add-port=80/tcp –permanent
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: –zone=public –add-port=80/tcp –permanent
[root@localhost ~]# firewall-cmd --state
running
[root@localhost ~]# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens33
sources:
services: dhcpv6-client ssh
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
[root@localhost ~]# firewall-cmd –zone=public –add-port=80/tcp –permanent
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: –zone=public –add-port=80/tcp –permanent
[root@localhost ~]# firewall-cmd --permanent --list-ports
[root@localhost ~]# firewall-cmd –zone=public –add-port=80/tcp
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: –zone=public –add-port=80/tcp
[root@localhost ~]# firewall-cmd –zone=public –permanent
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: –zone=public –permanent
[root@localhost ~]# sudo firewall-cmd –zone=public –add-port=80/tcp –permanent
usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: –zone=public –add-port=80/tcp –permanent
[root@localhost ~]# sudo firewall-cmd –add-port=80/tcp –permanent usage: see firewall-cmd man page
firewall-cmd: error: unrecognized arguments: –add-port=80/tcp –permanent
[root@localhost ~]# systemctl stop firewalld.service
二、安装PHP7.2
[root@localhost ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
Retrieving https://mirror.webtatic.com/yum/el7/epel-release.rpm
warning: /var/tmp/rpm-tmp.IFvUNu: Header V4 RSA/SHA1 Signature, key ID 62e74ca5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:epel-release-7-5 ################################# [100%]
[root@localhost ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Retrieving https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
warning: /var/tmp/rpm-tmp.3GAkFG: Header V4 RSA/SHA1 Signature, key ID 62e74ca5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:webtatic-release-7-3 ################################# [100%]
[root@localhost ~]# rpm -qa | grep php
[root@localhost ~]# yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel php72w-embedded php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.nju.edu.cn
* epel: mirrors.bfsu.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
* webtatic: us-east.repo.webtatic.com
webtatic | 3.6 kB 00:00
(1/2): webtatic/x86_64/group_gz | 448 B 00:01
(2/2): webtatic/x86_64/primary_db | 271 kB 00:02
Resolving Dependencies
--> Running transaction check
---> Package mod_php72w.x86_64 0:7.2.34-1.w7 will be installed
--> Processing Dependency: libargon2.so.0()(64bit) for package: mod_php72w-7.2.34-1.w7.x86_64
---> Package php72w-cli.x86_64 0:7.2.34-1.w7 will be installed
---> Package php72w-common.x86_64 0:7.2.34-1.w7 will be installed
---> Package php72w-devel.x86_64 0:7.2.34-1.w7 will be installed
--> Processing Dependency: pcre-devel(x86-64) for package: php72w-devel-7.2.34-1.w7.x86_64
---> Package php72w-embedded.x86_64 0:7.2.34-1.w7 will be installed
---> Package php72w-fpm.x86_64 0:7.2.34-1.w7 will be installed
---> Package php72w-gd.x86_64 0:7.2.34-1.w7 will be installed
---> Package php72w-mbstring.x86_64 0:7.2.34-1.w7 will be installed
---> Package php72w-mysqlnd.x86_64 0:7.2.34-1.w7 will be installed
---> Package php72w-opcache.x86_64 0:7.2.34-1.w7 will be installed
---> Package php72w-pdo.x86_64 0:7.2.34-1.w7 will be installed
---> Package php72w-xml.x86_64 0:7.2.34-1.w7 will be installed
--> Running transaction check
---> Package libargon2.x86_64 0:20161029-3.el7 will be installed
---> Package pcre-devel.x86_64 0:8.32-17.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
mod_php72w x86_64 7.2.34-1.w7 webtatic 3.1 M
php72w-cli x86_64 7.2.34-1.w7 webtatic 3.1 M
php72w-common x86_64 7.2.34-1.w7 webtatic 1.3 M
php72w-devel x86_64 7.2.34-1.w7 webtatic 2.8 M
php72w-embedded x86_64 7.2.34-1.w7 webtatic 1.5 M
php72w-fpm x86_64 7.2.34-1.w7 webtatic 1.6 M
php72w-gd x86_64 7.2.34-1.w7 webtatic 142 k
php72w-mbstring x86_64 7.2.34-1.w7 webtatic 587 k
php72w-mysqlnd x86_64 7.2.34-1.w7 webtatic 198 k
php72w-opcache x86_64 7.2.34-1.w7 webtatic 247 k
php72w-pdo x86_64 7.2.34-1.w7 webtatic 90 k
php72w-xml x86_64 7.2.34-1.w7 webtatic 123 k
Installing for dependencies:
libargon2 x86_64 20161029-3.el7 epel 23 k
pcre-devel x86_64 8.32-17.el7 base 480 k
Transaction Summary
================================================================================
Install 12 Packages (+2 Dependent packages)
Total download size: 15 M
Installed size: 66 M
Downloading packages:
(1/14): pcre-devel-8.32-17.el7.x86_64.rpm | 480 kB 00:00
warning: /var/cache/yum/x86_64/7/epel/packages/libargon2-20161029-3.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for libargon2-20161029-3.el7.x86_64.rpm is not installed
(2/14): libargon2-20161029-3.el7.x86_64.rpm | 23 kB 00:02
warning: /var/cache/yum/x86_64/7/webtatic/packages/php72w-common-7.2.34-1.w7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 62e74ca5: NOKEY
Public key for php72w-common-7.2.34-1.w7.x86_64.rpm is not installed
(3/14): php72w-common-7.2.34-1.w7.x86_64.rpm | 1.3 MB 00:02
(4/14): php72w-embedded-7.2.34-1.w7.x86_64.rpm | 1.5 MB 00:00
(5/14): php72w-cli-7.2.34-1.w7.x86_64.rpm | 3.1 MB 00:03
(6/14): mod_php72w-7.2.34-1.w7.x86_64.rpm | 3.1 MB 00:03
(7/14): php72w-gd-7.2.34-1.w7.x86_64.rpm | 142 kB 00:00
(8/14): php72w-fpm-7.2.34-1.w7.x86_64.rpm | 1.6 MB 00:00
(9/14): php72w-devel-7.2.34-1.w7.x86_64.rpm | 2.8 MB 00:03
(10/14): php72w-mysqlnd-7.2.34-1.w7.x86_64.rpm | 198 kB 00:00
(11/14): php72w-opcache-7.2.34-1.w7.x86_64.rpm | 247 kB 00:00
(12/14): php72w-mbstring-7.2.34-1.w7.x86_64.rpm | 587 kB 00:00
(13/14): php72w-xml-7.2.34-1.w7.x86_64.rpm | 123 kB 00:00
(14/14): php72w-pdo-7.2.34-1.w7.x86_64.rpm | 90 kB 00:01
--------------------------------------------------------------------------------
Total 2.7 MB/s | 15 MB 00:05
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el7
Importing GPG key 0x62E74CA5:
Userid : "Webtatic EL7 <rpms@webtatic.com>"
Fingerprint: 830d b159 6d9b 9b01 99dc 24a3 e87f d236 62e7 4ca5
Package : webtatic-release-7-3.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el7
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
Userid : "Fedora EPEL (7) <epel@fedoraproject.org>"
Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
Package : epel-release-7-5.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : php72w-common-7.2.34-1.w7.x86_64 1/14
Installing : libargon2-20161029-3.el7.x86_64 2/14
Installing : php72w-cli-7.2.34-1.w7.x86_64 3/14
Installing : php72w-pdo-7.2.34-1.w7.x86_64 4/14
Installing : pcre-devel-8.32-17.el7.x86_64 5/14
Installing : php72w-devel-7.2.34-1.w7.x86_64 6/14
Installing : php72w-mysqlnd-7.2.34-1.w7.x86_64 7/14
Installing : php72w-embedded-7.2.34-1.w7.x86_64 8/14
Installing : php72w-fpm-7.2.34-1.w7.x86_64 9/14
Installing : mod_php72w-7.2.34-1.w7.x86_64 10/14
Installing : php72w-opcache-7.2.34-1.w7.x86_64 11/14
Installing : php72w-mbstring-7.2.34-1.w7.x86_64 12/14
Installing : php72w-xml-7.2.34-1.w7.x86_64 13/14
Installing : php72w-gd-7.2.34-1.w7.x86_64 14/14
Verifying : php72w-embedded-7.2.34-1.w7.x86_64 1/14
Verifying : php72w-mysqlnd-7.2.34-1.w7.x86_64 2/14
Verifying : php72w-fpm-7.2.34-1.w7.x86_64 3/14
Verifying : php72w-opcache-7.2.34-1.w7.x86_64 4/14
Verifying : php72w-cli-7.2.34-1.w7.x86_64 5/14
Verifying : php72w-mbstring-7.2.34-1.w7.x86_64 6/14
Verifying : mod_php72w-7.2.34-1.w7.x86_64 7/14
Verifying : pcre-devel-8.32-17.el7.x86_64 8/14
Verifying : php72w-common-7.2.34-1.w7.x86_64 9/14
Verifying : php72w-devel-7.2.34-1.w7.x86_64 10/14
Verifying : php72w-xml-7.2.34-1.w7.x86_64 11/14
Verifying : libargon2-20161029-3.el7.x86_64 12/14
Verifying : php72w-gd-7.2.34-1.w7.x86_64 13/14
Verifying : php72w-pdo-7.2.34-1.w7.x86_64 14/14
Installed:
mod_php72w.x86_64 0:7.2.34-1.w7 php72w-cli.x86_64 0:7.2.34-1.w7
php72w-common.x86_64 0:7.2.34-1.w7 php72w-devel.x86_64 0:7.2.34-1.w7
php72w-embedded.x86_64 0:7.2.34-1.w7 php72w-fpm.x86_64 0:7.2.34-1.w7
php72w-gd.x86_64 0:7.2.34-1.w7 php72w-mbstring.x86_64 0:7.2.34-1.w7
php72w-mysqlnd.x86_64 0:7.2.34-1.w7 php72w-opcache.x86_64 0:7.2.34-1.w7
php72w-pdo.x86_64 0:7.2.34-1.w7 php72w-xml.x86_64 0:7.2.34-1.w7
Dependency Installed:
libargon2.x86_64 0:20161029-3.el7 pcre-devel.x86_64 0:8.32-17.el7
Complete!
[root@localhost ~]# ————————————————
bash: ————————————————: command not found...
[root@localhost ~]# 版权声明:本文为CSDN博主「轩轩n」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
bash: 版权声明:本文为CSDN博主「轩轩n」的原创文章,遵循CC: command not found...
[root@localhost ~]# 原文链接:https://blog.csdn.net/weixin_44897792/article/details/114533980
-bash: 原文链接:https://blog.csdn.net/weixin_44897792/article/details/114533980: No such file or directory
[root@localhost ~]# systemctl start php-fpm.service
[root@localhost ~]# php -v
PHP 7.2.34 (cli) (built: Oct 1 2020 13:37:37) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.34, Copyright (c) 1999-2018, by Zend Technologies
[root@localhost ~]# systemctl enable php-fpm.service
Created symlink from /etc/systemd/system/multi-user.target.wants/php-fpm.service to /usr/lib/systemd/system/php-fpm.service.
[root@localhost ~]# systemctl status php-fpm.service
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2022-03-29 21:48:52 EDT; 40s ago
Main PID: 14057 (php-fpm)
Status: "Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic: 0req/sec"
CGroup: /system.slice/php-fpm.service
├─14057 php-fpm: master process (/etc/php-fpm.conf)
├─14058 php-fpm: pool www
├─14059 php-fpm: pool www
├─14060 php-fpm: pool www
├─14061 php-fpm: pool www
└─14062 php-fpm: pool www
Mar 29 21:48:52 localhost.localdomain systemd[1]: Starting The PHP FastCGI Pr...
Mar 29 21:48:52 localhost.localdomain systemd[1]: Started The PHP FastCGI Pro...
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]# ss -tnl | grep 80
LISTEN 0 128 [::]:80 [::]:*
[root@localhost ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
三、安装数据库
[root@localhost ~]# yum install mariadb mariadb-server mariadb-devel -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.nju.edu.cn
* epel: mirrors.bfsu.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
* webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.68-1.el7 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.68-1.el7 for package: 1:mariadb-5.5.68-1.el7.x86_64
---> Package mariadb-devel.x86_64 1:5.5.68-1.el7 will be installed
--> Processing Dependency: openssl-devel(x86-64) for package: 1:mariadb-devel-5.5.68-1.el7.x86_64
---> Package mariadb-server.x86_64 1:5.5.68-1.el7 will be installed
--> Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(DBI) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.64-1.el7 will be updated
---> Package mariadb-libs.x86_64 1:5.5.68-1.el7 will be an update
---> Package openssl-devel.x86_64 1:1.0.2k-25.el7_9 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-25.el7_9 for package: 1:openssl-devel-1.0.2k-25.el7_9.x86_64
--> Processing Dependency: zlib-devel(x86-64) for package: 1:openssl-devel-1.0.2k-25.el7_9.x86_64
--> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.2k-25.el7_9.x86_64
---> Package perl-DBD-MySQL.x86_64 0:4.023-6.el7 will be installed
---> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed
--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64
--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64
--> Running transaction check
---> Package krb5-devel.x86_64 0:1.15.1-51.el7_9 will be installed
--> Processing Dependency: libkadm5(x86-64) = 1.15.1-51.el7_9 for package: krb5-devel-1.15.1-51.el7_9.x86_64
--> Processing Dependency: krb5-libs(x86-64) = 1.15.1-51.el7_9 for package: krb5-devel-1.15.1-51.el7_9.x86_64
--> Processing Dependency: libverto-devel for package: krb5-devel-1.15.1-51.el7_9.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.15.1-51.el7_9.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.15.1-51.el7_9.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.15.1-51.el7_9.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-19.el7 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-19.el7 for package: 1:openssl-1.0.2k-19.el7.x86_64
---> Package openssl-libs.x86_64 1:1.0.2k-25.el7_9 will be an update
---> Package perl-PlRPC.noarch 0:0.2020-14.el7 will be installed
--> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch
---> Package zlib-devel.x86_64 0:1.2.7-19.el7_9 will be installed
--> Processing Dependency: zlib = 1.2.7-19.el7_9 for package: zlib-devel-1.2.7-19.el7_9.x86_64
--> Running transaction check
---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed
---> Package krb5-libs.x86_64 0:1.15.1-37.el7_6 will be updated
--> Processing Dependency: krb5-libs(x86-64) = 1.15.1-37.el7_6 for package: krb5-workstation-1.15.1-37.el7_6.x86_64
---> Package krb5-libs.x86_64 0:1.15.1-51.el7_9 will be an update
---> Package libcom_err-devel.x86_64 0:1.42.9-19.el7 will be installed
--> Processing Dependency: libcom_err(x86-64) = 1.42.9-19.el7 for package: libcom_err-devel-1.42.9-19.el7.x86_64
---> Package libkadm5.x86_64 0:1.15.1-37.el7_6 will be updated
---> Package libkadm5.x86_64 0:1.15.1-51.el7_9 will be an update
---> Package libselinux-devel.x86_64 0:2.5-15.el7 will be installed
--> Processing Dependency: libselinux(x86-64) = 2.5-15.el7 for package: libselinux-devel-2.5-15.el7.x86_64
--> Processing Dependency: libsepol-devel(x86-64) >= 2.5-10 for package: libselinux-devel-2.5-15.el7.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.5-15.el7.x86_64
---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed
---> Package openssl.x86_64 1:1.0.2k-19.el7 will be updated
---> Package openssl.x86_64 1:1.0.2k-25.el7_9 will be an update
---> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed
--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
---> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed
---> Package zlib.x86_64 0:1.2.7-18.el7 will be updated
---> Package zlib.x86_64 0:1.2.7-19.el7_9 will be an update
--> Running transaction check
---> Package krb5-workstation.x86_64 0:1.15.1-37.el7_6 will be updated
---> Package krb5-workstation.x86_64 0:1.15.1-51.el7_9 will be an update
---> Package libcom_err.x86_64 0:1.42.9-16.el7 will be updated
--> Processing Dependency: libcom_err(x86-64) = 1.42.9-16.el7 for package: libss-1.42.9-16.el7.x86_64
--> Processing Dependency: libcom_err(x86-64) = 1.42.9-16.el7 for package: e2fsprogs-libs-1.42.9-16.el7.x86_64
--> Processing Dependency: libcom_err(x86-64) = 1.42.9-16.el7 for package: e2fsprogs-1.42.9-16.el7.x86_64
---> Package libcom_err.x86_64 0:1.42.9-19.el7 will be an update
---> Package libselinux.x86_64 0:2.5-14.1.el7 will be updated
--> Processing Dependency: libselinux(x86-64) = 2.5-14.1.el7 for package: libselinux-python-2.5-14.1.el7.x86_64
--> Processing Dependency: libselinux(x86-64) = 2.5-14.1.el7 for package: libselinux-utils-2.5-14.1.el7.x86_64
---> Package libselinux.x86_64 0:2.5-15.el7 will be an update
---> Package libsepol-devel.x86_64 0:2.5-10.el7 will be installed
---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 will be installed
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed
--> Running transaction check
---> Package e2fsprogs.x86_64 0:1.42.9-16.el7 will be updated
---> Package e2fsprogs.x86_64 0:1.42.9-19.el7 will be an update
---> Package e2fsprogs-libs.x86_64 0:1.42.9-16.el7 will be updated
---> Package e2fsprogs-libs.x86_64 0:1.42.9-19.el7 will be an update
---> Package libselinux-python.x86_64 0:2.5-14.1.el7 will be updated
---> Package libselinux-python.x86_64 0:2.5-15.el7 will be an update
---> Package libselinux-utils.x86_64 0:2.5-14.1.el7 will be updated
---> Package libselinux-utils.x86_64 0:2.5-15.el7 will be an update
---> Package libss.x86_64 0:1.42.9-16.el7 will be updated
---> Package libss.x86_64 0:1.42.9-19.el7 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
mariadb x86_64 1:5.5.68-1.el7 base 8.8 M
mariadb-devel x86_64 1:5.5.68-1.el7 base 757 k
mariadb-server x86_64 1:5.5.68-1.el7 base 11 M
Installing for dependencies:
keyutils-libs-devel x86_64 1.5.8-3.el7 base 37 k
krb5-devel x86_64 1.15.1-51.el7_9 updates 273 k
libcom_err-devel x86_64 1.42.9-19.el7 base 32 k
libselinux-devel x86_64 2.5-15.el7 base 187 k
libsepol-devel x86_64 2.5-10.el7 base 77 k
libverto-devel x86_64 0.2.5-4.el7 base 12 k
openssl-devel x86_64 1:1.0.2k-25.el7_9 updates 1.5 M
perl-Compress-Raw-Bzip2 x86_64 2.061-3.el7 base 32 k
perl-Compress-Raw-Zlib x86_64 1:2.061-4.el7 base 57 k
perl-DBD-MySQL x86_64 4.023-6.el7 base 140 k
perl-DBI x86_64 1.627-4.el7 base 802 k
perl-IO-Compress noarch 2.061-2.el7 base 260 k
perl-Net-Daemon noarch 0.48-5.el7 base 51 k
perl-PlRPC noarch 0.2020-14.el7 base 36 k
zlib-devel x86_64 1.2.7-19.el7_9 updates 50 k
Updating for dependencies:
e2fsprogs x86_64 1.42.9-19.el7 base 701 k
e2fsprogs-libs x86_64 1.42.9-19.el7 base 168 k
krb5-libs x86_64 1.15.1-51.el7_9 updates 809 k
krb5-workstation x86_64 1.15.1-51.el7_9 updates 820 k
libcom_err x86_64 1.42.9-19.el7 base 42 k
libkadm5 x86_64 1.15.1-51.el7_9 updates 179 k
libselinux x86_64 2.5-15.el7 base 162 k
libselinux-python x86_64 2.5-15.el7 base 236 k
libselinux-utils x86_64 2.5-15.el7 base 151 k
libss x86_64 1.42.9-19.el7 base 47 k
mariadb-libs x86_64 1:5.5.68-1.el7 base 760 k
openssl x86_64 1:1.0.2k-25.el7_9 updates 494 k
openssl-libs x86_64 1:1.0.2k-25.el7_9 updates 1.2 M
zlib x86_64 1.2.7-19.el7_9 updates 90 k
Transaction Summary
================================================================================
Install 3 Packages (+15 Dependent packages)
Upgrade ( 14 Dependent packages)
Total size: 30 M
Total download size: 24 M
Downloading packages:
(1/18): keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm | 37 kB 00:00
(2/18): libverto-devel-0.2.5-4.el7.x86_64.rpm | 12 kB 00:00
(3/18): libselinux-devel-2.5-15.el7.x86_64.rpm | 187 kB 00:00
(4/18): krb5-devel-1.15.1-51.el7_9.x86_64.rpm | 273 kB 00:00
(5/18): mariadb-devel-5.5.68-1.el7.x86_64.rpm | 757 kB 00:00
(6/18): libsepol-devel-2.5-10.el7.x86_64.rpm | 77 kB 00:00
(7/18): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm | 32 kB 00:00
(8/18): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm | 57 kB 00:00
(9/18): libcom_err-devel-1.42.9-19.el7.x86_64.rpm | 32 kB 00:00
(10/18): mariadb-5.5.68-1.el7.x86_64.rpm | 8.8 MB 00:00
(11/18): perl-IO-Compress-2.061-2.el7.noarch.rpm | 260 kB 00:00
(12/18): perl-Net-Daemon-0.48-5.el7.noarch.rpm | 51 kB 00:00
(13/18): perl-PlRPC-0.2020-14.el7.noarch.rpm | 36 kB 00:00
(14/18): zlib-devel-1.2.7-19.el7_9.x86_64.rpm | 50 kB 00:00
(15/18): openssl-devel-1.0.2k-25.el7_9.x86_64.rpm | 1.5 MB 00:00
(16/18): mariadb-server-5.5.68-1.el7.x86_64.rpm | 11 MB 00:00
(17/18): perl-DBD-MySQL-4.023-6.el7.x86_64.rpm | 140 kB 00:00
(18/18): perl-DBI-1.627-4.el7.x86_64.rpm | 802 kB 00:00
--------------------------------------------------------------------------------
Total 22 MB/s | 24 MB 00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : libcom_err-1.42.9-19.el7.x86_64 1/46
Updating : zlib-1.2.7-19.el7_9.x86_64 2/46
Updating : libselinux-2.5-15.el7.x86_64 3/46
Updating : 1:openssl-libs-1.0.2k-25.el7_9.x86_64 4/46
Updating : krb5-libs-1.15.1-51.el7_9.x86_64 5/46
Updating : 1:mariadb-libs-5.5.68-1.el7.x86_64 6/46
Updating : libkadm5-1.15.1-51.el7_9.x86_64 7/46
Updating : libss-1.42.9-19.el7.x86_64 8/46
Installing : 1:mariadb-5.5.68-1.el7.x86_64 9/46
Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 10/46
Installing : zlib-devel-1.2.7-19.el7_9.x86_64 11/46
Updating : e2fsprogs-libs-1.42.9-19.el7.x86_64 12/46
Installing : libcom_err-devel-1.42.9-19.el7.x86_64 13/46
Installing : perl-Net-Daemon-0.48-5.el7.noarch 14/46
Installing : libverto-devel-0.2.5-4.el7.x86_64 15/46
Installing : libsepol-devel-2.5-10.el7.x86_64 16/46
Installing : libselinux-devel-2.5-15.el7.x86_64 17/46
Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 18/46
Installing : perl-IO-Compress-2.061-2.el7.noarch 19/46
Installing : perl-PlRPC-0.2020-14.el7.noarch 20/46
Installing : perl-DBI-1.627-4.el7.x86_64 21/46
Installing : perl-DBD-MySQL-4.023-6.el7.x86_64 22/46
Installing : keyutils-libs-devel-1.5.8-3.el7.x86_64 23/46
Installing : krb5-devel-1.15.1-51.el7_9.x86_64 24/46
Installing : 1:openssl-devel-1.0.2k-25.el7_9.x86_64 25/46
Installing : 1:mariadb-devel-5.5.68-1.el7.x86_64 26/46
Installing : 1:mariadb-server-5.5.68-1.el7.x86_64 27/46
Updating : e2fsprogs-1.42.9-19.el7.x86_64 28/46
Updating : krb5-workstation-1.15.1-51.el7_9.x86_64 29/46
Updating : 1:openssl-1.0.2k-25.el7_9.x86_64 30/46
Updating : libselinux-utils-2.5-15.el7.x86_64 31/46
Updating : libselinux-python-2.5-15.el7.x86_64 32/46
Cleanup : krb5-workstation-1.15.1-37.el7_6.x86_64 33/46
Cleanup : 1:openssl-1.0.2k-19.el7.x86_64 34/46
Cleanup : e2fsprogs-1.42.9-16.el7.x86_64 35/46
Cleanup : libkadm5-1.15.1-37.el7_6.x86_64 36/46
Cleanup : 1:mariadb-libs-5.5.64-1.el7.x86_64 37/46
Cleanup : 1:openssl-libs-1.0.2k-19.el7.x86_64 38/46
Cleanup : krb5-libs-1.15.1-37.el7_6.x86_64 39/46
Cleanup : e2fsprogs-libs-1.42.9-16.el7.x86_64 40/46
Cleanup : libss-1.42.9-16.el7.x86_64 41/46
Cleanup : libselinux-python-2.5-14.1.el7.x86_64 42/46
Cleanup : libselinux-utils-2.5-14.1.el7.x86_64 43/46
Cleanup : libselinux-2.5-14.1.el7.x86_64 44/46
Cleanup : libcom_err-1.42.9-16.el7.x86_64 45/46
Cleanup : zlib-1.2.7-18.el7.x86_64 46/46
Verifying : libselinux-devel-2.5-15.el7.x86_64 1/46
Verifying : keyutils-libs-devel-1.5.8-3.el7.x86_64 2/46
Verifying : krb5-workstation-1.15.1-51.el7_9.x86_64 3/46
Verifying : 1:mariadb-server-5.5.68-1.el7.x86_64 4/46
Verifying : libselinux-2.5-15.el7.x86_64 5/46
Verifying : 1:openssl-1.0.2k-25.el7_9.x86_64 6/46
Verifying : perl-IO-Compress-2.061-2.el7.noarch 7/46
Verifying : e2fsprogs-1.42.9-19.el7.x86_64 8/46
Verifying : e2fsprogs-libs-1.42.9-19.el7.x86_64 9/46
Verifying : zlib-1.2.7-19.el7_9.x86_64 10/46
Verifying : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 11/46
Verifying : krb5-libs-1.15.1-51.el7_9.x86_64 12/46
Verifying : libsepol-devel-2.5-10.el7.x86_64 13/46
Verifying : libkadm5-1.15.1-51.el7_9.x86_64 14/46
Verifying : libverto-devel-0.2.5-4.el7.x86_64 15/46
Verifying : libcom_err-1.42.9-19.el7.x86_64 16/46
Verifying : libss-1.42.9-19.el7.x86_64 17/46
Verifying : libselinux-utils-2.5-15.el7.x86_64 18/46
Verifying : perl-DBI-1.627-4.el7.x86_64 19/46
Verifying : 1:mariadb-libs-5.5.68-1.el7.x86_64 20/46
Verifying : 1:openssl-libs-1.0.2k-25.el7_9.x86_64 21/46
Verifying : libselinux-python-2.5-15.el7.x86_64 22/46
Verifying : 1:openssl-devel-1.0.2k-25.el7_9.x86_64 23/46
Verifying : krb5-devel-1.15.1-51.el7_9.x86_64 24/46
Verifying : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 25/46
Verifying : perl-Net-Daemon-0.48-5.el7.noarch 26/46
Verifying : perl-PlRPC-0.2020-14.el7.noarch 27/46
Verifying : 1:mariadb-devel-5.5.68-1.el7.x86_64 28/46
Verifying : perl-DBD-MySQL-4.023-6.el7.x86_64 29/46
Verifying : 1:mariadb-5.5.68-1.el7.x86_64 30/46
Verifying : libcom_err-devel-1.42.9-19.el7.x86_64 31/46
Verifying : zlib-devel-1.2.7-19.el7_9.x86_64 32/46
Verifying : 1:mariadb-libs-5.5.64-1.el7.x86_64 33/46
Verifying : krb5-workstation-1.15.1-37.el7_6.x86_64 34/46
Verifying : krb5-libs-1.15.1-37.el7_6.x86_64 35/46
Verifying : zlib-1.2.7-18.el7.x86_64 36/46
Verifying : libss-1.42.9-16.el7.x86_64 37/46
Verifying : 1:openssl-1.0.2k-19.el7.x86_64 38/46
Verifying : libcom_err-1.42.9-16.el7.x86_64 39/46
Verifying : 1:openssl-libs-1.0.2k-19.el7.x86_64 40/46
Verifying : libselinux-python-2.5-14.1.el7.x86_64 41/46
Verifying : libselinux-utils-2.5-14.1.el7.x86_64 42/46
Verifying : libselinux-2.5-14.1.el7.x86_64 43/46
Verifying : libkadm5-1.15.1-37.el7_6.x86_64 44/46
Verifying : e2fsprogs-libs-1.42.9-16.el7.x86_64 45/46
Verifying : e2fsprogs-1.42.9-16.el7.x86_64 46/46
Installed:
mariadb.x86_64 1:5.5.68-1.el7 mariadb-devel.x86_64 1:5.5.68-1.el7
mariadb-server.x86_64 1:5.5.68-1.el7
Dependency Installed:
keyutils-libs-devel.x86_64 0:1.5.8-3.el7
krb5-devel.x86_64 0:1.15.1-51.el7_9
libcom_err-devel.x86_64 0:1.42.9-19.el7
libselinux-devel.x86_64 0:2.5-15.el7
libsepol-devel.x86_64 0:2.5-10.el7
libverto-devel.x86_64 0:0.2.5-4.el7
openssl-devel.x86_64 1:1.0.2k-25.el7_9
perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7
perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7
perl-DBD-MySQL.x86_64 0:4.023-6.el7
perl-DBI.x86_64 0:1.627-4.el7
perl-IO-Compress.noarch 0:2.061-2.el7
perl-Net-Daemon.noarch 0:0.48-5.el7
perl-PlRPC.noarch 0:0.2020-14.el7
zlib-devel.x86_64 0:1.2.7-19.el7_9
Dependency Updated:
e2fsprogs.x86_64 0:1.42.9-19.el7
e2fsprogs-libs.x86_64 0:1.42.9-19.el7
krb5-libs.x86_64 0:1.15.1-51.el7_9
krb5-workstation.x86_64 0:1.15.1-51.el7_9
libcom_err.x86_64 0:1.42.9-19.el7
libkadm5.x86_64 0:1.15.1-51.el7_9
libselinux.x86_64 0:2.5-15.el7
libselinux-python.x86_64 0:2.5-15.el7
libselinux-utils.x86_64 0:2.5-15.el7
libss.x86_64 0:1.42.9-19.el7
mariadb-libs.x86_64 1:5.5.68-1.el7
openssl.x86_64 1:1.0.2k-25.el7_9
openssl-libs.x86_64 1:1.0.2k-25.el7_9
zlib.x86_64 0:1.2.7-19.el7_9
Complete!
[root@localhost ~]#
开启mariadb服务,设为开机自启
[root@localhost ~]# systemctl start mariadb
[root@localhost ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@localhost ~]#
进行初始化操作:设置密码
[root@localhost ~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
[root@localhost ~]#
登录数据库,建表
[root@localhost ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 17
Server version: 5.5.68-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
MariaDB [(none)]> create database nextcloud_db charset=utf8;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| nextcloud_db |
| performance_schema |
+--------------------+
4 rows in set (0.00 sec)
MariaDB [(none)]> exit;
Bye
[root@localhost ~]#
创建数据库用户
[root@localhost html]# mysql -uroot -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 19
Server version: 5.5.68-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| nextcloud_db |
| performance_schema |
+--------------------+
4 rows in set (0.00 sec)
MariaDB [(none)]> CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY "master";
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> quit
Bye
[root@localhost html]# mysql -unextcloud -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 20
Server version: 5.5.68-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
+--------------------+
1 row in set (0.00 sec)
MariaDB [(none)]> quit
Bye