linux25

rpm -ivf rpm包名称

如何检测数据库写 系统防火墙是否开启

过滤

grep " "

一数据库跳过登陆

vim etc/my.cnf

skip-grant-tables

重启

desc mysql.user

image-20240112115615840

  update mysql.user  set authentication string=password(''密码')where User='root' and Host='localhost';

image-20240112115950160

flush privileges; 刷新一下

修改完成后删除my.cnf配置

安装php nginx

lnmp

image-20240112143031098

二部署php

image-20240112144942372

image-20240112145222981

image-20240112145232671

启动

image-20240112164340608

检查php是否启动成功

image-20240112164354257

三nginx关联php

1先对nginx.conf进行备份

​ cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak

2对配置文件进行更改

vim +42 /etc/nginx/nginx.conf z在文件的第42行加入如下的

index index.php index.html index.htm;
location ~ .php$
{
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/$fastcgi_script_name;
}

image-20240112163327468

3检查nginx的语法

nginx -t

image-20240112163816336

4重新加载配置文件(无间断的加载,加载过程可以进行访问nginx)

nginx -s reload

5探测文件

​ vim /usr/share/nginx/html/index.php
​ <?php ​ phpinfo(); ​ ?>

测试页面

image-20240112164043125

线上项目

安装wordpress-6.2.2-zh CNtar.gz进行解压,将解压后的文件送到/usr/share/nginx/html里面

image-20240112192544835

在usr/share/nginx/html 下

image-20240112193355685

image-20240112193734860

image-20240112193811364

  • 8
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值