Cách cài đặt apache mysql php và phpmyadmin lamp stack trên centos 7?

Để chỉnh sửa tệp trên trình bao, tôi sẽ cài đặt trình chỉnh sửa nano. Nếu bạn thích vi để chỉnh sửa tệp thì bỏ qua bước này

yum -y install nano

2 Cài đặt MySQL/MariaDB

MariaDB là một nhánh rẽ của MySQL của nhà phát triển MySQL gốc Monty Widenius. MariaDB tương thích với MySQL và tôi đã chọn sử dụng MariaDB tại đây thay vì MySQL. Chạy lệnh này để cài đặt MariaDB với yum

yum -y install mariadb-server mariadb

Sau đó, chúng tôi tạo các liên kết khởi động hệ thống cho MySQL [để MySQL tự động khởi động bất cứ khi nào hệ thống khởi động] và khởi động máy chủ MySQL

systemctl start mariadb.service
systemctl enable mariadb.service

Đặt mật khẩu cho tài khoản root MySQL

mysql_secure_installation
[[email protected] ~]# 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]:

Chủ Đề