u1jodi1q 发表于 2024-7-29 10:51:31

超仔细图解:从 0 搭建一个个人网站,亦太简单了吧


    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">大众</span>好,我是明哥。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">前两天我用WordPress 给自己搭建了一个网站,<span style="color: black;">全部</span>过程非常的顺利,体验非常地好,于是我就<span style="color: black;">全部</span>过程、以及其中的<span style="color: black;">有些</span>搭建心得,记录下来。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/4e1482dc285a47afa1b96a94d9b38560~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=KiyYCNQp4G4HO0F3FawOfj%2BJ%2BmY%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>你<span style="color: black;">亦</span>正好有搭建个人网站的想法,<span style="color: black;">那样</span>本文会给你一个参考,<span style="color: black;">亦</span>许看了这篇<span style="color: black;">文案</span>你就<span style="color: black;">能够</span><span style="color: black;">不消</span>再百度、<span style="color: black;">乃至</span>谷歌了,<span style="color: black;">由于</span>我会写得 <strong style="color: blue;">足够的细致而系统</strong>。</p>
    <h2 style="color: black; text-align: left; margin-bottom: 10px;">1. 写在前面</h2>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">说到网站,其实我搭建过挺多个了。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">从最<span style="color: black;">起始</span>的 Hexo 静态博客,到后来<span style="color: black;">运用</span> Django 仿照 Hexo -Next 主题自己写了一个有后端的个人博客。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">再后来又<span style="color: black;">发掘</span>了 Sphinx + Github + ReadtheDocs 完美的文档编排组合,用了搭建了四个网站,分别是:</p>黑魔法 Python:<a style="color: black;">http://magic.iswbm.com</a>PyCharm 中文指南:<a style="color: black;">http://pycharm.iswbm.com</a>Python 编程时光:<a style="color: black;">http://python.iswbm.com</a>Go 编程时光:<a style="color: black;">http://golang.iswbm.com</a>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这些四个网站,很好的将我这几年来写的<span style="color: black;">文案</span>进行分类,并以精美的排版展<span style="color: black;">此刻</span>每一个需要的人眼前。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">四个网站,用的都是三级子域名,可见在我心里,<span style="color: black;">她们</span>无论哪一个都<span style="color: black;">没法</span><span style="color: black;">作为</span>我心中的个人网站。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">原由</span>有几点:</p>内容过于分散,<span style="color: black;">不可</span><span style="color: black;">表率</span>一个完整的我。可定制性太低:<span style="color: black;">无</span>头像,<span style="color: black;">无</span>评论系统等等对 SEO 太不友好了,<span style="color: black;">有害</span>于<span style="color: black;">揭发</span>托管在 ReadtheDocs上,<span style="color: black;">拜访</span>速度太慢。<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">虽然有不少让我心痛的<span style="color: black;">地区</span>,<span style="color: black;">然则</span>它们却有流淌在基因里的<span style="color: black;">优良</span>:</p>无成本(时间成本当然不算啦):你不需要服务器,<span style="color: black;">亦</span>不需要域名。新手友好,只要简单配置,就能<span style="color: black;">马上</span>快速上手。<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">好似</span>扯远了,还是说回 WP 的网站搭建吧。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在教程之前呢,我先 show 一下我的成果,欢迎你去点点点~</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">网站<span style="color: black;">位置</span>:<a style="color: black;">https://iswbm.</a>com</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/0c9f9ea4d4da4a7ea685ce8d69a528b4~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=n8g2aMvNm6QbINJyWr269sssDGQ%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <h2 style="color: black; text-align: left; margin-bottom: 10px;">2. 准备工作</h2>
    <h3 style="color: black; text-align: left; margin-bottom: 10px;">一台 Linux 服务器</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在<span style="color: black;">起始</span>搭建网站之前,当然<span style="color: black;">第1</span>步是购买一个属于自己的 『服务器』。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">你<span style="color: black;">能够</span><span style="color: black;">选取</span>如下<span style="color: black;">途径</span>进行购买:</p>阿里云腾讯云Ucloud<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">等的大厂服务器,不要贪图便宜去买国外的服务器厂商,<span style="color: black;">由于</span>速度很慢<span style="color: black;">非常多</span>,很影响体验。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">我的<span style="color: black;">便是</span>在 <a style="color: black;">阿里云</a>上购买的,刚<span style="color: black;">起始</span>买个最低配置的服务器就行,以后<span style="color: black;">不足</span>用了,<span style="color: black;">能够</span>慢慢升级,扩容。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">能够</span>先领个券,再购买更实惠:<a style="color: black;">点击领券</a></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>是学生<span style="color: black;">能够</span>在领券页面里找到学生专享,服务器9.5元/月,直接点击购买<span style="color: black;">就可</span>。不是学生<span style="color: black;">亦</span><span style="color: black;">能够</span>组团购买,更便宜,服务器购买就不多说了,拿钱就好了。</p>
    <h3 style="color: black; text-align: left; margin-bottom: 10px;">一个专属的域名</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">买了服务器后,你就会<span style="color: black;">持有</span>一个公网ip,<span style="color: black;">倘若</span>网站搭建起来了,你完全<span style="color: black;">能够</span><span style="color: black;">运用</span>这个 ip 去<span style="color: black;">拜访</span>,但仅供<span style="color: black;">研发</span>、测试<span style="color: black;">运用</span>。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>要真正运营起来,想要有流量,还得搞一个域名,方便你推广。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">域名的购买<span style="color: black;">意见</span>和上面服务器<span style="color: black;">运用</span>同一个厂商,<span style="color: black;">能够</span>省去<span style="color: black;">有些</span>麻烦。<span style="color: black;">例如</span>阿里云购买的域名要备案是需要你在阿里云下有一台服务器的。</p>
    <h3 style="color: black; text-align: left; margin-bottom: 10px;">一个远程登陆软件</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">因为</span>后面我<span style="color: black;">运用</span>的是手工<span style="color: black;">安排</span>的方式,<span style="color: black;">因此</span>要登陆服务器进行操作。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">登陆的<span style="color: black;">办法</span>有两种:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">厂商<span style="color: black;">供给</span>的<span style="color: black;">掌控</span>台界面登陆:Workbench 和 VNC</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/0acc9362d3244c96a97860cfbbc2296e~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=6o44ywJ4oOUN%2FPNUi6X%2BEhOx1w8%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这种<span style="color: black;">办法</span><span style="color: black;">针对</span>不经常登陆服务器运维的人<span style="color: black;">来讲</span>,还是挺香的。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/fbbfd4c80a094dc9b5d74ea3f7f8d259~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=Pe9gzyiFTTK6y%2F9w74xDx8n2y7A%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">自己下载专业的远程登陆软件:Xshell <span style="color: black;">或</span> CRTSecure</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/957e46f3c20442fa8454957350c9d476~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=OILU%2BIjtaBIIamnFkDGe5%2ByaVug%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在<span style="color: black;">运用</span>这些远程登陆软件时,你需要在服务器厂商<span style="color: black;">掌控</span>台上面先获取到三个信息</p>服务器公网IP服务器SSH端口服务器远程连接<span style="color: black;">秘码</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">关于 Xshell <span style="color: black;">怎样</span><span style="color: black;">运用</span>的,<span style="color: black;">能够</span><span style="color: black;">自动</span>百度搜索,教程非常多。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">能够</span>到阿里云上去购买,选最低配置就足够啦,后续<span style="color: black;">拜访</span>量起来了再扩容升级。</p>
    <h2 style="color: black; text-align: left; margin-bottom: 10px;">2. <span style="color: black;">安排</span>方式<span style="color: black;">选取</span></h2>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">安排</span>方式,可分为两种</p><span style="color: black;">运用</span>服务器管理软件,实现自动化<span style="color: black;">安排</span>,最著名的<span style="color: black;">便是</span> <a style="color: black;">宝塔面板</a> 。手动登陆远程服务器,实现脚本化<span style="color: black;">安排</span>。<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">那样</span><span style="color: black;">怎样</span><span style="color: black;">选取</span>呢?</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">运用</span>宝塔<span style="color: black;">安排</span>,门槛低,只要会界面点一点<span style="color: black;">就可</span>。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">而<span style="color: black;">运用</span>脚本自己手工<span style="color: black;">安排</span>,需要你学会</p>远程登陆服务器:<span style="color: black;">运用</span> Xshell <span style="color: black;">或</span> 直接<span style="color: black;">运用</span>厂商<span style="color: black;">供给</span>的在线SSH窗口<span style="color: black;">有些</span> Linux 的基本操作:<span style="color: black;">例如</span> Vi/Vim 的<span style="color: black;">运用</span>,目录及文件的基本操作等<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在<span style="color: black;">这儿</span><span style="color: black;">意见</span><span style="color: black;">大众</span>跟着我<span style="color: black;">运用</span>第二种<span style="color: black;">办法</span>,<span style="color: black;">亦</span><span style="color: black;">便是</span>手工<span style="color: black;">运用</span>脚本进行<span style="color: black;">安排</span>。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">原由</span>有二:</p><span style="color: black;">第1</span>次接触,更精细的<span style="color: black;">安排</span><span style="color: black;">过程</span>会让你对 WordPress 的运作方式有更深的理解,<span style="color: black;">例如</span><span style="color: black;">运用</span>了<span style="color: black;">那些</span>软件,装了<span style="color: black;">那些</span>包?自己搭建了网站,难免以后会碰到<span style="color: black;">各样</span>各样的服务器问题,尽早的接触 Linux,<span style="color: black;">熟练</span>各项配置,对以后的运维工作会有<span style="color: black;">特别有</span><span style="color: black;">帮忙</span>。<h2 style="color: black; text-align: left; margin-bottom: 10px;">3. <span style="color: black;">安排</span> LNMP</h2>
    <h3 style="color: black; text-align: left; margin-bottom: 10px;">3.1 什么是 LNMP</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">LNMP 是 Linux + Nginx + MySQL + PHP 组合的简写。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">类似的组合还有:</p>LAMP 的全<span style="color: black;">叫作</span>是 Linux + Apache + MySQL + PHPLNAMP 的全<span style="color: black;">叫作</span>是 Linux + Nginx + Apache + MySQL + PHP<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">其中: </p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Linux 是类 Unix 计算机操作系统的统<span style="color: black;">叫作</span>,是目前最流行的免费操作系统。<span style="color: black;">表率</span>版本有:debian、centos、ubuntu、fedora、gentoo 等。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Nginx 是一个高性能的 HTTP 和反向代理服务器,<span style="color: black;">亦</span>是一个 IMAP/POP3/SMTP 代理服务器。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Apache 是世界<span style="color: black;">运用</span>排名<span style="color: black;">第1</span>的Web服务器软件。 它<span style="color: black;">能够</span>运行在几乎所有广泛<span style="color: black;">运用</span>的计算机平台上,<span style="color: black;">因为</span>其跨平台和安全性被广泛<span style="color: black;">运用</span>,是最流行的Web服务器端软件之一。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">PHP 是一种在服务器端执行的嵌入 HTML 文档的脚本语言。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">MySQL 是一个关系型数据库管理系统。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这些软件一个一个安装比较费力,<span style="color: black;">尤其</span>是数据库。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">因此呢</span>有人把这些软件的安装<span style="color: black;">安排</span>过程集<span style="color: black;">作为</span>一个 Shell 脚本,而你只要下载并执行它就<span style="color: black;">能够</span>了。简直不要太方便。</p>
    <h3 style="color: black; text-align: left; margin-bottom: 10px;">3.2 安装 LNMP</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">下载 LNMP 安装脚本(<span style="color: black;">日前</span>最新版本是 1.7 ,我安装的是 1.5,<span style="color: black;">更加多</span>版本可查看: <a style="color: black;"><span style="color: black;">https://lnmp.org/download.html)</span></a></p>$ wget <span style="color: black;">http:</span>/<span style="color: black;">/soft.vpser.net/lnmp</span><span style="color: black;">/lnmp1.5.tar.gz -cO lnmp1.5.tar.gz</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">解压并执行它</p><span style="color: black;">$</span><span style="color: black;"> tar zxf lnmp1.5.tar.gz &amp;&amp; <span style="color: black;">cd</span> lnmp1.5 &amp;&amp; ./install.sh lnmp</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">接下来会<span style="color: black;">显现</span><span style="color: black;">海量</span>的选项,<span style="color: black;">倘若</span>你不是很懂各个选项间的区别,按默认就行啦</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">运行脚本后,<span style="color: black;">首要</span>会让你<span style="color: black;">选取</span>数据库的版本:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/2b6a8b08abd44fe986fb5e773c92b8cf~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=TSCS6lWIan2B0FI%2Biq%2FFiVF6TyM%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">无</span>特殊需要,<span style="color: black;">意见</span><span style="color: black;">运用</span>默认配置,直接回车或输入序号再回车。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">选好数据库,会让你设置数据库 root 用户的<span style="color: black;">秘码</span>,此时<span style="color: black;">倘若</span>你直接回车,会默认设置为 lnmp.org#随机数字,</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/e52166f671d741838e2821a618806a32~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=WCc2kMmNGN4qU93bY4WsbkxxPSA%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在输入<span style="color: black;">秘码</span>的时候,<span style="color: black;">针对</span>新手有一点<span style="color: black;">重视</span>:<span style="color: black;">倘若</span>输入有错误需要删除,需要按住Ctrl再按Backspace键进行删除。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">秘码</span>输好后,回车进入下一步</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/83a71e8d4be447c5a1986f8a8fd7787c~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=bShJXQE2Fv9BEs08g7exfHXuzsI%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">询问<span style="color: black;">是不是</span>需要启用 MySQL InnoDB,InnoDB引擎默认为开启,<span style="color: black;">通常</span><span style="color: black;">意见</span>开启,直接回车或输入 y 。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>确定确实不需要该引擎<span style="color: black;">能够</span>输入 n,(MySQL 5.7+版本<span style="color: black;">没法</span>关闭InnoDB),输入完成,回车进入下一步:<span style="color: black;">选取</span> PHP 版本,<span style="color: black;">意见</span>安装 PHP 7+的版本</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/3e01a4a18b804d1188e9660fdf5fc124~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=PA9C%2Bi%2F26tAd6hzFTwLks2rHpdw%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">回车进入下一步,<span style="color: black;">选取</span><span style="color: black;">是不是</span>安装内存优化:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p26-sign.toutiaoimg.com/pgc-image/8413cfb0bce44385b07782ed470c89d5~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=NHmhMgnKqtdE%2Fof%2FhuKhwBHjVBY%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">能够</span><span style="color: black;">选取</span>不安装、Jemalloc或TCmalloc,输入对应序号回车,直接回车为默认为不安装。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>是LNMPA或LAMP的话还会提示设置邮箱和<span style="color: black;">选取</span>Apache:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/34365d0b2b4e4722af324523a5a5346d~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=QNkBKwGs376PnFSdihxnxu5c6WA%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">“Please enter Administrator Email Address:”,需要设置管理员邮箱,该邮箱会在报错时<span style="color: black;">表示</span>在错误页面上。再<span style="color: black;">选取</span>Apache版本:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/49cf4261560f4ad88d49189fa4c618c1~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=4lmLNdvQ4CvoBRfASC7VqFSVZ24%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">按提示输入对应版本前面的数字序号,回车。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">提示"Press any key to install...or Press Ctrl+c to cancel"后,按回车键确认<span style="color: black;">起始</span>安装。 LNMP脚本就会自动安装编译Nginx、MySQL、PHP、phpMyAdmin等软件及<span style="color: black;">关联</span>的组件。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">安装时间可能会几<span style="color: black;">非常</span>钟到几个小时不等,<span style="color: black;">重点</span>是<span style="color: black;">设备</span>的配置网速等<span style="color: black;">原由</span>会<span style="color: black;">导致</span>影响。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span><span style="color: black;">表示</span>Nginx: OK,MySQL: OK,PHP: OK</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/8c797a0d08744e73aa31c75664fd483c~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=9W%2ByMnbuReAYRHZ9MV806wvUkA8%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">显示</span>安装成功。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">最后几行的输出</p>3306 端口是 MySQL 监听的80 是 HTTP 端口22 是 SSH 端口<h3 style="color: black; text-align: left; margin-bottom: 10px;">3.3 配置 Nginx</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">安装好后,<span style="color: black;">运用</span>如下指令查看nginx配置文件(<span style="color: black;">倘若</span>你的服务器上找不到该文件,那请<span style="color: black;">运用</span> find / -name nginx.conf 搜索一下)</p><span style="color: black;">$</span><span style="color: black;"> cat /usr/<span style="color: black;">local</span>/nginx/conf/nginx.conf</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">你会看到如下内容:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/6918fa2754d4404da96e473cd68a0f76~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=ms7fvVvj9XMVOh3tWF5PA3KwGlU%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">上图<span style="color: black;">显示</span>,安装好的nginx将网站的根目录设置为/home/wwwroot/default,这个<span style="color: black;">能够</span><span style="color: black;">按照</span>自己的<span style="color: black;">爱好</span>进行修改。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">用浏览器打开http://ip,<span style="color: black;">能够</span>看到如下内容:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/f6305aee6fe24e0aacb2ba4f4815ec88~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=BuNCb9ZCMRGIlBNPYSMnFpxS6OE%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">其实这<span style="color: black;">便是</span>一个简单的网页demo了,自己随便修改index.html,就会有<span style="color: black;">区别</span>的内容。</p>
    <h2 style="color: black; text-align: left; margin-bottom: 10px;">4. 安装 WordPress</h2>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;">WordPress</a>是<span style="color: black;">运用</span>PHP语言(这<span style="color: black;">亦</span>是<span style="color: black;">咱们</span>上面<span style="color: black;">为何</span>要安装 PHP 的<span style="color: black;">原由</span>)<span style="color: black;">研发</span>的博客平台,<span style="color: black;">亦</span><span style="color: black;">便是</span>一个博客框架。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">上一步安装的 LNMP,只是<span style="color: black;">保准</span>了 WordPress 的基本运行环境。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">想要把你的个人网站跑起来,咱还需要安装 WordPress 。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">办法</span><span style="color: black;">亦</span>很简单,下面跟着操作就行。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">第1</span>步:安装 wordpress 安装包并解压到 /home/wwwroot</p>$ wget <span style="color: black;">https:</span>/<span style="color: black;">/cn.wordpress.org/latest</span>-zh_CN.zip &amp;&amp; unzip latest-zh_CN.zip -d /home/wwwroot<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">第二步:登录MySQL(<span style="color: black;">秘码</span>在前面 <span style="color: black;">安排</span>LNMP 时你设置过),创建wordpress表,创建完后输入exit退出。</p><span style="color: black;">$</span> <span style="color: black;">mysql -u root -p</span>
    <span style="color: black;">Enter</span> <span style="color: black;">password:</span>
    <span style="color: black;">MySQL</span> <span style="color: black;">&gt; create database wordpress;</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">第三步:<span style="color: black;">运用</span> vim 修改 nginx 配置文件(不会vim的<span style="color: black;">自动</span>百度)</p><span style="color: black;">$</span><span style="color: black;"> vim /usr/<span style="color: black;">local</span>/nginx/conf/nginx.conf</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">找到网站根目录位置,如下图所示:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/2b4f437456af42828d96f04a5d4943c7~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=4Hzg3ERnba8oFeP6OAO9Kd7etqs%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">修改成如下内容:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/e2a315fafc9e4d58b4970208bb1c567a~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=zV%2FQvQddwxRV6KfAhPl3Jhh9a6I%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">随后,<span style="color: black;">运用</span>wq<span style="color: black;">保留</span>配置退出即可。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">验证nginx<span style="color: black;">是不是</span>有配置错误:</p>$ nginx -t<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span><span style="color: black;">显现</span>ok,successful字样,说明<span style="color: black;">无</span>错误。<span style="color: black;">无</span>错误,重新加载nginx:</p>$ nginx -s reload<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">修改wordpress目录权限:</p><span style="color: black;">$</span><span style="color: black;"> <span style="color: black;">cd</span>/home/wwwroot &amp;&amp; chown -R www wordpress/ &amp;&amp; chgrp -R www wordpress/</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">用浏览器打开<a style="color: black;"><span style="color: black;">http://ip/wp-admin/setup-config.php,你<span style="color: black;">能够</span>看到如下内容:</span></a></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/6b67e9bf65f14ddd82c93213ef826c17~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=vbxvMmq47TxFm%2F3V2njgOMEhOaw%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">此刻</span>就<span style="color: black;">起始</span>,进行安装。填写信息如下:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/cf4d29130c3349e88018c047f8b17c6e~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=PjZk5IaVsLOuOJycBDvQ%2BwI96Sg%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">其中,*** 改为你设置的MySQL数据库<span style="color: black;">秘码</span>。点击提交,<span style="color: black;">显现</span>如下内容:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p9-sign.toutiaoimg.com/pgc-image/89d23939d47744ac9ca7cb5085b8a24d~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=xab2ciEBNFbrV0opviW0l0JNMEQ%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在/home/wwwroot/wordpress下,创建并编写wp-config.php文件:</p>$ vim wp-<span style="color: black;">config</span>.php<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">将上图内容复制进去并wq<span style="color: black;">保留</span>退出,<span style="color: black;">而后</span>点击<span style="color: black;">此刻</span>安装。最后<span style="color: black;">便是</span>配置用户信息了,这个是你登录wordpress用户后台的,要记住:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/c040dd1ae43346858cf47d4cbdedb72c~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=cyca%2Fou%2FtZmmpQEJsI4c9CktdNQ%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">最后点击安装WordPress,安装成功会<span style="color: black;">显现</span>如下界面:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/b324869267bb4ce98e2074d942297243~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=cq4YpptxbErXL229UpesfrN1ywE%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">点击登录,输入账户<span style="color: black;">秘码</span>,就<span style="color: black;">能够</span>登录自己的 wordpress 后台了。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/3ff699b7ab0840d39d74469d767b4d75~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=v5FGDB6uyCUTuNKQskaI2uw9eyo%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">此时</span>候你<span style="color: black;">运用</span>浏览器去<span style="color: black;">拜访</span> <a style="color: black;">http://ip</a> ,就<span style="color: black;">能够</span>看到你搭建的<span style="color: black;">第1</span>个网站了。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">此时你看到的这个网站,是 wordpress 默认为你安装的免费主题(应该有三个),可能并不是<span style="color: black;">那样</span>的好看,但<span style="color: black;">不碍事</span>,后面我会教<span style="color: black;">大众</span><span style="color: black;">怎样</span>挑选一个自己合适的主题,把你的网站装扮得有模有样。</p>
    <h2 style="color: black; text-align: left; margin-bottom: 10px;">5. 装扮你的网站</h2>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">到<span style="color: black;">这儿</span>,你的网站<span style="color: black;">安排</span><span style="color: black;">已然</span><span style="color: black;">所有</span>完成,<span style="color: black;">然则</span>还差最后一步,<span style="color: black;">亦</span>是<span style="color: black;">运用</span> WordPress 最为核心的一步:让你的网站看起来更加专业,更加成熟。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">为此<span style="color: black;">咱们</span>需要做两件事:</p>安装主题:让网站变得好看安装插件:丰富网站的功能<h3 style="color: black; text-align: left; margin-bottom: 10px;">5.1 安装主题</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">一样</span>都<span style="color: black;">运用</span>的 WordPress 的网站,外观上却天差地别。有的很酷炫,有点很简约,这是<span style="color: black;">由于</span>选了<span style="color: black;">区别</span>的主题(<span style="color: black;">能够</span>理解为皮肤)。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在你安装完 WordPress 后,本身就自带了几个免费的主题。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">几乎没人会<span style="color: black;">运用</span>它们,<span style="color: black;">由于</span>实在没什么亮点(<span style="color: black;">便是</span>丑)。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在 WordPress 的自带了主题商店,里面有<span style="color: black;">海量</span>的免费主题,各式各样的都有,可能有你<span style="color: black;">爱好</span>的。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/601b52cea9594c7b956323f92a6c4278~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=JqOrrQ1%2BN%2FcyveQfj9Gz81kyNz8%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在<span style="color: black;">这儿</span>要说明一点,我的主题不是在商店里安装的,而是我<span style="color: black;">经过</span>搜索引擎找到了一个比较清爽的主题,很符合我的审美,我装扮过后的效果如下。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p26-sign.toutiaoimg.com/pgc-image/b6cb3cd72fa04ba5a3a177c02551a912~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=JAXUqyu7Rg5lg520cREUdQovSV0%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>你想和我用<span style="color: black;">同样</span>的主题,我<span style="color: black;">已然</span>将安装包打包好了(需要的添加我<span style="color: black;">微X</span>领取: stromwbm),直接下载后,按下图的方式上传到你的 WordPress 后台安装就行。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/73267c4176fa4daf9b8e9eb02e7cb267~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=tG4knza5CAK6By3D2UT6Cla34yc%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <h3 style="color: black; text-align: left; margin-bottom: 10px;">5.2 安装插件</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">日前</span>我安装的插件比较少,<span style="color: black;">然则</span>基本够用啦,下面列举一下,<span style="color: black;">倘若</span>你有什么好插件介绍,<span style="color: black;">能够</span>评论区<span style="color: black;">举荐</span>一下:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">1. WP User Avatar</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">原生 WordPress 默认<span style="color: black;">运用</span> Gravatar头像,用户(<span style="color: black;">包含</span>访客评论)的头像调取都是<span style="color: black;">按照</span>所留邮箱匹配的 Gravatar 头像。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">无</span> Gravatar 怎么办?</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">只要装上 WP User Avatar 这个插件就能<span style="color: black;">能够</span><span style="color: black;">运用</span> WordPress <span style="color: black;">媒介</span>库中的<span style="color: black;">照片</span><span style="color: black;">做为</span>默认头像了。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">2. WP-PostViews</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">安装了 WP-PostViews,就<span style="color: black;">能够</span>统计你<span style="color: black;">文案</span>的浏览次数。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">需要两步配置</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">第1</span>步:设置<span style="color: black;">表示</span>的文字</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/d810b227f51e41f4907cfde1886740e2~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=jPr6cjhD85bK4x4BlSB%2F5qpHEzY%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">第二步:在你要<span style="color: black;">表示</span>的位置写入如下代码</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/fc143e5395ef4d4b801abdc33660e02b~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=XOCWn30oaCFshVuqvUW1o3VcecE%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">效果如下</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/0b43cd46073e4fd9993d2d74ec1f4e75~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=503VzOwEQMQfVBbvELyGAsgKaOY%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">3. Post Views Counter</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">咦,上面<span style="color: black;">已然</span>安装了一个统计阅读量的插件,怎么这边又<span style="color: black;">举荐</span>一个。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">上面那个统计阅读量的插件,其实做的比较粗糙。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">这是什么意思。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">例如</span>同一个 ip 连续连刷10次,WP-PostViews 的阅读量会 +10,但<span style="color: black;">倘若</span>你<span style="color: black;">运用</span> Post Views Counter,这个规则<span style="color: black;">能够</span>由你来定,<span style="color: black;">能够</span>只<span style="color: black;">表示</span>一次。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/e8ec9d3f9cdb4254a4129af4d0b88b21~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=d88MAh4NTGHrAtm7zBtm6KxelMo%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">安装完这个插件后,<span style="color: black;">一样</span>需要进行<span style="color: black;">有些</span>配置</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/3f7d28f3e593490b9df46c337373bae3~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=FACzzJIIpQvrGibbut5CiKpdTKg%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">为何</span><span style="color: black;">这儿</span><span style="color: black;">选取</span>手动呢?</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/98316a61396e4b02864a75d712ba9bda~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=JsM%2Fzx0dsIDtq7qn0s0ceKdXSaw%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">由于</span>我<span style="color: black;">发掘</span>不管在内容之前,还是在内容之后,<span style="color: black;">表示</span>的位置都比较尴尬(它会换行)。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>你和我用<span style="color: black;">同样</span>的主题,想和我有<span style="color: black;">同样</span>的效果,<span style="color: black;">那样</span>你<span style="color: black;">选取</span><strong style="color: blue;">手动</strong>之后,还要按下图指示修改下代码,新增如下一段代码。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/c3c83556b0ef420099708771fa97b389~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=4OtuUIk0ZPnd29oCXCQrfzF2Bas%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">效果如下</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/017b20a0d3374080840f162ccb6ce249~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=adWfPiHhNDwJcs2DTl%2BP3PBJTj4%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">4. WP Editor.md</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">或许这是一个WordPress中最好,最完美的Markdown编辑器。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">能够</span>像 md2all 和 mdnice 那样,即时<span style="color: black;">表示</span> Markdown 的渲染效果,<span style="color: black;">爱好</span>在后台写<span style="color: black;">文案</span>的<span style="color: black;">能够</span>安装(其实我是先本地 Typora 写好了再复制上去的)。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/8b077824862e43dcbd1256c539e59328~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=LADnTGpOLpIONaekg0pSrbJAZUQ%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">5. Simple Custom CSS</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在修改 WordPress主题时,CSS修改是最经常用到的<span style="color: black;">办法</span>,<span style="color: black;">例如</span><span style="color: black;">调节</span>字体、<span style="color: black;">调节</span>颜色、边距之类的都需要用到自定义的CSS代码。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">虽然说 WordPress 本身<span style="color: black;">供给</span>了CSS修改的功能,<span style="color: black;">不外</span><span style="color: black;">运用</span>起来有<span style="color: black;">非常多</span>的<span style="color: black;">坏处</span>端,其中最麻烦的一点<span style="color: black;">便是</span>每次更换<span style="color: black;">或</span>更新主题之前的修改都会消失,需要重复的添加。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">运用</span> Simple Custom CSS 这个插件<span style="color: black;">能够</span>避免这种尴尬,安装后他会在 外观 下新增一个 自定义CSS 的选项。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/648b0b9fdce3471bb4af66d39e511dd3~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=Eet5LTJBmjoLuzqgASBw0yPP5CU%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">6. LuckyWP Table of Contents</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">运用</span>我这个主题,在<span style="color: black;">文案</span>页面是<span style="color: black;">无</span>目录索引的,<span style="color: black;">针对</span>读者<span style="color: black;">来讲</span>,其实挺不方便的。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">因此呢</span>我安装了 LuckyWP Table of Contents,<span style="color: black;">能够</span>在我的<span style="color: black;">文案</span>中生成一个目录。目录默认是<span style="color: black;">隐匿</span>的(当然你<span style="color: black;">亦</span><span style="color: black;">能够</span>设置默认展示),需要的话再点击展开。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/2b0d0e0fabe448098cf7b5c680ab04c0~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=Etsk7HuvSKFmgtINB4pQRmrZekE%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">点击目录<span style="color: black;">能够</span>直接<span style="color: black;">转</span>到对应位置。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">但可能是我这个主题的<span style="color: black;">原由</span>,我的网站<span style="color: black;">没法</span><span style="color: black;">转</span>,<span style="color: black;">倘若</span>有人<span style="color: black;">晓得</span><span style="color: black;">原由</span>,还请留言区评论一下。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">7. 百度搜索推送管理</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">百度搜索推送管理插件是一款针对WP<span style="color: black;">研发</span>的功能非常强大的百度和Bing搜索引擎收录辅助插件。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">利用该插件,站长<span style="color: black;">能够</span>快速实现百度搜索资源平台和Bing站长平台URL数据推送及网站百度收录数据<span style="color: black;">查找</span>等。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">目的在于进一步<span style="color: black;">提高</span>网站的百度和Bing搜索引擎收录效率,<span style="color: black;">提高</span>网站SEO优化效果;及<span style="color: black;">帮忙</span>站长<span style="color: black;">经过</span>该插件<span style="color: black;">认识</span>网站百度收录数据<span style="color: black;">状况</span>,基于数据统计参考进一步对网站内容进行<span style="color: black;">调节</span>与优化。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">详细</span><span style="color: black;">运用</span><span style="color: black;">办法</span>比较<span style="color: black;">繁杂</span>,自己百度一下吧</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">8. Smart SEO Tool</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Smart SEO Tool是一款专门针对WordPress<span style="color: black;">研发</span>的智能SEO优化插件,与众多WordPress的SEO插件不<span style="color: black;">同样</span>的是,Smart SEO Tool更加简单易用,<span style="color: black;">帮忙</span>站长快速完成WordPress博客/网站的SEO<span style="color: black;">基本</span>优化。</p>
    <h2 style="color: black; text-align: left; margin-bottom: 10px;">6. 优化你的网站</h2>
    <h3 style="color: black; text-align: left; margin-bottom: 10px;">6.1 <span style="color: black;">运用</span>固定链接</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">先在后台按如下图示进行设置</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/96cd88067f974ffc98d427ba01cf4eda~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=qpaHiGiGaZv4WgAJb0Fg5y0bM3s%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">然则</span><span style="color: black;">这般</span><span style="color: black;">不足</span>,要<span style="color: black;">运用</span>固定链接,服务器还需要开启 rewrite 的功能。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>你和我<span style="color: black;">运用</span>的是 nginx ,<span style="color: black;">那样</span>只要登陆服务器,在 </p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">/usr/local/nginx/conf/nginx.conf</span> 里的 server 里加上这一段(我放在倒数第二段)</p><span style="color: black;">location</span> / {
    <span style="color: black;">if</span>(!-e<span style="color: black;">$request_filename</span>) {
    <span style="color: black;">rewrite</span> (.*) /index.php;
    }
    }<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span>重启一下 nginx</p>$ systemctl restart nginx<h3 style="color: black; text-align: left; margin-bottom: 10px;">6.2 网站添加备案号</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>你的域名<span style="color: black;">已然</span>备案了,最好将你的备案号放到底部(<span style="color: black;">好似</span>会有<span style="color: black;">检测</span>)。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/4fcfb6e2aaf34f78933f58844672bd39~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=lVN40sPjXr6byaPe0PqR6Qw9o2E%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <h3 style="color: black; text-align: left; margin-bottom: 10px;">6.3 美化<span style="color: black;">文案</span>的排版</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">一个好的排版,能够<span style="color: black;">极重</span><span style="color: black;">提高</span>阅读体验,<span style="color: black;">因此呢</span>定制一个好的排版非常有必要。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">我网站里的<span style="color: black;">文案</span>排版样式,借用的是 mdnice 的主题,个人非常<span style="color: black;">爱好</span>。</p><span style="color: black;">/* 二级标题 */</span>
    <span style="color: black;">.view-content</span> <span style="color: black;">h2</span> {
    <span style="color: black;">margin</span>: <span style="color: black;">40px</span> <span style="color: black;">20px</span> auto;
    <span style="color: black;">height</span>: <span style="color: black;">40px</span>;
    <span style="color: black;">bac<span style="color: black;">公斤</span>round-color</span>: <span style="color: black;">rgb</span>(<span style="color: black;">251</span>, <span style="color: black;">251</span>, <span style="color: black;">251</span>);
    <span style="color: black;">border-bottom</span>: <span style="color: black;">1px</span> solid <span style="color: black;">rgb</span>(<span style="color: black;">246</span>, <span style="color: black;">246</span>, <span style="color: black;">246</span>);
    <span style="color: black;">overflow</span>: hidden;
    <span style="color: black;">box-sizing</span>: border-box;
    }

    <span style="color: black;">/* 二级标题内容 */</span>
    <span style="color: black;">.view-content</span> <span style="color: black;">h2</span> {
    <span style="color: black;">margin-left</span>: -<span style="color: black;">10px</span>;
    <span style="color: black;">display</span>: inline-block;<span style="color: black;">width</span>: auto;
    <span style="color: black;">height</span>: <span style="color: black;">40px</span>;
    <span style="color: black;">bac<span style="color: black;">公斤</span>round-color</span>: <span style="color: black;">rgb</span>(<span style="color: black;">33</span>, <span style="color: black;">33</span>, <span style="color: black;">34</span>);
    <span style="color: black;">border-bottom-right-radius</span>:<span style="color: black;">100px</span>;
    <span style="color: black;">color</span>: <span style="color: black;">rgb</span>(<span style="color: black;">255</span>, <span style="color: black;">255</span>, <span style="color: black;">255</span>);
    <span style="color: black;">padding-right</span>: <span style="color: black;">30px</span>;
    <span style="color: black;">padding-left</span>: <span style="color: black;">30px</span>;
    <span style="color: black;">line-height</span>: <span style="color: black;">40px</span>;
    <span style="color: black;">font-size</span>: <span style="color: black;">16px</span>;
    }

    <span style="color: black;">/* 二级标题修饰 请参考有实例的主题 */</span>
    <span style="color: black;">.view-content</span> <span style="color: black;">h2</span><span style="color: black;">:after</span> {
    }


    <span style="color: black;">/* 三级标题内容 */</span>
    <span style="color: black;">.view-content</span> <span style="color: black;">h3</span> {
    <span style="color: black;">margin-top</span>: <span style="color: black;">5px</span>;
    <span style="color: black;">padding-top</span>: <span style="color: black;">20px</span>;
    <span style="color: black;">padding-right</span>: <span style="color: black;">5px</span>;
    <span style="color: black;">padding-bottom</span>: <span style="color: black;">5px</span>;
    <span style="color: black;">padding-left</span>: <span style="color: black;">5px</span>;
    <span style="color: black;">font-size</span>: <span style="color: black;">17px</span>;
    <span style="color: black;">border-bottom</span>: <span style="color: black;">2px</span> solid <span style="color: black;">rgb</span>(<span style="color: black;">33</span>, <span style="color: black;">33</span>, <span style="color: black;">34</span>);
    <span style="color: black;">line-height</span>: <span style="color: black;">1.1</span>;
    }


    <span style="color: black;">/* 引用文字 */</span>
    <span style="color: black;">.view-content</span> <span style="color: black;">blockquote</span> <span style="color: black;">p</span> {
    <span style="color: black;">color</span>: <span style="color: black;">#353535</span>;
    <span style="color: black;">font-size</span>: <span style="color: black;">16px</span>;
    <span style="color: black;">margin</span>: <span style="color: black;">0</span> <span style="color: black;">10px</span>;
    <span style="color: black;">display</span>: block;
    }

    <span style="color: black;">.view-content</span> <span style="color: black;">.blockquote</span><span style="color: black;">:after</span> {
    <span style="color: black;">content</span>: <span style="color: black;">"”"</span>;
    <span style="color: black;">float</span>: right;
    <span style="color: black;">display</span>: block;<span style="color: black;">font-size</span>: <span style="color: black;">2em</span>;
    <span style="color: black;">color</span>: <span style="color: black;">rgb</span>(<span style="color: black;">248</span>, <span style="color: black;">57</span>, <span style="color: black;">41</span>);
    <span style="color: black;">font-family</span>: Arial, serif;
    <span style="color: black;">line-height</span>: <span style="color: black;">1em</span>;
    <span style="color: black;">font-weight</span>: <span style="color: black;">700</span>;
    }

    <span style="color: black;">/* 二维码<span style="color: black;">表示</span> */</span>
    <span style="color: black;">header</span> <span style="color: black;">.gongzhonghao</span> {
    <span style="color: black;">color</span>: <span style="color: black;">#fff</span>;
    <span style="color: black;">font-size</span>: <span style="color: black;">14px</span>;
    <span style="color: black;">position</span>: absolute;
    <span style="color: black;">bottom</span>: <span style="color: black;">30px</span>;
    }

    <span style="color: black;">header</span> <span style="color: black;">.weixinhao</span> {
    <span style="color: black;">color</span>: <span style="color: black;">#fff</span>;
    <span style="color: black;">font-size</span>: <span style="color: black;">14px</span>;
    <span style="color: black;">position</span>: absolute;
    <span style="color: black;">bottom</span>: <span style="color: black;">180px</span>;
    }<h3 style="color: black; text-align: left; margin-bottom: 10px;">6.4 <span style="color: black;">安排</span> HTTPS</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">关于<span style="color: black;">怎样</span><span style="color: black;">安排</span> HTTPS ,我在之前的<span style="color: black;">文案</span>里讲过一种。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">今天再介绍<span style="color: black;">另一</span>一种:<span style="color: black;">运用</span>宝塔。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">注册并登陆宝塔(<a style="color: black;">https://bt.cn),<span style="color: black;">而后</span>进入<span style="color: black;">掌控</span>面板,进行实名认证。</a></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/dcad688f0acc4f29a1bf4480987f0ef3~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=c39f5nBuBwQrfLrq9o%2BIMZeBF44%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">点击申请证书</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/7f513d7084ac4b2c9bb645a57617770d~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=RBWRIauZL520%2FNju7gzxXuIqUAc%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">选取</span>免费的就好</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/4c62b605ec814231bb73398fc3a50387~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=BX0YgEOKxANp4mjDYnVgTkqMPIc%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">填写你的域名后,支付订单(<span style="color: black;">并不</span>要钱)。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/f563f013b07f4067b2003034dc306af3~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=b3FfY4EjHdJi7vIwQAX2yyJ4mrg%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span>点击详情,需要验证该域名是归你所有。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">办法</span>它会告诉你,登陆我的阿里云域名解析,<span style="color: black;">按照</span>如下提示去添加 DNS解析规则</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p26-sign.toutiaoimg.com/pgc-image/c692e8ed53b94f94a8223633e1aea3ac~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=KjWhLVlNsyA8Rz%2FtFUoIjWh4O3A%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span>静待一段时间验证成功了,就<span style="color: black;">能够</span>点击如下按钮,下载数据证书。 <img src="https://p3-sign.toutiaoimg.com/pgc-image/f1f3332b8ff040c68a5ab3a2ea3de5b7~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=aI32v8pG%2BmVl4%2BYRTVYWWZz93QY%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">下载到本地后,你会得到一个 zip 包,解压一下,就<span style="color: black;">能够</span>看到证书文件及私钥。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/383e9cf74e954fe18d53c076f882897c~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=5pzjI8hIM1RJUGnzr9FQs9B3jlc%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">由于</span>我的博客<span style="color: black;">运用</span>的是 Nginx,<span style="color: black;">因此呢</span>我该 Nginx 下的两个文件上传到我的服务器上的 nginx 目录下.</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">详细</span>怎么上传呢?你<span style="color: black;">能够</span><span style="color: black;">运用</span>远程拷贝软件,例如 WinSCP,<span style="color: black;">亦</span><span style="color: black;">能够</span><span style="color: black;">运用</span> lrzsz (<span style="color: black;">举荐</span><span style="color: black;">运用</span>)。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">传到哪个目录下呢?</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">先<span style="color: black;">运用</span> find 命令<span style="color: black;">查询</span>一下你的 nginx.conf 路径</p>$ <span style="color: black;">find</span> / -name nginx.conf
    /usr/<span style="color: black;">local</span>/nginx/conf/nginx.conf<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">你的证书文件<span style="color: black;">能够</span>和 nginx.conf 放在同一目录下</p>/usr/<span style="color: black;">local</span>/nginx/conf<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">接下来<span style="color: black;">运用</span> vim 编辑该文件,找到 server,添加如下行( server <span style="color: black;">本来</span>的内容 我<span style="color: black;">运用</span> ... <span style="color: black;">暗示</span>,意思是不需要去动。 )</p><span style="color: black;">server</span>
    <span style="color: black;">{</span>
    <span style="color: black;">listen</span> <span style="color: black;">443 ssl;</span>
    <span style="color: black;"> # 注释掉该行</span>
    <span style="color: black;"># listen 80 default_server reuseport;</span>
    <span style="color: black;">
      #证书文件名<span style="color: black;">叫作</span></span>
    <span style="color: black;">ssl_certificate</span> <span style="color: black;">1_iswbm.com_bundle.pem;</span>
    <span style="color: black;"> #私钥文件名<span style="color: black;">叫作</span></span>
    <span style="color: black;">ssl_certificate_key</span> <span style="color: black;">0_iswbm.com.key;</span>

    <span style="color: black;">...</span>
    <span style="color: black;">}</span>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">最后重启 nginx </p>$ systemctl restart nginx<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">尝试用 https <span style="color: black;">拜访</span>一下我的网站 https://iswbm.com,非常顺利。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/216bcec79a004dc5a78deebc505321b2~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=8jaAmMaGVR%2FfjDkPZhm4aeajKFU%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">到<span style="color: black;">这儿</span>,事情其实还<span style="color: black;">无</span>结束,你还需要做两件事情:</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">第1</span>件事</strong>:在后台进行<span style="color: black;">有些</span>配置,<span style="color: black;">否则</span>从网站<span style="color: black;">转</span>的时候还是会<span style="color: black;">运用</span> http</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/02b5a31683d040198dfed24967c7d764~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=Hm1ItBtdVBuULriiC7GLI9EC9N0%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">第二件事</strong>:将 http 重定向到你 https,<span style="color: black;">否则</span>有人在浏览器输入 iswbm.com 时,<span style="color: black;">拜访</span>的还是 http。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">运用</span> vim 编辑 </p>/usr/local/nginx/conf/nginx.conf,在<span style="color: black;">本来</span> server 的前面加入下面这么一段代码
    <span style="color: black;">server</span> {
    <span style="color: black;">listen</span> <span style="color: black;">80</span>;
    <span style="color: black;">server_name</span> iswbm.com;
    <span style="color: black;">rewrite</span><span style="color: black;"> ^(.*)</span> https://<span style="color: black;">$server_name</span><span style="color: black;">$1</span> <span style="color: black;">permanent</span>;
    }<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span>再重启 nginx</p>$ systemctl restart nginx<h3 style="color: black; text-align: left; margin-bottom: 10px;">6.5 图床开启HTTPS</h3>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">因为</span>我之前的 markdown <span style="color: black;">文案</span>,<span style="color: black;">运用</span>的图床都是 七牛云,当时并<span style="color: black;">无</span>开启 https,<span style="color: black;">此刻</span>网站开启了 https 后,自然<span style="color: black;">照片</span><span style="color: black;">亦</span>要开启,<span style="color: black;">否则</span>浏览器会<span style="color: black;">表示</span>有部分不安全的资源。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">登陆七牛云,然后进入<a style="color: black;">证书管理</a> 上传证书(<span style="color: black;">重视</span>这个证书得<span style="color: black;">另一</span>申请,<span style="color: black;">不可</span><span style="color: black;">运用</span>先前申请的 iswbm.com 证书)。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/4ab029d6bc9b4a868a7af98229159750~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=IcGh0YnBuoW%2F2%2BVd9ybtdnXGiNQ%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">进入对象存储 -&gt; 域名管理,找到 HTTPS 配置的位置,点击 修改配置。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/383a19e7e74546a6b928495c37fd55fa~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=JAvcVZInHcl5rl0m9y1PbFgjbHI%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">将按钮置为开启状态,<span style="color: black;">选取</span><span style="color: black;">咱们</span><span style="color: black;">刚才</span>上传的证书。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/018d173ced714eac86bb8aa4002e8ccf~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=40C26P1c1INjMQ0%2BpsEmmxhQjRs%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">设置完后,并<span style="color: black;">不可</span><span style="color: black;">马上</span><span style="color: black;">运用</span></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/81e44b66e53248dfa31ea17a3826a56a~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=osunAmw6upC1XyoWUMnUPpoh8I8%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">域名的升级需要一<span style="color: black;">按时</span>间,等待<span style="color: black;">就可</span>。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/0c47fde7037949918c1fa1aed4ca8333~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=s2%2Fcu%2BCFSlaGT8PKV96h0Rs24bk%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">以上<span style="color: black;">便是</span>我搭建网站的<span style="color: black;">所有</span>总结,写了两个<span style="color: black;">夜晚</span>,直到昨晚才完成。</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">全文一共 5000 多字,昨晚写的时候,还出了个小插曲,<span style="color: black;">文案</span>被我误删除了,无论怎么 ctrl + z 都回不来,找了<span style="color: black;">非常多</span><span style="color: black;">办法</span>,都行不通。。</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">把我吓得都快哭了,生怕今天发不出来<span style="color: black;">文案</span></strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">好在最后 Typora 还是给我留了一条生路,它居然支持 文件的版本<span style="color: black;">掌控</span>,真是有惊无险,差点今天就要哭了。</strong></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/pgc-image/b9d9bc47246c4a95b69a97d30769f9d1~noop.image?_iz=58558&amp;from=article.pc_detail&amp;lk3s=953192f4&amp;x-expires=1722819014&amp;x-signature=W6fyEL2vYhr9PmVRJWJFBWBn3M0%3D" style="width: 50%; margin-bottom: 20px;"></p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">写<span style="color: black;">文案</span><span style="color: black;">不易</span>(<span style="color: black;">尤其</span>是这种长文),<span style="color: black;">倘若</span>觉得本文写得还<span style="color: black;">能够</span>,给明哥转发下<span style="color: black;">文案</span>,<span style="color: black;">能够</span>吗</strong></p>




nykek5i 发表于 2024-10-5 10:13:01

楼主果然英明!不得不赞美你一下!

7wu1wm0 发表于 2024-10-22 09:57:54

楼主听话,多发外链好处多,快到碗里来!外链论坛 http://www.fok120.com/
页: [1]
查看完整版本: 超仔细图解:从 0 搭建一个个人网站,亦太简单了吧