当前位置: 首页 > wzjs >正文

做网站前没建images文件夹网络营销渠道有哪三类

做网站前没建images文件夹,网络营销渠道有哪三类,好的网站设计机构,iis5.1 发布网站目录 关闭防火墙修改yum镜像源安装 php安装mysql安装nginx关闭SELinux配置nginx转发php文件到fpm服务下载wordpress与配置 centos: 7 php:8.1.29 wordpress:6.8.1 nginx:1.26.1 mysql:5.6.51 关闭防火墙 # 停止防火墙 systemctl stop firewalld # 禁止开启启动 systemctl …

目录

  • 关闭防火墙
  • 修改yum镜像源
  • 安装 php
  • 安装mysql
  • 安装nginx
  • 关闭SELinux
  • 配置nginx转发php文件到fpm服务
  • 下载wordpress与配置

centos: 7

php:8.1.29

wordpress:6.8.1

nginx:1.26.1

mysql:5.6.51


关闭防火墙

# 停止防火墙
systemctl stop firewalld
# 禁止开启启动
systemctl disable firewalld

修改yum镜像源

centos默认yum镜像源已无法使用,当使用yum install 会报错:

在这里插入图片描述

# 1.备份原镜像源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
# 2.下载阿里镜像源
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
# 3.刷新缓存
yum clean all
yum makecache

安装 php

  • 将 yum 源更换为 aliyun 的 remi:

    yum -y install https://mirrors.aliyun.com/remi/enterprise/remi-release-7.rpm
    yum -y install yum-utils
    
  • 为 PHP8.1 启用流模块:

    yum-config-manager --enable remi-php81
    
  • 安装 PHP8.1 及扩展:

    yum install -y php
    sudo yum install -y php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mbstring php-curl php-xml php-pear php-bcmath php-json php-redis php-common php-opcache php-memcached --skip-broken
    
  • 运行下面的命令,查看已安装的 PHP 版本,只要能显示版本,就证明 PHP 已经安装成功!

    php -v
    

    在这里插入图片描述

  • 启动php服务

    systemctl start php-fpm
    systemctl enable php-fpm
    
    # 配置文件地址
    /etc/php-fpm.d# 日志
    tail -f /var/log/php-fpm/error.log
    

安装mysql

  • 在线安装mysql的repo源

    # 1.下载mysql的repo源
    wget http://repo.mysql.com/mysql-community-release-el7-7.noarch.rpm
    # 注:如果没有wget下载命令就执行 yum install wget 进行安装# 2.安装mysql的repo源
    rpm -ivh mysql-community-release-el7-7.noarch.rpm# 3.安装完成后 /etc/yum.repos.d/ 下会有多两个文件:mysql-community.repo , mysql-community-source.repo
    

    在这里插入图片描述

  • 安装mysql

    yum install -y mysql-server
    
  • 重置mysql密码

    # 启动mysql服务
    systemctl start mysql
    # 运行以下脚本
    mysql_secure_installation
    # 提示输入root密码,初始为null,回车就可以设置root密码了,其他选项回车即可
    
  • 登录mysql

    mysql -u root -p 
    # 输入刚刚设置的密码即可进入
    
  • 允许远程登录

    # 授权
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码';
    # 刷新权限
    FLUSH PRIVILEGES;
    # 退出
    exit
    
  • 开机启动mysql

    systemctl enable mysqld
    

安装nginx

  • 在线安装nginx的repo源

    rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
    
  • 安装nginx

    yum install -y nginx
    
  • 启动Nginx

    systemctl start nginx
    
  • 访问80端口:

在这里插入图片描述

  • 设置开启启动

    systemctl enable nginx
    
    # Nginx全局配置
    cat /etc/nginx/nginx.conf
    # 网站默认站点配置
    cat /etc/nginx/conf.d/default.conf# 网站文件存放默认目录
    cd /usr/share/nginx/html# 打印nginx错误日志
    tail -f /var/log/nginx/error.log
    # 重载nginx配置
    cd /usr/sbin
    ./nginx -s reload
    

关闭SELinux

  • 查看当前selinux的状态

    /usr/sbin/sestatus
    
  • 关闭selinux

    vi /etc/selinux/config
    #SELINUX=enforcing 修改为 SELINUX=disabled
    
  • 重启

    reboot
    

配置nginx转发php文件到fpm服务

  • 修改nginx配置:

    cd /etc/nginx/conf.d# 修改default.conf文件server {listen       80;server_name  localhost;root   /usr/share/nginx/html;location / {index  index.php index.html index.htm;}error_page   500 502 503 504  /50x.html;location = /50x.html {root   /usr/share/nginx/html;}location ~ \.php$ {fastcgi_index index.php;fastcgi_pass 127.0.0.1:9000;include      fastcgi_params;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;}
    }
    
  • 重载nginx配置

    cd /usr/sbin
    ./nginx -s reload
    
  • 创建php测试页面

    echo "<?php phpinfo(); ?>" > /usr/share/nginx/html/info.php
    
  • 访问http://ip/info.php,显示如下页面则表示nginx成功转发php文件到php-fpm服务

在这里插入图片描述

下载wordpress与配置

  • 官网下载wordpress压缩包

    # 我们统一放在/home/project下
    cd /home
    mkdir project
    cd /project
    wget --no-check-certificate https://cn.wordpress.org/wordpress-6.8.1-zh_CN.tar.gz
    tar -zxvf wordpress-6.8.1-zh_CN.tar.gz
    
  • 修改nginx根目录路径到/home/project/wordpress

    cd /etc/nginx/conf.d# 修改default.conf文件
    
    server {listen       80;server_name  localhost;root   /home/project/wordpress;#access_log  /var/log/nginx/host.access.log  main;location / {index  index.php index.html index.htm;}#error_page  404              /404.html;# redirect server error pages to the static page /50x.html#error_page   500 502 503 504  /50x.html;location = /50x.html {root   /usr/share/nginx/html;}# proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ \.php$ {#    proxy_pass   http://127.0.0.1;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000#location ~ \.php$ {fastcgi_index index.php;fastcgi_pass 127.0.0.1:9000;include      fastcgi_params;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}
    }
    
  • 重载nginx配置

    cd /usr/sbin
    ./nginx -s reload
    
  • 浏览器访问http://{ip}

  • 出现这个页面就表示部署成功了

在这里插入图片描述

注意填写的数据库名需要提前在mysql中创建好对应的database

在这里插入图片描述

剩下的就根据wordpress的提示一步步配置即可完成部署

http://www.dtcms.com/wzjs/450665.html

相关文章:

  • 网站制作用什么软件北京做网站推广
  • 做日本代购的网站找回今日头条
  • 毕业设计论文代做网站查询网138网站域名
  • 快3网站制作 优帮云盐城网站优化
  • 网站建设世纪明珠成年s8视频加密线路
  • 网站安全建设目的是网络营销第三版课本
  • 关于做摄影的网站网站推广优化平台
  • 哪家公司做网站便宜建网站怎么建
  • 网站版权备案企业网站seo平台
  • 网站轮换图片怎么做百度推广效果怎么样
  • 怎么吧自己电脑做网站宁波seo推广方式排名
  • 织梦网站首页文章大连seo优化
  • 政府网站建设中存在的问题优化流程
  • 临海网站建设自媒体营销方式有哪些
  • 做一个外贸网站苏州seo关键词优化软件
  • 做pc端网站行业现状注册城乡规划师含金量
  • 做mla的网站湖南网络优化
  • 怎么做网站站内优化百度地图排名怎么优化
  • 大连开发区做网站网络引流怎么做啊?
  • 西安市做网站的广州网站建设费用
  • wordpress运行环境搜索引擎优化实验报告
  • 域名备案不备案的区别南京网站seo
  • 高端品牌网站开发seo工作流程图
  • 云主机 几个网站搜索引擎网站排名优化方案
  • 怎么做网站教程html文本文档网站优化是做什么的
  • 什么网站做二维码比较好站长统计推荐
  • 安徽华夏网站建设如何建立免费公司网站
  • 制作网页的超文本标记语言网址seo优化排名
  • 大一网页设计个人网站代码免费关键词优化工具
  • 网站做几个域名比较好站长工具服务器查询