<?xml version="1.0" encoding="utf-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>海草网-分享IT</title><link>http://blog.haicao.net/</link><description>心若向阳 无畏悲伤</description><item><title>MACmini A1176系统重装及安装双系统方法</title><link>http://blog.haicao.net/?id=18</link><description>&lt;p&gt;&amp;nbsp; &amp;nbsp; 本文A1176已经更换T7200CPU,内存升级为2*1G。以更换全新硬盘及装第二系统debian为例，简要记录&lt;/p&gt;&lt;p&gt;1、需要准备一个16G的U盘。另外一台电脑苹果和Windows都可以，下载跨平台支持软件balenaEtcher-2.1.4.Setup用于客户系统启动U盘。&lt;/p&gt;&lt;p&gt;2、因设备比较老旧，苹果官网只提供10.7及以后的系统。本设备只支持10.6.8的系统。只能在网上搜索下载Mac_OS_X_10.6_Snow_Leopard_Retail.iso，并通过上步提到的软件刻录成启动盘。&lt;/p&gt;&lt;p&gt;3、插上系统引导盘，启动A1176，按住option键（win键盘按ALT），一般只有一个盘不用按也会自动进入Mac_OS_X_10.6_Snow系统安装引导，按流程完成安装，并更新系统到10.6.8.&lt;/p&gt;&lt;p&gt;4、进入A1176系统，找到磁盘工具，将硬盘增加2个分区，一个用于LINUX的SWAP分区，本设备划分3.6G，另外一个用于存放LINUX系统的分区，两个都选择FAT32格式。&lt;/p&gt;&lt;p&gt;5、下载系统引导refind-bin-0.14.2软件并用U盘拷贝到A1176新装系统的任意位置，并打开该软件文件夹，找到refind-install文件。打开MACOS命令窗口，将refind-install文件拖到命令窗口，按回车键，输入系统密码即可完成系统引导安装。&lt;/p&gt;&lt;p&gt;6、下载需要安装的LINUX,本文下载的debian-13.2.0-amd64-netinst.iso，并通过balenaEtcher-2.1.4.Setup刻录成U盘系统启动盘，将刻好的U盘插入A1176.&lt;/p&gt;&lt;p&gt;7、重启A1176，电脑会自动停止到refind引导界面，选择最后一个LINUX图标进入debian安装流程。完成安装即可。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Sun, 28 Dec 2025 13:59:04 +0800</pubDate></item><item><title>Matomo自建网站统计工具：助您掌握网站数据，提升数据分析能力</title><link>http://blog.haicao.net/?id=17</link><description>&lt;p&gt;
    鉴于GA（Google Analytics）统计服务在国内连接速度不佳，为了更好的体验，换成了Matomo。国内网站通常会使用统计服务如百度、CNZZ等，但功能不太丰富。而免费开源的网站统计分析程序 Matomo Analytics（前身为 Piwik Analytics），你不但可以将它部署在你自己的服务器上，掌控数据的所有权，而且它还提供比他们更加完整且全方位的功能，说几个重要的：
&lt;/p&gt;
&lt;ul class=&quot; list-paddingleft-2&quot;&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            100% 精准数据：无数据采样，为您提供最准确的见解。
        &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            页面性能报告：获取每个页面视图的详细性能指标。
        &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            无与伦比的 SEO 追踪：跟踪来自 800 多个搜索引擎的流量。
        &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            超快网站速度：监测您的网站向访客加载内容的速度。
        &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            精准的访客参与：衡量访问者在您的网站上的真实停留时间。
        &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            实时洞察：实时查看您的网站流量，了解谁在访问、他们在看什么以及做了什么。
        &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            全面地理位置：了解您的访客来自哪里，并查看世界地图上的实时统计数据。
        &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            自动报告：获取包含关键指标在内的标准统计报告，如 IP 地址、渠道、区域、关键词、浏览量等。
        &lt;/p&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    &lt;span style=&quot;font-size: 16px;&quot;&gt;告别功能受限的国内统计服务，尽情享受 Matomo 提供的丰富功能。掌控您数据的命运，释放您的网站分析潜力！&lt;br/&gt;&lt;br/&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;h2 data-into-catalog-status=&quot;&quot; style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    &lt;strong&gt;&lt;span style=&quot;font-size: 17px;&quot;&gt;运行所需配置&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-size: 17px;&quot;&gt;&lt;/span&gt;
&lt;/h2&gt;
&lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    &lt;span style=&quot;font-size: 16px;&quot;&gt;服务器要求：&lt;/span&gt;
&lt;/p&gt;
&lt;ul class=&quot; list-paddingleft-2&quot;&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            敬请选择您心仪的 Web 服务器，例如 Apache、Nginx、IIS 或 LiteSpeed。
        &lt;/p&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    &lt;span style=&quot;font-size: 16px;&quot;&gt;PHP 版本：&lt;/span&gt;
&lt;/p&gt;
&lt;ul class=&quot; list-paddingleft-2&quot;&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            Matomo 4.x 及以上版本：PHP 7.2.5 或更高，甚至与 PHP 8 完全兼容。
        &lt;/p&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            Matomo 3.x 版本：PHP 5.5.9 或 PHP 7.x
        &lt;/p&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    &lt;span style=&quot;font-size: 16px;&quot;&gt;数据库要求：&lt;/span&gt;
&lt;/p&gt;
&lt;ul class=&quot; list-paddingleft-2&quot;&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            MySQL 5.5 或更高版本，或 MariaDB（默认启用）。
        &lt;/p&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    &lt;span style=&quot;font-size: 16px;&quot;&gt;PHP 扩展：&lt;/span&gt;
&lt;/p&gt;
&lt;ul class=&quot; list-paddingleft-2&quot;&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            pdo 和 pdo_mysql，或 &lt;span class=&quot;&quot;&gt;mysqli&lt;/span&gt;
        &lt;/p&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    &lt;span style=&quot;font-size: 16px;&quot;&gt;操作系统兼容性：&lt;/span&gt;
&lt;/p&gt;
&lt;ul class=&quot; list-paddingleft-2&quot;&gt;
    &lt;li&gt;
        &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
            Matomo 可以在多种操作系统上运行，包括但不限于：
        &lt;/p&gt;
    &lt;/li&gt;
    &lt;ul class=&quot; list-paddingleft-2&quot; style=&quot;list-style-type: square;&quot;&gt;
        &lt;li&gt;
            &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
                Linux（Ubuntu、RedHat、CentOS、Raspberry Pi OS 等）
            &lt;/p&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
                Windows
            &lt;/p&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
                macOS Server
            &lt;/p&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
                FreeBSD
            &lt;/p&gt;
            &lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
                &lt;br/&gt;
            &lt;/p&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
&lt;/ul&gt;
&lt;h3 name=&quot;%E4%BA%94%E3%80%81Matomo%E7%BB%9F%E8%AE%A1%E5%8A%9F%E8%83%BD%E4%BB%8B%E7%BB%8D&quot; style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    &lt;span style=&quot;font-size: 17px;&quot;&gt;&lt;strong&gt;网址：&lt;/strong&gt;&lt;/span&gt;
&lt;/h3&gt;
&lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    官网：
&lt;/p&gt;
&lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    &lt;a target=&quot;_blank&quot; href=&quot;https://matomo.org/&quot; textvalue=&quot;https://matomo.org&quot; linktype=&quot;text&quot; imgurl=&quot;&quot; tab=&quot;outerlink&quot; data-linktype=&quot;2&quot;&gt;https://matomo.org&lt;/a&gt;
&lt;/p&gt;
&lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    项目：
&lt;/p&gt;
&lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/matomo-org/matomo&quot; textvalue=&quot;https://github.com/matomo-org/matomo&quot; linktype=&quot;text&quot; imgurl=&quot;&quot; tab=&quot;outerlink&quot; data-linktype=&quot;2&quot;&gt;https://github.com/matomo-org/matomo&lt;/a&gt;
&lt;/p&gt;
&lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    演示：
&lt;/p&gt;
&lt;p style=&quot;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
    &lt;a target=&quot;_blank&quot; href=&quot;https://demo.matomo.cloud/&quot; textvalue=&quot;https://demo.matomo.cloud/&quot; linktype=&quot;text&quot; imgurl=&quot;&quot; tab=&quot;outerlink&quot; data-linktype=&quot;2&quot;&gt;&lt;span class=&quot;wx_text_underline&quot;&gt;https://demo.matomo.cloud/&lt;/span&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;figure&gt;
    &lt;p style=&quot;text-align: center;line-height: 1.5em;margin-bottom: 8px;margin-top: 8px;&quot;&gt;
        &lt;span style=&quot;font-size: 16px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;
    &lt;/p&gt;
    &lt;p style=&quot;line-height: 1.5em; margin-bottom: 8px; margin-top: 8px;&quot;&gt;
        &lt;strong&gt;&lt;span style=&quot;font-size: 17px;&quot;&gt;总结&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-size: 17px;&quot;&gt;&lt;br/&gt;&lt;/span&gt;
    &lt;/p&gt;
    &lt;p style=&quot;font-family: Arial, sans-serif; font-size: medium; white-space: normal; line-height: 1.5em; margin-bottom: 8px; margin-top: 8px;&quot;&gt;
        &lt;span style=&quot;font-size: 16px;&quot;&gt;Matomo 提供了全面的网站统计功能，让您深入了解网站的受众和表现。它的易用界面使您可以轻松设置和获取有价值的数据。&lt;/span&gt;
    &lt;/p&gt;
    &lt;p style=&quot;font-family: Arial, sans-serif; font-size: medium; white-space: normal; line-height: 1.5em; margin-bottom: 8px; margin-top: 8px;&quot;&gt;
        &lt;span style=&quot;font-size: 16px;&quot;&gt;但是，需要注意的是，Matomo 对于资源消耗的要求很高。如果您要跟踪流量巨大的网站，我们强烈建议您：&lt;/span&gt;
    &lt;/p&gt;
    &lt;ul style=&quot;font-family: Arial, sans-serif; font-size: medium; white-space: normal;&quot; class=&quot; list-paddingleft-2&quot;&gt;
        &lt;li&gt;
            &lt;p style=&quot;line-height: 1.5em; margin-bottom: 8px; margin-top: 8px;&quot;&gt;
                &lt;strong&gt;选择配置较高的 VPS 主机：&lt;/strong&gt;确保服务器拥有足够的 RAM、CPU 和 SSD 存储空间来处理 Matomo 的数据密集型任务。
            &lt;/p&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;p style=&quot;line-height: 1.5em; margin-bottom: 8px; margin-top: 8px;&quot;&gt;
                &lt;strong&gt;实施 CDN 加速：&lt;/strong&gt;使用&lt;span class=&quot;&quot;&gt;内容分发网络&lt;/span&gt; (CDN) 可以将 Matomo 的静态资源（如图像和脚本）缓存到遍布全球的服务器上，从而提高加载速度和减少服务器负载。
            &lt;/p&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;p style=&quot;line-height: 1.5em; margin-bottom: 8px; margin-top: 8px;&quot;&gt;
                &lt;strong&gt;采用多服务器动态均衡：&lt;/strong&gt;通过将 Matomo 分布在多个服务器上，您可以分散负载并提高整体性能。
            &lt;/p&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
    &lt;p style=&quot;font-family: Arial, sans-serif; font-size: medium; white-space: normal; line-height: 1.5em; margin-bottom: 8px; margin-top: 8px;&quot;&gt;
        &lt;span style=&quot;font-size: 16px;&quot;&gt;通过采取这些措施，您可以确保 Matomo 在高速、大流量的网站上平稳高效地运行。&lt;/span&gt;
    &lt;/p&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;
    来源：&lt;a href=&quot;https://mp.weixin.qq.com/s/qdXLE5rb_5V35zJIDyW4Qg&quot;&gt;Matomo自建网站统计工具：助您掌握网站数据，提升数据分析能力 (qq.com)&lt;/a&gt;
&lt;/p&gt;</description><pubDate>Mon, 25 Nov 2024 13:53:41 +0800</pubDate></item><item><title>如何让你的 PHP 应用坚不可摧</title><link>http://blog.haicao.net/?id=16</link><description>&lt;p&gt;&amp;nbsp; &amp;nbsp;构建安全的 PHP 应用程序需要全面了解潜在漏洞，并采取措施防范常见的安全威胁，如 SQL 注入、跨站点脚本 (XSS) 和跨站点请求伪造 (CSRF)。本指南将为 PHP 开发人员提供详细的指导，介绍关键技术和最佳实践，帮助他们构建安全可靠的应用程序，并降低安全风险。&lt;/p&gt;&lt;h3 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; font-size: 20px; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;1、使用最新的PHP版本&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span class=&quot;wx_text_underline&quot;&gt;保障 PHP 应用安全，首要任务是选择合适的 PHP 版本。PHP 5.x 已不再受支持，PHP 7.x 即将停用。目前，PHP 8.x 是最安全、最高效的版本，它包含了最新的安全修复和性能优化。建议您尽快升级到 PHP 8.x，以获得最佳的安全性、性能和功能体验。&lt;/span&gt;&lt;/p&gt;&lt;h5 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;可行步骤&lt;/span&gt;&lt;/h5&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;为了确保 PHP 应用的安全，请使用 PHP 8 或更高版本，并及时更新到最新版本。建议您关注 PHP 官方网站发布的更新公告，并在安全补丁发布后立即进行更新，以修复潜在漏洞并获得最佳的安全防护。&lt;/p&gt;&lt;h3 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; font-size: 20px; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;2、强制使用 HTTPS（SSL/TLS）&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;为了保障用户数据安全，使用 HTTPS 加密客户端和服务器之间的通信至关重要。HTTPS 可确保敏感信息（例如密码、信用卡信息）在传输过程中受到保护，防止被恶意拦截和窃取。&lt;/p&gt;&lt;h5 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;可行步骤&lt;/span&gt;&lt;/h5&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;从可信赖的提供商获取 SSL/TLS 证书，以加密网站与用户之间的通信。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;在网站配置中启用 HTTPS（例如 Apache 或 Nginx），并使用 HTTP 严格传输安全 (HSTS) 标头，强制浏览器始终通过 HTTPS 与您的网站进行连接。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;定期更新 SSL/TLS 证书，确保其有效性和安全性。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre style=&quot;font-size: 16px; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; margin-top: 10px; margin-bottom: 10px; overflow: auto; cursor: pointer; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; background-color: rgb(255, 255, 255);&quot;&gt;#&amp;nbsp;For&amp;nbsp;Apache&amp;lt;IfModule&amp;nbsp;mod_headers.c&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Header&amp;nbsp;always&amp;nbsp;set&amp;nbsp;Strict-Transport-Security&amp;nbsp;&amp;quot;max-age=31536000;&amp;nbsp;includeSubDomains;&amp;nbsp;preload&amp;quot;&amp;lt;/IfModule&amp;gt;&lt;/pre&gt;&lt;h3 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; font-size: 20px; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;3、清理并验证用户输入&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;为了防止 SQL 注入、跨站点脚本 (XSS) 和 CSRF 攻击，请确保对用户输入进行严格的清理和验证。许多 PHP 应用正是由于对用户输入处理不当而成为攻击目标。&lt;/p&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;针对 SQL 注入的防御措施：&lt;/p&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;使用预处理语句：推荐使用 PDO（PHP 数据对象）或 &lt;span class=&quot;&quot;&gt;MySQLi&lt;/span&gt; 的预处理语句与数据库交互。预处理语句将用户输入视为参数，而不是可执行的 SQL 代码，有效防止 SQL 注入攻击。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;示例：&lt;/p&gt;&lt;pre style=&quot;font-size: 16px; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; margin-top: 10px; margin-bottom: 10px; overflow: auto; cursor: pointer; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; background-color: rgb(255, 255, 255);&quot;&gt;$stmt&amp;nbsp;=&amp;nbsp;$pdo-&amp;gt;prepare(&amp;quot;SELECT&amp;nbsp;*&amp;nbsp;FROM&amp;nbsp;users&amp;nbsp;WHERE&amp;nbsp;email&amp;nbsp;=&amp;nbsp;:email&amp;quot;);$stmt-&amp;gt;bindParam(&amp;#39;:email&amp;#39;,&amp;nbsp;$email);$stmt-&amp;gt;execute();&lt;/pre&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;跨站脚本 (XSS) 防御：对用户输入进行 HTML 编码，例如使用 htmlspecialchars() 函数。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre style=&quot;font-size: 16px; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; margin-top: 10px; margin-bottom: 10px; overflow: auto; cursor: pointer; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; background-color: rgb(255, 255, 255);&quot;&gt;echo&amp;nbsp;htmlspecialchars($user_input,&amp;nbsp;ENT_QUOTES,&amp;nbsp;&amp;#39;UTF-8&amp;#39;);&lt;/pre&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;CSRF 防御：使用 CSRF 令牌机制验证用户请求，并确保所有敏感操作（如修改密码或删除数据）都需要用户身份验证。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;示例：&lt;/p&gt;&lt;pre style=&quot;font-size: 16px; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; margin-top: 10px; margin-bottom: 10px; overflow: auto; cursor: pointer; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; background-color: rgb(255, 255, 255);&quot;&gt;$_SESSION[&amp;#39;csrf_token&amp;#39;]&amp;nbsp;=&amp;nbsp;bin2hex(random_bytes(32));&amp;nbsp;&amp;nbsp;//&amp;nbsp;Generate&amp;nbsp;a&amp;nbsp;token//&amp;nbsp;添加到表单&amp;lt;input&amp;nbsp;type=&amp;quot;hidden&amp;quot;&amp;nbsp;name=&amp;quot;csrf_token&amp;quot;&amp;nbsp;value=&amp;quot;&amp;lt;?php&amp;nbsp;echo&amp;nbsp;$_SESSION[&amp;#39;csrf_token&amp;#39;];&amp;nbsp;?&amp;gt;&amp;quot;&amp;gt;//&amp;nbsp;验证令牌if&amp;nbsp;($_POST[&amp;#39;csrf_token&amp;#39;]&amp;nbsp;!==&amp;nbsp;$_SESSION[&amp;#39;csrf_token&amp;#39;])&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;die(&amp;quot;CSRF&amp;nbsp;attack&amp;nbsp;detected!&amp;quot;);}&lt;/pre&gt;&lt;h3 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; font-size: 20px; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;4、密码管理&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;安全存储密码对于任何应用程序都是至关重要的。绝不能以明文形式存储密码，因为一旦数据库被攻击，密码信息将完全暴露，造成严重的安全风险。&lt;/p&gt;&lt;h5 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;可行步骤&lt;/span&gt;&lt;/h5&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;建议使用 bcrypt、argon2 或&amp;nbsp;&lt;code style=&quot;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 14px;cursor: pointer;color: rgb(19, 148, 216);line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-right: 2px;margin-left: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;word-break: break-all;&quot;&gt;scrypt_crypto_pwhash&lt;/code&gt;&amp;nbsp;等强加密算法进行哈希运算。PHP 内置的&amp;nbsp;&lt;code style=&quot;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 14px;cursor: pointer;color: rgb(19, 148, 216);line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-right: 2px;margin-left: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;word-break: break-all;&quot;&gt;password_hash()&lt;/code&gt;&amp;nbsp;函数默认使用 bcrypt 算法，这也是目前最推荐的解决方案。&lt;/p&gt;&lt;pre style=&quot;font-size: 16px; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; margin-top: 10px; margin-bottom: 10px; overflow: auto; cursor: pointer; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; background-color: rgb(255, 255, 255);&quot;&gt;$hashed_password&amp;nbsp;=&amp;nbsp;password_hash($password,&amp;nbsp;PASSWORD_BCRYPT);if&amp;nbsp;(password_verify($input_password,&amp;nbsp;$hashed_password))&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//&amp;nbsp;密码正确}&lt;/pre&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;避免使用 MD5 或 &lt;span class=&quot;&quot;&gt;SHA1&lt;/span&gt; 等过时的算法，因为它们很容易被破解。&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; font-size: 20px; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;5、跨站点脚本（XSS）预防&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;XSS攻击允许攻击者将恶意脚本注入其他用户将执行的网页。这是一个严重的安全风险，尤其是当攻击者可以窃取会话令牌或代表用户执行任意操作时。&lt;/p&gt;&lt;h5 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;可行步骤&lt;/span&gt;&lt;/h5&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;使用&amp;nbsp;&lt;code style=&quot;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 14px;cursor: pointer;color: rgb(19, 148, 216);line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-right: 2px;margin-left: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;word-break: break-all;&quot;&gt;htmlspecialchars()&lt;/code&gt;&amp;nbsp;函数对要输出到页面的用户输入进行净化，以防止跨站脚本攻击（XSS）。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;实施内容安全策略 (CSP) 来限制浏览器可以执行的内容类型，例如脚本和样式，以进一步降低 XSS 风险。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;示例：&lt;/p&gt;&lt;pre style=&quot;font-size: 16px; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; margin-top: 10px; margin-bottom: 10px; overflow: auto; cursor: pointer; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; background-color: rgb(255, 255, 255);&quot;&gt;Content-Security-Policy:&amp;nbsp;default-src&amp;nbsp;&amp;#39;self&amp;#39;;&amp;nbsp;script-src&amp;nbsp;&amp;#39;self&amp;#39;&amp;nbsp;https://apis.google.com;&lt;/pre&gt;&lt;h3 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; font-size: 20px; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;6、会话管理&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;PHP 广泛利用会话机制来保存用户相关信息，因此安全的会话管理对于防范会话劫持和固定攻击至关重要。&lt;/p&gt;&lt;h5 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;可行步骤&lt;/span&gt;&lt;/h5&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;安全 Cookie：使用安全的 HttpOnly cookie 存储会话 ID，以防止 JavaScript 访问它们，降低跨站脚本攻击 (XSS) 的风险。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;会话 ID 重生：在用户登录时使用&amp;nbsp;&lt;code style=&quot;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 14px;cursor: pointer;color: rgb(19, 148, 216);line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-right: 2px;margin-left: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;word-break: break-all;&quot;&gt;session_regenerate_id()&lt;/code&gt;&amp;nbsp;重生会话 ID，进一步增强安全性。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;会话超时：设置会话超时时间，以及实现空闲会话过期机制，以提高安全性。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre style=&quot;font-size: 16px; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; margin-top: 10px; margin-bottom: 10px; overflow: auto; cursor: pointer; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; background-color: rgb(255, 255, 255);&quot;&gt;session_regenerate_id(true);&lt;/pre&gt;&lt;h3 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; font-size: 20px; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;7、错误处理和日志记录&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;在生产环境中，务必禁用详细的错误消息显示。因为泄露详细的错误消息可能会暴露敏感信息，例如文件路径、数据库结构或引发问题的代码行，从而增加应用程序的安全风险。&lt;/p&gt;&lt;h5 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;可操作步骤：&lt;/span&gt;&lt;/h5&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;生产环境配置：在生产环境中禁用错误显示，例如使用&amp;nbsp;&lt;code style=&quot;font-family: &amp;quot;Operator Mono&amp;quot;, Consolas, Monaco, Menlo, monospace;font-size: 14px;cursor: pointer;color: rgb(19, 148, 216);line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-right: 2px;margin-left: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;word-break: break-all;&quot;&gt;error_reporting(0)&lt;/code&gt;，并配置日志记录功能以安全地捕获所有错误。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;日志存储：将日志存储在不可公开访问的位置，防止敏感信息泄露。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;敏感数据日志：避免记录密码、个人信息等敏感数据，防止泄露。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;例子：&lt;/p&gt;&lt;pre style=&quot;font-size: 16px; font-family: SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace; margin-top: 10px; margin-bottom: 10px; overflow: auto; cursor: pointer; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px; background-color: rgb(255, 255, 255);&quot;&gt;error_reporting(E_ALL);ini_set(&amp;#39;display_errors&amp;#39;,&amp;nbsp;&amp;#39;0&amp;#39;);&lt;/pre&gt;&lt;h3 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; font-size: 20px; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;8、文件上传安全&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;允许文件上传会带来安全风险，恶意用户可能会上传可能执行有害代码的危险文件。&lt;/p&gt;&lt;h5 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;可行步骤&lt;/span&gt;&lt;/h5&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;文件类型验证：验证文件类型，例如检查 &lt;span class=&quot;&quot;&gt;MIME&lt;/span&gt; 类型，确保仅上传安全的文件，例如使用 .jpg 或 .png 扩展名上传图像。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;限制文件大小：限制文件大小以防止 DoS（拒绝服务）攻击，例如设置最大上传文件大小。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;安全存储：将文件存储在 Web 根目录之外，防止直接访问。同时，重命名上传文件以防止覆盖现有文件。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; font-size: 20px; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;9、使用安全依赖项&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;许多 PHP 应用程序依赖于外部库，这些库可能存在安全漏洞，尤其是在版本过时或存在已知漏洞的情况下。因此，使用过时或易受攻击的库会给应用程序带来安全风险。&lt;/p&gt;&lt;h5 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;可操作步骤&lt;/span&gt;&lt;/h5&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;依赖管理：使用 &lt;span class=&quot;&quot;&gt;Composer&lt;/span&gt; 管理依赖项，并定期使用 Composer Security Audit 等工具进行安全审计。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;更新依赖：始终将库更新至最新稳定版本，及时修复已知的漏洞。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;漏洞监控：使用 PHP 安全公告数据库等服务，持续监控漏洞信息并及时采取应对措施。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; font-size: 20px; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;10、应用最小特权原则&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;为了增强应用程序的安全性，需要遵循最小权限原则。这意味着，用户和应用程序组件只应该拥有执行其必要功能的最小权限。&lt;/p&gt;&lt;h5 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;可操作步骤&lt;/span&gt;&lt;/h5&gt;&lt;ul style=&quot;list-style-type: circle;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;限制数据库权限：避免使用root账户访问生产数据库，而是为每个用户分配必要的最小权限。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;li&gt;&lt;section style=&quot;cursor: pointer;margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);line-height: 1.8em;letter-spacing: 0em;&quot;&gt;&lt;p style=&quot;cursor: pointer;color: rgb(51, 51, 51);line-height: 1.8em;letter-spacing: 0em;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;&quot;&gt;加密敏感数据：对敏感数据进行加密存储，例如密码、信用卡信息等，防止数据泄露。&lt;/p&gt;&lt;/section&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 style=&quot;margin-top: 30px; margin-bottom: 15px; color: rgba(0, 0, 0, 0.85); cursor: pointer; display: flex; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;&lt;span style=&quot;cursor: pointer; font-size: 20px; color: #135CE0; line-height: 1.5em; letter-spacing: 0em; display: block;&quot;&gt;结论&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;margin-bottom: 0px; cursor: pointer; color: rgb(51, 51, 51); font-size: 16px; line-height: 1.8em; padding-top: 8px; padding-bottom: 8px; font-family: Optima, &amp;quot;Microsoft YaHei&amp;quot;, PingFangSC-regular, serif; background-color: rgb(255, 255, 255);&quot;&gt;为了保障 PHP 应用程序的安全，必须保持警惕，采取积极主动的措施。通过使用安全编码技术，例如预处理语句、正确散列密码、清理用户输入和强制使用 HTTPS，您可以有效降低常见的攻击风险。此外，遵守会话管理、错误处理和文件上传的最佳实践将进一步增强应用程序的安全性。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Mon, 25 Nov 2024 13:41:27 +0800</pubDate></item><item><title>centos7AnolisOS安装pip</title><link>http://blog.haicao.net/?id=15</link><description>&lt;p&gt;正常来说应该这样：&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;安装epel ：yum install -y epel-release&lt;/p&gt;&lt;p&gt;启用epel ：yum install -y yum-utils &amp;amp;&amp;amp; yum-config-manager --enable epel&lt;/p&gt;&lt;p&gt;安装pip ：yum install -y python-pip&lt;/p&gt;&lt;p&gt;更新pip：pip install --upgrade pip&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;但是在安装pip的时候报错&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Error: Unable to find a match: python-pip&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;执行：&lt;/p&gt;&lt;p&gt;yum --enablerepo=epel install python-pip&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;还是不行，继续：&lt;/p&gt;&lt;p&gt;1.pip的安装这里参考官网-Installation,即，输入curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py后回车，如下：&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;[root@localhost /]# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py&lt;/p&gt;&lt;p&gt;2.然后，输入python get-pip.py之后回车，如下：&lt;/p&gt;&lt;p&gt;ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead.&lt;/p&gt;&lt;p&gt;重新输入上步提示的路径，并继续执行&lt;/p&gt;&lt;p&gt;[root@cdw-lj /]# python get-pip.py&amp;nbsp; &amp;nbsp;#会看到Successfully.....等安装成功的字样&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Fri, 19 Apr 2024 09:08:30 +0800</pubDate></item><item><title>APACHE安全配置</title><link>http://blog.haicao.net/?id=14</link><description>&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;我们来看俩段通常对上传目录设置无权限的列子,配置如下:&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;代码如下:&lt;/p&gt;&lt;blockquote style=&quot;margin: 10px 0px; padding: 10px 60px 5px; background: url(&amp;quot;/skins/summerGarden/images/comment.gif&amp;quot;) 25px 0px no-repeat rgb(250, 247, 239); border: 2px solid rgb(239, 239, 239); min-height: 35px; line-height: 1.6em; color: rgb(51, 51, 51); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px;&quot;&gt;&amp;lt;Directory &amp;quot;/var/www/upload&amp;quot;&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;FilesMatch &amp;quot;.php&amp;quot;&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Order Allow,Deny&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Deny from all&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/FilesMatch&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/Directory&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;这些配置表面上看起来是没什么问题的，确实在windows下可以这么说。&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;但是linux就不同了，大家都是知道的linux操作系统是区分大小写的，这里如果换成大写后缀名*.phP一类就pass了&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;这里我说下我个人的解决方法，代码如下:&lt;/p&gt;&lt;blockquote style=&quot;margin: 10px 0px; padding: 10px 60px 5px; background: url(&amp;quot;/skins/summerGarden/images/comment.gif&amp;quot;) 25px 0px no-repeat rgb(250, 247, 239); border: 2px solid rgb(239, 239, 239); min-height: 35px; line-height: 1.6em; color: rgb(51, 51, 51); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px;&quot;&gt;&amp;lt;Directory &amp;quot;要去掉PHP执行权限的目录路径，例如：D:/piaoyun.cc/upload&amp;quot;&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;ErrorDocument 404 /404/404.html&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;ErrorDocument 403 /404/403.html&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;FilesMatch &amp;quot;\.(?i:php|php3|php4)$&amp;quot;&amp;gt; // ?是尽可能多的匹配.php的字符串,i是不区分大小写,然后冒号后面跟上正则表达式，也可以写成：&amp;lt;FilesMatch &amp;quot;\.(php|php3)$&amp;quot;&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Order allow,deny&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Deny from all&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/FilesMatch&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/Directory&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;上面的意思就是说，&amp;lt;Directory &amp;quot;要去掉PHP执行权限的目录路径，例如：D:/piaoyun.cc/upload&amp;quot;&amp;gt; 内目录路径下所有php文件不区分大小写，通过order,allow,deny原则判断拒绝执行php文件，对nginx同样也是可应用的&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;另外一种方法，是设置在htaccess里面的，这个方法比较灵活一点，针对那些没有apapche安全操作权限的网站管理员：&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Apache环境规则内容如下：Apache执行php脚本限制 把这些规则添加到.htaccess文件中&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;代码如下:&lt;/p&gt;&lt;blockquote style=&quot;margin: 10px 0px; padding: 10px 60px 5px; background: url(&amp;quot;/skins/summerGarden/images/comment.gif&amp;quot;) 25px 0px no-repeat rgb(250, 247, 239); border: 2px solid rgb(239, 239, 239); min-height: 35px; line-height: 1.6em; color: rgb(51, 51, 51); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px;&quot;&gt;RewriteEngine on RewriteCond % !^$&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;RewriteRule uploads/(.*).(php)$ – [F]&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;RewriteRule data/(.*).(php)$ – [F]&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;RewriteRule templets/(.*).(php)$ –[F]&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;另外一种方法，代码如下:&lt;/p&gt;&lt;blockquote style=&quot;margin: 10px 0px; padding: 10px 60px 5px; background: url(&amp;quot;/skins/summerGarden/images/comment.gif&amp;quot;) 25px 0px no-repeat rgb(250, 247, 239); border: 2px solid rgb(239, 239, 239); min-height: 35px; line-height: 1.6em; color: rgb(51, 51, 51); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px;&quot;&gt;&amp;lt;Directory &amp;quot;/var/www/upload&amp;quot;&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;php_admin_flag engine off&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/Directory&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;此方法我在win系统下面测试失败了，重新启动apapche出现下面的错误信息：&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;The Apache service named reported the following error:&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;gt;&amp;gt;&amp;gt; Invalid command &amp;#39;php_flag&amp;#39;, perhaps misspelled or defined by a module not included in the server configuration.&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;这里我就不具体说明这个解决办法了，因为禁止php执行的方法，大家看自己的需求去设置就可以了！&lt;/p&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;【apache配置禁止访问】&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;1. 禁止访问某些文件/目录&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;增加Files选项来控制，比如要不允许访问 .inc 扩展名的文件，保护php类库：&lt;/p&gt;&lt;blockquote style=&quot;margin: 10px 0px; padding: 10px 60px 5px; background: url(&amp;quot;/skins/summerGarden/images/comment.gif&amp;quot;) 25px 0px no-repeat rgb(250, 247, 239); border: 2px solid rgb(239, 239, 239); min-height: 35px; line-height: 1.6em; color: rgb(51, 51, 51); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px;&quot;&gt;&amp;lt;Files ~ &amp;quot;\.inc$&amp;quot;&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Order allow,deny&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Deny from all&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/Files&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;禁止访问某些指定的目录：（可以用 &amp;lt;DirectoryMatch&amp;gt; 来进行正则匹配）&lt;/p&gt;&lt;blockquote style=&quot;margin: 10px 0px; padding: 10px 60px 5px; background: url(&amp;quot;/skins/summerGarden/images/comment.gif&amp;quot;) 25px 0px no-repeat rgb(250, 247, 239); border: 2px solid rgb(239, 239, 239); min-height: 35px; line-height: 1.6em; color: rgb(51, 51, 51); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px;&quot;&gt;&amp;lt;Directory ~ &amp;quot;^/var/www/(.+/)*[0-9]{3}&amp;quot;&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Order allow,deny&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Deny from all&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/Directory&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;通过文件匹配来进行禁止，比如禁止所有针对图片的访问：&lt;/p&gt;&lt;blockquote style=&quot;margin: 10px 0px; padding: 10px 60px 5px; background: url(&amp;quot;/skins/summerGarden/images/comment.gif&amp;quot;) 25px 0px no-repeat rgb(250, 247, 239); border: 2px solid rgb(239, 239, 239); min-height: 35px; line-height: 1.6em; color: rgb(51, 51, 51); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px;&quot;&gt;&amp;lt;FilesMatch \.(?i:gif|jpe?g|png)$&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Order allow,deny&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Deny from all&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/FilesMatch&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;针对URL相对路径的禁止访问：&lt;/p&gt;&lt;blockquote style=&quot;margin: 10px 0px; padding: 10px 60px 5px; background: url(&amp;quot;/skins/summerGarden/images/comment.gif&amp;quot;) 25px 0px no-repeat rgb(250, 247, 239); border: 2px solid rgb(239, 239, 239); min-height: 35px; line-height: 1.6em; color: rgb(51, 51, 51); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px;&quot;&gt;&amp;lt;Location /dir/&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Order allow,deny&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Deny from all&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/Location&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;针对代理方式禁止对某些目标的访问（&amp;lt;ProxyMatch&amp;gt; 可以用来正则匹配），比如拒绝通过代理访问cnn.com：&lt;/p&gt;&lt;blockquote style=&quot;margin: 10px 0px; padding: 10px 60px 5px; background: url(&amp;quot;/skins/summerGarden/images/comment.gif&amp;quot;) 25px 0px no-repeat rgb(250, 247, 239); border: 2px solid rgb(239, 239, 239); min-height: 35px; line-height: 1.6em; color: rgb(51, 51, 51); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px;&quot;&gt;&amp;lt;Proxy http://piaoyun.cc/*&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Order allow,deny&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Deny from all&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/Proxy&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;2. 禁止某些IP访问/只允许某些IP访问&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;如果要控制禁止某些非法IP访问，在Directory选项控制：&lt;/p&gt;&lt;blockquote style=&quot;margin: 10px 0px; padding: 10px 60px 5px; background: url(&amp;quot;/skins/summerGarden/images/comment.gif&amp;quot;) 25px 0px no-repeat rgb(250, 247, 239); border: 2px solid rgb(239, 239, 239); min-height: 35px; line-height: 1.6em; color: rgb(51, 51, 51); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px;&quot;&gt;&amp;lt;Directory &amp;quot;/var/www/web/&amp;quot;&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Order allow,deny&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Allow from all&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Deny from 10.0.0.1 #阻止一个IP&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Deny from 192.168.0.0/24 #阻止一个IP段&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/Directory&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;只允许某些IP访问，适合比如就允许内部或者合作公司访问：&lt;/p&gt;&lt;blockquote style=&quot;margin: 10px 0px; padding: 10px 60px 5px; background: url(&amp;quot;/skins/summerGarden/images/comment.gif&amp;quot;) 25px 0px no-repeat rgb(250, 247, 239); border: 2px solid rgb(239, 239, 239); min-height: 35px; line-height: 1.6em; color: rgb(51, 51, 51); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px;&quot;&gt;&amp;lt;Directory &amp;quot;/var/www/web/&amp;quot;&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Order deny,allow&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Deny from all&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;All from example.com #允许某个域名&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;All from 10.0.0.1 #允许一个iP&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;All from 10.0.0.1 10.0.0.2 #允许多个iP&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Allow from 10.1.0.0/255.255.0.0 #允许一个IP段，掩码对&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;All from 10.0.1 192.168 #允许一个IP段，后面不填写&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;All from 192.168.0.0/24 #允许一个IP段，网络号&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/Directory&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px; color: rgb(57, 57, 57); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal; background-color: rgb(250, 247, 239);&quot;&gt;Apache：解决办法；&lt;/p&gt;&lt;blockquote style=&quot;margin: 10px 0px; padding: 10px 60px 5px; background: url(&amp;quot;/skins/summerGarden/images/comment.gif&amp;quot;) 25px 0px no-repeat rgb(250, 247, 239); border: 2px solid rgb(239, 239, 239); min-height: 35px; line-height: 1.6em; color: rgb(51, 51, 51); font-family: verdana, &amp;quot;ms song&amp;quot;, Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&lt;p style=&quot;margin: 10px auto; padding: 0px;&quot;&gt;&amp;lt;Directory &amp;quot;/home/domain/public_html&amp;quot;&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Options -Indexes FollowSymLinks&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;AllowOverride All&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;Files ~ &amp;quot;.txt&amp;quot;&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Order allow,deny&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;Deny from all&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/Files&amp;gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot;/&gt;&amp;lt;/Directory&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description><pubDate>Tue, 19 Mar 2019 23:23:35 +0800</pubDate></item><item><title>mac硬盘解锁或者解除混合硬盘、重建混合硬盘安装干净的系统</title><link>http://blog.haicao.net/?id=13</link><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;1.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;启动至恢复系统：按住&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;Command&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;和&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;R&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;键的同时重新启动&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;Mac&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;2.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; font-size: 11.5pt; word-wrap: break-word;&quot;&gt;从&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;“&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;恢复&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;菜单栏中选取&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;“&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;实用工具&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;”&amp;gt;“&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;终端&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;3.“&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; font-size: 11.5pt; word-wrap: break-word;&quot;&gt;终端&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;窗口显示后，从菜单栏中选取&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;“Shell”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;，然后选取&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;“&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;新建窗口&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;”,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;再选择&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;“basic&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;那一项，来打开第二个&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;“&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;终端&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;窗口。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;4.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; font-size: 11.5pt; word-wrap: break-word;&quot;&gt;在第一个&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;“&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;终端&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;窗口中，键入以下命令：&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;diskutil cs list&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; font-size: 11.5pt; word-wrap: break-word;&quot;&gt;回车&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;应会显示类似以下内容的列表：&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;例：&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;-- Logical Volume Group 9BDE693D-8B2A-4BB5-B2F2-AB836127C4FA&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;5.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; font-size: 11.5pt; word-wrap: break-word;&quot;&gt;拷贝第一行中的逻辑宗卷组用户&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;ID&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;号。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;即：&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;group&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;后面的一串东西&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;)&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;6.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;在第二个&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;“&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;终端&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;窗口中，键入以下命令：&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;diskutil cs delete LVG UUID&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; font-size: 11.5pt; word-wrap: break-word;&quot;&gt;注：将&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;“LVGUUID”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;替换为您在上一步中记下的编号。例如：&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;diskutilcs delete 9BDE693D-8B2A-4BB5-B2F2-AB836127C4FA&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;直到看到&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;finish&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;或&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;operation&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;7.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; font-size: 11.5pt; word-wrap: break-word;&quot;&gt;选取&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;“&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;终端&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;”&amp;gt;“&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;退出&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;来返回到&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;ＯＳ&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;Ｘ实用工具&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;菜单。选择&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;“&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;磁盘工具&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;，选择左手白色框内第一个名称，看看右手边的五个选项是否全部显示正常了，不是要把&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;4-6&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;的步骤重新再做一次，直到见到五个选项显示正常为止。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;8.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; font-size: 11.5pt; word-wrap: break-word;&quot;&gt;然后选取&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;“&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;重新安装&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;OS X”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;，按照提示处理即可。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;9&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;、由于我是混合硬盘，这样就由一个混合硬盘变成了&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;个物理硬盘。需再次执行如下命令&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;Diskutil list&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;回车&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;Diskutil unmountdisk disk0&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;回车&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;Diskutil zerodisk disk0&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;回车&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;秒后&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;用&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;ctrl+c&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;终止&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;Diskutil unmountdisk disk1&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;回车&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;Diskutil zerodisk disk1&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;回车&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&amp;nbsp; &amp;nbsp;5&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;秒后&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;用&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;ctrl+c&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;终止&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;关闭终端&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;回到磁盘工具界面&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;这时磁盘工具左边应该&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;个物理硬盘为红字，点击一个会提示磁盘有问题，需修复，（如果未出现，重新启动，cmd＋r，进入磁盘工具，就会出现）点击修复，完成后出现一个&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;internalhdd&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;下面出现一个&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;M***&amp;nbsp;&amp;nbsp;hdd&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;再下面是原来的一个红色的物理硬盘，点击出界面，但是修复不了，这没关系，退出磁盘工具，再次进去，混合硬盘就已经好了。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;就可以选择重新安装&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 宋体;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;os&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;进行网络安装了，也可以做好u盘，通过u盘安装，这个网上很多教程。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-family: 宋体; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 11.5pt; word-wrap: break-word;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 14px/28px 微软雅黑, Arial, HELVETICA; color: rgb(17, 17, 17); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; word-wrap: break-word; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(254, 254, 254); -webkit-text-stroke-width: 0px;&quot; align=&quot;left&quot;&gt;&lt;span style=&quot;font-family: 宋体; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: rgb(61, 61, 61); word-wrap: break-word;&quot;&gt;&lt;span style=&quot;font-size: 15px; word-wrap: break-word;&quot;&gt;这个是我这几天总算搞清楚的事情，希望能让大家少走点弯路。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</description><pubDate>Sat, 28 May 2016 10:10:40 +0800</pubDate></item><item><title>Mac忘记登录密码的4种无损解决方法（前提硬盘无锁）</title><link>http://blog.haicao.net/?id=12</link><description>&lt;p&gt;力求以最简洁的文字来解决问题。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;4种方法，前提是硬盘无锁，关于硬盘加密，提示解锁硬盘的，只能重装系统，请看本站另外一篇帖子。直接进入正题，：&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot; class=&quot; list-paddingleft-2&quot;&gt;&lt;li&gt;&lt;p&gt;使用Apple ID重置用户账户密码&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;使用OS X安装光盘或者U盘来重置用户账户密码&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;新建一个管理员账户来更改原有用户账户密码&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Recovery模式终端更改用户账户密码&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br/&gt;一、使用Apple ID重置用户账户密码&lt;br/&gt;使用这个方法有一个前提&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;如上图红框，此项必须勾选，否则无法使用Apple ID重置密码。（如果你不记得有没有勾选，则你起码要记得首次启动 OS X 或装有 OS X Lion 或更高版本的全新 Mac 时，你会进入“OS X 设置助理”，其中需要你输入 Apple ID。输入 Apple ID 后，请在“创建您的帐户”阶段选择“允许我的 Apple ID 重设此用户的密码”选项。）&lt;br/&gt;好了，来说下具体实现的方法：&lt;br/&gt;如果您在登录窗口错误输入帐户密码三次，系统会显示一条信息，提示“如果忘记密码，您可以使用 Apple ID 重设密码”。点按圆圈中带箭头的图标以调出“重设密码”对话框。输入您的 Apple ID 和密码，然后点按“重设密码”以继续操作。&lt;br/&gt;在系统显示的通知您关于新钥匙串信息的对话框中，点按”好“。&lt;br/&gt;输入新密码、验证密码和密码提示字段，然后点按”重设密码“以继续操作。&lt;br/&gt;点按”继续登录“，使用刚创建的新密码完成登录。&lt;br/&gt;注：更改用户帐户密码将创建新的钥匙串。之前的钥匙串仍存在，且如果您以后记起之前的密码，可对其进行访问。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;二、使用OS X安装光盘或者U盘来重置用户账户密码。&lt;br/&gt;插上U盘或者光盘，开机按住Option进入，进入后，先选择语言，在屏幕的上方会出现一个工具栏，在上面找到实用工具，在实用工具里面找到“重设密码”，进入后选择Mac OS X硬盘宗卷，选择原始管理员账户的用户名。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;如图，输完新密码，点储存，重启电脑即可。&lt;br/&gt;注：请勿选择“系统管理员 (root)”。此帐户实际上是 Root 用户。不要将其与普通管理员帐户混淆。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;三、新建一个管理员账户来更改原有用户账户密码&lt;br/&gt;开机，启动时按cmd+S，进入Single User Mode，在:/ root#下 输入 mount -uaw / 回车，&lt;br/&gt;完成后，输入rm -rf /var/db/.AppleSetupDone按下回车键，如果没有任何报错信息，则表明执行成功。&lt;br/&gt;输入reboot重新启动。你会发现，熟悉的初始界面又回来了，别担心，东西全没丢。就像第一次安装一样，重新建立一个新的管理员账号。在新的管理员下打开 用户与群组，打开最下面的锁，问密码时，用新的管理员的帐号的密码。你会看到至少两个账号，新的管理员的帐号和你原来的帐号，点中原来的账号，选择更改密码。 你不必有原先的密码就直接可以设新密码。&lt;br/&gt;点下面的登陆选项 ，自动登录选中你原先的账号，重启即可。&lt;br/&gt;OK，大功告成。如果你不喜欢机器多出一个账号，删除你新建的管理员账户。&lt;/p&gt;&lt;p&gt;&lt;br/&gt;四、Recovery模式终端更改用户账户密码&lt;br/&gt;其实这个方法较前两个是比较简单方便的，实质就是进入Recovery来使用终端修改密码&lt;/p&gt;&lt;p&gt;&lt;br/&gt;第一种方法：开机按CMD+R进入网络恢复模式，等待地球转，进度条读完，进入实用工具-终端-输入resetpassword就可以直接修改密码了。&lt;br/&gt;第二种方法：开机按住Option，进入Recovery（恢复），实用工具-终端-输入resetpassword修改密码。&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;如果有用话的请支持！让更多人看到&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description><pubDate>Sat, 28 May 2016 09:56:14 +0800</pubDate></item><item><title>Mysql修复损坏表并写脚本自动修复</title><link>http://blog.haicao.net/?id=11</link><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;mysql 进程在一个写入中被杀死、计算机意外关闭、硬件错误都能造成mysql表损坏 。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;&lt;strong&gt;mysql 修复表的各种方法&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;1、mysqlcheck 进行表修复&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;使用mysqlcheck 命令对表进行修复&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;#mysqlcheck -uuser -ppassword database&amp;nbsp; table&amp;nbsp; -c&amp;nbsp; #检查单个表是否损坏&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;#mysqlcheck -uuser -ppassword database&amp;nbsp; -c&amp;nbsp; #检查整个库那些表损坏&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;首先检查数据库的那些表损坏，如果能定位到那张表损坏可以直接对表修复&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;#mysqlcheck -uuser -ppassword database&amp;nbsp; table&amp;nbsp; -r # 修复数据表&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;#mysqlcheck -uuser -ppassword database&amp;nbsp;&amp;nbsp; -r # 修复整个数据库&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;更多参数 查看 mysqlcheck –help&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;2、myisamchk 修复mysql表&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Myisamchk是MyISAM表维护的一个非常实用的工具。可以使用myisamchk实用程序来获得有关数据库表的信息或检查、修复、优化他们。myisamchk适用MyISAM表(对应.MYI和.MYD文件的表)。&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Myisamchk&lt;/span&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;选项解释&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–debug=debug_options, -# debug_options&lt;br/&gt;输出调试记录文件。debug_options字符串经常是’d:t:o,filename’。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–silent，-s&lt;br/&gt;沉默模式。仅当发生错误时写输出。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–wait, -w&lt;br/&gt;如果表被锁定，不是提示错误终止，而是在继续前等待到表被解锁。&lt;br/&gt;如果不使用–skip-external-locking，可以随时使用myisamchk来检查表。当检查表时，所有尝试更新表的客户端将等待，直到myisamchk准备好可以继续。&lt;br/&gt;请注意如果用–skip-external-locking选项运行mysqld，只能用另一个myisamchk命令锁定表。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–var_name=value&lt;br/&gt;可以通过–var_name=value选项设置下面的变量:&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–check, -c&lt;br/&gt;检查表的错误。如果你不明确指定操作类型选项，这就是默认操作。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–check-only-changed, -C&lt;br/&gt;只检查上次检查后有变更的表。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–extend-check, -e&lt;br/&gt;非常仔细地检查表。如果表有许多索引将会相当慢。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–fast，-F&lt;br/&gt;只检查没有正确关闭的表。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–force, -f&lt;br/&gt;如果myisamchk发现表内有任何错误，则自动进行修复。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–information, -i&lt;br/&gt;打印所检查表的统计信息。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–medium-check, -m&lt;br/&gt;比–extend-check更快速地进行检查。只能发现99.99%的错误&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–update-state, -U&lt;br/&gt;将信息保存在.MYI文件中，来表示表检查的时间以及是否表崩溃了。该选项用来充分利用–check-only-changed选项，&lt;br/&gt;但如果mysqld服务器正使用表并且正用–skip-external-locking选项运行时不应使用该选项。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–read-only, -T&lt;br/&gt;不要将表标记为已经检查。如果你使用myisamchk来检查正被其它应用程序使用而没有锁定的表很有用&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–backup, -B&lt;br/&gt;将.MYD文件备份为file_name-time.BAK&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–character-sets-dir=path&lt;br/&gt;字符集安装目录。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–correct-checksum&lt;br/&gt;纠正表的校验和信息。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–data-file-length=len, -D len&lt;br/&gt;数据文件的最大长度&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–extend-check，-e&lt;br/&gt;进行修复，试图从数据文件恢复每一行。一般情况会发现大量的垃圾行。不要使用该选项,除非你不顾后果。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–force, -f&lt;br/&gt;覆盖旧的中间文件(文件名类似tbl_name.TMD)，而不是中断&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–keys-used=val, -k val&lt;br/&gt;对于myisamchk，该选项值为位值，说明要更新的索引。选项值的每一个二进制位对应表的一个索引，其中第一个索引对应位0。&lt;br/&gt;选项值0禁用对所有索引的更新，可以保证快速插入。通过myisamchk -r可以重新激活被禁用的索引。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–parallel-recover, -p&lt;br/&gt;与-r和-n的用法相同，但使用不同的线程并行创建所有键。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–quick，-q&lt;br/&gt;不修改数据文件，快速进行修复。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–recover, -r&lt;br/&gt;可以修复几乎所有一切问题，除非唯一的键不唯一时(对于MyISAM表，这是非常不可能的情况)。如果你想要恢复表，&lt;br/&gt;这是首先要尝试的选项。如果myisamchk报告表不能用-r恢复，则只能尝试-o。&lt;br/&gt;在不太可能的情况下-r失败，数据文件保持完好）。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–safe-recover, -o&lt;br/&gt;使用一个老的恢复方法读取，按顺序读取所有行，并根据找到的行更新所有索引树。这比-r慢些，&lt;br/&gt;但是能处理-r不能处理的情况。该恢复方法使用的硬盘空间比-r少。一般情况，你应首先用-r维修，如果-r失败则用-o。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–sort-recover, -n&lt;br/&gt;强制myisamchk通过排序来解析键值，即使临时文件将可能很大。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–analyze，-a&lt;br/&gt;分析键值的分布。这通过让联结优化器更好地选择表应该以什么次序联结和应该使用哪个键来改进联结性能。&lt;br/&gt;要想获取分布相关信息，使用myisamchk –description –verbose tbl_name命令或SHOW KEYS FROM tbl_name语句。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–sort-index, -S&lt;br/&gt;以从高到低的顺序排序索引树块。这将优化搜寻并且将使按键值的表扫描更快。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–set-auto-increment[=value], -A[value]&lt;br/&gt;强制从给定值开始的新记录使用AUTO_INCREMENT编号(或如果已经有AUTO_INCREMENT值大小的记录，应使用更高值)。&lt;br/&gt;如果未指定value，新记录的AUTO_INCREMENT编号应使用当前表的最大值加上1。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;–description, -d&lt;br/&gt;打印出关于表的描述性信息。&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;检查表&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;[root@nagios test]# myisamchk -e wpusers.MYI&lt;br/&gt;Checking MyISAM file: wpusers.MYI&lt;br/&gt;Data records:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; Deleted blocks:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;br/&gt;- check file-size&lt;br/&gt;- check record delete-chain&lt;br/&gt;- check key delete-chain&lt;br/&gt;- check index reference&lt;br/&gt;- check data record references index: 1&lt;br/&gt;- check data record references index: 2&lt;br/&gt;- check data record references index: 3&lt;br/&gt;- check records and index references&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;myisanchk修复表&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;[root@nagios test]# myisamchk -r wpusers.MYI&lt;br/&gt;- recovering (with sort) MyISAM-table ‘wpusers.MYI’&lt;br/&gt;Data records: 1&lt;br/&gt;- Fixing index 1&lt;br/&gt;- Fixing index 2&lt;br/&gt;- Fixing index 3&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;3、自动修复mysql 表脚本&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;#!/bin/bash&lt;br/&gt;#This script edit by badboy connect leezhenhua17@163.com&lt;br/&gt;#This script used by repair tables&lt;br/&gt;mysql_host=localhost&lt;br/&gt;mysql_user=root&lt;br/&gt;mysql_pass=123456&lt;br/&gt;database=test&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;tables=$(mysql -h$mysql_host -u$mysql_user -p$mysql_pass $database -A -Bse “show tables”)&lt;br/&gt;for arg in $tables&lt;br/&gt;do&lt;br/&gt;check_status=$(mysql -h$mysql_host -u$mysql_user -p$mysql_pass $database -A -Bse “check table $arg” | awk ‘{ print $4 }’)&lt;br/&gt;if [ &amp;quot;$check_status&amp;quot; = &amp;quot;OK&amp;quot; ]&lt;br/&gt;then&lt;br/&gt;echo “$arg is ok”&lt;br/&gt;else&lt;br/&gt;echo $(mysql -h$mysql_host -u$mysql_user -p$mysql_pass $database -A -Bse “repair table $arg”)&lt;/p&gt;&lt;p style=&quot;font: 13px/19px verdana, Arial, helvetica, sans-seriff; margin: 10px auto; text-align: left; color: rgb(75, 75, 75); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;&quot;&gt;fi&lt;br/&gt;echo $(mysql -h$mysql_host -u$mysql_user -p$mysql_pass $database -A -Bse “optimize table $arg”)&lt;br/&gt;done&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><pubDate>Mon, 07 Mar 2016 09:56:11 +0800</pubDate></item><item><title>为什么给的待遇很丰厚，我的90后员工还是要走？</title><link>http://blog.haicao.net/?id=10</link><description>&lt;p&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;90后的员工和富二代、娱乐圈，并称朋友圈三宝，因为他们总是说走就走了，老板们哭着喊着给他们加薪升职，却也只能看到他们的背影和扬起的尘土。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;其实钱、工作环境这些因素只能让他们“没有不满意”，并不能让他们感到“满意”。满意只能来自于工作本身，和已经得到满足的需求。一个人的需求很多样化，有五层，满足的难易程度不同，而当每一层的需要得到满足之后，就很难起到任何的激励作用了。所以对超级多元化的90后员工，老板们还是得用不同的激励手段。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;没有不满意，不代表一定喜欢啊&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;小甄是小巴的朋友，一位80后的尾巴，本科毕业之后就在一线城市的一家互联网创业公司工作。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;毕业三年后第一次同学会上，别人就发现他的名片头衔上已经带上了“总”字。有相熟的同学半开玩笑地说以后要照应兄弟们。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;去年年底，他在微信上公告已卖掉期权，从工作了五六年的公司辞职了。前段时间，他旅游路过杭州，顺道来看我，便聊起了近况。他上半年一直在装修新房子，自己设计、自己买材料、自己做监工，现在一切完毕后出来旅游放个假。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;小甄突然离职，且并非被别家挖走，只是单纯地离职在家赋闲，总归让人有一些不解。我就问他为什么不干了？他的回答让我印象太深刻。&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 20px; padding: 0px; text-align: center; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;image&quot;&gt;&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;|&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;为什么90后员工这么难留？&lt;/strong&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;|&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;他的父母并不同意他辞职，问他“这么好的工作还有什么不满意的”，小甄的回答是&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;“其实一切都很好，但是没有不满意并不等于一定满意。”&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;在原来的公司收入很丰厚，岗位层次也不低，管理人性化，总体上办公室政治也在可控范围内。但他渐渐觉得这些应该是一个好公司的必要条件。要让他在工作上更有动力，还需要一些别的东西，他离职的前一年，似乎并没有感觉到。虽然公司的发展还是很快，但他每天在做的事情都变化不大，似乎和公司总体上的大局没有太大关系，有没有他其实不会有决定性的差别。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;小甄一直都希望有一套自己设计的房子，正好去年年底房价低，就在市区买了一套大户型，辞职全身心投入到房子的装修设计中去了。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;说起房子，他手舞足蹈地给我比划结构，一本正经地给我科普：家里第一重要的玄关要怎么设计、客厅大的话顶灯要选择什么样式、如果在家里安置一面书墙应该放在哪里比较好、阳台上其实可以铺一部分鹅卵石，还拿出手机不停地展示这个他最钟情的“产品”。整个装修过程中他都全情投入，有时候每天要花十几个小时，甚至比此前的工作时间还要长。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;看得出来，这是他喜欢的事情，也让他很满足，他说：“装修房子特别好玩，住自己设计的房子这个做法特别酷，以后也许就在这个方面创业，把它作为未来的事业”。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;报酬待遇、上司的监督、人际关系、工作环境，这些和工作内容本身没有太大关系的物质利益和工作条件等，在工作中属于&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;“保健性因素”&lt;/strong&gt;。如果工作中这些条件没有被满足，员工很容易产生不满。任何一个企业要想安抚员工，维持工作水平，就必须让这些因素维持在使员工满意的水平。不过这些因素只能消除不满意，却不能激励员工更热爱这份事业。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;而激发员工工作意愿，自发自愿地“喜欢”一项工作的元素，来自于工作内容本身，属于&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;“激励性因素”&lt;/strong&gt;。这些条件包括：成就感、赏识和褒奖、工作内容本身、责任、升迁和发展等。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;在一个快速成长的行业，激励性因素显然不会是稀缺事物，但却可能经常被忽略。很多时候管理者仅仅依靠保健性因素来作为激励手段，而对于工作本身并没有提供激励，才会出现小甄这种“钱给够了，但是心还是委屈了”的离职。&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 20px; padding: 0px; text-align: center; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;image&quot;&gt;&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;|&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;90后需要“激励性因素”更甚于“保健型因素”&lt;/strong&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;|&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;“员工以客户为上帝，管理以员工为上帝”&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;老叶是一家精品酒店的老板，是一位70后的老酒店人，在多家五星级酒店担任了多年的管理层。现在他手下带领着一个几乎由清一色90后 “小朋友”组成的团队，少数的几位80后高管镶嵌在其中。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;在几个旅游网站上，他的酒店评分都是本地最高的，接近满分，看评语似乎有很多回头客，除了酒店的环境很好之外，主要的原因大概是“服务真的很好”、“酒店的员工很周到”。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;老叶说服务业终究还是人的行业，一开始他觉得自己有很多年的酒店从业经验，从“顾客是上帝”这一点出发，把服务做好，后面的一切都有了。但是年轻人的世界不太一样，他走了一段弯路。最后发现，他还是要先把员工们伺候好了，然后员工们才能把顾客当成是上帝。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;他告诉我&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;“90后和90后也是不一样的”&lt;/strong&gt;。不同的岗位和员工类型上，也需要用不同的激励手段。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;服务中心的一线员工，比如前台和服务员，工作本身是一套流程，而不是高深的专业技能。他们工资不高，因为在这个岗位上酒店付不起太高的工资。所以需要对他们进行额外的非物质激励，给予他们被重视的感觉。老叶采取过一些老式方法，比如通过业绩光荣榜来展现对优质员工的重视、经常采取态度真诚的口头表扬，效果也都不错。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;不过效果最好的办法是给一线员工授权，让他们在解决顾客的实际问题时拥有更多的自主权。服务中心距离顾客最近，所以他把服务中心设置成资源调配中心，有权力调动包括客房、厨房等其他部门的资源，并在考核上加以参考。除此之外，前台员工可以直接调用一夜间房费以内的费用，事后报备，比如某位新入住的顾客，正好是生日，订一个蛋糕还是鲜花，完全由一线员工决定。&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 20px; padding: 0px; text-align: center; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;image&quot;&gt;&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;|&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;不少&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;公司&lt;/strong&gt;&lt;/strong&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;让年轻员工自己设计办公场所&lt;/strong&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;|&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;而酒店的微信订阅号做得不错，负责的是一位从媒体界挖来的90后编辑，虽然年轻，但也是资深的专业人员，忠于自己的专业技能甚于雇主。所以老叶给他安排了很多具有挑战性的目标，又让他自主决定如何处理，还定期慰问表达支持与鼓励，关心他的工作存在什么问题，是否需要支持，以表达对他的工作不仅感兴趣而且很看重。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;还有一些是兼职的实习生和试用期的员工，他们在工作安全感和稳定性上欠佳，福利待遇上也有所不如。所以相应的激励因素就是提供转正的机会，以及提供一些职业技能培训的课程。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;在行为科学上具有划时代意义的心理学家亚伯拉罕·马斯洛将人类的需要分为了五层，分别是：&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;1）生存和生理需求&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;2）安全需求&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;3）情感和归属的需求&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;4）尊重的需求&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;5）自我实现的需求&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;当每一层的需要得到满足之后，就很难起到任何的激励作用了。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;很显然，相较于长辈和前辈们，90后成长于殷实的年代，生存和生理上的、安全的两层需要被轻易满足，所以基于此的薪酬、稳定等因素已经失效了。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;社交上的认可、他人和自我的尊重、以及一种自我成就感，才是需要优先考虑的。&lt;/strong&gt;如果一份工作不能拿出去在朋友圈晒、如果工作成果不能让顾客和老板真诚表扬、如果由于公司或者上司的支持力度不够而不能做到最好，那么这份工作对于他们的激励是远远不够的。&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;而最终的激励一定来自于自我的实现和超越，对于此，马斯洛在他的专著《动机与人格》中写到&lt;strong style=&quot;margin: 0px; padding: 0px; line-height: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: 800; vertical-align: baseline; -webkit-font-smoothing: antialiased;&quot;&gt;“的确，自我实现的人，那些已达到成熟、健康和自我满足的高层次的人们，他们有如此多的东西可以教给我们，以至于有时他们几乎就像是人类中的一个不同的种类。”&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;font: 14px/24px arial, &amp;quot;Hiragino Sans GB&amp;quot;, 微软雅黑, MicrosoftYaHei, 宋体, 宋体, Tahoma, Arial, Helvetica, STHeiti; margin: 25px 0px; padding: 0px; color: rgb(51, 51, 51); text-transform: none; text-indent: 28px; letter-spacing: 0.5px; word-spacing: 0px; vertical-align: baseline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px; -webkit-font-smoothing: antialiased;&quot; class=&quot;text&quot;&gt;90后员工的老板们最好能理解并做到这一点，并用心为此提供一切帮助，否则他们一定会用脚惩罚你们。&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><pubDate>Tue, 13 Oct 2015 08:54:55 +0800</pubDate></item><item><title>php获取远程图片的两种 CURL方式和sockets方式获取远程图片</title><link>http://blog.haicao.net/?id=9</link><description>&lt;p&gt;&amp;nbsp;php获取远程图片的两种:CURL方式和sockets方式获取远程图片,&lt;/p&gt;&lt;p&gt;方式1：sockets &lt;br/&gt;&lt;/p&gt;&lt;div class=&quot;codetitle&quot;&gt;&lt;a style=&quot;cursor: pointer;&quot; id=&quot;copybut41863&quot; class=&quot;copybut&quot; data=&quot;41863&quot;&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;复制代码&lt;/span&gt;&lt;/a&gt; 代码如下:&lt;/div&gt;&lt;div id=&quot;code41863&quot; class=&quot;codebody&quot;&gt;&lt;br/&gt;$a = &amp;quot;http://jb51.net/content/uploadfile/201106/thum-f3ccdd27d2000e3f9255a7e3e2c4880020110622095243.jpg&amp;quot;; &lt;br/&gt;$local = &amp;#39;socket1.gif&amp;#39;; &lt;br/&gt;$aa = getImg($a,$local); &lt;br/&gt;/* &lt;br/&gt;*@ 完整的图片地址 &lt;br/&gt;*@ 要存储的文件名 &lt;br/&gt;*/ &lt;br/&gt;function getImg( $url = &amp;quot;&amp;quot;, $filename = &amp;quot;&amp;quot; ) { &lt;br/&gt;if(is_dir(basename($filename))) { &lt;br/&gt;echo &amp;quot;The Dir was not exits&amp;quot;; &lt;br/&gt;Return false; &lt;br/&gt;} &lt;br/&gt;//去除URL连接上面可能的引号 &lt;br/&gt;$url = preg_replace( &amp;#39;/(?:^[\&amp;#39;&amp;quot;]+|[\&amp;#39;&amp;quot;\/]+$)/&amp;#39;, &amp;#39;&amp;#39;, $url ); &lt;br/&gt;if (!extension_loaded(&amp;#39;sockets&amp;#39;)) return false; &lt;br/&gt;//获取url各相关信息 &lt;br/&gt;preg_match( &amp;#39;/http:\/\/([^\/\:]+(\:\d{1,5})?)(.*)/i&amp;#39;, $url, $matches ); &lt;br/&gt;if (!$matches) return false; &lt;br/&gt;$sock = socket_create( AF_INET, SOCK_STREAM, SOL_TCP ); &lt;br/&gt;if ( !@socket_connect( $sock, $matches[1], $matches[2] ? substr($matches[2], 1 ) : 80 ) ) { &lt;br/&gt;return false; &lt;br/&gt;} &lt;br/&gt;//图片的相对地址 &lt;br/&gt;$msg = &amp;#39;GET &amp;#39; . $matches[3] . &amp;quot; HTTP/1.1\r\n&amp;quot;; &lt;br/&gt;//主机名称 &lt;br/&gt;$msg .= &amp;#39;Host: &amp;#39; . $matches[1] . &amp;quot;\r\n&amp;quot;; &lt;br/&gt;$msg .= &amp;#39;Connection: Close&amp;#39; . &amp;quot;\r\n\r\n&amp;quot;; &lt;br/&gt;socket_write( $sock, $msg ); &lt;br/&gt;$bin = &amp;#39;&amp;#39;; &lt;br/&gt;while ( $tmp = socket_read( $sock, 10 ) ) { &lt;br/&gt;$bin .= $tmp; &lt;br/&gt;$tmp = &amp;#39;&amp;#39;; &lt;br/&gt;} &lt;br/&gt;$bin = explode(&amp;quot;\r\n\r\n&amp;quot;, $bin); &lt;br/&gt;$img = $bin[1]; &lt;br/&gt;$h = fopen( $filename, &amp;#39;wb&amp;#39; ); &lt;br/&gt;$res = fwrite( $h, $img ) === false ? false : true; &lt;br/&gt;@socket_close( $sock ); &lt;br/&gt;Return $res; &lt;br/&gt;} &lt;br/&gt;&lt;/div&gt;&lt;p&gt;&lt;br/&gt;方式2：curl &lt;br/&gt;&lt;/p&gt;&lt;div class=&quot;codetitle&quot;&gt;&lt;a style=&quot;cursor: pointer;&quot; id=&quot;copybut33577&quot; class=&quot;copybut&quot; data=&quot;33577&quot;&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;复制代码&lt;/span&gt;&lt;/a&gt; 代码如下:&lt;/div&gt;&lt;div id=&quot;code33577&quot; class=&quot;codebody&quot;&gt;&lt;br/&gt;&amp;lt;?php &lt;br/&gt;$url = &amp;quot;http://jb51.net/content/uploadfile/201106/thum-f3ccdd27d2000e3f9255a7e3e2c4880020110622095243.jpg&amp;quot;; &lt;br/&gt;$filename = &amp;#39;curl.gif&amp;#39;; &lt;br/&gt;//http://jb51.net &lt;br/&gt;getImg($url, $filename); &lt;br/&gt;/* &lt;br/&gt;*@通过curl方式获取制定的图片到本地 &lt;br/&gt;*@ 完整的图片地址 &lt;br/&gt;*@ 要存储的文件名 &lt;br/&gt;*/ &lt;br/&gt;function getImg($url = &amp;quot;&amp;quot;, $filename = &amp;quot;&amp;quot;) { &lt;br/&gt;if(is_dir(basename($filename))) { &lt;br/&gt;echo &amp;quot;The Dir was not exits&amp;quot;; &lt;br/&gt;Return false; &lt;br/&gt;} &lt;br/&gt;//去除URL连接上面可能的引号 &lt;br/&gt;$url = preg_replace( &amp;#39;/(?:^[\&amp;#39;&amp;quot;]+|[\&amp;#39;&amp;quot;\/]+$)/&amp;#39;, &amp;#39;&amp;#39;, $url ); &lt;br/&gt;$hander = curl_init(); &lt;br/&gt;$fp = fopen($filename,&amp;#39;wb&amp;#39;); &lt;br/&gt;curl_setopt($hander,CURLOPT_URL,$url); &lt;br/&gt;curl_setopt($hander,CURLOPT_FILE,$fp); &lt;br/&gt;curl_setopt($hander,CURLOPT_HEADER,0); &lt;br/&gt;curl_setopt($hander,CURLOPT_FOLLOWLOCATION,1); &lt;br/&gt;//curl_setopt($hander,CURLOPT_RETURNTRANSFER,false);//以数据流的方式返回数据,当为false是直接显示出来 &lt;br/&gt;curl_setopt($hander,CURLOPT_TIMEOUT,60); &lt;br/&gt;/*$options = array( &lt;br/&gt;CURLOPT_URL=&amp;gt; &amp;#39;http://jb51.net/content/uploadfile/201106/thum-f3ccdd27d2000e3f9255a7e3e2c4880020110622095243.jpg&amp;#39;, &lt;br/&gt;CURLOPT_FILE =&amp;gt; $fp, &lt;br/&gt;CURLOPT_HEADER =&amp;gt; 0, &lt;br/&gt;CURLOPT_FOLLOWLOCATION =&amp;gt; 1, &lt;br/&gt;CURLOPT_TIMEOUT =&amp;gt; 60 &lt;br/&gt;); &lt;br/&gt;curl_setopt_array($hander, $options); &lt;br/&gt;*/ &lt;br/&gt;curl_exec($hander); &lt;br/&gt;curl_close($hander); &lt;br/&gt;fclose($fp); &lt;br/&gt;Return true; &lt;br/&gt;} &lt;br/&gt;?&amp;gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</description><pubDate>Fri, 11 Sep 2015 15:48:26 +0800</pubDate></item></channel></rss>