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

马尼拉做网站茂名网站制作维护

马尼拉做网站,茂名网站制作维护,2022网页游戏大全,网站建设需要条件目录 1. 更换yum源更新系统软件包#xff1a; 1.1备份yum源 1.1.1创建备份目录#xff1a; 1.1.2移动现有仓库配置文件到备份目录#xff1a; 1.1.3验证备份#xff1a; 1.2更换yum源 1.2.1添加yum源 1.2.2删除和建立yum缓存 1.3更新系统软件包 1.4 yum与dnf介绍… 目录 1. 更换yum源更新系统软件包 1.1备份yum源 1.1.1创建备份目录 1.1.2移动现有仓库配置文件到备份目录 1.1.3验证备份 1.2更换yum源 1.2.1添加yum源 1.2.2删除和建立yum缓存 1.3更新系统软件包 1.4 yum与dnf介绍 2. 安装 Nginx 2.1安装 2.2开启服务 3. 安装 MariaDB 3.1安装 3.2开启服务 4. 安全配置 MariaDB 5. 创建 WordPress 数据库和用户 5.1进入数据 5.2创建数据库 5.3创建用户并赋权 6. 安装 PHP 6.1修改配置文件 6.2启动并启用 PHP-FPM 服务 7. 下载并配置 WordPress 8. 配置 WordPress 8.1复制样本配置文件并编辑 8.2根据需要更新以下内容 9. 配置 Nginx 9.1编辑 Nginx 配置文件 9.2检查 Nginx 配置是否正确 9.3重新加载 Nginx 配置 10. 配置 SELinux 和防火墙 10.1如果启用了 SELinux 10.2配置防火墙允许 HTTP 和 HTTPS 流量 11. 访问 WordPress 安装界面 11.1访问 11.2安装 11.3无法写入wp-config.php 11.4填写配置信息 11.5登录 利用nginx和MariaDB搭建wordpress   1. 更换yum源更新系统软件包 1.1备份yum源 1.1.1创建备份目录 创建一个目录来保存备份的仓库配置文件 sudo mkdir -p /etc/yum.repos.d/backup 1.1.2移动现有仓库配置文件到备份目录 将 /etc/yum.repos.d/ 目录中的所有文件移动到备份目录中 sudo mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/ 1.1.3验证备份 确认备份是否成功可以列出备份目录中的文件 ls /etc/yum.repos.d/backup/ 1.2更换yum源 可以参考CentOS Stream - USTC Mirror Help 1.2.1添加yum源 vim /etc/yum.repos.d/centos.repo [baseos] nameCentOS Stream $releasever - BaseOS baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/BaseOS/$basearch/os # metalinkhttps://mirrors.centos.org/metalink?repocentos-baseos-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled1 [baseos-debuginfo] nameCentOS Stream $releasever - BaseOS - Debug baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/BaseOS/$basearch/debug/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-baseos-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [baseos-source] nameCentOS Stream $releasever - BaseOS - Source baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/BaseOS/source/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-baseos-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [appstream] nameCentOS Stream $releasever - AppStream baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/AppStream/$basearch/os # metalinkhttps://mirrors.centos.org/metalink?repocentos-appstream-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled1 [appstream-debuginfo] nameCentOS Stream $releasever - AppStream - Debug baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/AppStream/$basearch/debug/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-appstream-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [appstream-source] nameCentOS Stream $releasever - AppStream - Source baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/AppStream/source/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-appstream-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [crb] nameCentOS Stream $releasever - CRB baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/CRB/$basearch/os # metalinkhttps://mirrors.centos.org/metalink?repocentos-crb-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled1 [crb-debuginfo] nameCentOS Stream $releasever - CRB - Debug baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/CRB/$basearch/debug/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-crb-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [crb-source] nameCentOS Stream $releasever - CRB - Source baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/CRB/source/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-crb-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 vim /etc/yum.repos.d/centos-addons.repo [highavailability] nameCentOS Stream $releasever - HighAvailability baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/HighAvailability/$basearch/os # metalinkhttps://mirrors.centos.org/metalink?repocentos-highavailability-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled0 [highavailability-debuginfo] nameCentOS Stream $releasever - HighAvailability - Debug baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/HighAvailability/$basearch/debug/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-highavailability-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [highavailability-source] nameCentOS Stream $releasever - HighAvailability - Source baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/HighAvailability/source/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-highavailability-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [nfv] nameCentOS Stream $releasever - NFV baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/NFV/$basearch/os # metalinkhttps://mirrors.centos.org/metalink?repocentos-nfv-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled0 [nfv-debuginfo] nameCentOS Stream $releasever - NFV - Debug baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/NFV/$basearch/debug/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-nfv-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [nfv-source] nameCentOS Stream $releasever - NFV - Source baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/NFV/source/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-nfv-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [rt] nameCentOS Stream $releasever - RT baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/RT/$basearch/os # metalinkhttps://mirrors.centos.org/metalink?repocentos-rt-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled0 [rt-debuginfo] nameCentOS Stream $releasever - RT - Debug baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/RT/$basearch/debug/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-rt-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [rt-source] nameCentOS Stream $releasever - RT - Source baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/RT/source/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-rt-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [resilientstorage] nameCentOS Stream $releasever - ResilientStorage baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/ResilientStorage/$basearch/os # metalinkhttps://mirrors.centos.org/metalink?repocentos-resilientstorage-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled0 [resilientstorage-debuginfo] nameCentOS Stream $releasever - ResilientStorage - Debug baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/ResilientStorage/$basearch/debug/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-resilientstorage-debug-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [resilientstorage-source] nameCentOS Stream $releasever - ResilientStorage - Source baseurlhttps://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/ResilientStorage/source/tree/ # metalinkhttps://mirrors.centos.org/metalink?repocentos-resilientstorage-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 [extras-common] nameCentOS Stream $releasever - Extras packages baseurlhttps://mirrors.ustc.edu.cn/centos-stream/SIGs/$releasever-stream/extras/$basearch/extras-common # metalinkhttps://mirrors.centos.org/metalink?repocentos-extras-sig-extras-common-$streamarch$basearchprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 gpgcheck1 repo_gpgcheck0 metadata_expire6h countme1 enabled1 [extras-common-source] nameCentOS Stream $releasever - Extras packages - Source baseurlhttps://mirrors.ustc.edu.cn/centos-stream/SIGs/$releasever-stream/extras/source/extras-common # metalinkhttps://mirrors.centos.org/metalink?repocentos-extras-sig-extras-common-source-$streamarchsourceprotocolhttps,http gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512 gpgcheck1 repo_gpgcheck0 metadata_expire6h enabled0 1.2.2删除和建立yum缓存 yum clean all yum makecache 1.3更新系统软件包 sudo dnf update -y 1.4 yum与dnf介绍 CentOS 9 默认使用的是 DNF 作为包管理工具而不再使用 YUM。虽然 CentOS 9 中没有传统的 YUM 命令但它提供了一个 yum 的软链接指向 dnf这意味着你在命令行中输入 yum 实际上是运行 dnf。 以下是一些关键点 DNF 作为默认包管理工具CentOS 9 使用 DNF 作为其默认的包管理工具。你可以使用 dnf 命令来安装、更新和删除软件包。 YUM 的兼容性虽然没有传统的 YUM但系统提供了一个指向 DNF 的 yum 软链接这样习惯于使用 yum 的用户仍然可以使用 yum 命令如同在以前的版本中一样。例如输入 yum install package 实际上会运行 dnf install package。 命令和功能在 CentOS 9 中使用 dnf 命令时大多数你习惯于在 YUM 中使用的命令和选项仍然适用因为 DNF 保持了相当的兼容性。 总的来说在 CentOS 9 上你可以继续使用 yum 命令但它实际上是调用 DNF。 2. 安装 Nginx 2.1安装 sudo yum install nginx -y 2.2开启服务 sudo systemctl start nginx sudo systemctl enable nginx 3. 安装 MariaDB 3.1安装 sudo dnf install mariadb-server mariadb -y 3.2开启服务 sudo systemctl start mariadb sudo systemctl enable mariadb 4. 安全配置 MariaDB sudo mysql_secure_installation 按照提示设置 MariaDB root 用户密码并进行其他安全设置。 注意默认答案都是“yes”是 5. 创建 WordPress 数据库和用户 5.1进入数据 sudo mysql -u root -p 密码 5.2创建数据库 CREATE DATABASE wordpress; 5.3创建用户并赋权 CREATE USER wordpressuserlocalhost IDENTIFIED BY Huawei!123; GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuserlocalhost; FLUSH PRIVILEGES; EXIT; 6. 安装 PHP sudo dnf install php-fpm php-mysqlnd php-json php-xml php-mbstring -y 6.1修改配置文件 编辑 /etc/php-fpm.d/www.conf 文件确保 user 和 group 设置为 nginx listen 127.0.0.1:9000 6.2启动并启用 PHP-FPM 服务 sudo systemctl start php-fpm sudo systemctl enable php-fpm 7. 下载并配置 WordPress cd /usr/share/nginx/html sudo curl -O https://wordpress.org/latest.tar.gz sudo tar -zxvf latest.tar.gz sudo chown -R nginx:nginx /usr/share/nginx/html sudo chmod -R 755 /usr/share/nginx/html 8. 配置 WordPress 这一步可以跳过的 8.1复制样本配置文件并编辑 sudo cp wp-config-sample.php wp-config.php sudo nano wp-config.php 8.2根据需要更新以下内容 根据自己的具体内容来做修改如数据库密码 define( DB_NAME, wordpress ); define( DB_USER, wordpressuser ); define( DB_PASSWORD, password ); define( DB_HOST, localhost ); 9. 配置 Nginx 9.1编辑 Nginx 配置文件 vim /etc/nginx/conf.d/wordpress.conf server {     listen 80;     server_name your_domain_or_IP更换成你的电脑的ip地址;     root /usr/share/nginx/html;     index index.php index.html index.htm;     location / {         try_files $uri $uri/ /index.php?$args;     }     location ~ \.php$ {         include /etc/nginx/fastcgi_params;         fastcgi_pass 127.0.0.1:9000;         fastcgi_index index.php;         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;     }     location ~ /\.ht {         deny all;     } } 9.2检查 Nginx 配置是否正确 sudo nginx -t 9.3重新加载 Nginx 配置 sudo systemctl restart nginx 10. 配置 SELinux 和防火墙 10.1如果启用了 SELinux 运行以下命令 sudo chcon -t httpd_sys_rw_content_t /usr/share/nginx/html -R 10.2配置防火墙允许 HTTP 和 HTTPS 流量 sudo firewall-cmd --permanent --add-servicehttp sudo firewall-cmd --permanent --add-servicehttps sudo firewall-cmd --reload 11. 访问 WordPress 安装界面 在浏览器中访问您的服务器 IP 地址或域名例如 http://your_domain_or_IP然后按照屏幕上的说明完成 WordPress 安装。 11.1访问 ifconfig可以查看网络信息 http://ip/wordpress 11.2安装 11.3无法写入wp-config.php 出现这种错误是目录权限问题如果在步骤8处理过就不会有 vim /etc/share/nginx/html/wordpress/wp-config.php 把上面的东西复制粘贴进去保存 11.4填写配置信息 11.5登录 这样您就可以在 CentOS 9 上使用 Nginx 成功搭建 WordPress 了。
http://www.zqtcl.cn/news/532798/

相关文章:

  • 地方宣传网站建设的必要性汕头企业网站建站模板
  • html网站源代码网站非法字符过滤
  • 江苏盐城建筑公司网站网络服务提供商是指什么
  • 汕头网站搜索优化视频广告制作
  • 靖边县建设局网站苏州企业网站建设公司价格
  • 沈阳微网站三好街 网站建设
  • 毕业答辩ppt模板免费下载网站网站域名使用怎么做分录
  • 建设购物网站要求网页制作与网站建设 pdf
  • 众创空间网站建设wordpress上传与安装包
  • 公司网站怎么做seo关键词排名优化销售
  • 企业网站建设如何去规划广西南宁网站建设哪家好
  • 类似头条的网站怎么做长丰县住房和城乡建设局网站
  • 密云青岛网站建设腾讯云cdn加速wordpress
  • windows 2008 iis添加网站长虹电视网站建设中
  • 金华网站建设公司哪家好沧州南皮网站建设公司
  • 站群网站程序软装设计师资格证
  • 邵阳经开区网站永康市住房建设局网站
  • 能够做代理的网站有哪些问题wordpress 建站视频
  • 凡科网做网站好吗厦门电商培训
  • 建立网站的目录结构时最好的做法是wordpress 恢复默认
  • 我需要把网站做东莞营销外包公司
  • 平台型网站制作住房和城乡建设网站 上海
  • 个人网站可以如果做淘宝客WordPress用quic
  • 建设网站要什么广告设计专业有什么可从事的工作
  • 网站开发上传视频教程济南网站建站模板
  • 深圳市城乡和建设局网站有哪些ui的设计网站
  • vs2010网站开发源码音乐网站设计怎么做
  • 长沙县政务网站网站色彩的应用
  • 成都哪家公司做网站好百度关键词搜索热度
  • 单位写材料素材网站深圳建设外贸网站