安装数据库
yum -y install mariadb-server mariadb
安装php8
yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install php80-php-xsl php80-php php80-php-cli php80-php-devel php80-php-gd php80-php-pdo php80-php-mysql php80-php-fpm -y
安装nginx
yum install -y epel-release
yum install -y nginx
启动php 数据库 nginx
systemctl start php80-php-fpm mariadb nginx
nginx 配置文件设置
listen 80;
server_name www.itnzs.top;
location / {
root /usr/share/nginx/html;
index index.php;
}
location ~ \.php$ {
root /usr/share/nginx/html; #指定网站目录
fastcgi_pass 127.0.0.1:9000; #指定访问地址
fastcgi_index index.php; #指定默认文件
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #站点根目录,取决于root配置项
include fastcgi_params; #包含nginx常量定义
}
}
重启nginx
systemctl restart nginx
mysql 创建数据库
mysql -e "create database wordpress"
代码上传
tar xf wordpress-6.1-zh_CN.tar.gz
rm -rf /usr/share/nginx/html/*
cp -r ./wordpress/* /usr/share/nginx/html
Comments NOTHING