安装php相关命令linux

安装php的相关命令

-- 安装mysql
sudo yum install mysql-community-server
-- 启动mysql
sudo systemctl start mysqld
-- 查看mysql状态
sudo systemctl status mysqld
-- 设置开机启动
sudo systemctl enable mysqld
-- 查询默认密码
grep 'temporary password' /var/log/mysqld.log
-- 登录mysql控制台
mysql -u root -p
-- 更改密码
alter user 'root'@'localhost' identified by ''

-- 安装SCL管理
sudo yum install centos-release-scl-rh
-- 安装PHP
sudo yum install rh-php72
-- 关联scl命令与php默认命令
scl enable rh-php72 bash
-- 配置Nginx软件源
sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
-- 安装Nginx
sudo yum install nginx
-- 启动Nginx
sudo systemctl start nginx

你可能感兴趣的:(安装php相关命令linux)