[linuxidc@localhost ~/www.linuxidc.com]$systemctl start mariadb
[linuxidc@localhost ~/www.linuxidc.com]$systemctl enable mariadb
Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.
您可以通过运行呼吁来验证MariaDB的状态。
● mariadb.service - MariaDB 10.3 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor pre>
Active: active (running) since Wed 2020-02-26 07:23:30 EST; 47s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 90101 (mysqld)
Status: "Taking your SQL requests now..."
Tasks: 30 (limit: 23820)
Memory: 81.7M
CGroup: /system.slice/mariadb.service
└─90101 /usr/libexec/mysqld --basedir=/usr
~
最后,我们需要通过secure来掩护MariaDB数据库引擎。
[linuxidc@localhost ~/www.linuxidc.com]$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):
系统将提示您输入root暗码(假如您已经有root暗码)或举办配置。在随后的每个提示中答复Y。
步调4:在CentOS 8上安装PHP 7
我们需要安装的LAMP仓库中的最后一个组件是PHP,而且如前所述,PHP是用于开动员态网页的剧本Web编程语言。
我们将利用Remi信息库安装最新版本的PHP(在撰写本指南时为PHP 7.4)。
首先,安装EPEL存储库。
[linuxidc@localhost ~/www.linuxidc.com]$sudo dnf install https://dl.Fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
接下来,安装yum utils并利用以下呼吁启用remi-repository。
[linuxidc@localhost ~/www.linuxidc.com]$sudo dnf install dnf-utils
乐成安装yum-utils和Remi-packages之后,通过运行呼吁搜索可下载的PHP模块。
[linuxidc@localhost ~/www.linuxidc.com]$sudo dnf module list php
输出将包罗可用的PHP模块,流和安装设置文件,如下所示。
Extra Packages for Enterprise Linux 8 - x86_64 3.3 MB/s | 5.9 MB 00:01
Remi's Modular repository for Enterprise Linux 7.1 kB/s | 535 kB 01:15
Safe Remi's RPM repository for Enterprise Linux 3.7 kB/s | 1.4 MB 06:27
上次元数据逾期查抄:0:00:03 前,执行于 2020年02月26日 礼拜三 07时39分24秒。
CentOS-8 - AppStream
Name Stream Profiles Summary
php 7.2 [d][e] common [d], devel, minimal PHP scripting language
php 7.3 common, devel, minimal PHP scripting language
Remi's Modular repository for Enterprise Linux 8 - x86_64
Name Stream Profiles Summary
php remi-7.2 common [d], devel, minimal PHP scripting language
php remi-7.3 common [d], devel, minimal PHP scripting language
php remi-7.4 common [d], devel, minimal PHP scripting language
提示:[d]默认,[e]已启用,[x]已禁用,[i]已安装
输出表白当前安装的PHP版本是PHP 7.2。要安装较新的版本PHP 7.4,请重置PHP模块。
[linuxidc@localhost ~/www.linuxidc.com]$sudo dnf module reset php
重置PHP模块后,通过运行启用PHP 7.4模块。
[linuxidc@localhost ~/www.linuxidc.com]$sudo dnf module enable php:remi-7.4
最后,利用呼吁安装PHP,PHP-FPM(FastCGI历程打点器)和关联的PHP模块。
[linuxidc@localhost ~/www.linuxidc.com]$ sudo dnf install php php-opcache php-gd php-curl php-mysqlnd