[{"content":"1. 问题场景 安装 Ubuntu Server 时，如果安装程序使用了 LVM 默认配置，通常只会分配磁盘的一部分给 root 逻辑卷（Logical Volume），剩余空间留在 Volume Group 中未使用。例如：\n磁盘总容量 200GB root 分区仅分配了 98.5GB VG 中还有 98.5GB 空闲 此时需要将剩余空间在线扩充到 / 分区，无需重启、无需卸载。\n2. 前置知识 在动手之前，理解 LVM 的三层抽象有助于你排查更复杂的场景：\n层 组件 类比 PV (Physical Volume) /dev/sda3 一块硬盘原料 VG (Volume Group) ubuntu-vg 一个\u0026quot;存储池\u0026quot;，由若干 PV 组成 LV (Logical Volume) ubuntu-lv 从池中切出的\u0026quot;虚拟分区\u0026quot;，格式化后挂载 扩容的本质就是：池（VG）里有空闲空间 → 划给虚拟分区（LV）→ 通知文件系统去用新空间。\nPE (Physical Extent) 是 LVM 的最小分配单位，默认 4MiB。lvextend -l +100%FREE 中的 -l 就是以 PE 为单位分配——+100%FREE 表示\u0026quot;把 VG 中所有空闲 PE 全给这个 LV\u0026quot;。\n3. 检查当前磁盘布局 使用 lsblk 查看分区和挂载点：\nlsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,FSAVAIL,FSUSE% 输出示例：\nNAME SIZE TYPE FSTYPE MOUNTPOINT FSAVAIL FSUSE% sda 200G disk ├─sda1 1G part vfat /boot/efi 1G 1% ├─sda2 2G part ext4 /boot 1.7G 5% └─sda3 196.9G part LVM2_member └─ubuntu--vg-ubuntu--lv 98.5G lvm ext4 / 79.5G 12% 可以看到：\nsda3 是整个 LVM 物理卷（PV），大小 196.9G ubuntu--vg 是 Volume Group ubuntu--lv 是 Logical Volume，只用了 98.5G 还有约 98.5G 空闲空间在 VG 中未被分配 再用 vgs / lvs / pvs 确认 LVM 状态：\nvgs \u0026amp;\u0026amp; lvs \u0026amp;\u0026amp; pvs 输出示例：\nVG #PV #LV #SN Attr VSize VFree ubuntu-vg 1 1 0 wz--n- \u0026lt;196.95g 98.47g LV VG Attr LSize ubuntu-lv ubuntu-vg -wi-ao---- 98.47g PV VG Fmt Attr PSize PFree /dev/sda3 ubuntu-vg lvm a-- \u0026lt;196.95g 98.47g 关键信息：VFree = 98.47g，说明 VG 中有大量空闲空间等待分配。\n💡 小技巧： 如果 lsblk 输出太杂乱，可以只看 LVM 相关行：lsblk | grep -E '(lvm|disk$)'\n4. 一步扩容：LV + 文件系统 Ubuntu 默认使用 ext4 文件系统，支持在线 resize。只需两条命令：\n# 将 VG 中所有剩余空间分配给 LV sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv # 在线扩展 ext4 文件系统 sudo resize2fs /dev/ubuntu-vg/ubuntu-lv 命令详解 参数 含义 常见误区 -l +100%FREE 用 PE 数量表示：VG 所有空闲全给 -l 是 PE 单位，-L 才是容量单位（如 -L +50G） -L +50G 只增加 50G，而非全部 如果不知道剩余多少，用 -l +100%FREE 最安全 resize2fs 扩展 ext3/ext4 文件系统 仅适用于 ext 家族，XFS 用 xfs_growfs ⚠️ 文件系统差异： 如果文件系统是 XFS（如 CentOS/RHEL 默认），需使用 xfs_growfs / 而非 resize2fs。Ubuntu 默认是 ext4，所以用 resize2fs。如果不确定，用 df -T / 查看 Type 列。\n执行输出示例：\nSize of logical volume ubuntu-vg/ubuntu-lv changed from 98.47 GiB (25209 extents) to \u0026lt;196.95 GiB (50418 extents). Logical volume ubuntu-vg/ubuntu-lv successfully resized. resize2fs 1.47.2 (1-Jan-2025) Filesystem at /dev/ubuntu-vg/ubuntu-lv is mounted on /; on-line resizing required old_desc_blocks = 13, new_desc_blocks = 25 The filesystem on /dev/ubuntu-vg/ubuntu-lv is now 51628032 (4k) blocks long. 5. 验证结果 df -h / lsblk /dev/sda 最终输出：\nFilesystem Size Used Avail Use% Mounted on /dev/mapper/ubuntu--vg-ubuntu--lv 194G 12G 173G 7% / NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 200G 0 disk ├─sda1 8:1 0 1G 0 part /boot/efi ├─sda2 8:2 0 2G 0 part /boot └─sda3 8:3 0 196.9G 0 part └─ubuntu--vg-ubuntu--lv 252:0 0 196.9G 0 lvm / / 从 98.5G → 196.9G，剩余空间全部并入，零停机、零重启。\n6. 与 CentOS 方案的区别 之前写过一篇 CentOS 7 磁盘扩容，流程复杂得多——需要 fdisk 手动创建新分区、partprobe 重读分区表、pvcreate 创建 PV、vgextend 扩展 VG，最后才 lvextend + xfs_growfs。\n而 Ubuntu 安装器（subiquity）在安装时已经将整块磁盘作为一个 PV 加入了 VG，只是 LV 没有分配全部空间。所以只需要一步 lvextend + resize2fs 即可，无需操作分区表。\n步骤 CentOS 7 Ubuntu 26.04 创建分区 fdisk 手动创建 无需（安装时已整盘 PV） 重读分区表 partprobe 无需 创建 PV pvcreate /dev/sda3 无需 扩展 VG vgextend centos /dev/sda3 无需 扩展 LV lvextend -l +100%FREE lvextend -l +100%FREE 扩展文件系统 xfs_growfs / resize2fs /dev/... 7. 排障指南 7.1 resize2fs 报错 \u0026ldquo;No space left on device\u0026rdquo; 原因： VG 中已经没有空闲空间了，或者 LV 已经占满了 VG。\n排查： vgs 看 VFree 是否为 0。如果 VFree 有值但 resize2fs 报错，检查 LV 大小是否已经等于 VG 大小。\n7.2 磁盘没有整盘作为 PV 如果你的 lsblk 输出中 sda3 的大小明显小于磁盘总容量（比如 200G 磁盘只有 100G 的 sda3），说明安装时没有把整盘分给 LVM。此时需要：\nfdisk 或 gdisk 创建新分区 pvcreate 创建新 PV vgextend 加入 VG 再执行 lvextend + resize2fs 步骤与上面 CentOS 7 方案一致。\n7.3 文件系统是 XFS 不是 ext4 # 先确认文件系统类型 df -T / # 如果是 xfs，用这个替代 resize2fs sudo xfs_growfs / XFS 的 xfs_growfs 只能以挂载点为参数（/），不能指定设备路径。\n8. 安全提示 LVM 操作有风险，虽然 lvextend 和 resize2fs 非常成熟，但生产环境操作前建议备份重要数据 如果使用了 LVM 快照（lvcreate -s），需要在扩容前确认快照不会因 COW 写满 扩容是安全的（只增加不减少），缩容（lvreduce / resize2fs 缩小）才危险——必须先缩文件系统再缩 LV，顺序错了直接丢数据 9. 总结 Ubuntu LVM 磁盘扩容的核心思路：\nlsblk 看磁盘布局，确认 PV 已覆盖整盘 vgs 确认 VG 中有空闲空间（VFree） lvextend 将空闲空间分配给 LV resize2fs 在线扩展文件系统 整个过程 30 秒完成，无需重启，适合生产环境在线操作。\n扩展阅读：\nCentOS 7 系统盘剩余容量扩充到 root 分区 ","permalink":"/posts/ubuntu-lvm-xi-tong-pan-sheng-yu-rong-liang-kuo-chong-dao-root-fen-qu/","summary":"\u003ch2 id=\"1-问题场景\"\u003e1. 问题场景\u003c/h2\u003e\n\u003cp\u003e安装 Ubuntu Server 时，如果安装程序使用了 LVM 默认配置，通常只会分配磁盘的一部分给 root 逻辑卷（Logical Volume），剩余空间留在 Volume Group 中未使用。例如：\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e磁盘总容量 \u003cstrong\u003e200GB\u003c/strong\u003e\u003c/li\u003e\n\u003cli\u003eroot 分区仅分配了 \u003cstrong\u003e98.5GB\u003c/strong\u003e\u003c/li\u003e\n\u003cli\u003eVG 中还有 \u003cstrong\u003e98.5GB 空闲\u003c/strong\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e此时需要将剩余空间在线扩充到 \u003ccode\u003e/\u003c/code\u003e 分区，无需重启、无需卸载。\u003c/p\u003e\n\u003ch2 id=\"2-前置知识\"\u003e2. 前置知识\u003c/h2\u003e\n\u003cp\u003e在动手之前，理解 LVM 的三层抽象有助于你排查更复杂的场景：\u003c/p\u003e\n\u003ctable\u003e\n  \u003cthead\u003e\n      \u003ctr\u003e\n          \u003cth\u003e层\u003c/th\u003e\n          \u003cth\u003e组件\u003c/th\u003e\n          \u003cth\u003e类比\u003c/th\u003e\n      \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n      \u003ctr\u003e\n          \u003ctd\u003e\u003cstrong\u003ePV\u003c/strong\u003e (Physical Volume)\u003c/td\u003e\n          \u003ctd\u003e\u003ccode\u003e/dev/sda3\u003c/code\u003e\u003c/td\u003e\n          \u003ctd\u003e一块硬盘原料\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n          \u003ctd\u003e\u003cstrong\u003eVG\u003c/strong\u003e (Volume Group)\u003c/td\u003e\n          \u003ctd\u003e\u003ccode\u003eubuntu-vg\u003c/code\u003e\u003c/td\u003e\n          \u003ctd\u003e一个\u0026quot;存储池\u0026quot;，由若干 PV 组成\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n          \u003ctd\u003e\u003cstrong\u003eLV\u003c/strong\u003e (Logical Volume)\u003c/td\u003e\n          \u003ctd\u003e\u003ccode\u003eubuntu-lv\u003c/code\u003e\u003c/td\u003e\n          \u003ctd\u003e从池中切出的\u0026quot;虚拟分区\u0026quot;，格式化后挂载\u003c/td\u003e\n      \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003e扩容的本质就是：\u003cstrong\u003e池（VG）里有空闲空间 → 划给虚拟分区（LV）→ 通知文件系统去用新空间\u003c/strong\u003e。\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003e\u003cstrong\u003ePE (Physical Extent)\u003c/strong\u003e 是 LVM 的最小分配单位，默认 4MiB。\u003ccode\u003elvextend -l +100%FREE\u003c/code\u003e 中的 \u003ccode\u003e-l\u003c/code\u003e 就是以 PE 为单位分配——\u003ccode\u003e+100%FREE\u003c/code\u003e 表示\u0026quot;把 VG 中所有空闲 PE 全给这个 LV\u0026quot;。\u003c/p\u003e","title":"Ubuntu LVM 系统盘剩余容量扩充到 root 分区"},{"content":"课文原文（双语） Good morning, Susan. 早安，Susan。\nGood morning, Sam. 早安，Sam。\nWhat\u0026rsquo;s the schedule today? 今天的工作是怎么安排的？\nTen o\u0026rsquo;clock, telephone FAO Schwarz about the new twin baby dolls. 十点钟，打电话给FAO Schwarz谈关于双胞娃娃玩具的事。\nOK. 好的。\nTelephone Mrs. Zaskey at the advertising agency. 打电话给广告代理Zaskey夫人。\nI did that. Go on. 我已经打了。继续说。\nEleven o\u0026rsquo;clock, approve the sketches for the toy spaceship. 十一点钟，批示玩具太空船的草图。\nWhere are they? 草图在哪儿？\nRight here. 就在这里。\nDid you look at them? 你看过了吗？\nYes, I did. 是的，我看过了。\nWhat do you think of the spaceship? 你觉得那个太空船怎么样？\nI think the kids\u0026rsquo;ll love it. 我觉得孩子们会喜欢。\nWould you show me the drawings, please? 请把草图给我看看好吗？\nHuh. Now, what else is on the schedule today? 嗯！那么，今天的工作表上还有些什么？\nWell, at one o\u0026rsquo;clock you have a lunch appointment with Mr. Levine, the client from the Toytown Stores. 嗯，一点钟，你跟Levine先生约好吃午餐，这个客户来自Toytown Stores。\nWhere? 在什么地方？\nAt Rossano\u0026rsquo;s. 在Rossano餐厅。\nHmm. Anything else? 嗯，还有其他事吗？\nAt four o\u0026rsquo;clock, you have a meeting with the production staff in the conference room. 四点钟，你要与生产部门人员开会，在会议室。\nMake sure everybody is at that meeting. 要确定每一位都出席这次会议。\nWill do. 没问题。\nAt six you\u0026rsquo;re meeting Mr. Ozawa. 六点钟你要会见Ozawa先生。\nOh, yes. Are his models here? 噢，对啦。他的模型在这里吗？\nThey\u0026rsquo;re in my office. 在我办公室。\nI\u0026rsquo;d like to see them. 我想看看。\nRight. 好的。\nWhat else? 还有什么？\nCome on, Sam \u0026hellip; You work too hard, Susan. When was your last day off? 好啦，Sam……你太拼命工作了，Susan。你上次休假是在什么时候？\nHmm. I can\u0026rsquo;t remember. 嗯，我记不起来了。\nYou really ought to take some time off. 你的确应该休一休假。\nWhat for? 为什么？\nTo enjoy the simple things in life \u0026hellip; 享受人生乐趣……\nI know, Sam. Maybe soon. 我知道，Sam。也许很快就会。\nTo smell the flowers. 去轻松一下。\nOh, wait a minute. What\u0026rsquo;s today\u0026rsquo;s date? 噢，等一等，今天几号？\nToday is the twelfth. Why? 今天是十二号。怎么？\nIt seems to me I scheduled something else. 好像我还安排了什么别的事情。\nThere\u0026rsquo;s nothing else in the appointment book. 在工作日志里没有别的事了。\nI\u0026rsquo;m sure I did. Oh, well, I\u0026rsquo;ll probably remember it later. I hope it isn\u0026rsquo;t important. Hmm. It\u0026rsquo;s probably nothing. 我确信我安排了什么事。噢，也许过一会我会记起来。希望不是什么重要事。嗯，也许没什么事。\nOK, let\u0026rsquo;s get started. Would you call Priscilla Smith at FAO Schwarz, please? 好吧，我们开始工作。请拨电话给FAO Schwarz的Priscilla Smith，好吗？\nRight. 好的。\nThese are the models from the Japanese film maker. Thank you. Just put them on my desk. And the new drawings for the toy spaceship. 这些是那位日本电影制片家那里的模型。谢谢。把它们放在我桌上。还有玩具太空船的新草图。\nWonderful. That was fast. 真精采。而且又快。\nWe have a new artist. She\u0026rsquo;s very talented. 我们找来了一位新的美工人员。她很有才华。\nWhat time is it, anyway? My watch stopped. 几点钟了？顺便说一声。我的表停了。\nIt\u0026rsquo;s eleven thirty. 十一点半。\nWhat time is my lunch date with Bill Levine? 我与Bill Levine约好的中饭时间是几点？\nOne o\u0026rsquo;clock. 一点钟。\nRemind me to leave at twelve forty-five. 提醒我十二点四十五分走。\nDid you remember your other appointment for today? 你还记得今天的另一个约会吗？\nNo, but I have a feeling it\u0026rsquo;s going to be too late when I do remember. 记不起来了。但我觉得等我想起来时已经太晚了。\nYes, Sam? 什么事，Sam？\nI just solved the mystery. What did I forget? 我刚刚把那个谜底解开了。我忘记什么？\nYou have some guests in the reception room. 你有几位客人在接待室等你。\nWhat? Who? 什么？是谁？\nMr. Harry Bennett and his daughter. Harry Bennett先生和他女儿。\nI remember! Oh \u0026hellip; Harry! I made a lunch date with him and his daughter weeks ago. 我记起来了！噢……Harry！几星期前我约好和他以及他女儿共进午餐。\nIs he a client? 他是顾客吗？\nHe\u0026rsquo;s a friend. 他是位朋友。\nWell, he\u0026rsquo;s here with his daughter to have lunch. I met her at Thanksgiving, and I promised to have lunch with both of them today. 嗯，他和他女儿已到这里等吃午餐了。我在感恩节与她见面，我答应今天和他们共进午餐。\nYes, indeed. What are you going to do about your appointment with Mr. Levine? 是的，原来如此。那你怎么办，与Levine先生的邀约？\nAny suggestions? 有什么建议吗？\nOh! Hi, Michelle. Hello, Harry. It\u0026rsquo;s nice to see you again. 噢！嗨，Michelle。你好，Harry。很高兴再见到你们。\nHello. Hi, Susan. 你好。嗨，Susan。\nWe have both been excited about seeing you and having lunch with you today. Michelle picked these flowers out for you. 我们两个很高兴见到你，并与你一起吃中餐。Michelle选这些花送你。\nDaddy, can we go soon? 爸爸，我们能快点走吗？\nWe\u0026rsquo;re going to go to lunch in a few minutes, honey. 我们一下子就去吃中餐，亲爱的。\nBut I\u0026rsquo;m thirsty. 可是我渴了。\nOK. You go out and get a drink of water at the fountain. The fountain is over there, Michelle. Near the Exit sign. 好。你出去在饮水机那儿喝点水吧。饮水机在那里，Michelle。就在出口标志附近。\nThank you. 谢谢你。\nMichelle is a little shy. I used to be that way when I was her age. Michelle有点不好意思。我像她这般年纪也是这样。\nHarry, if Michelle doesn\u0026rsquo;t want to go, we don\u0026rsquo;t have to. Harry，如果Michelle不想去，我们不必勉强。\nShe\u0026rsquo;ll be fine. Remember, I haven\u0026rsquo;t dated any one else since her mother died. This is a little difficult for her. 她没有问题。别忘了，自从她母亲去世之后，我从没有和别人约会过。这对她来说有点不习惯。\nAre you ready to go? 你准备好动身吗？\nYes. But could you wait one minute? I have a call to make. Would you excuse me? 是的。不过，你能等一下吗？我需要打个电话，失陪一下。\nSam, get Mr. Levine at Toytown Stores on the telephone for me, please. Sam，给Toytown Stores的Levine先生请替我拨电话。\nRight. 好的。\nHello. Susan Stewart calling Mr. Levine, please. 喂，Susan Stewart想跟Levine先生通话。\nHe\u0026rsquo;s on the phone. 他在电话上。\nMr. Levine, Susan Stewart. I find myself in an embarrassing situation. I made another lunch date for today and forgot to enter it in my appointment book. Can you and I meet for drinks tomorrow? I\u0026rsquo;d really appreciate it\u0026hellip;. Yes\u0026hellip;. Thank you\u0026hellip;. Tomorrow at five o\u0026rsquo;clock at the Biltmore. I\u0026rsquo;ll see you then. Thank you, Mr. Levine. Levine先生，我是Susan Stewart。我现在有一件很糗的事。我和别人约好共进午餐，但忘了写到工作日志里。你和我能否在明天见面喝点什么吗？我非常感激……好的……谢谢你……明天五点钟，在Biltmore饭店。到时候见啦。谢谢你，Levine先生。\nAt the South Street restaurant: （在南街餐馆：）\nWelcome to the South Street restaurant, folks. What\u0026rsquo;ll it be? 欢迎光临南街餐馆，各位。想来点什么？\nWhat do you recommend? 你推荐什么？\nWell, the crab salad\u0026rsquo;s always a big hit. 嗯，蟹肉沙拉一向是广受欢迎的。\nSusan, would you like the crab salad? Susan，你要不要蟹肉沙拉？\nI\u0026rsquo;d love the crab salad. 我要蟹肉沙拉。\nMichelle, would you like to try the crab salad, too? Michelle，你要不要也试试蟹肉沙拉？\nOK, Daddy. 好的，爸爸。\nWe\u0026rsquo;ll have three crab salads and a pitcher of lemonade. Help yourself to celery and carrots and other vegetables. 我们来三份蟹肉沙拉和一壶柠檬汁。请你们自己盛芹菜、胡萝卜和其他蔬菜。\nWe used to catch crabs. Where was that? 我们以前常捉螃蟹。在什么地方？\nWe had a summer house on Fire Island. Do you remember, Michelle? 我们在火岛有一所避暑别墅，你还记得吗，Michelle？\nSure. You and Mommy used to take me on the ferryboat. Sometimes, at night, we would go down to the beach and catch crabs, remember? With a piece of meat on a string! 当然记得。你和妈妈常带我坐渡船。有时候，在夜里，我们走到海边抓螃蟹，记得吗？用一根绳子拴着一点肉！\nRight. 对。\nWell, I think I\u0026rsquo;m going to go get us all some vegetables. There you go. Thank you. And some ice-cold lemonade. Thank you. Enjoy it. 好啦，我想我去给大家盛点蔬菜来。东西来了。谢谢。还有冰凉的柠檬汁。谢谢。请享用。\nMichelle, can I help you with the lemonade? Michelle，我帮你倒点柠檬汁好吗？\nNo, thank you. I\u0026rsquo;ll wait for my father. 不，谢谢你。我要等我爸爸。\nMichelle, can we have a talk? Michelle，我们能谈一谈吗？\nSure. 当然。\nI know you miss your mother. 我知道你想念你妈妈。\nYou do? 你真的知道？\nYes. And I\u0026rsquo;m not trying to take her place. 是的，我并不想取代她。\nThen why are you and Daddy spending so much time together? 那为什么你和爸爸老是在一起呢？\nBecause we like each other. And right now, he needs a friend. I\u0026rsquo;m his friend. 因为我们彼此喜欢。而且现在，他需要一个朋友。我是他的朋友。\nI know you are. 我知道你是。\nSometimes he\u0026rsquo;s very sad. And so are you, I think. 他有时很忧悒。我想你也如此。\nSometimes. 有时候。\nI\u0026rsquo;d like to be your friend, too. Will you let me be your friend, Michelle? 我也想成为你的朋友。你愿意让我成为你的朋友吗，Michelle？\nSo, what were you two talking about? 你们俩刚才谈什么了？\nJust girl talk, Daddy. It\u0026rsquo;s too hard to explain. 只是女孩子之间的谈话，爸爸。这很难解释清楚。\nYou\u0026rsquo;re probably right. 也许你说得对。\nWell, let\u0026rsquo;s get started. 好吧，我们开始吃吧。\nOh, it\u0026rsquo;s a quarter to four, and I have a production meeting at four. I planned to take you for a ride in Central Park in a horse and carriage. 噢，差十五分就四点了，我四点钟有个生产会议。我原打算带你去中央公园坐马车。\nHarry, I\u0026rsquo;d love to, but I have work to do. Harry，我确实想去，但我有工作要做。\nOK. We\u0026rsquo;ll walk back to your office with you. It\u0026rsquo;s so nice out. I decided to forget about my accounting problems and just enjoy this beautiful spring day. Take the time, Susan. 好吧，我们陪你走回你的办公室去。外面天气真好。我已决定不再去想那些会计上的问题，尽情享受这美好的春天。别那么忙，Susan。\nI know I should, but \u0026hellip; well, there are too many things to do. 我知道应该这样，但是……我要做的事情太多了。\nI understand. I\u0026rsquo;ll go for a ride with Michelle. 我了解。我和Michelle一起去坐马车。\nRight. Well, I had a really nice time. 好的。嗯，我玩得很开心。\nSo did I. 我也一样。\nSo did I. 我也一样。\nI\u0026rsquo;m sorry you can\u0026rsquo;t come with us, Susan. 很遗憾你不能同我们一起去，Susan。\nSo am I. 我也很遗憾。\nBye-bye. 再见。\nHarry! Michelle! Can you wait till I make a phone call? Harry！Michelle！你们等一下让我打个电话好吗？\nSure. 当然。\nSusan Stewart\u0026rsquo;s office. Susan Stewart办公室。\nSam, this is Susan. Hi. How was lunch? Fine. You\u0026rsquo;re late. The production department\u0026rsquo;s waiting in the conference room. Sam，我是Susan。嗨，午餐怎么样？很好。你已经迟了。生产部门的人正在会议室等你。\nI know. Ask Paul Smith to fill in for me. He knows everything about the production schedule, and he can answer any questions. 我知道。叫Paul Smith代替我出席。他知道生产进度的一切情况，他也可以回答任何问题。\nRight. 好的。\nDon\u0026rsquo;t tell any one, but I\u0026rsquo;m taking a little time to smell the flowers. 别告诉别人，我正利用一点时间轻松一下。\nGood for you. 我真为你高兴。\nIt\u0026rsquo;ll be our secret. But schedule another production meeting for tomorrow. I\u0026rsquo;ll be back for my six o\u0026rsquo;clock appointment with Mr. Ozawa. 这只是你我之间的秘密。务必安排在明天举行另一次生产会议。我会回来参加六点钟与Ozawa先生的约见。\nOK, Susan. And have a nice afternoon. 好的，Susan，祝你下午玩得愉快。\nThanks. 谢谢。\nShe likes you. 她喜欢你。\nI know. I like her. How\u0026rsquo;d you do it? 我知道。我喜欢她。你是如何办到的？\nWe had a talk. 我们谈了一下。\nAbout what? 谈什么？\nLife. 生活。\nAnd what did you decide? 那你们有什么结论呢？\nThat\u0026rsquo;s a secret \u0026hellip; between us women. 这是个秘密……我们女人的秘密。\n重难点分析 \u0026ldquo;smell the flowers\u0026rdquo; — 习语，字面义\u0026quot;闻花香\u0026quot;，引申义\u0026quot;放慢脚步享受生活\u0026quot;。 \u0026ldquo;What\u0026rsquo;s the schedule today?\u0026rdquo; — 询问今日安排，职场常用语。 \u0026ldquo;Go on.\u0026rdquo; — 表示\u0026quot;继续（说下去）\u0026quot;。 \u0026ldquo;Make sure everybody is at that meeting.\u0026rdquo; — make sure + 从句，表示\u0026quot;确保……\u0026quot;。 \u0026ldquo;Will do.\u0026rdquo; — 口语缩略，相当于\u0026quot;I will do that.\u0026quot;，表示\u0026quot;没问题/照办\u0026quot;。 \u0026ldquo;I find myself in an embarrassing situation.\u0026rdquo; — 正式表达\u0026quot;我发现自己处于尴尬境地\u0026quot;。 \u0026ldquo;a big hit\u0026rdquo; — 表示\u0026quot;大受欢迎的事物\u0026quot;。 \u0026ldquo;Help yourself to\u0026hellip;\u0026rdquo; — 请客人自取食物时的标准用语。 \u0026ldquo;I\u0026rsquo;m not trying to take her place.\u0026rdquo; — 表示\u0026quot;我并不想取代她（的位置）\u0026quot;。 \u0026ldquo;fill in for me\u0026rdquo; — 表示\u0026quot;代替我\u0026quot;。 \u0026ldquo;Good for you.\u0026rdquo; — 表示\u0026quot;真为你高兴/做得好\u0026quot;。 \u0026ldquo;It\u0026rsquo;ll be our secret.\u0026rdquo; — 表示\u0026quot;这是我们之间的秘密\u0026quot;。 核心词汇 词汇 音标 释义 schedule /ˈskedʒuːl/ 日程安排 approve /əˈpruːv/ 批准，批示 sketch /sketʃ/ 草图 client /ˈklaɪənt/ 客户 appointment /əˈpɔɪntmənt/ 约会，预约 recommend /ˌrekəˈmend/ 推荐 embarrassing /ɪmˈbærəsɪŋ/ 令人尴尬的 appreciate /əˈpriːʃieɪt/ 感激 production /prəˈdʌkʃn/ 生产 conference /ˈkɑːnfərəns/ 会议 fountain /ˈfaʊntn/ 喷泉式饮水器 shy /ʃaɪ/ 害羞的 secret /ˈsiːkrət/ 秘密 talented /ˈtæləntɪd/ 有才华的 mystery /ˈmɪstəri/ 谜 口语中的应用 \u0026ldquo;Go on.\u0026rdquo; — 催促对方继续说话，非常口语化。 \u0026ldquo;Will do.\u0026rdquo; — 简洁有力的回应，表示\u0026quot;好的/没问题\u0026quot;。 \u0026ldquo;What do you recommend?\u0026rdquo; — 在餐厅询问服务员推荐菜品的标准用语。 \u0026ldquo;Help yourself.\u0026rdquo; — 请对方自便/自取。 \u0026ldquo;Good for you.\u0026rdquo; — 表达赞许或为对方高兴。 \u0026ldquo;It\u0026rsquo;s too hard to explain.\u0026rdquo; — 表示\u0026quot;这很难解释清楚\u0026quot;。 \u0026ldquo;I\u0026rsquo;m not trying to\u0026hellip;\u0026rdquo; — 表示\u0026quot;我并不是想要……\u0026quot;，澄清意图。 \u0026ldquo;We had a talk.\u0026rdquo; — 表示\u0026quot;我们谈了一下\u0026quot;。 核心练习句型 询问和描述日程：\nWhat\u0026rsquo;s the schedule today? What else is on the schedule? I scheduled something else. 表达推荐：\nWhat do you recommend? The crab salad\u0026rsquo;s always a big hit. 表达尴尬/道歉：\nI find myself in an embarrassing situation. I forgot to enter it in my appointment book. 表达\u0026quot;代替某人\u0026quot;：\nAsk Paul Smith to fill in for me. 表达\u0026quot;确保\u0026quot;：\nMake sure everybody is at that meeting. 表达\u0026quot;享受生活\u0026quot;：\nTake some time off. Smell the flowers. Enjoy the simple things in life. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-10/","summary":"\u003ch2 id=\"课文原文双语\"\u003e课文原文（双语）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eGood morning, Susan.\u003c/strong\u003e\n早安，Susan。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eGood morning, Sam.\u003c/strong\u003e\n早安，Sam。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWhat\u0026rsquo;s the schedule today?\u003c/strong\u003e\n今天的工作是怎么安排的？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eTen o\u0026rsquo;clock, telephone FAO Schwarz about the new twin baby dolls.\u003c/strong\u003e\n十点钟，打电话给FAO Schwarz谈关于双胞娃娃玩具的事。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eOK.\u003c/strong\u003e\n好的。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eTelephone Mrs. Zaskey at the advertising agency.\u003c/strong\u003e\n打电话给广告代理Zaskey夫人。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI did that. Go on.\u003c/strong\u003e\n我已经打了。继续说。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eEleven o\u0026rsquo;clock, approve the sketches for the toy spaceship.\u003c/strong\u003e\n十一点钟，批示玩具太空船的草图。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWhere are they?\u003c/strong\u003e\n草图在哪儿？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRight here.\u003c/strong\u003e\n就在这里。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eDid you look at them?\u003c/strong\u003e\n你看过了吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eYes, I did.\u003c/strong\u003e\n是的，我看过了。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第10课：Smell the Flowers（享受生活）"},{"content":"课文原文（双语） Ellen, I\u0026rsquo;d like your opinion. Ellen，我想听听你的意见。\nAbout what? 关于什么？\nWell, Richard and I feel that with a baby coming we need to have our own place to live. 嗯，Richard和我觉得孩子快要出生了，我们应该有自己的房子。\nOh. 噢。\nWell, what do you think about Richard and me looking for a small house or an apartment at this point in our lives? 那么，你觉得我和Richard找一个小住宅或公寓在这个时候怎么样？\nWe love having you here, and there is room, and \u0026hellip; and when the baby comes, the baby can stay in your room for a while. 我们喜欢你们住这里，这里有地方，而且……而且婴儿出生以后，可以住在你们房间一段时间。\nRichard feels we need to find a small house. Richard觉得我们需要一个小住宅。\nI remember when I was pregnant with Richard. Philip and I were living with Grandma and Grandpa. Philip was a young doctor, and he kept talking about having a house of our own. It\u0026rsquo;s natural. 我记得当我怀着Richard时，Philip与我和爷爷、奶奶住在一起。Philip当时是个年轻的大夫，他老说要有自己的家。这是很自然的。\nWhat did you do? 那你们怎么办呢？\nWe looked at a lot of houses. 我们看了好多房子。\nDid you find one? 找到合适的吗？\nOh, not at first. We couldn\u0026rsquo;t afford it. 噢，没有马上找到。我们当时不够钱。\nGrandpa wanted to lend us the money to buy one, but Philip is too independent. He didn\u0026rsquo;t want to borrow any money. 爷爷要借给我们钱去买房子，但是Philip的独立性太强了。他不想借钱。\nSounds like Richard. They\u0026rsquo;re all alike. Richard is a real Stewart. He\u0026rsquo;s independent, and sometimes just stubborn. 听起来跟Richard一样。他们都是一个样子。Richard是个典型的Stewart家后代。他的独立性强，有时候甚至近乎顽固。\nWhen did you buy a house? 那你们在什么时候买房子呢？\nAfter Richard was born. I was teaching music, and Philip was opening his first medical office. 等生下Richard之后。我当时教音乐，而Philip则第一次开诊所。\nWhere was the house? 房子在什么地方？\nRight here in Riverdale. Of course, it was a small house, but just right for us. 就在这里，Riverdale。当然，那是一栋小房子，但正好够我们住。\nIt\u0026rsquo;s funny. History repeats itself. Now Richard and I are having a baby, and we probably won\u0026rsquo;t be able to afford a house right away, either. 真有意思。历史在重演。现在，Richard和我有了孩子，而我们也许也一样不能马上负担得起一栋房子。\nWhy don\u0026rsquo;t you look at some houses, Marilyn? 你何不去看一看房子呢，Marilyn？\nGood idea. 好主意。\nLook in the real-estate section of Sunday\u0026rsquo;s Times. You\u0026rsquo;ll learn a lot. 查一查星期天的《纽约时报》房地产版，你会增长不少见识。\nMaybe we should speak to a real-estate agent about a house. And a bank about a mortgage. 也许我们应该和房地产仲介商谈一谈关于房子的事。还要和银行谈谈贷款。\nI\u0026rsquo;ll talk to Richard about it. I think it\u0026rsquo;s a good idea, Ellen. We can learn a lot by asking. 我会与Richard商量商量。我觉得这是个好主意，Ellen。我们到处问问会学到不少东西。\nAnd if I can be of any help, let me know. 如果我能有所帮忙的话，告诉我。\nAs a matter of fact, my friend Virginia Martinelli is a real-estate agent. 事实上，我的朋友Virginia Martinelli就是个房地产仲介。\nGood. You won\u0026rsquo;t believe this, but she sold us our first house and this one. 好极了。你简直不会相信，我们的第一栋房子和这一栋都是她卖的。\nWell, I\u0026rsquo;ll tell Richard, and we\u0026rsquo;ll go to see her. 嗯，我会告诉Richard，我们会去找她。\nDo you think the skirt length is right, Ellen? Do you think it\u0026rsquo;s too long? 你觉得这裙子长度合适吗？你会不会觉得太长了？\nI think the skirt is just right. Are you planning to attach a train to it? 我觉得长度合适。你准备加拖地裙摆吗？\nNo. No train. Just the dress. But I am going to make a headpiece of lace. 不，不加裙摆。就是这样连身套装。但我准备做一个蕾丝头饰。\nThat dress is gorgeous. 这套服装真华丽。\nThanks, Ellen. And thanks for the advice about the house. I\u0026rsquo;ll talk to Richard about it the minute he comes home. 谢谢，Ellen。也谢谢你关于房子的建议。我就跟Richard商量，他一回来。\nAnd remember, we love having you here. There\u0026rsquo;s no need to rush. 记住，我们喜欢你们住这里。没有必要急急忙忙。\nAt the real-estate agent\u0026rsquo;s office: （在房地产中介办公室：）\nI remember your parents\u0026rsquo; first house very well. It was on Spring Avenue, near the park. 我还清楚记得你父母的第一栋房子。那房子是在Spring Avenue，公园附近。\nI grew up in that house. 我就在那栋房子长大的。\nYes, and you were such a cute baby. I\u0026rsquo;ve seen pictures of him. He had blond hair. 对，你当时是个很逗人喜爱的婴儿。我见过他的照片。他原来是金色头发。\nI\u0026rsquo;ve been friendly with the Stewart family for a long time, so it\u0026rsquo;s my pleasure to help you find a house now. 我和Stewart家有交情很久了，所以现在我很乐意帮助你们找房子。\nWell, we\u0026rsquo;re not sure we can afford one. But we\u0026rsquo;d like to find out about the possibilities. 嗯，我们还不知道是不是负担得起。但我们想知道有多大的可能性。\nThat\u0026rsquo;s a good idea. I love your house on Linden Street. I sold your father that house seventeen years ago. 这是个好主意。我喜欢你们家在Linden街的房子。十七年前我把那栋房子卖给你父亲的。\nReally? 真的？\nYes, Mom was pregnant with Robbie then, and they needed the extra room. 是的，那时妈妈怀着Robbie，他们需要多一些空间。\nI hear you\u0026rsquo;re expecting a baby, Mrs. Stewart. 我听说你们快有小孩了，Stewart太太。\nMmm-hmm. So we will be needing more room. 嗯。所以我们也将需要更大的空间。\nOh, so you don\u0026rsquo;t need something immediately? 呵，所以你们并不是急着马上就要。\nNo. But in five or six months \u0026hellip; 不急。但是在五、六个月后……\nAnd time passes so quickly. 可是时间过得很快。\nYes, it does. 是的，确实如此。\nWell, when you called, you gave me enough information about your salaries and your savings. So I have a good idea about your financial situation. Let me show you some pictures of houses. 嗯，你们打电话来时，已经给了我充分的资料关于薪资和储蓄。所以，我对你们的财务状况很了解。我来给你们看看一些房子的照片。\nWith two bedrooms? 有两间卧室吗？\nYes, I think I can show you some. Of course, they won\u0026rsquo;t be in Riverdale. The cost of housing\u0026rsquo;s too high for you here. 是的，我有一些可以给你们看。当然这些房子不在Riverdale，这里的房子对你们来说太贵了。\nI haven\u0026rsquo;t thought about living anywhere else. We\u0026rsquo;ve always lived in this area. 我还没有考虑要住到别的地方去。我们一直住在这个地区。\nWhere should we look for a house, Mrs. Martinelli? 我们应该到什么地方找房子，Martinelli太太？\nWell, we have an office in Mount Kisco. It\u0026rsquo;s a lovely area, and it\u0026rsquo;s only about an hour\u0026rsquo;s drive from here. Here. I have a book with photos of some homes in that area. 好，我们在Mount Kisco有个办事处。那里是个可爱的地方，而且从此地到那里只有大约一小时的车程。这里。我有一本那个地区房子的照片。\nNow, let\u0026rsquo;s see. Here. This is a lovely two-bedroom house in your price range. 来，我们看看。这个，这一栋可爱房子有两间卧室，在你们价格范围内。\nIt\u0026rsquo;s pretty, but I prefer a two-story home. 是漂亮，但我喜欢两层楼的房子。\nI do, too. I don\u0026rsquo;t care for a ranch type. 我也一样。不爱平房。\nOK. Oh, this is a wonderful house. I know it well. I sold it to the present owners. 好的。啊，这是一栋很好的房子。我非常清楚。是我把它卖给了现在的主人。\nIt looks wonderful. 看起来很好看。\nThis is a two-bedroom, two-bath house. It has a full basement, and it is on a half-acre lot. You can probably afford this one. 这是一栋有两间卧室，两间盥洗室的房子。全面地下室，用地半英亩。你可能负担得起这栋房子。\nI like this house. 我喜欢这栋房子。\nSo do I. And the price is right. 我也喜欢。而且价格也合适。\nWould you like to go see it? 你们要去看看吗？\nYes. We\u0026rsquo;re planning to talk to someone at the bank next week. Perhaps we could see the house this weekend. 是的。我们计划下星期与银行的人谈一谈。也许这周末我们会去看看这栋房子。\nIf someone doesn\u0026rsquo;t buy it before then. But let\u0026rsquo;s keep looking. Just to get an idea of some other possibilities. 如果在此之前没有人买走的话。但让我们继续看下去。瞧瞧其他可能的选择。\nThis is very helpful, Mrs. Martinelli. 这样很有用，Martinelli太太。\nHere. This is a wonderful example of Spanish-style architecture. 这里。这是栋很棒的典型西班牙式建筑。\nOh, I love the roof tiles on a Spanish-style house. It looks like the houses in Hollywood. 噢，我喜欢西班牙式房屋的屋顶瓦。看起来好像是好莱坞的房子。\nIt\u0026rsquo;s interesting. A house like this in Riverdale costs double the price. 很有趣。在Riverdale像这样的房子价格要贵一倍。\nOh my! 啊！\nHere\u0026rsquo;s a real buy. It\u0026rsquo;s a bargain. This house just came on the market. It\u0026rsquo;s quite lovely. 这个价格便宜。真是大廉售。这栋房子刚刚推出要卖。相当好看。\nIs it a two-bedroom house? 是两个卧室的吗？\nNo. It has three bedrooms and three baths. I know the house. It has a brand new kitchen. And a living room with a twelve-foot ceiling. And there\u0026rsquo;s a two-car garage. 不。这栋房子有三间卧室，三间盥洗室。我熟悉这房子，有一个全新的厨房。有一间十二英尺高的客厅。还有一个可放两辆车的车库。\nThen why don\u0026rsquo;t we go look at this house, too? It\u0026rsquo;s a good investment. 那我们何不也去看看这栋房子？这是一项好投资。\nThank you, Mrs. Martinelli. Thanks so much. 谢谢你！Martinelli太太。非常感谢。\nMy pleasure. Give my best to your parents. Your father\u0026rsquo;s a wonderful doctor, Richard. He took care of my daughter when she was a child. He\u0026rsquo;s the best pediatrician in Westchester. 不客气。替我向你父母问好。你父亲是个了不起的医生，Richard。我女儿曾受他照顾在她小时候。他是全Westchester最好的小儿科医师。\nThanks, Mrs. Martinelli. I\u0026rsquo;ll give them your regards. We really appreciate your advice. 谢谢你，Martinelli太太。我会向他们转达你的问候。我们非常感谢你的建议。\nI do think you should go see the houses and talk to the bank. Here. Let me give you some information sheets about the houses. They\u0026rsquo;re both very good buys. 我确实感到你们应该去看看这些房子并且和银行谈一谈。来，我给你们一些关于这些房子的简介。这两栋都是价格便宜的。\nWell, thanks so much for your help and your time, Mrs. Martinelli. We\u0026rsquo;ve got a lot to talk about. 好的，感谢你的帮助，占用了你的时间，Martinelli太太。我们有很多可商量的了。\nMmm-hmm. Thanks. 嗯。谢谢。\nAt the bank: （在银行：）\nHow do you do? 你好！\nHello. I\u0026rsquo;m Ralph Riley. 哈罗！我叫Ralph Riley。\nI\u0026rsquo;m Richard Stewart, and this is my wife, Marilyn. 我叫Richard Stewart，这是我妻子，Marilyn。\nPleased to meet you. 很高兴与你见面。\nLikewise, Mr. Riley. 我们也一样，Riley先生。\nPlease, sit down. What can I do for you? 请坐下。我能为你们做什么呢？\nWe\u0026rsquo;d like to discuss a mortgage. For a house. 我们想请教一下贷款的事。为了房子。\nFine. Are you buying a house or are you refinancing your present home? 好的。你们是要买房子呢，还是原有的房子重新申请贷款？\nWe\u0026rsquo;re planning to buy a house. And we\u0026rsquo;d like to find out about a mortgage. We are customers of the bank. As a matter of fact, my whole family banks here. 我们计划买一栋房子。我们想知道如何贷款。我们是贵行的顾客。事实上，我们全家都是贵行的顾客。\nI have some questions to ask. Do you own your house or do you rent? 我有一些问题要问。你们自己有房子还是租房子？\nNeither. We live with my parents, Dr. and Mrs. Philip Stewart. 都不是。我们和父母住在一起，我父母是Philip Stewart夫妇。\nAnd how old are you? 你几岁了？\nI\u0026rsquo;m twenty-nine. 我二十九岁。\nI\u0026rsquo;m thirty. 我三十岁。\nAnd, Mr. Stewart, what is your occupation? 那么，Stewart先生，你的职业呢？\nI\u0026rsquo;m a freelance photographer. 我是自由摄影师。\nAnd, Mrs. Stewart, are you working? 嗯，Stewart太太，你有工作吗？\nYes. I\u0026rsquo;m a designer, and I work in a boutique. 是的，我是位设计师，我在一家服装店工作。\nDid you bring any savings or salary information? Last year\u0026rsquo;s tax forms? 你是否带来储蓄和薪资的相关资料？譬如去年的纳税申报表格？\nYes. Here they are. 带来了，在这里。\nOK. What \u0026hellip; what kind of house did you have in mind? 好的，你们打算买什么样的房子？\nWe\u0026rsquo;re talking about buying a two-bedroom house in Mount Kisco. Here are the financial details on the house. 我们在商量购买一栋有两间卧室的房子，在Mount Kisco。这是这房子的财务细节。\nThank you. Are you prepared to make a ten-percent down payment? 谢谢你。你打算缴纳10%做为自备款吗？\nYes, we are. 是的，我们准备如此。\nPayments over thirty years? 三十年分期付款吗？\nYes. 是的。\nDo you think we can get a loan? 你觉得我们能得到贷款吗？\nWell, it depends. Do you own any other property? Any stocks or bonds? 嗯，这还要看情况。你们拥有其他什么财产吗？有股票或债券吗？\nNo. 没有。\nI see. Then you don\u0026rsquo;t have any collateral. 我明白了。那么你们没有任何担保物。\nPerhaps you could get a guarantor\u0026ndash;someone to sign for the loan for you. 也许你可以找一位担保人，找个人为你们的贷款签个名。\nWhy is that necessary? 为什么有此必要？\nSince you don\u0026rsquo;t have enough income, and you don\u0026rsquo;t already own any property, the bank needs to be sure you can pay the mortgage every month. A guarantor is responsible for the loan if you can\u0026rsquo;t make the payments. 由于你们的收入不够，而你们又没有拥有其他财产，银行需要确定你们能每月按时付款。担保人要对贷款负责，如果你们不能还钱。\nI see. Well, the idea of buying a house is exciting. Thank you, Mr. Riley. We\u0026rsquo;ll read this over carefully. 我明白了。嗯，买房子的念头叫人兴奋过头。谢谢你，Riley先生。我们会仔细阅读这些。\nThank you. 谢谢。\nGood-bye. Thanks. 再见。谢谢。\nGood-bye. And hope to see you soon. 再见。希望很快再见到你们。\nI hope so, too. Take care. 我也希望如此。慢走。\nGood-bye. 再见。\nBack home, discussing with Ellen: （回家后与Ellen讨论：）\nIt all sounded so easy until they mentioned needing collateral or a guarantor. 一切听起来都那么容易，在他们提到担保物或担保人之前。\nWe have no collateral. And I don\u0026rsquo;t think it\u0026rsquo;s a good idea to ask Dad to sign as a guarantor. I don\u0026rsquo;t feel right about it. 我们没有担保物。而且我觉得这不是个好主意，请爸爸当担保人为我签字。我觉得这样不对。\nI understand your feelings about it, Richard. 我了解你对这种事的心情，Richard。\nNow, tell me, what\u0026rsquo;s the problem? 啊，告诉我，有什么问题？\nWe can get a loan from the bank if we can put up some collateral. And we don\u0026rsquo;t own anything to use as collateral. Or someone can sign with us as a guarantor. 我们能够从银行得到贷款，如果我们能提供担保物的话。可是我们没有任何可以做担保物的东西。或者有人能当担保人帮我们签字。\nWhy don\u0026rsquo;t you speak to Dad? 你们为什么不跟爸爸说说看？\nNo. If we buy a house, I want to be able to handle it alone. 不，如果我们买房子，我希望能够自行负责。\nEverybody needs help sometimes, Richard. 每个人都有需要帮助的时候，Richard。\nI understand Richard\u0026rsquo;s feelings about it, Ellen. In two or three months, I\u0026rsquo;ll have an advance on my book and be able to put more money down. 我了解Richard对此的感受，Ellen。两到三个月后，我能得到我那本书的预付款，也就可以增加自备款的额度。\nWhat about the house in Mount Kisco? 在Mount Kisco的房子呢？\nSomebody else\u0026rsquo;ll buy it by then. 别人也许买走了。\nThen there\u0026rsquo;ll be other houses, Marilyn. Richard has a point. You\u0026rsquo;re just beginning to look. We\u0026rsquo;re in no great rush. It\u0026rsquo;s true. 还会有别的房子，Marilyn。Richard说得对。你们只是开始看房子而已。我们并不很急，这是真的。\nThis has been a great learning experience for us, Marilyn. Talking to the real-estate agent. Looking at the houses. Talking to the loan officer at the bank. It has been a learning experience. That\u0026rsquo;s true. 这对我们是一次很好的学习经验，Marilyn。与房地产仲介商谈，看房子，与银行的贷款负责人谈。这真是一次学习经验，真的。\nI think you\u0026rsquo;re doing the right thing. Taking your time. Looking around. Especially with a purchase of this kind. You\u0026rsquo;re talking about a lot of money. 我觉得你们做得对。慢慢来，到处看看，特别是这一类买卖。你们谈的可是一大笔钱。\nWe\u0026rsquo;ll call Mrs. Martinelli and tell her to keep looking for us. And I\u0026rsquo;ll call Mr. Riley at the bank and tell him we\u0026rsquo;ll see him in a couple of months. 我们会打电话给Martinelli太太告诉她继续帮我们物色房子。我打电话到银行给Riley先生，告诉他过几个月我们再去找他。\nAnd if you ever need Dad or me to help you \u0026hellip; 如果你们的确需要我和爸爸的帮助的话，……\nWe know. You know we\u0026rsquo;ll be there for you. It\u0026rsquo;s a Stewart tradition. We\u0026rsquo;re a family. 我们知道。你们知道我们是会伸出援手的。这是Stewart家的传统。我们是一家人。\n重难点分析 \u0026ldquo;I\u0026rsquo;d like your opinion.\u0026rdquo; — 礼貌地征求对方意见。 \u0026ldquo;at this point in our lives\u0026rdquo; — 表示\u0026quot;在我们人生的这个阶段\u0026quot;。 \u0026ldquo;History repeats itself.\u0026rdquo; — 谚语，意为\u0026quot;历史重演\u0026quot;。 \u0026ldquo;real-estate section\u0026rdquo; — 报纸的房地产版块。 \u0026ldquo;real-estate agent\u0026rdquo; — 房地产经纪人/中介。 \u0026ldquo;mortgage\u0026rdquo; — 按揭贷款，购房贷款的核心术语。 \u0026ldquo;As a matter of fact\u0026rdquo; — 固定表达，意为\u0026quot;事实上\u0026quot;。 \u0026ldquo;You won\u0026rsquo;t believe this\u0026rdquo; — 引出令人惊讶的信息。 \u0026ldquo;the minute he comes home\u0026rdquo; — 表示\u0026quot;他一回家就……\u0026quot;，the minute 相当于 as soon as。 \u0026ldquo;in your price range\u0026rdquo; — 在你能承受的价格范围内。 \u0026ldquo;I don\u0026rsquo;t care for\u0026hellip;\u0026rdquo; — 表示\u0026quot;我不喜欢……\u0026quot;。 \u0026ldquo;a real buy\u0026rdquo; / \u0026ldquo;a bargain\u0026rdquo; — 表示\u0026quot;划算的买卖/便宜货\u0026quot;。 \u0026ldquo;came on the market\u0026rdquo; — 表示\u0026quot;上市/开始出售\u0026quot;。 \u0026ldquo;down payment\u0026rdquo; — 首付/自备款。 \u0026ldquo;collateral\u0026rdquo; — 抵押品/担保物。 \u0026ldquo;guarantor\u0026rdquo; — 担保人/保证人。 \u0026ldquo;have a point\u0026rdquo; — 表示\u0026quot;说得有道理\u0026quot;。 \u0026ldquo;in no great rush\u0026rdquo; — 表示\u0026quot;不着急\u0026quot;。 核心词汇 词汇 音标 释义 opinion /əˈpɪnjən/ 意见，看法 pregnant /ˈpreɡnənt/ 怀孕的 independent /ˌɪndɪˈpendənt/ 独立的 stubborn /ˈstʌbərn/ 固执的 afford /əˈfɔːrd/ 负担得起 mortgage /ˈmɔːrɡɪdʒ/ 按揭贷款 real-estate /ˈriːl ɪˈsteɪt/ 房地产 agent /ˈeɪdʒənt/ 代理人，中介 salary /ˈsæləri/ 薪资 savings /ˈseɪvɪŋz/ 储蓄 financial /faɪˈnænʃl/ 财务的 collateral /kəˈlætərəl/ 抵押品，担保物 guarantor /ˌɡærənˈtɔːr/ 担保人，保证人 investment /ɪnˈvestmənt/ 投资 property /ˈprɑːpərti/ 财产，房产 freelance /ˈfriːlæns/ 自由职业的 boutique /buːˈtiːk/ 精品店 口语中的应用 \u0026ldquo;I\u0026rsquo;d like your opinion.\u0026rdquo; — 礼貌地请求建议或意见。 \u0026ldquo;Sounds like Richard.\u0026rdquo; — 表示\u0026quot;听起来像Richard（的作风）\u0026quot;。 \u0026ldquo;You won\u0026rsquo;t believe this\u0026rdquo; — 引出令人惊讶的消息。 \u0026ldquo;I don\u0026rsquo;t care for\u0026hellip;\u0026rdquo; — 委婉表达不喜欢。 \u0026ldquo;It depends.\u0026rdquo; — 表示\u0026quot;看情况而定\u0026quot;。 \u0026ldquo;Take your time.\u0026rdquo; — 表示\u0026quot;慢慢来，不着急\u0026quot;。 \u0026ldquo;We\u0026rsquo;re a family.\u0026rdquo; — 强调家庭团结和支持。 \u0026ldquo;We\u0026rsquo;ll be there for you.\u0026rdquo; — 表示\u0026quot;我们会支持你\u0026quot;。 核心练习句型 征求对方意见：\nI\u0026rsquo;d like your opinion. What do you think about\u0026hellip;? 表达\u0026quot;买不起/负担得起\u0026quot;：\nWe couldn\u0026rsquo;t afford it. We can afford this one. 表达\u0026quot;喜欢/不喜欢\u0026quot;：\nI prefer a two-story home. I don\u0026rsquo;t care for a ranch type. 询问职业和收入：\nWhat is your occupation? Are you working? 银行贷款相关表达：\nWe\u0026rsquo;d like to discuss a mortgage. Are you prepared to make a ten-percent down payment? Do you have any collateral? 表达\u0026quot;有道理\u0026quot;：\nRichard has a point. That\u0026rsquo;s a good point. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-11/","summary":"\u003ch2 id=\"课文原文双语\"\u003e课文原文（双语）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eEllen, I\u0026rsquo;d like your opinion.\u003c/strong\u003e\nEllen，我想听听你的意见。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAbout what?\u003c/strong\u003e\n关于什么？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWell, Richard and I feel that with a baby coming we need to have our own place to live.\u003c/strong\u003e\n嗯，Richard和我觉得孩子快要出生了，我们应该有自己的房子。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eOh.\u003c/strong\u003e\n噢。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWell, what do you think about Richard and me looking for a small house or an apartment at this point in our lives?\u003c/strong\u003e\n那么，你觉得我和Richard找一个小住宅或公寓在这个时候怎么样？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWe love having you here, and there is room, and \u0026hellip; and when the baby comes, the baby can stay in your room for a while.\u003c/strong\u003e\n我们喜欢你们住这里，这里有地方，而且……而且婴儿出生以后，可以住在你们房间一段时间。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第11课：A Place of Our Own（自己的家）"},{"content":"课文原文（双语） Is that you, Susan? 是你吗，Susan？\nIt\u0026rsquo;s me, Grandpa. 是我，爷爷。\nAm I glad to see you! 我看到你真的很高兴！\nAnd am I glad to see you! 我看见你才高兴呢！\nI am also glad to be here. 我很高兴来这里。\nHow are things? 近况如何？\nI have been talking to a group of salesmen since ten this morning, and I\u0026rsquo;m real exhausted. 我一直在与一群推销人员谈话，从今天上午十点起，我实在是精疲力竭了。\nWell, you look good. 嗯，你看起来蛮好的。\nWhat\u0026rsquo;s Harry doing tonight? Harry今晚做什么？\nHe and Michelle are visiting relatives in New Jersey today. 他和Michelle今天去New Jersey拜访亲戚去了。\nThe rest of our family went to the movies. 我们家里其余的人都去看电影了。\nSo it\u0026rsquo;s just you and me, Susan. 所以，这里只有你和我，Susan。\nIt\u0026rsquo;s nice to be alone with you, Grandpa. We don\u0026rsquo;t get to see enough of each other. 很高兴单独与你在一起，爷爷。我们在一起的时间太少了。\nOh, I feel the same way, Susan. I miss seeing you. 噢，我也有同样的感受，Susan。我很想见到你。\nBut to tell the truth, next time I\u0026rsquo;d like to go into the city and meet you there, instead of you coming here. 但是，老实说，下一次我想到城里看你，而不是你到这里来。\nYou don\u0026rsquo;t need to do that, Grandpa. 你不用这样，爷爷。\nYeah, I do. I need to get out more. 不，我要这样。我需要多出门去。\nWell, I mean there\u0026rsquo;s a lot to do around the house, and I love being here with the family, you know, but I\u0026rsquo;m restless. 我的意思是这屋里有很多事可做，而我也喜欢和家人在一起，你知道的，但我闲不住。\nSince I retired, I\u0026rsquo;ve got extra time on my hands. 自从我退休以后，我有过多空闲时间。\nI understand, Grandpa. 我能体会，爷爷。\nI think you do. Frankly, I\u0026rsquo;d like to use my brain a little more. 我想你能体会。坦白地说，我想多用用我的脑子。\nGrandpa, you have so much energy and so many years of experience. There are probably a lot of places for you to work. Particularly in the construction field. 爷爷，你精力这么好，又有这么多年的经验。也许有很多地方可以让你去工作。特别是在营造界。\nBut at my age, I\u0026rsquo;m not looking for a full-time job. I\u0026rsquo;m retired. But I\u0026rsquo;m bored. 但是，像我这般年纪，我不会去找一个上全天班的工作。我退休了。但我感到无聊。\nWell, there must be something. Maybe I can help. 嗯，一定可以找到事做。也许我能帮忙。\nLet\u0026rsquo;s go into the kitchen, and maybe you can help me set the table. 我们到厨房去，也许你能帮我摆桌子。\nSounds good to me. What are we having? 我来。我们吃些什么？\nI prepared lamb chops, mashed potatoes, and a tossed green salad to begin with. 我准备了羊肉，马铃薯泥，还有蔬菜沙拉当头道菜。\nGrandpa, you are a terrific guy! You\u0026rsquo;re still thinking about something to do, aren\u0026rsquo;t you? A job of some kind. 爷爷，你真了不起！你还在想要找点事做，是吗？找点工作。\nThat\u0026rsquo;s right. I\u0026rsquo;ve been thinking about it for weeks now. There must be some way to put my mind to good use. 是的。为这事我想了几个星期。总会有办法让我发挥才智。\nWe\u0026rsquo;ll find a solution. A positive solution to your finding a way to use that wonderful mind of yours. 我们会找到解决的办法。一个好法子，能够让你施展你的学识。\nSusan talks to her assistant Sam: （Susan与助手Sam交谈：）\nSam, would you come in, please? Sam，请进来一下，好吗？\nYou sound like something\u0026rsquo;s bothering you, Susan. 听起来好像你有什么心事，Susan？\nThe sketches for the cover of the new doll book? 是新玩具书的封面设计吗？\nThat\u0026rsquo;s not it. Please sit down. 不是这种事，请坐下。\nSure. 好的。\nI need your advice on a personal matter, but it\u0026rsquo;s not about me. 我有件私事，需要听听你的高见，但这不是关于我自己的事。\nYou need my advice on a personal matter, and it\u0026rsquo;s not about you. OK. 你有私事需要听我的意见，而且不是关于你自己的。好吧。\nIt\u0026rsquo;s about my grandfather. 是关于我爷爷。\nWhat\u0026rsquo;s the problem? 什么事？\nIt won\u0026rsquo;t sound like a big deal, but it is. I had dinner with him Saturday, and he\u0026rsquo;s very unhappy about not working. 这事听起来没啥严重，但实际上很要紧。星期六我与他一起吃晚餐，他对没有工作感到怏怏不乐。\nI thought he was retired and pleased to be living with the family. 我原以为他退休了，乐于跟家人住在一起。\nHe is, but there\u0026rsquo;s so much energy and talent in the man, and he doesn\u0026rsquo;t get to use it. 没有错，但是他有那么多的精力和才能，却又用不上。\nBut what can I do? What kind of advice are you looking for? 但我能帮什么忙？你希望能得到什么建议？\nSimply this. John Marchetta runs this company. He founded this company. 简单说来是这样的。John Marchetta经营这家公司。他创办了这家公司。\nRight. 对。\nJohn Marchetta gave me my start here six years ago, when I first graduated from college. He gave me the chance to use my talents and made me feel more confident. 六年前，John Marchetta让我在这里起步，那时我刚从大学毕业。他提供给我施展才能的机会，使我对自己更加有信心。\nRight. 是的。\nMaybe he can do the same thing for your grandfather. Or at least give him some advice. 也许他能为你爷爷做同样的事。再不然至少可以给他一些忠告。\nRight. 对。\nThen I\u0026rsquo;ve solved your problem. 说来我替你解决问题了。\nI can always depend on you, Sam. 我知道我可以依靠你，Sam。\nI\u0026rsquo;m glad to help. Shall I call Mr. Marchetta for you? 我很乐意帮忙。要我替你打电话给Marchetta先生吗？\nNo, no. I\u0026rsquo;ll do that. Thanks. 不，不。我自己来，谢谢你。\nSusan meets with Mr. Marchetta: （Susan与Marchetta先生会面：）\nNow, how\u0026rsquo;s the Stewart family? 那么，Stewart全家人都好吗？\nFine, thank you, Mr. Marchetta. Except for my grandfather. 都好，谢谢你，Marchetta先生。除了我爷爷。\nWhat\u0026rsquo;s wrong, Susan? What\u0026rsquo;s wrong with him? 怎么啦，Susan？他怎么啦？\nHe needs to work. In fact, that is the reason why I\u0026rsquo;m here to see you. I know you\u0026rsquo;re building a new factory, and I thought \u0026hellip; maybe \u0026hellip; my grandfather is so experienced in the construction trade, he could be so valuable. 他需要工作。事实上，这是我来见你的原因。我知道你在兴建一座新工厂，我觉得……也许……我爷爷在营造这一行业经验丰富，他或许能够有所用。\nTell him to come and see me at ten o\u0026rsquo;clock tomorrow morning. I have an idea that may solve the problem for him and help a lot of other people. 告诉他来见我，明天上午十点钟。我有个主意，也许能解决这个问题，并且对其他很多人有益。\nReally, Mr. Marchetta? Can I tell him that? 真的吗，Marchetta先生？我可以把这消息告诉他吗？\nSure can. Ten o\u0026rsquo;clock in the morning. Here. 当然可以。上午十点，在这里。\nOh, thank you! 噢，谢谢你！\nGrandpa meets Mr. Marchetta: （爷爷与Marchetta先生会面：）\nHi. I\u0026rsquo;m Malcolm Stewart. 嗨。我是Malcolm Stewart。\nJohn Marchetta. Sit down, sit down. Susan has told me a great deal about you. She says you\u0026rsquo;re quite a man. 我是John Marchetta。请坐，请坐。Susan告诉我许多关于你的事。她说你是个了不起的人。\nShe says a lot of wonderful things about you too, Mr. Stewart. 她也谈起不少你的非凡作为，Stewart先生。\nThat\u0026rsquo;s always nice to hear, Mr. Marchetta. 听到这事总是好的，Marchetta先生。\nCall me John. May I call you Malcolm? 叫我John。我能称你Malcolm吗？\nLet\u0026rsquo;s talk business. 我们来谈谈正经事。\nThat\u0026rsquo;s music to my ears. 正合我意。\nI understand you used to be in the construction business. 听说你过去在营造界工作。\nYup. Forty-three years. 是的，四十三年。\nHere\u0026rsquo;s a brief description of forty-three years of on-the-job training. 这是一份简单的记录，关于我四十三年的工作经历。\nThat is some history! You\u0026rsquo;re a valuable asset, Malcolm. Very valuable. 这阅历了不得！你是很有价值的资产，Malcolm，很有价值。\nThank you. Yup. Forty-three years. Half that time in my own construction company. Big jobs\u0026ndash;factories, shopping malls. That kind of thing. 谢谢你。是的。四十三年，一半时间是在我自己的营造公司。大的工程——工厂、大型购物中心等等。\nThen you retired. 然后你退休了。\nYes. After my wife died, and I felt I should spend more time with my children and grandchildren. I lived in Florida, and they lived in New York. 是的。我妻子去世后，我觉得应该多花些时间与儿子、孙子们在一起。我住在Florida，而他们住在纽约。\nI understand. My daughter Cami lives in New York. I like being near her. 我了解。我女儿Cami住在纽约。我喜欢离她近一点。\nWhen I came here, I planned to take a few months off. Relax with the family and then look for some work. Put my experience on the line \u0026hellip; but, unfortunately, there isn\u0026rsquo;t any work for a retired person my age. 当我初到这里，我计划休息几个月。与家人轻松一段时间，然后找个工作。考验考验我的阅历……但是，很不幸，没有我这种年纪的退休老人的工作。\nSometimes there is, and sometimes there isn\u0026rsquo;t. Well, I\u0026rsquo;m involved with an organization, and we\u0026rsquo;re trying to resolve that problem. 有时候有，有时候没有。嗯，我参加一个组织，试图解决这类问题。\nWhat\u0026rsquo;s that? 什么组织？\nTOPS. T-O-P-S\u0026ndash;means Talented Older People\u0026rsquo;s Society. TOPS。T-O-P-S全名是优秀老人协会。\nI\u0026rsquo;d like to be a member. How much are the dues? 我想加入做为会员。会费多少？\nThere are no dues. The organization serves major companies in this city. 不要会费。这个组织为本市各大公司服务。\nWhy? 为什么？\nBecause our members are men and women like you. Experienced, talented, retired. But our members want to go out there and use their talents. They want to work. 因为，这个组织的会员都是像你这样的人。有经验，有才能，退休了。但会员们希望在社会上贡献他们的才能。他们想工作。\nThat is fantastic, John! 那太好了，John！\nI\u0026rsquo;ve got an idea for you, Malcolm. Just fill out this form for me. It\u0026rsquo;ll only take a few minutes. Sit right here, and do it while I talk to my secretary. When I get back, we\u0026rsquo;ll talk about my new factory. 我倒替你想出了一个主意，Malcolm。请把这份表填好。只要几分钟时间。就坐在这里填，我去和秘书说个话。我回来后，我们谈一谈我的新工厂。\nMy company is a member of TOPS. So I try hard to find opportunities for people like you, Malcolm. And when I see an opportunity, I can act on it. 我的公司也是优秀老人协会的会员，所以我努力为像你这样的人寻找机会，Malcolm。而且当我一看到机会，我就可以处理。\nWell, I can use your brainpower on the job right now. Have you got time this morning to go over to the construction site with me? I\u0026rsquo;d like to have you meet my foreman\u0026ndash;get some background on the job. 嗯，我马上可以将你的才智用在这项工程上。今天上午你有时间去看一看建筑工地吗？我希望带你去认识工头——了解这项工程的一些背景。\nI\u0026rsquo;ve got plenty of time. 我有的是时间。\nI\u0026rsquo;ll be right back. We\u0026rsquo;ll go over to the job site together. 我马上就回来。我们等一会儿一起去工地。\nMalcolm, you worked on the Spaceport project? Malcolm，你曾负责\u0026quot;太空港\u0026quot;的案子？\nMy company was the contractor. I built the theater there with my own two hands, practically. 我的公司承包了这项工程。我建造这个剧院，差不多是独自完成的。\nI understand. 我明白了。\nWell, I\u0026rsquo;m glad to see you two guys getting along so well because, Danny, Malcolm is on the TOPS team. He\u0026rsquo;s going to be working with you for a while. His experience will be valuable to both of us. 好的，看到你们两位相处得这么好我很高兴，因为Danny，Malcolm是TOPS的一员。他将与你一起工作一段时间。他的经验对你我都很有用。\nWelcome aboard, Malcolm! 欢迎加入，Malcolm！\nI\u0026rsquo;m going back to my office. Give me a call later, Malcolm. I\u0026rsquo;ll tell you the time and date of the next TOPS meeting. I\u0026rsquo;d like you to meet the group. 我要回办公室了。请稍后打电话给我，Malcolm。我要告诉你TOPS下次聚会的时间。我希望你能与协会的成员见面。\nI will, John. And again\u0026ndash;thanks. 我会的，John。再次谢谢你。\nNo \u0026hellip; thank you. And thank Susan. 不……谢谢你。还要谢谢Susan。\nHe\u0026rsquo;s quite a man. A real inspiration for me. 他是个了不起的人。他给我很大的启发。\nOK, Danny. I know you didn\u0026rsquo;t expect to have me around, but I think I can be of some help to you. 好啦，Danny。我知道你没有预期我出现在你身边，但我觉得我可以对你略有帮助。\nLet me tell you something, Malcolm. With your background and experience, I can learn something \u0026hellip; and I do need some advice on a difficult problem. Let me show you this. 我跟你说，Malcolm。依你的背景和经验，我能学到一些东西……我的确有一个难题要请教你。我给你看看这个。\nI don\u0026rsquo;t want to give you a final opinion without studying these building plans more carefully. But a simple solution might be to move the air-conditioning units instead of redesigning the entire system. It might be simpler and less expensive. 我不想给你总结的意见，在没有仔细研究这些建筑图的情况下。但是，一个简单的解决办法可能是移动空调设备，而不必重新设计整套系统。这样可能比较简单而且省钱。\nYou just earned your weight in gold, Malcolm. Welcome aboard! 你可帮了大忙，Malcolm。欢迎加入我们的行列！\nIt all happened so quickly! I can\u0026rsquo;t believe it! 这一切发生得太快了！我简直不敢相信！\nI\u0026rsquo;m glad Mr. Marchetta was so helpful. He was more than helpful. He actually took me to meet his foreman. 我真高兴，Marchetta先生如此帮忙。他不仅仅是帮忙。事实上他带着我去见他的工头。\nI\u0026rsquo;m thrilled for you, Grandpa. I don\u0026rsquo;t know how to thank you, Susan. You\u0026rsquo;re a wonderful granddaughter. 我真为你兴奋，爷爷。我不知道如何谢你，Susan。你真是个好孙女。\nIt\u0026rsquo;s good to see you so happy. 能看见你如此高兴，太好了。\nI\u0026rsquo;ll be at the construction site tomorrow. What are you doing tomorrow night? 明天我要去工地，你明天晚上做什么？\nI\u0026rsquo;m not doing anything. Why? 我没有要做什么。怎样？\nHow about a date with your grandfather? I owe you a good steak dinner. 和你爷爷约个会好吗？我欠你一顿牛排晚餐。\nI\u0026rsquo;ll accept. Tomorrow night. You and me. Dinner. What time? 我接受邀请。明天晚上。你和我。吃晚饭。什么时候？\nI\u0026rsquo;ll pick you up here at seven. Is that OK? 我七点钟到这里来接你。可以吗？\nI can\u0026rsquo;t wait! And you can tell me all about your first full day back on the job. 我盼望着那个时候！到时候你就可以告诉我关于你重回工作第一天的全部情况了。\nIt\u0026rsquo;s a deal! 就这么约定！\n重难点分析 \u0026ldquo;Am I glad to see you!\u0026rdquo; — 倒装强调结构，比\u0026quot;I\u0026rsquo;m glad to see you\u0026quot;语气强烈得多，表示\u0026quot;我真是太高兴见到你了！\u0026quot; \u0026ldquo;How are things?\u0026rdquo; — 问候语，相当于\u0026quot;How are you?\u0026ldquo;或\u0026quot;How\u0026rsquo;s everything?\u0026quot;。 \u0026ldquo;I\u0026rsquo;m real exhausted.\u0026rdquo; — real 在口语中可作副词，相当于 really。 \u0026ldquo;to tell the truth\u0026rdquo; — 固定表达，意为\u0026quot;老实说/说实话\u0026rdquo;。 \u0026ldquo;I\u0026rsquo;ve got extra time on my hands.\u0026rdquo; — 表示\u0026quot;我手头有太多空闲时间\u0026quot;。 \u0026ldquo;put my mind to good use\u0026rdquo; — 表示\u0026quot;好好利用我的才智\u0026quot;。 \u0026ldquo;Sounds good to me.\u0026rdquo; — 表示\u0026quot;听起来不错/我没问题\u0026quot;。 \u0026ldquo;It won\u0026rsquo;t sound like a big deal, but it is.\u0026rdquo; — 固定表达 a big deal 表示\u0026quot;大事/了不起的事\u0026quot;。 \u0026ldquo;That\u0026rsquo;s music to my ears.\u0026rdquo; — 习语，字面义\u0026quot;那是我耳朵的音乐\u0026quot;，引申义\u0026quot;正合我意/太好了\u0026quot;。 \u0026ldquo;That is some history!\u0026rdquo; — some 在此表示\u0026quot;了不起的/不得了的\u0026quot;。 \u0026ldquo;You just earned your weight in gold.\u0026rdquo; — 习语，表示\u0026quot;你帮了大忙/你非常有价值\u0026quot;。 \u0026ldquo;Welcome aboard!\u0026rdquo; — 表示\u0026quot;欢迎加入！\u0026quot;，常用于新员工入职。 \u0026ldquo;It\u0026rsquo;s a deal!\u0026rdquo; — 表示\u0026quot;一言为定！\u0026quot;。 核心词汇 词汇 音标 释义 exhausted /ɪɡˈzɔːstɪd/ 精疲力竭的 restless /ˈrestləs/ 闲不住的，不安分的 retired /rɪˈtaɪərd/ 退休的 bored /bɔːrd/ 无聊的 energy /ˈenərdʒi/ 精力，能量 experience /ɪkˈspɪriəns/ 经验 construction /kənˈstrʌkʃn/ 建筑，营造 talent /ˈtælənt/ 才能，天赋 confident /ˈkɑːnfɪdənt/ 自信的 opportunity /ˌɑːpərˈtuːnəti/ 机会 organization /ˌɔːrɡənəˈzeɪʃn/ 组织，机构 foreman /ˈfɔːrmən/ 工头，领班 contractor /ˈkɑːntræktər/ 承包商 solution /səˈluːʃn/ 解决方案 inspiration /ˌɪnspəˈreɪʃn/ 启发，灵感 asset /ˈæset/ 资产，宝贵的人/物 口语中的应用 \u0026ldquo;Am I glad to see you!\u0026rdquo; — 强调式表达强烈情感。 \u0026ldquo;How are things?\u0026rdquo; — 日常问候，比\u0026quot;How are you?\u0026ldquo;更随意。 \u0026ldquo;Sounds good to me.\u0026rdquo; — 表示同意或接受建议。 \u0026ldquo;That\u0026rsquo;s music to my ears.\u0026rdquo; — 听到好消息时的地道表达。 \u0026ldquo;Let\u0026rsquo;s talk business.\u0026rdquo; — 表示\u0026quot;我们谈正事吧\u0026rdquo;。 \u0026ldquo;Welcome aboard!\u0026rdquo; — 欢迎新成员加入团队。 \u0026ldquo;It\u0026rsquo;s a deal!\u0026rdquo; — 确认约定或交易。 \u0026ldquo;I can\u0026rsquo;t wait!\u0026rdquo; — 表示迫不及待。 核心练习句型 表达\u0026quot;说实话\u0026quot;：\nTo tell the truth, I\u0026rsquo;d like to go into the city. Frankly, I\u0026rsquo;d like to use my brain more. 表达\u0026quot;需要建议\u0026quot;：\nI need your advice on a personal matter. What kind of advice are you looking for? 表达\u0026quot;依靠某人\u0026quot;：\nI can always depend on you. I can count on you. 表达\u0026quot;解决问题\u0026quot;：\nWe\u0026rsquo;ll find a solution. Let me try to work something out. 表达\u0026quot;约时间\u0026quot;：\nTell him to come and see me at ten o\u0026rsquo;clock. How about a date with your grandfather? 表达\u0026quot;一言为定\u0026quot;：\nIt\u0026rsquo;s a deal! ","permalink":"/posts/2026-06-14-family-album-usa-lesson-12/","summary":"\u003ch2 id=\"课文原文双语\"\u003e课文原文（双语）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eIs that you, Susan?\u003c/strong\u003e\n是你吗，Susan？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eIt\u0026rsquo;s me, Grandpa.\u003c/strong\u003e\n是我，爷爷。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAm I glad to see you!\u003c/strong\u003e\n我看到你真的很高兴！\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAnd am I glad to see you!\u003c/strong\u003e\n我看见你才高兴呢！\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI am also glad to be here.\u003c/strong\u003e\n我很高兴来这里。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHow are things?\u003c/strong\u003e\n近况如何？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI have been talking to a group of salesmen since ten this morning, and I\u0026rsquo;m real exhausted.\u003c/strong\u003e\n我一直在与一群推销人员谈话，从今天上午十点起，我实在是精疲力竭了。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWell, you look good.\u003c/strong\u003e\n嗯，你看起来蛮好的。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWhat\u0026rsquo;s Harry doing tonight?\u003c/strong\u003e\nHarry今晚做什么？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHe and Michelle are visiting relatives in New Jersey today.\u003c/strong\u003e\n他和Michelle今天去New Jersey拜访亲戚去了。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第12课：Grandpa's New Job（爷爷的新工作）"},{"content":"课文原文（双语） There\u0026rsquo;s nothing more joyous than the arrival of a new baby. 没有任何事能比新生儿的到来更令人喜悦的了。\nI am so excited. Mother! 我好兴奋，妈妈！\nJust imagine\u0026ndash;Marilyn and Richard must be thrilled! 想像得出——Marilyn和Richard一定乐坏了！\nOh, a new baby! 噢，一个新生儿！\nMax \u0026hellip; Max \u0026hellip; Max. Max……Max……Max。\nOh, it\u0026rsquo;s a sweet-sounding name for a sweet little boy. 噢，好一个甜美悦耳的名字，配个甜美的小孩。\nMy first grandchild. 我的第一个孙子。\nAnd my first nephew. 我的第一个侄子。\nIsn\u0026rsquo;t he just adorable? 他真是太可爱了！\nHe looks a lot like you, Mom. He does. 他像你，妈妈。他像你。\nDo you think so? Well, I guess. He does look a lot like Richard, and I guess he looks a lot like me. 你真的这么认为？嗯，有点像。他确实很像Richard，我看也蛮像我。\nOh, he\u0026rsquo;s got Richard\u0026rsquo;s eyes, though. 噢，他的眼睛跟Richard的像极了。\nI really want Harry and Michelle to see Max. When are they coming? 我真希望Harry和Michelle来看看Max。他们什么时候来？\nTomorrow. Harry has an account to work on today. 明天。Harry今天有项会计工作要做。\nYes, he does have Richard\u0026rsquo;s eyes. Big blue eyes. The baby even looks at you like Richard does. 是的，他的眼睛很像Richard。蓝色大眼睛。这婴儿看你的时候也像Richard那样。\nWell, children usually resemble their parents. 嗯，孩子总是像父母的。\nIt\u0026rsquo;s true. Michelle is a lot like Harry in so many ways. And she\u0026rsquo;s shy with new people, just like he is. 对。Michelle在许多方面很像Harry。她见了生人就害羞，与他一样。\nYou really like Michelle, don\u0026rsquo;t you? 你的确很喜欢Michelle，是吗？\nYes. I\u0026rsquo;m very fond of her. 是的。我很喜欢她。\nAnd Harry, too? 也喜欢Harry，是吗？\nWell \u0026hellip; Uh, it\u0026rsquo;s four-thirty. Oh my! Marilyn and Richard will be home from the hospital any minute, and we must prepare this room. 嗯……啊，已经四点半了。啊，天啦！Marilyn和Richard随时都会从医院回来，我们得收拾好房间。\nWhere will we put all the presents? 我们把这些礼物放在哪里？\nWell, let\u0026rsquo;s take everything to the living room. Marilyn and Richard and the baby need the space. It\u0026rsquo;s crowded in here. 嗯，我们把东西都放到客厅去。Marilyn和Richard还有婴儿需要空间。这里太挤了。\nThe welcome sign is up: \u0026ldquo;Welcome home, Max.\u0026rdquo; 欢迎的标语已经弄好了：\u0026ldquo;欢迎你回家来，Max\u0026rdquo;。\nIsn\u0026rsquo;t it exciting, Grandpa? Your first great-grandchild. 真令人兴奋，是吗，爷爷？你的第一个曾孙。\nYes. Yes, sir. A great-grandchild. A great-grandson. Another generation to carry on the Stewart name. 是的。是的。一个曾孙。一个曾孙。这是承继Stewart家族香火的新一代。\nI love you, Grandpa. You make me feel so proud to be part of our family. 我爱你，爷爷。你让我以成为我们家庭的一员而自豪。\nOne day, you\u0026rsquo;ll have your own family, and I\u0026rsquo;ll be proud to be part of it. 总有一天，你会有你自己的家，那时我会以成为你家的一份子而自豪。\nNow you understand my feelings, Susan. 现在你能理解我的感受了，Susan。\nI\u0026rsquo;m Grandpa\u0026rsquo;s daughter-in-law, but I feel like a Stewart. He\u0026rsquo;s always made me feel like his own daughter. 我是你爷爷的儿媳妇，但我觉得我是Stewart家的一员。他总是让我觉得我是他的亲生女儿。\nWell, that\u0026rsquo;s because you\u0026rsquo;re so much like us\u0026ndash;wonderful! 嗯，那是因为你太像我们了——你太好了！\nMom, got it. This will make a nice gift for Marilyn and Richard. They can keep a record of all of the important dates and information about Max\u0026rsquo;s life here. 妈妈，找到了。这是给Richard和Marilyn的一件好礼物。他们可以记录下重要的日子关于Max在这里的生活。\nLet\u0026rsquo;s see. Name: Max Stewart. Does he have a middle name? 让我想想。姓名：Max Stewart。他有中间名字吗？\nNo, just Max. I like that. No middle name. No middle initial. Like me. I\u0026rsquo;m Malcolm Stewart. Just Malcolm Stewart. 没有，就是Max。我喜欢这样。没有中间的名字。没有中间的字母。像我一样。我叫Malcolm Stewart。就是Malcolm Stewart。\nAnd Max has your initials, Grandpa: M.S. Max的名字开头字母与你的一样，爷爷，都是M.S.。\nUh, it must mean something. 噢，这很有意思。\nWeight: eight pounds six ounces. Eight-six. Big boy! 体重，八磅六盎司。八磅六。是个大婴儿！\nAll the Stewart men were big. Well, Robbie was eight pounds two ounces, and Richard was eight pounds three. Stewart家的男人都很大。嗯，Robbie生下来八磅二盎司，Richard生下来时八磅三。\nAnd me? 我呢？\nEight pounds six. You were big, just like Max. 八磅六。你很大，像Max一样。\nEight pounds six, just like me. 八磅六，跟我一样。\nThat\u0026rsquo;s nice. Length. Length? Richard says Max is twenty-one inches long. Twenty-one inches. Is that tall or average or what? 太好了。身高，多高？Richard说Max是二十一英寸长。二十一英寸。这样尺寸是高呢，还是普通？或者算怎样？\nTall. All the Stewart men are tall. 高，Stewart家的男人都高。\nWell, Grandpa, you\u0026rsquo;re about five-nine or five-ten. I wouldn\u0026rsquo;t call that tall. 嗯，爷爷。你大概是五英尺九或者五英尺十。我不觉得这样算高。\nI take after my mother\u0026rsquo;s family. They were \u0026hellip; they were \u0026hellip; they were average. 我像我母亲家的人。他们……他们……他们是普通身材。\nMother: Marilyn. Father: Richard. And lots of pages for Richard\u0026rsquo;s photos of Max. 母亲：Marilyn。父亲：Richard。有好多页可用来贴Richard给Max拍的照片。\nSpeaking of mother and of father\u0026ndash;and speaking of Max\u0026ndash;I hear the car. They\u0026rsquo;re here! 谈到孩子的爸，孩子的妈——谈到小孩——我听见汽车声了。他们到了！\nOh! Oh, quickly! Go, go, go! Let\u0026rsquo;s see. Oh, welcome home. 噢！噢，赶快！走！走！走！让我看看。噢，欢迎回家来。\nOh, let her in. Wait with your pictures for a second. 噢，让她进来。先别忙着你的摄影。\nCome on, darlings. Sweetheart \u0026hellip;. Sit down right here. 来，亲爱的。心肝宝贝……就坐在这里。\nOh, he\u0026rsquo;s so cute! Oh, Marilyn! Max looks just like Grandpa. A real Stewart. 噢，他真逗人喜爱！噢，Marilyn！Max长得真像爷爷。一个真正的Stewart家后代。\nI\u0026rsquo;m so happy to be home with my family\u0026ndash;and with Max. 我真高兴回到家里和大家在一起——还有和Max在一起。\nIt\u0026rsquo;s almost ten o\u0026rsquo;clock. I\u0026rsquo;ve got to go. Tomorrow is Monday, and work begins at eight in the morning for me. 差不多十点了。我得走了。明天是星期一，早晨八点我就得开始工作。\nOh, I\u0026rsquo;m so happy that Max is home. He\u0026rsquo;s the sweetest little thing. 噢，我真高兴Max回到家了。他是最可爱的小家伙。\nI\u0026rsquo;ll drive you to the station, dear. You can catch the ten-twenty train to Grand Central Station. 我开车送你到车站去。你能赶上开往Grand Central Station的十点二十分班车。\nI\u0026rsquo;ll drive Susan, dear. 我送Susan，亲爱的。\nThank you, Philip. Then Grandpa, Robbie, and I can finish wrapping all these gifts. 谢谢你，Philip。那么爷爷，Robbie和我可以把这些礼物包装完。\nIt\u0026rsquo;s so good to have you home again \u0026hellip; and to see Max asleep in his bassinet at home with us. To be with our family and all that Stewart TLC. 真高兴你又回家了……真高兴看到Max和我们一起，睡在家里的摇篮。真高兴和全家人在一起，受到Stewart家族无微不至的照顾。\nTLC\u0026ndash;tender loving care. That\u0026rsquo;s our motto. TLC——温暖的爱护和关怀。这是我们的格言。\nDid you see the washcloth and the towels with the teddy bears on them? Alexandra and the Molinas sent them for Max. It was so kind of them. 你看见浴巾和泰迪熊毛巾吗？那是Alexandra和Molina全家送给Max的。他们太客气了。\nNow Max has come into everyone\u0026rsquo;s life. The house is so alive with him here. The welcome sign over the door. The boxes of presents. The M-A-X over his bassinet. Robbie put that there. Susan\u0026rsquo;s teddy bear. So cuddly. The beautiful crib from Mom and Dad. 现在Max走进了每个人的生活里。有了他在这里，屋里头变得生气蓬勃。门上的欢迎标语。那些礼物盒。摇篮上的MAX字样。这是Robbie弄的。Susan送的泰迪熊，抱起来真舒服。爸爸、妈妈送的漂亮婴儿床。\nOh, and Grandpa\u0026rsquo;s baseball glove. You know, it hung over my crib, too. And it hung over Robbie\u0026rsquo;s crib. 噢，还有爷爷的棒球手套。要知道，我的小床上也曾挂过它。Robbie的小床也挂过。\nPart of Grandpa\u0026rsquo;s magic? 这是爷爷\u0026quot;魔法\u0026quot;的一部分吗？\nOh, that\u0026rsquo;s not all. It hung over Susan\u0026rsquo;s crib. 噢，还没完呢，Susan的小床也曾挂过。\nThe same baseball glove? 同一个棒球手套吗？\nThat\u0026rsquo;s right. Grandpa hangs it there for good luck. He says it always brought him good luck on the baseball team. He believes it\u0026rsquo;ll bring good luck to all the Stewart babies. 是的。爷爷把它挂在那里以求好运。他说，当年他在棒球队时这手套总是带给他好运。他相信这手套会给Stewart家所有的婴儿带来好运。\nAnd then he takes it back when Max is ready to use it? 然后，他就把它收回去，当Max长大能使用这手套时吗？\nYes, and replaces it with a new glove, so the old one will be ready for a new member of the Stewart family. 是的，用一个新的手套来换它，这个旧的又可准备给Stewart家的新成员了。\nGrandpa really loves his family, doesn\u0026rsquo;t he? 爷爷确实很爱这个家，是吗？\nSo do I. 我也一样。\nAnd so do I. 我也一样。\nAnd so does Max. Max也一样。\nAfter he eats! 等他吃饱了！\nThanks, Michelle. I hope you like it. Isn\u0026rsquo;t this baby outfit adorable? With his name on it\u0026ndash;\u0026ldquo;Max.\u0026rdquo; 谢谢你，Michelle。希望你喜欢。这套婴儿装不是很可爱吗？有他的名字在上面——\u0026ldquo;Max\u0026rdquo;。\nThanks so much, Harry and Michelle. We really appreciate it. 太感谢了，Harry和Michelle。我们实在很感激。\nI\u0026rsquo;m glad you like it. Michelle picked it out. 我很高兴你们喜欢。是Michelle选的。\nYes, I told Daddy to pick blue ones. Blue is for boys, and pink is for girls. And Max is some boy. He\u0026rsquo;s a real Stewart. 是的。我告诉爸爸选蓝色的。蓝色是男孩子的，粉红色是女孩子的。Max是个好男孩。他是个十足的Stewart家的人。\nRight. That was so thoughtful of you, Michelle, especially to pick it out in blue. 对。你想得真周到，Michelle，还特地选了一件蓝色的。\nWould you like to see baby Max, Michelle? 你想看看Max小家伙吗，Michelle？\nCould she? Could we? Could I? 她能看看吗？我们能看看吗？我能看一看吗？\nTake them upstairs, Susan. Harry and Michelle can watch Max sleeping. 带他们上楼去，Susan。Harry和Michelle可以去看Max在睡觉。\nLet\u0026rsquo;s go. Come on, Michelle. Before Max wakes up. 我们走。来吧，Michelle。趁Max还没有醒来。\nWill you please take this upstairs, Susan? 麻烦你把这个带上去好吗，Susan？\nUh-huh. 好，好。\nThank you. 谢谢你。\nMichelle is very grown up for a ten-year-old, huh? She\u0026rsquo;s smart and sensitive for her age. Growing up without a mother is difficult. You mature quickly. 以一个十岁的孩子来说，Michelle很成熟，是吗？就这样的年龄来说，她很聪明而且懂事。在没有母亲的情况下长大不简单。这种人成熟得快。\nSusan\u0026rsquo;s like a mother to Michelle. They have a good relationship. Susan就像是Michelle的母亲。他们关系不错。\nDo you think Susan and Harry will get married? Yeah. You can count on it. I think so. Yes. They get along so well. I like him. He\u0026rsquo;s good for Susan. 你觉得Susan和Harry会结婚吗？当然，你等着瞧吧。我也觉得是这样。是的，他们相处得很好。我喜欢他。他很适合Susan。\nHe\u0026rsquo;s a little quiet. It\u0026rsquo;s hard to do anything but listen in this family. How can anybody get a word in around here? 他有点沉静。在这个家庭里，除了听别人之外还能怎样。在这里，谁有机会插话呢？\nYou\u0026rsquo;re right, Ellen. Oh, really? It\u0026rsquo;s the way it should be. The Stewarts are the Stewarts! They always were, and they always will be. Right! They\u0026rsquo;ve always got an opinion. Always got something to say. 你说得对，Ellen。噢，是吗？本该如此。这就是Stewart家人的本色！他们过去如此，将来也永远会如此。对！他们总有自己的看法。总有话要说。\nAnd now there\u0026rsquo;s Max Stewart. And if he talks as loudly as he cries, we\u0026rsquo;re all in for trouble. 现在又加上Max Stewart。如果他说话像他哭一样大声，我们都会吃不消的。\nHe\u0026rsquo;s quiet now. 他现在很安静。\nMmm-hmm. That\u0026rsquo;s because he\u0026rsquo;s sleeping. 嗯。那是因为他睡了。\nHe\u0026rsquo;s really cute. 他真是逗人喜爱。\nIt\u0026rsquo;s not necessary to whisper, Harry. A baby gets used to voices. 没有必要压低声音说话，Harry。婴儿习惯各种声音。\nI remember now. We always whispered when Michelle was born. And I didn\u0026rsquo;t sleep well, Daddy told me. I never slept. And when I did, I woke up when I heard someone speak. 我现在记起来了。当Michelle出生的时候，我们总是压低嗓门说话。而我总是睡不好。爸爸告诉我的。我总睡不着。就算我睡着了，一听到有人说话我就醒了。\nI bet you were cute. 我打赌你当时很逗人喜爱。\nShe sure was. Not as cute as Max. He\u0026rsquo;s like a little doll. 她小时候很逗人喜爱。不如Max这么逗人喜爱，他像个小洋娃娃。\nOh, good. Now I can help diaper him. 噢，好了。我现在可以帮他换尿布了。\nLet\u0026rsquo;s get Marilyn. 还是叫Marilyn来吧。\nWhat do you do when he cries like that? 像他哭得这个样子该怎么办？\nYou pick him up. 把他抱起来呀。\nHe\u0026rsquo;s so little \u0026hellip; so new. 他这么小……这么幼……\nLet\u0026rsquo;s call Marilyn. 我们还是叫Marilyn来吧。\nTime for a feeding and time for a diapering. 该喂奶、换尿布的时候了。\nYou\u0026rsquo;re a real Stewart. 你是个真正的Stewart家后代。\n重难点分析 \u0026ldquo;There\u0026rsquo;s nothing more joyous than\u0026hellip;\u0026rdquo; — 最高级表达，意为\u0026quot;没有什么比……更令人喜悦的了\u0026quot;。 \u0026ldquo;Isn\u0026rsquo;t he just adorable?\u0026rdquo; — 反意疑问句表感叹，相当于\u0026quot;He is so adorable!\u0026quot;。 \u0026ldquo;He looks a lot like you.\u0026rdquo; — look like 表示\u0026quot;看起来像\u0026quot;，a lot 加强程度。 \u0026ldquo;I\u0026rsquo;m very fond of her.\u0026rdquo; — be fond of 表示\u0026quot;喜欢/喜爱\u0026quot;。 \u0026ldquo;any minute\u0026rdquo; — 表示\u0026quot;随时/马上\u0026quot;。 \u0026ldquo;carry on the Stewart name\u0026rdquo; — 表示\u0026quot;延续Stewart家族的姓氏/香火\u0026quot;。 \u0026ldquo;TLC \u0026ndash; tender loving care\u0026rdquo; — 缩写，意为\u0026quot;温暖的爱护和关怀\u0026quot;。 \u0026ldquo;It was so kind of them.\u0026rdquo; — 表达感谢的常用句式，表示\u0026quot;他们太好了/太客气了\u0026quot;。 \u0026ldquo;for good luck\u0026rdquo; — 表示\u0026quot;为了祈求好运\u0026quot;。 \u0026ldquo;You can count on it.\u0026rdquo; — 表示\u0026quot;你放心好了/你等着瞧吧\u0026quot;。 \u0026ldquo;get a word in\u0026rdquo; — 表示\u0026quot;插上话/有机会说话\u0026quot;。 \u0026ldquo;We\u0026rsquo;re all in for trouble.\u0026rdquo; — be in for trouble 表示\u0026quot;会有麻烦/吃不消\u0026quot;。 \u0026ldquo;I bet you were cute.\u0026rdquo; — I bet 表示\u0026quot;我打赌/我肯定\u0026quot;。 \u0026ldquo;Time for a feeding and time for a diapering.\u0026rdquo; — feeding 喂奶，diapering 换尿布，动名词作名词用。 核心词汇 词汇 音标 释义 joyous /ˈdʒɔɪəs/ 喜悦的，快乐的 thrilled /θrɪld/ 非常兴奋的 adorable /əˈdɔːrəbl/ 可爱的，讨人喜欢的 nephew /ˈnefjuː/ 侄子，外甥 grandchild /ˈɡræntʃaɪld/ 孙子/孙女 resemble /rɪˈzembl/ 像，相似 fond /fɑːnd/ 喜爱的 bassinet /ˌbæsɪˈnet/ 婴儿摇篮 crib /krɪb/ 婴儿床 motto /ˈmɑːtoʊ/ 格言，座右铭 cuddly /ˈkʌdli/ 令人想拥抱的 outfit /ˈaʊtfɪt/ 一套服装 mature /məˈtʃʊr/ 成熟的 relationship /rɪˈleɪʃnʃɪp/ 关系 whisper /ˈwɪspər/ 低声说，耳语 diaper /ˈdaɪpər/ 尿布；换尿布 口语中的应用 \u0026ldquo;Isn\u0026rsquo;t he just adorable?\u0026rdquo; — 感叹句式的反问，表达强烈喜爱。 \u0026ldquo;Any minute.\u0026rdquo; — 表示\u0026quot;随时\u0026quot;，非常简洁。 \u0026ldquo;Speaking of\u0026hellip;\u0026rdquo; — 表示\u0026quot;说到……/提到……\u0026quot;，转换话题的常用语。 \u0026ldquo;You can count on it.\u0026rdquo; — 表示\u0026quot;你放心/肯定如此\u0026quot;。 \u0026ldquo;I bet you were cute.\u0026rdquo; — 表示\u0026quot;我打赌/我肯定\u0026quot;。 \u0026ldquo;Get a word in.\u0026rdquo; — 表示\u0026quot;插上话\u0026quot;。 \u0026ldquo;We\u0026rsquo;re in for trouble.\u0026rdquo; — 表示\u0026quot;我们要有麻烦了\u0026quot;。 \u0026ldquo;Time for\u0026hellip;\u0026rdquo; — 表示\u0026quot;该……的时候了\u0026quot;。 核心练习句型 表达\u0026quot;像某人\u0026quot;：\nHe looks a lot like you. He\u0026rsquo;s got Richard\u0026rsquo;s eyes. Children usually resemble their parents. 表达\u0026quot;喜欢/喜爱\u0026quot;：\nI\u0026rsquo;m very fond of her. I really like Michelle. 表达\u0026quot;随时可能\u0026quot;：\nThey\u0026rsquo;ll be home any minute. The bus will come any minute. 表达\u0026quot;该做某事了\u0026quot;：\nTime for a feeding. Time for a diapering. Time to go. 表达\u0026quot;可以放心/肯定\u0026quot;：\nYou can count on it. I bet you were cute. 表达\u0026quot;太……了\u0026quot;（感叹）：\nIsn\u0026rsquo;t he just adorable? It was so kind of them. That was so thoughtful of you. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-13/","summary":"\u003ch2 id=\"课文原文双语\"\u003e课文原文（双语）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eThere\u0026rsquo;s nothing more joyous than the arrival of a new baby.\u003c/strong\u003e\n没有任何事能比新生儿的到来更令人喜悦的了。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI am so excited. Mother!\u003c/strong\u003e\n我好兴奋，妈妈！\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eJust imagine\u0026ndash;Marilyn and Richard must be thrilled!\u003c/strong\u003e\n想像得出——Marilyn和Richard一定乐坏了！\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eOh, a new baby!\u003c/strong\u003e\n噢，一个新生儿！\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMax \u0026hellip; Max \u0026hellip; Max.\u003c/strong\u003e\nMax……Max……Max。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eOh, it\u0026rsquo;s a sweet-sounding name for a sweet little boy.\u003c/strong\u003e\n噢，好一个甜美悦耳的名字，配个甜美的小孩。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMy first grandchild.\u003c/strong\u003e\n我的第一个孙子。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAnd my first nephew.\u003c/strong\u003e\n我的第一个侄子。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eIsn\u0026rsquo;t he just adorable?\u003c/strong\u003e\n他真是太可爱了！\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHe looks a lot like you, Mom. He does.\u003c/strong\u003e\n他像你，妈妈。他像你。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第13课：Welcome Home, Max（欢迎回家，Max）"},{"content":"课文原文（双语对话） Susan: You like living in New York, don\u0026rsquo;t you? / 你喜欢住在纽约，是吗？\nHarry: Oh, I love it. It\u0026rsquo;s so convenient. I can take the bus to work \u0026hellip; or the subway \u0026hellip; or a taxi. And there\u0026rsquo;s so much to do. Lots of movie houses, and the theater. / 噢，我喜欢住在纽约。一切都很方便，我可以坐公共汽车上班……或者搭地铁……或者坐计程车。而且这里总是有许多事可做。很多电影院，还有剧院。\nSusan: I know what you mean. / 我懂得你的意思。\nHarry: I\u0026rsquo;d like to live in the city, but living in New Jersey and the suburbs is better for Michelle. Trees, grass. / 我也喜欢住在城里，但住在New Jersey的郊区对Michelle要好些。有绿树，有草地。\nSusan: There\u0026rsquo;s a lot of good things about suburban living. I grew up in Riverdale, remember? So I know. But, as a working woman, I think New York has all the conveniences—including the best tomatoes. / 郊区生活是有许多优点。你记得吗？我就是在Riverdale长大的，所以我了解这些。但是就职业妇女来说，我觉得纽约具备了一切便利的条件——包括上好的蕃茄。\nHarry: The truth is, I\u0026rsquo;d like to live in the city. Michelle\u0026rsquo;s the right age. There are lots of things for her here. / 老实说我也想住到城里来。Michelle正处于成长的年龄。这里有许多适合她的东西。\nSusan: You\u0026rsquo;re right, Harry. Today is the perfect example. Michelle and her friends are at the aquarium in Brooklyn. They come back here for lunch, then go uptown to the Museum of Natural History. There\u0026rsquo;s so much for young people to see and do. It\u0026rsquo;s just incredible! / 你说的对，Harry。今天就是一个很好的例子。Michelle和她的朋友们在参观Brooklyn的水族馆。他们回到这儿来吃午餐，然后再往北去自然历史博物馆。这里有很多可供年轻人看和做的事情。简直是难以置信！\nHarry: Not just for young people. What about me? I\u0026rsquo;ve never been to the aquarium or the Museum of Natural History. Have you? / 不仅仅对年轻人来说是这样。对我还不是一样？我从来没有去过水族馆或自然历史博物馆。你呢？\nSusan: Oh yes, Harry. My mother and father often took us somewhere in the city on the weekends. Dad was a busy doctor, but he usually managed to squeeze a Sunday in with Richard, Robbie, and me. I used to love to go to the Metropolitan Museum of Art. / 去过了，Harry。我父母经常在周末带我们去城里的一些地方。爸爸是个很忙的医生，但是他总会设法挤出星期天和Richard、Robbie及我在一起。我过去很喜欢去大都会美术馆。\nHarry: I\u0026rsquo;ve been there several times. Twice with Michelle. / 我到那儿去过好几次。其中两次是和Michelle去的。\nSusan: You ought to think about spending more time with Michelle at all the great places in the city. / 你应当考虑多花点时间陪Michelle去城里所有的好地方看看。\nHarry: Well, perhaps, you\u0026rsquo;ll help me select some of the great places. And perhaps, you\u0026rsquo;ll join us? / 好的，也许，你能帮我挑一些好地方。也许你能跟我们一起去？\nSusan: Perhaps I will. / 也许吧。\n（Michelle和朋友们到达，大家一起玩拼字游戏）\nMichelle: Cheese—c-h-e-e-s-e. / Cheese—c-h-e-e-s-e。\nSusan: Terrific! Michelle wins with a six-letter word, plus she gets an additional ten points for a total of sixteen points. / 好极了！Michelle赢了，她的单字有六个字母，加上另外的十分，她一共得十六分。\nMichelle: I think it\u0026rsquo;s too easy. / 我觉得它太简单了。\nSusan: Michelle is quite right. She just said it\u0026rsquo;s too easy. / Michelle非常对。她仅仅说它太容易了。\n（游戏结束后，Harry和Susan继续他们的谈话）\nHarry: There\u0026rsquo;s a conversation we have to finish. / 我们有一段话还没有谈完呢。\nSusan: What was it about? / 刚才谈什么？\nHarry: It was about caring. I said that it makes me feel good that you care about Michelle. Well, I do care about Michelle. And it makes me feel good that you care about me. You\u0026rsquo;re a \u0026hellip; wonderful friend. And it makes me feel good that you care about us. / 谈到关心。我是说我感到很高兴你关心Michelle。是的，我真的关心Michelle。而且你关心我，也让我感到很高兴。你是个……极好的朋友。使我太高兴了，你关心我们大家。\nHarry: Now comes the good part. / 现在最精彩的部分来了。\nHarry: Here are ten letters that express my feelings for you. / 这里有十个字母可以表达我对你的感情。\nSusan: Don\u0026rsquo;t be silly, Harry. / 别闹了，Harry。\nHarry: You want a hint? It\u0026rsquo;s two words. / 你需要提示吗？两个字。\nSusan: Harry, I get it! / Harry，我想到了！\nHarry: Well? Does that mean you\u0026rsquo;ll marry me? / 噢？你的意思是你答应嫁给我了？\nSusan: Is that a proposal, or are we just playing a game? / 这是求婚呢，还是仅仅在玩游戏？\nHarry: Sit down, Susan. There\u0026rsquo;s something I have to ask you. Susan, will you marry me? / 坐下，Susan。我有一件事要问你。Susan，你愿意嫁给我吗？\nSusan: It\u0026rsquo;s such an important decision. There\u0026rsquo;s so many things to talk about. There are three things that have to be done first, Harry. First, we have to decide where to live. Second, we have to talk to Michelle together about being married. Third, you have to ask for my father\u0026rsquo;s permission. / 这是一个如此重要的决定。有许多事情需要讨论。首先我们必须做三件事，Harry。首先，我们得决定住在哪里。第二，我们必须一起跟Michelle谈谈我们结婚的事。第三，你必须徵得我父亲的同意。\nHarry: Absolutely! But first things first. We have to go pick up Michelle. / 那当然！但事有先后。我们得去接Michelle了。\nSusan: Oh, I\u0026rsquo;m so happy, Harry! / 噢，我太高兴了，Harry！\nHarry: Not as happy as I am. / 我比你更高兴。\n重难点分析 反意疑问句（Tag Questions）：\u0026ldquo;You like living in New York, don\u0026rsquo;t you?\u0026rdquo; — 反意疑问句用于确认信息或寻求同意，前肯定后否定，前否定后肯定。\n\u0026ldquo;used to\u0026rdquo; 的用法：\u0026ldquo;I used to love to go to the Metropolitan Museum of Art.\u0026rdquo; — 表示过去经常做但现在不再做的习惯或状态。\n\u0026ldquo;squeeze in\u0026rdquo; 的用法：\u0026ldquo;He usually managed to squeeze a Sunday in\u0026rdquo; — 表示挤出时间做某事，非常实用的口语表达。\n\u0026ldquo;care about\u0026rdquo; 的用法：本课多次出现，表示\u0026quot;关心、在乎\u0026quot;。注意区分 \u0026ldquo;care about\u0026rdquo;（关心某人/某事）和 \u0026ldquo;care for\u0026rdquo;（照顾、喜欢）。\n\u0026ldquo;assume\u0026rdquo; 的用法：\u0026ldquo;assume that if you care about Michelle\u0026rdquo; — 表示\u0026quot;假设、假定\u0026quot;，用于提出假设情况。\n\u0026ldquo;first things first\u0026rdquo; — 固定表达，意思是\u0026quot;重要的事情先做\u0026quot;。\n核心词汇 词汇 释义 例句 convenient 方便的 It\u0026rsquo;s so convenient to live in the city. suburb 郊区 Suburban living has many advantages. aquarium 水族馆 The girls had a good time at the aquarium. incredible 难以置信的 It\u0026rsquo;s just incredible! squeeze 挤、压缩 He managed to squeeze a Sunday in. starving 饥饿的 I\u0026rsquo;m starving, aren\u0026rsquo;t you? appreciate 感激 I really appreciate your doing this. shuffle 洗牌 First, you shuffle the deck. counterclockwise 逆时针方向 Everyone goes counterclockwise. proposal 求婚 Is that a proposal? 口语中的应用 \u0026ldquo;I know what you mean.\u0026rdquo; — 表示理解对方的感受或想法，比 \u0026ldquo;I understand\u0026rdquo; 更口语化、更亲切。\n\u0026ldquo;It looks inviting.\u0026rdquo; — 形容食物看起来诱人，也可以形容地方看起来吸引人。\n\u0026ldquo;I can\u0026rsquo;t wait to\u0026hellip;\u0026rdquo; — 表达迫不及待想做某事，如 \u0026ldquo;I can\u0026rsquo;t wait to take a bite.\u0026rdquo;\n\u0026ldquo;It\u0026rsquo;s nothing.\u0026rdquo; — 当别人感谢你时，表示\u0026quot;没什么、不客气\u0026quot;。\n\u0026ldquo;You\u0026rsquo;re wonderful with kids.\u0026rdquo; — 夸赞某人善于与孩子相处。\n核心练习句型 反意疑问句：You like living in New York, don\u0026rsquo;t you? used to + 动词原形：I used to love to go to the museum. squeeze in + 时间：He managed to squeeze a Sunday in. care about + 某人/某事：I care about Michelle. can\u0026rsquo;t wait to + 动词：I can\u0026rsquo;t wait to take a bite. first things first：First things first, we have to pick up Michelle. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-14/","summary":"\u003ch2 id=\"课文原文双语对话\"\u003e课文原文（双语对话）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eSusan:\u003c/strong\u003e You like living in New York, don\u0026rsquo;t you? / 你喜欢住在纽约，是吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHarry:\u003c/strong\u003e Oh, I love it. It\u0026rsquo;s so convenient. I can take the bus to work \u0026hellip; or the subway \u0026hellip; or a taxi. And there\u0026rsquo;s so much to do. Lots of movie houses, and the theater. / 噢，我喜欢住在纽约。一切都很方便，我可以坐公共汽车上班……或者搭地铁……或者坐计程车。而且这里总是有许多事可做。很多电影院，还有剧院。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eSusan:\u003c/strong\u003e I know what you mean. / 我懂得你的意思。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHarry:\u003c/strong\u003e I\u0026rsquo;d like to live in the city, but living in New Jersey and the suburbs is better for Michelle. Trees, grass. / 我也喜欢住在城里，但住在New Jersey的郊区对Michelle要好些。有绿树，有草地。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第14课：求婚与游戏"},{"content":"课文原文（双语对话） Richard: What\u0026rsquo;s this for? / 为什么要送我花？\nMarilyn: Just because. How\u0026rsquo;s the baby? / 没有原因。孩子好吗？\nRichard: Fast asleep. I\u0026rsquo;m sorry I missed him. I had to work late. / 正熟睡着呢。很抱歉我错过了他醒着的时候。我必须工作到很晚。\nMarilyn: What are the flowers for, Richard? / 究竟为什么送花，Richard？\nRichard: Five years of happiness. Happy anniversary. / 为了五年的幸福。祝你结婚周年快乐！\nMarilyn: But our anniversary isn\u0026rsquo;t until Saturday. / 但是要到星期六才是我们结婚周年呀。\nRichard: I couldn\u0026rsquo;t wait. Besides, we are not going to be here Saturday. / 我迫不及待啦。另外，我们星期六将不在这里了。\nMarilyn: We\u0026rsquo;re not? / 不在这里？\nRichard: Uh-uh. / 嗯。\nMarilyn: Where are we going to be? / 我们会在哪儿？\nRichard: If you had your choice of all the places in the world, where would you choose to spend our anniversary? / 假如你可以选择世界上的任何地方，你会选哪里去度我们的结婚周年纪念日？\nMarilyn: The Watermill Inn. I loved that place when we went on our honeymoon. / Watermill Inn。当初我们度蜜月时我便很喜欢那个地方。\nRichard: Perfect! You picked the right place. You and I, Mrs. Stewart, are going to spend a second honeymoon at the Watermill Inn. / 棒透了！你选对了地方。Stewart太太，你和我，将到Watermill Inn去度第二次蜜月。\nMarilyn: Oh, Richard! That\u0026rsquo;s wonderful, but— / 噢，Richard！那真是太好了，可是……\nRichard: No buts. / 不要说可是。\nMarilyn: What about the baby? Aren\u0026rsquo;t we taking the baby on our honeymoon? / 那小宝宝怎么办？我们岂不是要带小宝宝一起去度蜜月？\nRichard: Absolutely not. The world\u0026rsquo;s greatest grandmother, Mrs. Ellen Stewart, has agreed to take care of him for the weekend. / 绝对不必。世界上最伟大的祖母，Ellen Stewart太太，同意在周末照顾他。\nMarilyn: Richard, isn\u0026rsquo;t that too much to ask of your mother? / Richard，那是不是太麻烦你母亲啦？\nRichard: Too much? She loves taking care of Max. / 太麻烦？她喜欢照顾Max。\nMarilyn: But \u0026hellip; I\u0026rsquo;ll miss him. / 但是……我会想他的。\nRichard: Well, we\u0026rsquo;ll phone every hour, and you can listen to him over the phone. Come on, Mar. It\u0026rsquo;s time you and I had a romantic weekend alone together. We\u0026rsquo;ve earned it. What do you say? / 好了，我们每个小时都打电话，而且你可以在电话中听到他的声音。得了，Mar。是我们俩单独在一起过一个浪漫周末的时候了。我们有这样做的权利。你说呢？\nMarilyn: It does sound tempting. You\u0026rsquo;re right. We\u0026rsquo;ve earned it. / 听起来很诱人。你说得对，我们有这样做的权利。\n（Richard打电话预订房间，但Watermill Inn已满，推荐了Old Country Inn）\nRichard: Well, it\u0026rsquo;s small, but clean. / 噢，它是小了点，但是干净。\nMarilyn: Clean? You call this clean? / 干净？这样算干净？\nRichard: Sorry, Marilyn. Well, the rain, the room, the view of the parking lot. It isn\u0026rsquo;t the way I hoped it would be. / 对不起，Marilyn。唉，这雨，这房间，这停车场的景色。这不是我所盼望的。\nMarilyn: Stop blaming yourself. After all, we\u0026rsquo;re here, we\u0026rsquo;re alone, we\u0026rsquo;re together. And I love you. Isn\u0026rsquo;t that enough? / 别责备你自己了。毕竟，我们来到这儿了，我们又单独在一起了。我爱你。难道这还不够吗？\n（突然接到Watermill Inn的电话，有空房了）\nMarilyn: Mrs. Montefiore from the Watermill Inn. They have an opening. Someone just checked out, and Mrs. Montefiore has reserved the honeymoon suite for us. / 是Watermill Inn的Montefiore太太打来的电话。他们有一个空房间。有一个人刚刚结帐走了，Montefiore太太为我们保留了蜜月套房。\nRichard: You\u0026rsquo;re kidding! / 你在开玩笑！\nMarilyn: No. Isn\u0026rsquo;t it wonderful? / 不，这不是很美妙吗？\nRichard: It\u0026rsquo;s fantastic! / 太棒了！\n（在Watermill Inn）\nMarilyn: Oh, Richard, it\u0026rsquo;s exactly as it was when we were married! / 噢，Richard，它跟我们结婚的时候一模一样！\nMrs. Montefiore: Even the old patchwork quilt is the same! My great-grandmother made that quilt when Teddy Roosevelt was President. / 甚至这条旧的百衲被罩也是一样！我曾祖母缝制了这个被罩，在Teddy Roosevelt当总统的时代。\nRichard: Now, this is my idea of a good time. / 这才是我所谓的享受。\n重难点分析 虚拟语气（过去式）：\u0026ldquo;If you had your choice of all the places in the world, where would you choose?\u0026rdquo; — 与现在事实相反的虚拟条件句，从句用过去式，主句用would + 动词原形。\n\u0026ldquo;No buts\u0026rdquo; — 固定口语表达，意思是\u0026quot;不要找借口\u0026quot;、\u0026ldquo;别说但是\u0026rdquo;，非常地道。\n\u0026ldquo;It\u0026rsquo;s time you and I had\u0026hellip;\u0026rdquo; — 句型 \u0026ldquo;It\u0026rsquo;s time (that) + 主语 + 过去式\u0026rdquo; 表示\u0026quot;该是做某事的时候了\u0026quot;，用过去式表示虚拟。\n\u0026ldquo;earn\u0026rdquo; 的用法：\u0026ldquo;We\u0026rsquo;ve earned it.\u0026rdquo; — 表示\u0026quot;我们赢得了/有资格享受\u0026quot;，非常实用的表达。\n\u0026ldquo;You\u0026rsquo;re kidding!\u0026rdquo; — 口语中表示惊讶，\u0026ldquo;你在开玩笑吧！\u0026rdquo;\n\u0026ldquo;check out\u0026rdquo; — 结账离开（酒店），反义词是 \u0026ldquo;check in\u0026rdquo;（入住登记）。\n核心词汇 词汇 释义 例句 anniversary 周年纪念日 Happy anniversary! honeymoon 蜜月 We spent our honeymoon at the Watermill Inn. tempting 诱人的 It does sound tempting. reservation 预订 I\u0026rsquo;ll make a reservation right now. balcony 阳台 Remember that wonderful little balcony? view 景色 Let\u0026rsquo;s get a look at the view. patchwork quilt 百衲被 Even the old patchwork quilt is the same! tradition 传统 What a lovely tradition! heavenly 天堂般的、极好的 This food is heavenly, isn\u0026rsquo;t it? adorable 可爱的 Oh, he\u0026rsquo;s adorable! 口语中的应用 \u0026ldquo;Just because.\u0026rdquo; — 当被问及原因但不想解释时，说\u0026quot;没什么特别原因\u0026quot;，非常口语化。\n\u0026ldquo;Fast asleep.\u0026rdquo; — 表示\u0026quot;熟睡\u0026quot;，比 \u0026ldquo;sleeping deeply\u0026rdquo; 更地道。\n\u0026ldquo;No buts.\u0026rdquo; — 阻止对方找借口或反驳时使用。\n\u0026ldquo;What do you say?\u0026rdquo; — 征求对方意见，\u0026ldquo;你觉得怎么样？\u0026rdquo;\n\u0026ldquo;You\u0026rsquo;re being a really good sport about this.\u0026rdquo; — 夸赞对方对不如意的事情表现得很豁达、很配合。\n\u0026ldquo;This is my idea of a good time.\u0026rdquo; — 表达\u0026quot;这才是我认为的享受/好时光\u0026quot;。\n核心练习句型 虚拟语气：If you had your choice, where would you choose? It\u0026rsquo;s time + 主语 + 过去式：It\u0026rsquo;s time you and I had a romantic weekend. earn + 名词：We\u0026rsquo;ve earned it. check out / check in：Someone just checked out. You\u0026rsquo;re kidding! — 表达惊讶。 This is my idea of + 名词：This is my idea of a good time. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-15/","summary":"\u003ch2 id=\"课文原文双语对话\"\u003e课文原文（双语对话）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e What\u0026rsquo;s this for? / 为什么要送我花？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMarilyn:\u003c/strong\u003e Just because. How\u0026rsquo;s the baby? / 没有原因。孩子好吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e Fast asleep. I\u0026rsquo;m sorry I missed him. I had to work late. / 正熟睡着呢。很抱歉我错过了他醒着的时候。我必须工作到很晚。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMarilyn:\u003c/strong\u003e What are the flowers for, Richard? / 究竟为什么送花，Richard？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e Five years of happiness. Happy anniversary. / 为了五年的幸福。祝你结婚周年快乐！\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMarilyn:\u003c/strong\u003e But our anniversary isn\u0026rsquo;t until Saturday. / 但是要到星期六才是我们结婚周年呀。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e I couldn\u0026rsquo;t wait. Besides, we are not going to be here Saturday. / 我迫不及待啦。另外，我们星期六将不在这里了。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第15课：结婚纪念日惊喜"},{"content":"课文原文（双语对话） Robbie: The mailman just dropped some mail in our box, Grandpa. / 邮差刚刚塞进一些信件在我们的信箱里，爷爷。\nGrandpa: Probably a lot of advertising and bills. / 大概是一大堆广告和帐单。\nRobbie: You were right, Grandpa. Advertising, bills, bills, advertising. / 给你说对了，爷爷。广告、帐单、帐单、广告。\nGrandpa: Nothing interesting. / 没有什么有趣的。\nRobbie: You won\u0026rsquo;t believe it, Grandpa, but there\u0026rsquo;s a letter here addressed to you, Mr. Malcolm Stewart, and it looks like a personal letter. / 你绝不会相信，爷爷，这里确实有一封信是寄给你的，Malcolm Stewart先生收，而且看来是一封私人信件。\nGrandpa: Oh, it must be a bill. / 噢，还不是帐单。\nRobbie: I don\u0026rsquo;t think so. The return name and address is Pete Waters, RFD Number 1, Chesterton. / 我想不是吧。发信人姓名和地址是：Pete Waters，Chesterton，乡村免费邮递路线一号。\nGrandpa: You\u0026rsquo;re joking. Pete Waters? You bet I do! He was my roommate in college. He visited with Grandma and me in Florida about five years ago. / 你在开玩笑吧。Pete Waters？你可以打赌我当然认识。他是我大学时的室友。他到Florida看过祖母和我，大约五年前。\nRobbie: What does he say? / 他说了些什么？\nGrandpa: He\u0026rsquo;s writing to invite me to spend a weekend with him at his farm. He\u0026rsquo;s planning a get-together with two or three other college friends. A kind of a fifty-year anniversary reunion. / 他写信邀请我去他的农场跟他一起渡个周末。他计划办一个聚会，邀两、三个其他的大学朋友一起。等于是五十周年重逢聚会。\nRobbie: Sounds like fun. Fifty years? Wow! / 听起来好像蛮好玩的。五十年？喔！\nRobbie: How come he never got married? / 为什么他不结婚？\nGrandpa: He never married because the girl he was in love with in college married someone else. As simple as that. He never got over it. / 他不结婚是因为他大学时代所爱的女孩跟别人结婚了。就这么简单。他一直念念不忘。\nRobbie: He must have loved her very much. / 他一定非常非常地爱她。\nGrandpa: Yes. Very much. Lillian Winters. She was in our class. / 是的，非常爱。她是Lillian Winters。她和我们同班。\n（Grandpa开车去农场，途中问路）\nGrandpa: Could you tell me how to use the shortcut? / 你能告诉我怎么走这条近路吗？\nGas Station Attendant: Sure. You take the next left turn. You\u0026rsquo;ll see a stop sign. Make a right at the stop sign. Stay on that road, and you\u0026rsquo;ll cross a blue bridge. Then you\u0026rsquo;ll see a big old red barn. That\u0026rsquo;s the back of Pete Waters\u0026rsquo;s place. / 当然。你在下一个路口左转，会看到有个停车再开标志。就在停车再开标志那里向右拐。沿着路开下去，你会经过一座蓝色的桥。然后你就会看到一座旧的红色大谷仓。那就是Pete Waters住处的后面。\n（到达农场，看到Pete留下的纸条）\nGrandpa: \u0026ldquo;Have gone to the railroad station. Back soon with a surprise. Make yourself at home. Have a look around. Pete.\u0026rdquo; Same old Pete Waters. Always full of surprises. / \u0026ldquo;去火车站。接一个惊喜即回。勿客气。到处看看。Pete。\u0026rdquo; Pete Waters还是老样子。总是出人意表。\n（老朋友们相聚）\nPeggy: It\u0026rsquo;s Malcolm Stewart! You haven\u0026rsquo;t changed much in fifty years. / 他是Malcolm Stewart！你五十年来没有什么变。\nArnold: You look wonderful, Malcolm! / 你看起来好得很，Malcolm！\n（Pete带着Lillian回来了）\nPete: Remember Lillian? / 还记得Lillian吗？\nGrandpa: Lillian! Oh, my gosh! Lillian Winters. We were together in the Thursday night drama society. / Lillian！噢，我的天啊！Lillian Winters。我们过去总在星期四晚上的话剧社里聚会。\nGrandpa: How\u0026rsquo;s Donald? / Donald怎么样？\nLillian: That\u0026rsquo;s OK, Malcolm. Donald passed away a couple of years ago. / 没有关系，Malcolm。Donald几年前去世了。\nPete: I\u0026rsquo;ve invited you here for the weekend to help celebrate. / 我邀请你们到这儿来渡周末并一起庆祝。\nArnold: Celebrate? Our fiftieth reunion? / 庆祝？是我们的五十年重聚？\nPete: No. I have loved Lillian all these years, so I asked her to be Mrs. Pete Waters. / 不是。这些年来我一直爱着Lillian，所以我请求她成为Pete Waters夫人。\nLillian: And I said yes. / 而我答应了。\nPeggy: I knew it! I knew it! Congratulations! / 我就知道是这样！我就知道是这样！恭喜你们！\nPete: Lillian and I were married two weeks ago in Detroit. She\u0026rsquo;s come here to stay. / Lillian和我在两周前在Detroit结婚了。她这次来是要住下来。\nGrandpa: Wait till I tell my family about this! Why, that\u0026rsquo;s wonderful! / 我告诉我家人这件事的时候有的瞧了！哎呀，这太美好了！\n重难点分析 \u0026ldquo;You bet\u0026rdquo; — 口语中表示\u0026quot;当然、肯定\u0026quot;，相当于 \u0026ldquo;of course\u0026rdquo;、\u0026ldquo;definitely\u0026rdquo;。\n\u0026ldquo;How come\u0026rdquo; — 口语中询问原因，相当于 \u0026ldquo;why\u0026rdquo;，但更随意。注意 \u0026ldquo;How come\u0026rdquo; 后面用陈述句语序：\u0026ldquo;How come he never got married?\u0026rdquo;\n\u0026ldquo;get over\u0026rdquo; — 表示\u0026quot;从（失恋、疾病、打击中）恢复过来\u0026quot;。\u0026ldquo;He never got over it.\u0026rdquo; 表示他一直没能释怀。\n\u0026ldquo;pass away\u0026rdquo; — \u0026ldquo;去世\u0026quot;的委婉说法，比 \u0026ldquo;die\u0026rdquo; 更礼貌。\n\u0026ldquo;full of surprises\u0026rdquo; — 形容某人总是给人惊喜，出人意表。\n\u0026ldquo;make yourself at home\u0026rdquo; — 主人对客人说的客套话，\u0026ldquo;别客气，就像在自己家一样\u0026rdquo;。\n核心词汇 词汇 释义 例句 advertising 广告 Probably a lot of advertising and bills. personal 私人的 It looks like a personal letter. roommate 室友 He was my roommate in college. reunion 重聚、 reunion A kind of a fifty-year anniversary reunion. get-together 聚会 He\u0026rsquo;s planning a get-together. shortcut 近路、捷径 There\u0026rsquo;s a shortcut—if you know it. surprise 惊喜 Always full of surprises. recognize 认出 I recognize you. rascal 淘气鬼、老顽童 You old rascal! congratulations 恭喜 Congratulations! 口语中的应用 \u0026ldquo;You bet I do!\u0026rdquo; — 强烈肯定，\u0026ldquo;我当然（认识/知道）！\u0026rdquo;\n\u0026ldquo;Sounds like fun.\u0026rdquo; — 表示某事听起来很有趣。\n\u0026ldquo;As simple as that.\u0026rdquo; — \u0026ldquo;就这么简单\u0026rdquo;，用于强调事情很简单。\n\u0026ldquo;Make yourself at home.\u0026rdquo; — 热情招待客人时使用。\n\u0026ldquo;Wait till I tell\u0026hellip;\u0026rdquo; — \u0026ldquo;等我告诉……\u0026quot;，表达迫不及待想分享消息。\n\u0026ldquo;For goodness\u0026rsquo; sake\u0026rdquo; — \u0026ldquo;天啊、看在老天份上\u0026rdquo;，表达急切或惊讶。\n核心练习句型 How come + 陈述句：How come he never got married? get over + 某事：He never got over it. must have + 过去分词：He must have loved her very much. full of + 名词：He\u0026rsquo;s always full of surprises. You bet + 从句：You bet I do! make yourself at home — 别客气。 ","permalink":"/posts/2026-06-14-family-album-usa-lesson-16/","summary":"\u003ch2 id=\"课文原文双语对话\"\u003e课文原文（双语对话）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eRobbie:\u003c/strong\u003e The mailman just dropped some mail in our box, Grandpa. / 邮差刚刚塞进一些信件在我们的信箱里，爷爷。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eGrandpa:\u003c/strong\u003e Probably a lot of advertising and bills. / 大概是一大堆广告和帐单。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRobbie:\u003c/strong\u003e You were right, Grandpa. Advertising, bills, bills, advertising. / 给你说对了，爷爷。广告、帐单、帐单、广告。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eGrandpa:\u003c/strong\u003e Nothing interesting. / 没有什么有趣的。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRobbie:\u003c/strong\u003e You won\u0026rsquo;t believe it, Grandpa, but there\u0026rsquo;s a letter here addressed to you, Mr. Malcolm Stewart, and it looks like a personal letter. / 你绝不会相信，爷爷，这里确实有一封信是寄给你的，Malcolm Stewart先生收，而且看来是一封私人信件。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eGrandpa:\u003c/strong\u003e Oh, it must be a bill. / 噢，还不是帐单。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第16课：五十年重逢与惊喜"},{"content":"课文原文（双语对话） Marilyn: What are you doing? / 你在干什么？\nRichard: I think I\u0026rsquo;ve got them. / 我想我已经拍齐了。\nMarilyn: You think you\u0026rsquo;ve got what? / 你想你已经拍齐了什么？\nRichard: Performing arts—performing arts centers. I think I\u0026rsquo;ve got them all, but I\u0026rsquo;m not sure. / 表演艺术——表演艺术中心。我想我都已经拍齐了，但我不能肯定。\nMarilyn: I think you have got it, Richard. Lincoln Center, home of the Metropolitan Opera, the New York City Ballet, the New York Philharmonic. Shubert Alley, center of the theater on Broadway. And Carnegie Hall. And the Kennedy Center for the Performing Arts in Washington. And the Music Center in Los Angeles. And the others. I do have it all. / 我想你已完成了，Richard。林肯中心——大都会歌剧团、纽约市芭蕾舞团、纽约爱乐的大本营。Shubert Alley——百老汇戏剧中心。还有卡奈基音乐厅。还有位于华盛顿的甘乃迪表演艺术中心。还有位于洛杉矶的音乐中心。还有其他的。我确实拍齐了。\nRichard: You have been working on this for some time, Richard. I\u0026rsquo;m glad you feel you\u0026rsquo;ve finally put it all together. / 你从事这工作已有一段时间了，Richard。我很高兴你终于就绪了。\nMarilyn: What now? / 下一步呢？\nRichard: Now for the hard part. / 现在到了最难的部分。\nMarilyn: Oh, you think you\u0026rsquo;re going to have a hard time getting the album published? / 你认为需要大费周章才能让摄影集出版吗？\nRichard: Well, it won\u0026rsquo;t be easy. / 嗯，不很容易。\nMarilyn: So, what do you think you\u0026rsquo;re going to do? / 那么你打算怎么办呢？\nRichard: Does the name Harvey Carlson ring a bell? / 你对Harvey Carlson这个名字有印象吗？\nMarilyn: Oh, yes! Harvey Carlson! I remember. He said I should call him. He\u0026rsquo;s the publisher of the Carlson Publishing Company. He said they need a new book of photographs, and he really liked my concept. / 噢，是的！Harvey Carlson！我记得。他说我可以打电话给他。他是Carlson出版公司的老板。他说他公司需要一本新的摄影集，而且他真的喜欢我的想法。\n（Richard打电话预约）\nSecretary: Mr. Carlson is busy at the moment. May I help you? / Carlson先生现在正忙着呢。我可以为你效劳吗？\nRichard: I\u0026rsquo;d like to make an appointment with him. / 我想跟他约个晤谈时间。\nSecretary: Mr. Stewart, I just spoke to Mr. Carlson. He would like to see you. But the only time he\u0026rsquo;s available this week is tomorrow morning at ten o\u0026rsquo;clock. / Stewart先生，我刚刚与Carlson先生通了话。他想见你。但这星期他有空的时间只有明天早上十点。\n（在Carlson的办公室）\nMr. Carlson: Come in, come in. This is a crazy morning. Hello, Richard. / 进来，进来。这是一个忙得头昏的早晨。哈罗，Richard。\nRichard: Thank you for seeing me on such short notice. / 谢谢您这样快就安排见我。\nMr. Carlson: I hope you\u0026rsquo;ve brought your pictures along. I see that you have. Let\u0026rsquo;s get right to it. We need a new coffee-table book, and a book of photos about the United States still feels right. / 我希望你带了你的照片一起来。我看到你带来了。我们就直接谈正事了。我们需要一本可以摆在客厅的书，而一本关于美国的摄影集仍然很有前景。\nMr. Carlson: Good. Very good. Family Album, U.S.A. It\u0026rsquo;s an excellent title. / 不错，很不错。\u0026ldquo;美国写真集\u0026rdquo;。这是个绝妙的书名。\nMr. Carlson: If you had to describe the book in one sentence, how would you do it? / 假如要你用一句话来描述这本书，你怎么说？\nRichard: Well, I\u0026rsquo;d describe it as a book which is a portrait of the United States—the places, the people—mostly the people. The things they do, the ways they live, the places they visit, and the landmarks. A photographic journey. / 嗯，我会把这本书形容为一幅美国的剪影——美国的一些地方、人民——大部分是人。他们所做的事情、他们的生活方式、他们所去的地方，以及地标等等。一次透过摄影作品的旅行。\nMr. Carlson: These are wonderful—these photos in your performing arts section. / 这些好得很——你这些表演艺术中心部分的照片。\nRichard: I\u0026rsquo;m glad you like them. / 我很高兴你喜欢它们。\nMr. Carlson: I do, but \u0026hellip; There\u0026rsquo;s something missing. You\u0026rsquo;ve got a good eye, Richard. You\u0026rsquo;re a terrific photographer. But before I can publish your work, I need to meet with my marketing department, and you\u0026rsquo;ve got to do one more thing. / 我确实喜欢，但是……少了些东西。你有艺术眼光，Richard。你是一名出色的摄影师。但在我出版你的书之前，我需要跟我的行销部门商量一下，而且你还要做一件事。\nMr. Carlson: In the section on culture, you\u0026rsquo;ve included performing arts centers, but you\u0026rsquo;ve left out street performance. The mimes. The musicians. The dancers—in the parks and on the streets. Richard, if you go out and photograph street performances in the city, you\u0026rsquo;ll have it. / 在文化这部分，你拍了表演艺术中心，但你忽略了街头表演。幽默剧演员啦、音乐家啦、在公园或街头跳舞的人啦。Richard，假如你去拍摄城市里的街头表演，那你就大功告成了。\nRichard: That is a great idea. I\u0026rsquo;ll do it. / 这是个好主意。我会去办。\nMr. Carlson: If you do it, I\u0026rsquo;ll publish your work. / 假如你拍好了，我就出版你的作品。\nRichard: Are you serious? / 你说真的吗？\nMr. Carlson: I\u0026rsquo;ve never been more serious. / 我从来没有比现在更认真了。\n（两周后，Richard完成了街头表演的拍摄）\nMarilyn: The pictures you\u0026rsquo;ve taken are fabulous, Richard. Mr. Carlson will love them. / 你拍的照片太精采了，Richard。Carlson先生会喜欢的。\nRichard: I\u0026rsquo;m going to show him the photos on Monday morning. I can\u0026rsquo;t wait! / 我要在星期一早晨给他看这些照片。我简直迫不急待！\n（在Carlson的办公室，Carlson非常满意）\nMr. Carlson: What a job! Good work, Richard! / 你拍得很棒！好作品，Richard！\nRichard: Well \u0026hellip; what do you think? Do I have my book? / 那么——你看怎么样？我的书可以出版吗？\nMr. Carlson: You do. You do. There\u0026rsquo;s a book here. I\u0026rsquo;ll have a contract and an advance payment waiting for you, first thing in the morning. / 当然，当然。书要出版。我会准备好一张合同和预付稿酬等你来，这是我明天早上的第一件事。\nRichard: I can\u0026rsquo;t wait to tell Marilyn! / 我迫不及待地想告诉Marilyn。\n重难点分析 \u0026ldquo;ring a bell\u0026rdquo; — 口语表达，意思是\u0026quot;听起来耳熟、有印象\u0026quot;。Does the name ring a bell?（这个名字你有印象吗？）\n\u0026ldquo;on such short notice\u0026rdquo; — 固定搭配，表示\u0026quot;在这么短的时间内通知/安排\u0026quot;。\n\u0026ldquo;Let\u0026rsquo;s get right to it.\u0026rdquo; — \u0026ldquo;我们直接谈正事吧\u0026rdquo;，非常实用的商务口语。\n\u0026ldquo;coffee-table book\u0026rdquo; — 指适合放在咖啡桌上的精装画册/书籍。\n\u0026ldquo;You\u0026rsquo;ve got a good eye.\u0026rdquo; — 夸赞某人有艺术眼光/审美眼光。\n\u0026ldquo;I\u0026rsquo;ve never been more serious.\u0026rdquo; — \u0026ldquo;我从来没有比现在更认真了\u0026rdquo;，强调自己是认真的。\n核心词汇 词汇 释义 例句 performing arts 表演艺术 This is the performing arts section. publisher 出版商 He\u0026rsquo;s the publisher of the company. concept 概念、想法 He really liked my concept. appointment 预约 I\u0026rsquo;d like to make an appointment. available 有空的 The only time he\u0026rsquo;s available is tomorrow. describe 描述 How would you describe the book? portrait 肖像、写照 A portrait of the United States. landmark 地标 The places they visit and the landmarks. street performance 街头表演 You\u0026rsquo;ve left out street performance. contract 合同 I\u0026rsquo;ll have a contract ready for you. advance payment 预付稿酬 An advance payment waiting for you. 口语中的应用 \u0026ldquo;Does the name \u0026hellip; ring a bell?\u0026rdquo; — 询问对方是否对某人/某事有印象。\n\u0026ldquo;on such short notice\u0026rdquo; — 表示时间紧迫的情况下。\n\u0026ldquo;Let\u0026rsquo;s get right to it.\u0026rdquo; — 商务场合中表示直接进入正题。\n\u0026ldquo;You\u0026rsquo;ve got a good eye.\u0026rdquo; — 夸赞对方的审美或观察力。\n\u0026ldquo;I\u0026rsquo;ve never been more serious.\u0026rdquo; — 强调自己是认真的。\n\u0026ldquo;When I say something, I mean it.\u0026rdquo; — \u0026ldquo;我说到做到\u0026rdquo;，强调诚信和决心。\n核心练习句型 ring a bell：Does the name ring a bell? on short notice：Thank you for seeing me on such short notice. get right to + 名词：Let\u0026rsquo;s get right to it. have a good eye：You\u0026rsquo;ve got a good eye. If you do it, I\u0026rsquo;ll + 动词：If you do it, I\u0026rsquo;ll publish your work. can\u0026rsquo;t wait to + 动词：I can\u0026rsquo;t wait to tell Marilyn! ","permalink":"/posts/2026-06-14-family-album-usa-lesson-17/","summary":"\u003ch2 id=\"课文原文双语对话\"\u003e课文原文（双语对话）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eMarilyn:\u003c/strong\u003e What are you doing? / 你在干什么？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e I think I\u0026rsquo;ve got them. / 我想我已经拍齐了。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMarilyn:\u003c/strong\u003e You think you\u0026rsquo;ve got what? / 你想你已经拍齐了什么？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e Performing arts—performing arts centers. I think I\u0026rsquo;ve got them all, but I\u0026rsquo;m not sure. / 表演艺术——表演艺术中心。我想我都已经拍齐了，但我不能肯定。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMarilyn:\u003c/strong\u003e I think you have got it, Richard. Lincoln Center, home of the Metropolitan Opera, the New York City Ballet, the New York Philharmonic. Shubert Alley, center of the theater on Broadway. And Carnegie Hall. And the Kennedy Center for the Performing Arts in Washington. And the Music Center in Los Angeles. And the others. I do have it all. / 我想你已完成了，Richard。林肯中心——大都会歌剧团、纽约市芭蕾舞团、纽约爱乐的大本营。Shubert Alley——百老汇戏剧中心。还有卡奈基音乐厅。还有位于华盛顿的甘乃迪表演艺术中心。还有位于洛杉矶的音乐中心。还有其他的。我确实拍齐了。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第17课：摄影集出版之路"},{"content":"课文原文（双语对话） Ellen: I don\u0026rsquo;t believe it! / 我简直难以相信！\nPhilip: What\u0026rsquo;s wrong? / 怎么了？\nEllen: Carter Boswell! / Carter Boswell！\nPhilip: Who\u0026rsquo;s Carter Boswell? / 谁是Carter Boswell？\nEllen: He\u0026rsquo;s running for the school board. The election\u0026rsquo;s next month. / 他正在竞选联合校董会董事。选举就在下个月。\nPhilip: What\u0026rsquo;s wrong with wanting to be on the school board? / 想进入联合校董会有什么错？\nEllen: Nothing. But he wants to cut the school budget! / 没有什么。但他想削减学校的预算！\nPhilip: Maybe it needs cutting. / 也许真需要削减呢。\nEllen: Cutting the budget is fine, but he wants to do it by cutting all the cultural programs. No music, no dance, no concert, no stage presentations. / 削减预算是好的，但他要削减，是透过取消所有的文化活动。没有音乐、没有舞蹈、没有音乐会、没有舞台表演。\nPhilip: Why does he want to do that? / 为什么他要那么做呢？\nEllen: He says it\u0026rsquo;s to save the taxpayers\u0026rsquo; money, and I think he believes that the taxpayers will vote for him if he spends less on the cultural programs. / 他说这是为了要节省纳税人的钱，而我认为他相信纳税人会投他一票，假如他在这文化活动上减少开支的话。\nPhilip: He\u0026rsquo;s probably right. Lots of people want their taxes used for new books and a new paint job in the schoolrooms. / 他也许是对的。许多人希望他们缴的税金被用来购买新书和重新油漆教室。\nEllen: Maybe some of us would like to pay a little bit more and keep the cultural programs for our kids. / 也许我们之中有一些人愿意多付一点钱，以便为我们的孩子保存文化活动。\nRobbie: Hey, that\u0026rsquo;s terrific, Mom! Against Carter Boswell? Great! / 嗨，太棒了，妈妈！和Carter Boswell竞选？太好了！\nEllen: Well, if I run for office, the voters will have a clear choice. I stand for everything Boswell doesn\u0026rsquo;t. / 嗯，假如我出来竞选公职，投票人可以有明确的选择。我代表Boswell所不赞成的那些立场。\nPhilip: I think a lot of people will vote for you against Boswell, Ellen. / 我想很多人会投票支持你和Boswell对抗，Ellen。\nEllen: Will you help me if I do run? / 假如我真的竞选，你会帮我忙吗？\nPhilip: Absolutely. / 当然。\n（Ellen去见报纸编辑Mr. Maxwell）\nMr. Maxwell: Why will the voters vote for you against Boswell, Mrs. Stewart? / 为什么选民会投票支持你和Boswell对抗呢，Stewart太太？\nEllen: Because I care. / 因为我关心。\nMr. Maxwell: \u0026ldquo;Vote for Ellen Stewart. She cares.\u0026rdquo; Not a bad slogan. But what do you care about? / \u0026ldquo;投Ellen Stewart一票。她关心。\u0026rdquo; 不错的标语。但你关心什么呢？\nEllen: Well, I care about the children of our town. I don\u0026rsquo;t want them to grow up without cultural programs in our school. / 噢，我关心我们镇上的孩子们。我不希望在他们成长期间，我们的学校里没有文化活动。\n（全家动员助选）\nRichard: Here are the fliers, hot off the press! / 传单来了，刚刚印出来的！\nGrandpa: Right over here, Grandpa. You fold the fliers. Richard and I will put them into the envelopes. / 请到这里来，爷爷。你来折传单，我和Richard把它们放进信封。\n（Boswell在电视上做广告）\nBoswell on TV: I care about the school buildings in need of paint. I care about more lockers for the teachers. I care about new fixtures in the hallways—not music or dancing or entertainment. I care about the practical things. / 我关心学校的建筑物需要粉刷。我关心教师要有更多的储物柜。我关心走廊的新灯具——而不是音乐、舞蹈或者娱乐。我关心实用的事物。\nRobbie: A lot of people will agree with him. / 许多人会赞同他。\nPhilip: You have to go on television, too. / 你也应该上电视。\n（Ellen的电视广告）\nEllen on TV: My slogan is \u0026ldquo;I care.\u0026rdquo; I care about people, not things. Vote for me, Ellen Stewart. I care. / 我的口号是\u0026quot;我关心\u0026quot;。我关心人，而不是东西。请投我——Ellen Stewart一票。我关心。\n（Richard想出让Ellen的广告在电器行电视上播放的主意）\nRichard: Mom is now on television in every appliance store in Riverdale, except Hamlin\u0026rsquo;s. He\u0026rsquo;s a Boswell voter. / 妈妈现在出现在电视里，在Riverdale的每一家电器行，Hamlin的店除外。他是Boswell的支持者。\nPhilip: That\u0026rsquo;s a brilliant idea, Richard! / 这主意太棒了，Richard！\n（选举结果）\nTV News: In the hotly contested race for the one seat on the Riverdale School Board, Mrs. Ellen Stewart has taken an early lead. / 在这场激烈竞赛中争夺Riverdale联合校董会一个席次，Ellen Stewart太太初步领先。\n（最终结果）\nPhilip: You came very close, Ellen. You lost by only a hundred and twenty-one votes. / 你差了一点点，Ellen。你仅仅以一百二十一票的些微差距输了。\nEllen: I lost. / 我输了。\nRobbie: You tried, Mom. You lost by a very small number of votes. Only one hundred and twenty-one votes! / 你尽力了，妈妈。你输的票数非常少。仅仅一百二十一票！\nPhilip: Look, you\u0026rsquo;ve made a very strong impression on our community. You\u0026rsquo;ll have another chance next election. / 看，你已经留下了非常深刻的印象给我们的社区。下次选举时你还有机会。\n（Mr. Maxwell打来电话）\nMr. Maxwell: I just called to tell you that you are very impressive. You lost the election, but you won the attention of the residents of Riverdale, of Boswell, and of me. I hear Boswell wants to appoint you to a special arts committee. I\u0026rsquo;m sending over a reporter in the morning to interview you. I\u0026rsquo;m gonna do an article on \u0026ldquo;Ellen Stewart—she cares.\u0026rdquo; / 我打电话是想告诉你，你给人们留下了深刻的印象。尽管你输了，但你引起了Riverdale的居民的注目，和Boswell和我的。我听说Boswell将任命你到一个特别艺术委员会。我将派一位记者在明天早晨来采访你。我准备写一篇文章，叫做\u0026quot;Ellen Stewart——她关心\u0026quot;。\nEllen: You were right, Philip. I did make a difference in town. And in this family. / 你说对了，Philip。我确实在镇上发挥了影响力。也在这个家里。\n重难点分析 \u0026ldquo;run for\u0026rdquo; — 竞选（公职）。\u0026ldquo;run for the school board\u0026rdquo; 竞选校董会。注意 \u0026ldquo;run\u0026rdquo; 在这里不是\u0026quot;跑步\u0026quot;的意思。\n\u0026ldquo;stand for\u0026rdquo; — 代表、主张。\u0026ldquo;I stand for everything Boswell doesn\u0026rsquo;t.\u0026rdquo; 我代表Boswell所不赞成的立场。\n\u0026ldquo;make a difference\u0026rdquo; — 发挥作用、产生影响。\u0026ldquo;You can make a difference.\u0026rdquo; 你可以发挥影响力。\n\u0026ldquo;hot off the press\u0026rdquo; — 刚印好的、最新出炉的。原指报纸刚印好从印刷机出来。\n\u0026ldquo;take an early lead\u0026rdquo; — 在比赛中/选举中取得初步领先。\n\u0026ldquo;I\u0026rsquo;m with you.\u0026rdquo; — 口语中表示\u0026quot;我支持你\u0026quot;、\u0026ldquo;我同意你\u0026rdquo;。\n核心词汇 词汇 释义 例句 school board 校董会 He\u0026rsquo;s running for the school board. election 选举 The election\u0026rsquo;s next month. budget 预算 He wants to cut the school budget. cultural programs 文化活动 Cutting all the cultural programs. taxpayer 纳税人 It\u0026rsquo;s to save the taxpayers\u0026rsquo; money. slogan 口号、标语 Not a bad slogan. campaign 竞选活动 It takes money to run a campaign. commercial 广告 He\u0026rsquo;s doing a commercial on TV. flier 传单 Here are the fliers. appliance store 电器行 In every appliance store in Riverdale. interview 采访 I\u0026rsquo;m sending over a reporter to interview you. 口语中的应用 \u0026ldquo;I don\u0026rsquo;t believe it!\u0026rdquo; — 表达惊讶或难以置信。\n\u0026ldquo;You\u0026rsquo;ve got my vote.\u0026rdquo; — \u0026ldquo;我投你一票\u0026rdquo;，也表示\u0026quot;我支持你\u0026quot;。\n\u0026ldquo;I\u0026rsquo;m with you.\u0026rdquo; — \u0026ldquo;我支持你/我同意你\u0026rdquo;。\n\u0026ldquo;Just cool down.\u0026rdquo; — \u0026ldquo;冷静一下\u0026rdquo;，劝人不要过于激动。\n\u0026ldquo;You\u0026rsquo;re gonna win.\u0026rdquo; — 口语中 \u0026ldquo;gonna\u0026rdquo; = \u0026ldquo;going to\u0026rdquo;。\n\u0026ldquo;Trust me!\u0026rdquo; — \u0026ldquo;相信我！\u0026rdquo; 用于说服对方。\n核心练习句型 run for + 职位：She\u0026rsquo;s running for the school board. stand for + 主张：I stand for everything Boswell doesn\u0026rsquo;t. make a difference：You can make a difference. vote for + 某人：I\u0026rsquo;ll vote for you. hot off the press — 刚出炉的。 take an early lead — 取得初步领先。 ","permalink":"/posts/2026-06-14-family-album-usa-lesson-18/","summary":"\u003ch2 id=\"课文原文双语对话\"\u003e课文原文（双语对话）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eEllen:\u003c/strong\u003e I don\u0026rsquo;t believe it! / 我简直难以相信！\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003ePhilip:\u003c/strong\u003e What\u0026rsquo;s wrong? / 怎么了？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eEllen:\u003c/strong\u003e Carter Boswell! / Carter Boswell！\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003ePhilip:\u003c/strong\u003e Who\u0026rsquo;s Carter Boswell? / 谁是Carter Boswell？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eEllen:\u003c/strong\u003e He\u0026rsquo;s running for the school board. The election\u0026rsquo;s next month. / 他正在竞选联合校董会董事。选举就在下个月。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003ePhilip:\u003c/strong\u003e What\u0026rsquo;s wrong with wanting to be on the school board? / 想进入联合校董会有什么错？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eEllen:\u003c/strong\u003e Nothing. But he wants to cut the school budget! / 没有什么。但他想削减学校的预算！\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003ePhilip:\u003c/strong\u003e Maybe it needs cutting. / 也许真需要削减呢。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第18课：竞选校董会"},{"content":"课文原文（双语对话） Harry: It looks wrong. / 看起来不对劲。\nRichard: Hmmm. It is wrong. / 嗯嗯。是不对劲。\nHarry: Are they always that difficult to make? / 领结这样难系吗？\nRichard: The truth is \u0026hellip; yes. / 老实说……是很难。\nHarry: I\u0026rsquo;ll try again. / 我再试一次。\nRichard: At this rate, the wedding will take place tomorrow. / 照这种速度，婚礼只有明天举行了。\nHarry: Not to worry. / 别担心。\nRichard: OK. Here we go. / 好吧。我们重来。\nPhilip: I\u0026rsquo;m worried, Philip. What if we can\u0026rsquo;t tie the tie? / 我很担心，Philip。如果我们系不好领结怎么办？\nRichard: If we can\u0026rsquo;t tie the tie, then there can\u0026rsquo;t be a wedding. / 假如我们系不好领结，婚礼就不能举行了。\nPhilip: You\u0026rsquo;d better not make Harry any more nervous than he is. / 你最好别让Harry更加紧张了。\nRichard: Don\u0026rsquo;t worry. We\u0026rsquo;ll figure a way. / 别担心，我们会想法子的。\n（Grandpa加入）\nRobbie: How\u0026rsquo;re you doing, fellas? / 你们怎么样了，各位？\nRichard: Not so good, Grandpa. We can\u0026rsquo;t get this bow tie tied. Nobody knows how to do it. Do you? / 情况不太好，爷爷。我们系不好领结。没有人会系。你会吗？\nGrandpa: No. I never could, either. / 不会，我也一直都不会。\nRobbie: Well, you have your own tuxedo. How do you tie your bow tie? / 噢，你有自己的燕尾服。你怎么系领结的？\nGrandpa: I don\u0026rsquo;t. I never could tie one of those things \u0026hellip; bow ties. I have always worn a clip-on bow tie. / 我没系。我从来就不会打那一类的玩意儿……领结。我都是用夹上去的领结。\nRichard: A clip-on? Of course. Now I remember. Yes, it\u0026rsquo;s so easy. All you do is clip it around under your collar. / 用夹上去的？没错，现在我想起来了。没错，它真简便。你所要做的就是将它夹在领子下方。\nRobbie: We all need one of those. / 我们都需要一个这样的领结。\n（Robbie骑自行车去礼服出租店买夹式领结）\nGrandpa: I\u0026rsquo;m the father of the bride. I\u0026rsquo;m supposed to be worried about my daughter, and here I am with the man that\u0026rsquo;s marrying my daughter—worrying about him. Poor Harry. I know the feeling. Wedding-day Jitters. / 我是新娘的父亲。我原该为我的女儿担心才是，如今我却和将要娶我女儿的人在一起——为他操心。可怜的Harry。我知道这种感觉。这叫婚礼紧张症。\n（Harry找不到戒指）\nHarry: Ring? Ring? Oh my! What did I do with the rings? I put them in the pocket of my sports jacket. / 戒指？戒指？噢，我的天！我把戒指放哪儿了？我把它们放在我运动夹克的口袋里。\nRichard: No, I think you put them in your tuxedo jacket pocket. Remember? / 不对，我想你是放在礼服上衣口袋里。记得吗？\nHarry: Right. What did I do with the rings? / 对。我把戒指放哪儿了？\nRichard: Didn\u0026rsquo;t you give them to Richard? He\u0026rsquo;s your best man. / 你不是把它们交给Richard了吗？他是男傧相呀。\nHarry: I remember. You gave them to Richard. / 我记起来了。你交给了Richard。\nRichard: Oh, yeah. I remember now. You handed them to me. What did I do with them? / 噢，对了。我现在想起来了。你将它们给了我。我把它们放在哪儿了？\nRichard: I remember. I gave them to Robbie to hold so I wouldn\u0026rsquo;t lose them. / 我想起来了。我把它们交给Robbie拿，免得我弄丢了。\nPhilip: Where\u0026rsquo;s Robbie? / Robbie在哪儿？\nRichard: Relax, Harry. Robbie went to pick up the clip-on bow ties. / 不要紧张，Harry。Robbie去拿夹上去的领结。\nHarry: Oh, I forgot. / 噢，我忘了。\n（Susan和Marilyn、Ellen在另一边准备）\nSusan: And now for \u0026hellip; something old, something new, something borrowed, and something blue. / 现在，接着是——一些旧的、一些新的、一些借来的、一些蓝色的。\nMarilyn: Something borrowed. That\u0026rsquo;s this dress. Borrowed from Marilyn. / 借来的东西。那就是这件礼服。跟Marilyn借的。\nEllen: Something blue. My wristband. I wore it when I married your father. / 蓝色的东西。我的腕带。我和你父亲结婚时戴着它。\nSusan: Oh, Mother. I forgot you still had it. It\u0026rsquo;s just so lovely. / 噢，妈妈。我忘了你仍然保留着它。它是那么可爱。\nEllen: I bought it in an antique shop when I was about eighteen years old. I saved it for my wedding day. / 我在一家古董店买的，那时我差不多十八岁。我留着等我的结婚日才用。\nSusan: And you saved it for me, didn\u0026rsquo;t you, Mother? / 你也留着要给我，对吗，妈妈？\nEllen: Yes, honey. I did. / 是的，亲爱的，是这样。\nMarilyn: Something old. Grandma\u0026rsquo;s pearls! / 旧的东西。祖母的珍珠项链！\nSusan: Oh, Grandpa will be so pleased that you\u0026rsquo;re wearing them. I\u0026rsquo;m sure he misses Grandma on a day like this. / 噢，你戴了它，祖父一定会非常高兴。我想在这样的日子祖父一定会思念祖母。\nMarilyn: Something borrowed, something blue. Something old \u0026hellip; and now for something new. The veil. / 借的东西、蓝色的东西、旧的东西……现在轮到新的东西了。面纱。\nSusan: Oh, it\u0026rsquo;s so beautiful, Marilyn! / 噢，它好漂亮，Marilyn！\nMarilyn: You really are a fabulous designer, Marilyn. Doesn\u0026rsquo;t it look just right on Susan? / 你真是一个绝佳的设计师，Marilyn。Susan戴起来正好，不是吗？\nEllen: Perfect! And when you both say, \u0026ldquo;I do,\u0026rdquo; Harry will lift this veil over your head and kiss the bride. / 太棒了！当你们两人都说\u0026quot;我愿意\u0026quot;时，Harry会掀起面纱并吻新娘。\n（婚礼开始）\nJudge: Dearly beloved, we are gathered here today to join this man and this woman in holy matrimony. / 敬爱的人们，我们今天聚集在这里见证这位男士和这位女士的神圣婚盟。\nJudge: Then, Harry Bennett, do you take Susan Stewart to be your lawful, wedded wife? / 那么，Harry Bennett，你愿意接受Susan Stewart做你合法的妻子吗？\nHarry: I do. / 我愿意。\nJudge: And you, Susan Stewart, do you take Harry Bennett to be your lawful, wedded husband? / 那么你，Susan Stewart，你愿意接受Harry Bennett为你合法的丈夫吗？\nSusan: I do. / 我愿意。\nJudge: By the power vested in me by the laws of the State of New York, I now pronounce you husband and wife. You may kiss the bride now, Harry. / 凭着纽约州法律赋予我的权力，我现在宣布你们成为夫妻。你可以吻新娘了，Harry。\n重难点分析 \u0026ldquo;Not to worry.\u0026rdquo; — 口语表达，\u0026ldquo;别担心\u0026rdquo;，比 \u0026ldquo;Don\u0026rsquo;t worry\u0026rdquo; 更简洁。\n\u0026ldquo;Here we go.\u0026rdquo; — 口语中表示\u0026quot;开始吧\u0026quot;、\u0026ldquo;我们重来\u0026rdquo;。\n\u0026ldquo;What if\u0026hellip;\u0026rdquo; — 用来提出假设性问题，\u0026ldquo;如果……怎么办？\u0026rdquo;\n\u0026ldquo;figure a way\u0026rdquo; — \u0026ldquo;想出办法\u0026rdquo;，相当于 \u0026ldquo;figure out a way\u0026rdquo;。\n\u0026ldquo;clip-on\u0026rdquo; — 夹上去的（领结），由动词 \u0026ldquo;clip\u0026rdquo;（夹住）加 \u0026ldquo;on\u0026rdquo; 构成复合形容词。\n\u0026ldquo;Wedding-day Jitters\u0026rdquo; — \u0026ldquo;婚礼紧张症\u0026rdquo;，\u0026ldquo;jitters\u0026rdquo; 表示紧张不安。\n\u0026ldquo;Something old, something new, something borrowed, something blue.\u0026rdquo; — 西方婚礼传统，新娘要穿戴\u0026quot;旧的、新的、借来的、蓝色的\u0026quot;四样东西以求好运。\n核心词汇 词汇 释义 例句 bow tie 领结 We can\u0026rsquo;t get this bow tie tied. tuxedo 燕尾服、礼服 You have your own tuxedo. clip-on 夹上去的 I have always worn a clip-on bow tie. collar 衣领 Clip it around under your collar. jitters 紧张不安 Wedding-day Jitters. bride 新娘 I\u0026rsquo;m the father of the bride. groom 新郎 The man that\u0026rsquo;s marrying my daughter. best man 男傧相 He\u0026rsquo;s your best man. veil 面纱 Harry will lift this veil. wristband 腕带 My wristband. pearls 珍珠项链 Grandma\u0026rsquo;s pearls! matrimony 婚姻 Join this man and this woman in holy matrimony. 口语中的应用 \u0026ldquo;Not to worry.\u0026rdquo; — 安慰对方\u0026quot;别担心\u0026quot;。\n\u0026ldquo;Here we go.\u0026rdquo; — 开始做某事时的口头禅。\n\u0026ldquo;Take it easy.\u0026rdquo; — \u0026ldquo;放轻松\u0026rdquo;，安慰紧张的人。\n\u0026ldquo;You\u0026rsquo;re a lucky guy.\u0026rdquo; — \u0026ldquo;你是个幸运的家伙\u0026rdquo;，祝贺别人。\n\u0026ldquo;Are you kidding?\u0026rdquo; — \u0026ldquo;你在开玩笑吗？\u0026rdquo; 表达惊讶或难以置信。\n\u0026ldquo;I do.\u0026rdquo; — 婚礼上最经典的誓言回答，\u0026ldquo;我愿意\u0026rdquo;。\n核心练习句型 What if + 从句：What if we can\u0026rsquo;t tie the tie? figure a way：We\u0026rsquo;ll figure a way. be supposed to + 动词：I\u0026rsquo;m supposed to be worried about my daughter. take it easy：Try to take it easy. something old / new / borrowed / blue — 西方婚礼传统表达。 I do. — 婚礼誓言。 ","permalink":"/posts/2026-06-14-family-album-usa-lesson-19/","summary":"\u003ch2 id=\"课文原文双语对话\"\u003e课文原文（双语对话）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eHarry:\u003c/strong\u003e It looks wrong. / 看起来不对劲。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e Hmmm. It is wrong. / 嗯嗯。是不对劲。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHarry:\u003c/strong\u003e Are they always that difficult to make? / 领结这样难系吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e The truth is \u0026hellip; yes. / 老实说……是很难。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHarry:\u003c/strong\u003e I\u0026rsquo;ll try again. / 我再试一次。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e At this rate, the wedding will take place tomorrow. / 照这种速度，婚礼只有明天举行了。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHarry:\u003c/strong\u003e Not to worry. / 别担心。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e OK. Here we go. / 好吧。我们重来。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003ePhilip:\u003c/strong\u003e I\u0026rsquo;m worried, Philip. What if we can\u0026rsquo;t tie the tie? / 我很担心，Philip。如果我们系不好领结怎么办？\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第19课：婚礼前的紧张与准备"},{"content":"课文原文 Excuse me. My name is Richard Stewart. I\u0026rsquo;m a photographer. May I take a picture of you and your little boy? 对不起，我叫Richard Stewart，我是一位摄影师。我可以替你和你的小男孩拍一张照吗？\nWhat\u0026rsquo;s it for? 是做什么用的？\nIt\u0026rsquo;s for a book. It\u0026rsquo;s a book of pictures. I call it Family Album, U.S.A. 是为一本书拍的。这是一本摄影集。我称之为「美国写真」。\nOh, that\u0026rsquo;s a nice idea. Well, it\u0026rsquo;s fine if you take our picture. 噢，这想法不错。你想拍我们的照，就请吧。\nI\u0026rsquo;m Martha Vann. 我叫Martha Vann。\nThank you. I appreciate your help. 谢谢，很感谢你的帮助。\nI\u0026rsquo;m Richard. What\u0026rsquo;s your name? 我是Richard，你叫什么？\nGerald. Gerald。\nHow old are you, Gerald? Gerald，你今年多大啦？\nFive. 五岁。\nAnd where do you live? 你们住在哪里？\nWe live in California. 我们住在California。\nWell, welcome to New York. 噢，欢迎你们到纽约来。\nOK, just a second. I\u0026rsquo;m almost ready here. 好了，请稍等一下。我快要准备就绪了。\nCan I help you? 我能帮你忙吗？\nOh, please. Hold Gerald\u0026rsquo;s hand, please. Great! Now point to the buildings. Terrific! Give Mommy a kiss, Gerald. Nice! 噢，太好了。请握住Gerald的手。很好！现在请指着那些建筑物。好极了！Gerald，亲一亲妈妈，很好！\nThank you, Gerald. And thank you, Mrs. Vann. 谢谢你，Gerald。谢谢你，Vann太太。\nOh, my pleasure. We\u0026rsquo;ll be looking for your book. 噢，不客气。我们会去买你的书。\nThank you. Good-bye. Bye, Gerald. Thanks again. 谢谢。再见。Gerald，再见。再次谢谢你。\nOh, you\u0026rsquo;re welcome. 噢，请别客气。\nHey, let me take your picture! 嘿！让我给你拍一张照！\nWonderful. Please. 好啊，请。\nAre you from New York? 你是从纽约来的吗？\nNo, I\u0026rsquo;m from Greece. I\u0026rsquo;m an exchange student. 不是，我是从希腊来的。我是一名交换学生。\nWhen did you come here? 你是什么时候来这里的？\nThree months ago. 三个月之前。\nYour English is very good. 你的英语说得很好。\nThanks. I studied English in school. 谢谢你的夸奖。我是在学校里学的英语。\nWould you like some coffee? 要不要来点咖啡？\nNo, thank you. Tell me about your book. 不要，谢谢。谈谈你的书吧。\nOh, it\u0026rsquo;s not finished yet, but I have some of the pictures. Would you like to see them? 噢，它尚未完成，但我手头有一些照片。你要不要看一看？\nYes. I\u0026rsquo;d like that. 要啊，我想看一看。\nHere they are. Family Album, U.S.A. It\u0026rsquo;s an album of pictures of the United States: the cities, the special places, and the people. And these are pictures of people working: steelworkers, bankers, police, street vendors, ambulance drivers, doctors\u0026hellip;. 就在这里。「美国写真」，是关于美国的城市、特别的地方以及人们的摄影选辑。这是工作中人们的照片：钢架工人、银行职员、警察、街头小贩、救护车驾驶员、医生等等……\nOh, this is my father. He\u0026rsquo;s a doctor. This is my mother. 噢，这是我父亲，他是一名医生。这是我母亲。\nWhat\u0026rsquo;s her name? 她叫什么名字？\nEllen. Ellen。\nMy younger brother, Robbie. He goes to high school. This is my sister Susan. She works for a toy company. Here\u0026rsquo;s my grandfather. He lives in Florida. And this is my wife Marilyn. 这是我弟弟Robbie，他在上高中。这是我妹妹Susan，她在一家玩具公司工作。这是我祖父，他住在Florida。这是我太太Marilyn。\nOh, she\u0026rsquo;s very pretty. 噢，她很漂亮。\nThanks. And what about your family? 谢谢。那你的家庭呢？\nThey are in Thessaloniki. That\u0026rsquo;s a large city in northern Greece. But now I\u0026rsquo;m living in the Bronx. 他们住在Thessaloniki，那是希腊北部的一个大城市。但现在我住在Bronx区。\nWith a Greek-American family? 跟希裔美国家庭住吗？\nNo. Hispanic. 不是，是西语裔家庭。\nOh no! It\u0026rsquo;s five thirty. Will you excuse me? I have to meet my wife. 哎呀，已经五点半了。我失陪了，我得去见我太太。\nIt was nice meeting you. 非常高兴遇见你。\nIt was a pleasure meeting you, too. 我也很高兴碰到你。\nThanks for your help. And good luck! I\u0026rsquo;ve got to go. 谢谢你的帮助。祝你好运！我得走了。\nBy the way, I\u0026rsquo;m Richard. What\u0026rsquo;s your name? 噢，我忘了说，我叫Richard，你呢？\nAlexandra. Alexandra。\nBye-bye, Alexandra. Thanks. 再见，Alexandra，谢谢。\nBye-bye. Richard! Richard! You left your bag! 再见。Richard！Richard！你掉了一个旅行袋。\nExcuse me, officer. Can you help me? 对不起，警官。你能帮帮我吗？\nSure. 当然可以。\nCan you tell me how to get to Linden Street, in Riverdale? 你能告诉我怎么去Riverdale的林登街吗？\n\u0026ldquo;Richard Stewart, 46 Linden Street, Riverdale, New York.\u0026rdquo; You should take the number 1 subway. \u0026ldquo;Richard Stewart，林登街46号，Riverdale，纽约\u0026rdquo;。你应当搭一路地铁。\nIs there a station near here? 附近有地铁站吗？\nYes. The station\u0026rsquo;s that way. You should take the number 1 train to Van Cortlandt Park. 有。地铁站在那边。你搭一路车到Van Cortlandt公园下车。\nNumber 1 train to Van Cortlandt Park. Thank you. 一路车到Van Cortlandt公园。谢谢。\nAnytime. Good luck. Remember, the number 1 train. The uptown platform. 不用谢。祝你好运。记住，搭一路车，在北线月台。\nThank you. 谢谢。\nYou\u0026rsquo;re welcome. 不客气。\nIs this pink too bright for me? 我穿粉红色会不会太过鲜艳了？\nMmm-hmm. It is a very bright pink. 是的，这种粉红是亮了点。\nTry this. It\u0026rsquo;s size eight. 试试这一件。尺码是八号。\nBut I wear size ten. 但我穿十号的衣服。\nHow about green? It\u0026rsquo;s size ten. 绿的怎么样？它是十号的。\nLet me try it on. 让我试试看。\nI\u0026rsquo;m taking too much of your time. 我耽误了你很多时间。\nIt\u0026rsquo;s six o\u0026rsquo;clock. Where\u0026rsquo;s my husband? 已经六点了。我丈夫怎么还没来？\nI was expecting him here at five forty-five. 我们约好了五点四十五在这里会面的。\nDon\u0026rsquo;t worry. The traffic is very heavy at this hour. 别担心。这个时间交通很拥挤。\nI know. But we\u0026rsquo;re going to be late for dinner. 我知道。但我们晚餐可要推迟了。\nI\u0026rsquo;ll take this green sweater. I like the color on me, don\u0026rsquo;t you? 我买这件绿毛衣吧，我觉得这种颜色较适合我，你说呢？\nI think it looks terrific on you. 我觉得你穿上它好极了。\nI\u0026rsquo;m sorry I\u0026rsquo;m so late. I had a really bad day. 对不起，我迟到了这么久。今天真是糟透了。\nIt\u0026rsquo;s ten after six. We\u0026rsquo;re late. Robbie\u0026rsquo;s cooking tonight, and dinner\u0026rsquo;s at six thirty. 现在是六点十分。我们迟了。今晚Robbie作饭，晚餐六点半开始。\nI know. I know. I\u0026rsquo;m really sorry. I left my bag of film on the ferry. I went back for it, but the ferry was gone. I lost a whole day\u0026rsquo;s work. 我知道，我知道。真的很抱歉。我把装底片的旅行袋遗放在渡船上了，等我回去找的时候，船已经开走了。我丢掉一整天的工作成果。\nI\u0026rsquo;ll call the Staten Island Ferry lost-and-found office. 我来打电话给Staten岛渡轮的失物招领处。\nI didn\u0026rsquo;t think of that. Thanks. 我倒没有想到这个法子。谢了。\nHello. Yes. The number, please, of the Staten Island Ferry lost-and-found office. Five five five\u0026hellip;zero eight zero eight. Thank you. 喂，我想问一下Staten岛渡轮失物招领处的电话号码，555-0808。谢谢。\nI really appreciate it, Marilyn. 真的很感谢你，Marilyn。\nHello. Did anyone find a camera bag this afternoon, a small canvas bag, on the J. F. Kennedy Ferry?\u0026hellip;No? Maybe someone will find it. The name is Stewart, Richard Stewart. And the telephone number is five five five\u0026hellip;three oh nine oh. Thank you. 喂，请问今天下午有人捡到一个照像机旅行袋吗？一个小的粗帆布袋？是在J. F. Kennedy号渡船上丢的。……没有吗？也许会有人发现的。失主是Stewart，Richard Stewart。电话是555-3090。谢谢你。\nSorry, Richard. They don\u0026rsquo;t have it. 对不起，Richard，他们那里没有。\nThanks, anyway. There was a girl on the ferry. Now maybe\u0026hellip; 不管怎样，我都得谢谢你。在渡船上有一个女孩。也许现在……\nTell me about it on the way home. 在回家的路上告诉我吧。\nAnd give her a teaspoon of the medicine after every meal. 每餐之后给她吃一茶匙的药。\nDon\u0026rsquo;t worry. She\u0026rsquo;ll be fine. You\u0026rsquo;re welcome. Good-bye. 不要担心，她会好的。不用谢。再见。\nHow are you? 你怎么样？\nI\u0026rsquo;m tired and hungry. 我累了，也饿了。\nWell, Marilyn and Richard called. They\u0026rsquo;ll be here soon, and then we\u0026rsquo;ll eat. 好啦，Marilyn和Richard打电话来了，他们马上就到。他们一到就开饭。\nAll right. Is\u0026hellip;is Susan coming? 好吧，Susan来吗？\nWell, she\u0026rsquo;ll be here later. She has to work late tonight. 来，她会晚一点。她今晚得工作得晚一些。\nAnd what\u0026rsquo;s Robbie cooking for dinner? Robbie为晚餐准备了什么？\nIt\u0026rsquo;s a surprise. 会给你一个惊喜。\nI hope it\u0026rsquo;s pasta. 我希望是意大利面食。\nRobbie, the dinner was terrific. Robbie，晚餐真是棒透了！\nYes, it was delicious. What\u0026rsquo;s for dessert? 对，味道非常好。有什么甜点呢？\nOh, I forgot dessert. 哦，我忘了甜点了。\nRobbie! Robbie！\nDon\u0026rsquo;t worry. We\u0026rsquo;ve got lots of ice cream. 别愁。我们有很多冰淇淋。\nOh, I\u0026rsquo;d love some ice cream. 哦，我想吃冰淇淋。\nWell, there\u0026rsquo;s chocolate and coffee and a little vanilla. 好的。这里有巧克力冰淇淋、咖啡冰淇淋和一点香草的。\nI\u0026rsquo;ll have vanilla. Is that all right with everyone? 我要香草的。各位有意见吗？\nI\u0026rsquo;ll have chocolate. 我要巧克力的。\nMe, too. 我也是。\nUh, one scoop of coffee and one scoop of chocolate for me. 我要一勺咖啡的和一勺巧克力的。\nRobbie, will you help me serve? Robbie，你能帮帮我吗？\nI keep thinking about that bag of film. Eight rolls. A whole day\u0026rsquo;s work. And good stuff, too. 我一直在想着旅行袋的事。一共有八卷呢！一整天的成果呀。而且都很精采。\nDon\u0026rsquo;t worry, Richard. Someone will find it. 别担心，Richard，总有人发现它的。\nI\u0026rsquo;ll get it. Hello. 我去开门。哈罗！\nHello. 哈罗！\nDoes Richard Stewart live here? Richard Stewart住这里吗？\nYes, he\u0026rsquo;s my brother. I\u0026rsquo;m Robbie\u0026hellip;Robbie Stewart. 是的。他是我哥哥。我叫Robbie，Robbie Stewart。\nI\u0026rsquo;m Alexandra Pappas. How do you do? 我叫Alexandra Pappas，你好。\nYour brother left his bag of film on the ferryboat. I found it. 你哥哥将他的旅行袋遗放在渡船上了。我发现了它。\nI\u0026rsquo;m really glad to see you. I mean\u0026hellip;my brother\u0026rsquo;ll be really glad to see you! 非常高兴见到你。我的意思是我哥哥见到你会非常高兴。\nRobbie! Who is it? Robbie！是谁呀？\nIt\u0026rsquo;s Richard\u0026rsquo;s film! I mean, Alexandra Pappas. Come in, please. Richard的底片找到了！我是说Alexandra Pappas。请进。\nAlexandra! Alexandra！\nHello, Richard. I found your bag! 哈罗，Richard，我找到你的旅行袋。\nOh, thank you! Thank you! Um\u0026hellip;Alexandra, let me introduce you. This is my wife Marilyn. 哦，谢谢你，谢谢你。噢……Alexandra，让我来介绍一下。这是我太太Marilyn。\nRichard showed me your photo. How do you do? Richard给我看了你的照片。你好！\nOh yes. Richard told us all about you. It\u0026rsquo;s nice to meet you. 你好！Richard跟我们谈起你。很高兴见到你。\nAnd this is my mother, Ellen Stewart. 这是我妈妈，Ellen Stewart。\nHow do you do? 你好。\nAnd my father, Dr. Philip Stewart. 这是我父亲，Philip Stewart医生。\nNice to meet you, Alexandra. 很高兴见到你，Alexandra。\nAnd\u0026hellip;ah\u0026hellip;you met Robbie. 还有……啊，你已经见过Robbie。\nYes. And you must be Susan. Hi. 是的。你一定是Susan了。嗨！\nHi. Welcome. 嗨，欢迎你。\nI\u0026rsquo;m so glad you found the bag and took the time and trouble to return it. 我很高兴你发现了旅行袋，而且不怕麻烦，花时间将它送来。\nOh, it was no trouble. I just took the wrong train. 哦，没什么麻烦。只是我坐错了车。\nWould you like something to eat? 你来吃点东西，好吗？\nThank you, no. I\u0026rsquo;m late for dinner at my house. I really have to go. 谢谢，不用了。我回家吃晚饭要迟到了。我真的得走了。\nWould you like to call home? 你想跟家里通个电话吗？\nI\u0026rsquo;d appreciate that. 谢谢你让我使用电话。\nPlease, use the phone. 请随便用。\nThanks. Excuse me. 谢谢。失陪一下。\nAlexandra\u0026rsquo;s a high-school exchange student from Greece. Alexandra是从希腊来的交换高中生。\nWhere does she live? 她住在哪里？\nWith a family in the Bronx. 住在Bronx区的一个家庭里。\nOh, that\u0026rsquo;s not too far from here! 噢，那里不很远！\nTake it easy, Robbie. 不要太紧张，Robbie。\nThank you. I can only stay a few minutes. 谢谢。我只能停留几分钟。\nHave some iced tea. 喝点冰茶吧。\nThanks, Mrs. Stewart. 谢谢，Stewart太太。\nPlease sit down, Alexandra. So, you\u0026rsquo;re an exchange student. Where do you go to school? 请坐，Alexandra。哦，你是一名交换学生。你在哪里上学？\nAt the Bronx High School of Science. 在Bronx区的理科中学读书。\nOh, that\u0026rsquo;s a very good school. What are your favorite subjects? 哦，那是个好学校。你喜欢哪些课程？\nBiology and mathematics. 生物学和数学。\nRichard tells me you\u0026rsquo;re a doctor. Richard告诉我您是医生。\nYes, a pediatrician. 是的，小儿科医师。\nAnd what does your father do? 令尊是做什么的？\nHe\u0026rsquo;s a lawyer, in Thessaloniki. 他是Thessaloniki的一名律师。\nWould you like some pasta? I made it myself. It might be a little cold. 你想来点意大利面食吗？我自己做的。可能有点凉了。\nThanks, no. I do have to go. It was nice meeting you all. 谢谢了，不用。我真的得走了。很高兴见到你们一家人。\nWell, maybe you\u0026rsquo;ll come for lunch some Sunday, so we can really thank you for bringing Richard\u0026rsquo;s bag back. 既然如此，或许哪个星期天你能来吃中饭，让我们好好地感谢你送回Richard的旅行袋。\nMaybe. You\u0026rsquo;re welcome anytime. 再说，再说。欢迎你随时来玩。\nGood-bye. 再见。\nCan I drive you home? 我开车送你回去好吗？\nNo, thanks. The train is just up the street. It won\u0026rsquo;t take me long at all. 不用了，谢谢。地铁车就在街的那一头。不需要花很长时间的。\nWell, you really saved the day for me, Alexandra. Bye. 你真的帮了我一个大忙，Alexandra。再见。\nBye-bye. 再见。\nGood night. 晚安。\nShe\u0026rsquo;s a smart young lady, and very nice. 她是个聪明的年轻姑娘，而且很善良。\nVery! Hey, she forgot her bag! 非常！嘿，她忘了她的旅行包！\nI guess we\u0026rsquo;ll be seeing Alexandra again. Right, Robbie? 我想我们不久又将见到Alexandra。对吧，Robbie？\n重难点分析 Excuse me vs. Sorry：Excuse me用于打扰别人或引起注意时，Sorry用于道歉。本课中多次出现\u0026quot;Excuse me\u0026quot;的用法。\nMay I\u0026hellip;? 比 Can I\u0026hellip;? 更正式礼貌。\u0026ldquo;May I take a picture of you?\u0026ldquo;是征求许可的礼貌表达。\nWhat\u0026rsquo;s it for? 询问用途的常用句型，意为\u0026quot;这是做什么用的？\u0026rdquo;\nI appreciate your help. 表达感谢的正式说法，比简单的\u0026quot;Thank you\u0026quot;更显诚意。\nJust a second. 口语中表示\u0026quot;稍等一下\u0026rdquo;，相当于\u0026quot;Just a moment\u0026quot;。\nPoint to\u0026hellip; 指向某物的动词短语，注意介词用\u0026quot;to\u0026quot;。\nIt was nice meeting you. 初次见面告别时的标准用语，注意用过去时\u0026quot;was\u0026quot;和动名词\u0026quot;meeting\u0026quot;。\nBy the way 口语中转换话题或补充信息时的常用表达。\nTake the number 1 subway / train 乘坐地铁/火车的表达方式。\nI\u0026rsquo;m taking too much of your time. 占用别人时间时的客气表达。\nI was expecting him\u0026hellip; 过去进行时表示\u0026quot;原本期待/等待\u0026quot;。\nI keep thinking about\u0026hellip; \u0026ldquo;一直在想……\u0026quot;，keep + doing表示持续的动作。\nYou really saved the day for me. 口语中\u0026quot;你真是帮了大忙/救了我一命\u0026quot;的生动表达。\n核心词汇 词汇 词性 释义 例句 photographer n. 摄影师 I\u0026rsquo;m a photographer. appreciate v. 感激，欣赏 I appreciate your help. exchange student n. 交换学生 I\u0026rsquo;m an exchange student from Greece. album n. 相册，专辑 It\u0026rsquo;s a book of pictures. I call it Family Album. ferry n. 渡船 I left my bag on the ferry. lost-and-found n. 失物招领处 I\u0026rsquo;ll call the lost-and-found office. pediatrician n. 小儿科医师 Yes, a pediatrician. terrific adj. 极好的，了不起的 The dinner was terrific! introduce v. 介绍 Let me introduce you. smart adj. 聪明的，精明的 She\u0026rsquo;s a smart young lady. 口语中的应用 Excuse me. 在日常生活中极为常用——问路、请求帮助、打断别人说话时都可以使用。\nJust a second. 比\u0026quot;Wait a moment\u0026quot;更自然的口语表达，也可以说\u0026quot;Just a sec\u0026rdquo;。\nBy the way 用于自然转换话题：\u0026ldquo;By the way, I\u0026rsquo;m Richard. What\u0026rsquo;s your name?\u0026rdquo;\nIt was nice meeting you. 初次见面告别时的标准用语，比\u0026quot;Nice to meet you\u0026quot;（刚见面时说）更合适。\nYou really saved the day. 非常地道的口语表达，用于感谢某人解决了大问题。\nTake it easy. 多义短语，这里意为\u0026quot;别太紧张/别太兴奋\u0026quot;。\n核心练习句型 May I take a picture of you? 征求许可的礼貌句型\nMay I ask you a question? May I use your phone? What\u0026rsquo;s it for? 询问用途\nWhat\u0026rsquo;s this for? What\u0026rsquo;s that machine for? How do you do? 初次见面正式问候（回答相同）\nNice to meet you.（较随意） Pleased to meet you. Can you tell me how to get to\u0026hellip;? 问路句型\nCan you tell me how to get to Linden Street? Can you tell me how to get to the station? I keep thinking about\u0026hellip; 持续动作表达\nI keep thinking about that bag of film. I keep thinking about what you said. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-1/","summary":"\u003ch2 id=\"课文原文\"\u003e课文原文\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eExcuse me. My name is Richard Stewart. I\u0026rsquo;m a photographer. May I take a picture of you and your little boy?\u003c/strong\u003e\n对不起，我叫Richard Stewart，我是一位摄影师。我可以替你和你的小男孩拍一张照吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWhat\u0026rsquo;s it for?\u003c/strong\u003e\n是做什么用的？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eIt\u0026rsquo;s for a book. It\u0026rsquo;s a book of pictures. I call it Family Album, U.S.A.\u003c/strong\u003e\n是为一本书拍的。这是一本摄影集。我称之为「美国写真」。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eOh, that\u0026rsquo;s a nice idea. Well, it\u0026rsquo;s fine if you take our picture.\u003c/strong\u003e\n噢，这想法不错。你想拍我们的照，就请吧。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI\u0026rsquo;m Martha Vann.\u003c/strong\u003e\n我叫Martha Vann。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eThank you. I appreciate your help.\u003c/strong\u003e\n谢谢，很感谢你的帮助。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第1课：46 Linden Street（林登街46号）"},{"content":"课文原文（双语对话） Robbie: Where\u0026rsquo;s Mom? / 妈妈呢？\nGrandpa: She went to a school-board meeting. / 她去参加联合校董会会议了。\nRobbie: I don\u0026rsquo;t know how she does it. She sure keeps busy. / 我不知道她怎么办到的。她真的是忙个不停。\nGrandpa: It\u0026rsquo;s important to her. There are lots of places to go, lots of things to do. She can\u0026rsquo;t sit around and do nothing. / 这对她来说很重要。有很多地方要去，许多事情要做。她总不能闲坐着无所事事呀。\nRobbie: Philip works late. I guess you\u0026rsquo;re right. I wish I had her energy. / Philip工作到很晚。我想你说得对。我希望我有她那样的精力。\n（Philip回家）\nPhilip: Oh. Hi, gang. / 噢。嗨，你们好。\nRobbie: Hello, Philip. How was your day? / 哈罗，Philip。今天好吗？\nPhilip: My day was just fine. So was my night. It\u0026rsquo;s almost ten o\u0026rsquo;clock. Mmm. I\u0026rsquo;m starving. / 这一天还好。晚上也还不错。现在已经快十点钟了。嗯，我饿坏了。\nRobbie: Um \u0026hellip; where\u0026rsquo;s Mom? / 唔……妈妈呢？\nPhilip: She went to a school-board meeting. There\u0026rsquo;s a note for you on the refrigerator. / 她去参加联合校董会的会议。冰箱上有她留给你的字条。\nRobbie: You\u0026rsquo;ve been working late almost every night this week, Dad. Aren\u0026rsquo;t you exhausted? / 你一直工作到很晚，几乎这个星期的每天晚上都如此，爸爸。你不会精疲力尽吗？\nPhilip: I don\u0026rsquo;t have time to be exhausted. / 我没有时间去精疲力尽。\nRobbie: You and Mom haven\u0026rsquo;t had dinner together with us in almost a full week. / 你和妈妈没有和我们一起吃晚餐，差不多有一整个星期了。\nPhilip: Yeah, I feel bad about us not having dinner with the family, but our schedules are so different. Either I\u0026rsquo;m at the hospital doing paperwork, or Mom is at a committee meeting. I frankly don\u0026rsquo;t know what to do about it. / 是啊，我觉得很不安，对于我们无法与全家人共进晚餐一事，但我们的工作时间实在差太多了。不是我在医院办公事，就是妈妈参加小组会议。我真不知道该怎么解决。\nRobbie: I\u0026rsquo;m worried about you and Mom. You really have been working too hard. / 我很担心你和妈妈。你们确实太忙了。\n（Robbie和妈妈深夜谈话）\nEllen: Robbie, Robbie, remember me? I\u0026rsquo;m your mother. If you have something you want to talk about, I\u0026rsquo;m always prepared to listen. / Robbie，Robbie，记得我吗？我是你母亲。假如你有什么事情要谈，我总是准备听的。\nRobbie: You haven\u0026rsquo;t been around much lately. / 最近你在家的时候不多。\nEllen: So that\u0026rsquo;s it. OK, let\u0026rsquo;s talk. / 原来是这件事。好，让我们谈谈。\nRobbie: You and Dad are like ships that pass in the night. Dad works hard, and he works late. You work hard on all your committees, and you work late. / 你和爸爸就像在夜里交错而过的船一样。爸爸工作忙，而且忙到很晚。而你总是在各种委员会里忙，也工作到很晚。\nEllen: I thought you were proud of the work I do. / 我还以为你为我所做的工作感到骄傲。\nRobbie: I am, Mom. Real proud. You are one fantastic mom, but \u0026hellip; but I\u0026rsquo;ve been noticing how little quality time you spend with Dad and me \u0026hellip; and the family. / 我确实感到骄傲，妈妈。真的骄傲。你是一位好母亲，但……但我注意到高品质时光太少了，你和父亲、我及全家人共度的。\nEllen: It\u0026rsquo;s a real problem, Robbie. I know it. I\u0026rsquo;m concerned. There must be a way that Dad and you can spend more time together. / 这确实是个问题，Robbie。我知道。我很担心。总该有个办法能使你和爸爸有更多的时间在一起。\nRobbie: Well, you know how Dad is always talking about the kids in the ward and how important it is for them to be paid attention to? And how hard it is because the doctors and nurses are so busy? Well, how would it be if you took some time to work with Dad towards solving that problem? Like setting up a regular weekly reading program. You and Dad. You and Dr. Philip Stewart—going to the children\u0026rsquo;s ward once or twice a week and reading to them. / 噢，你知道爸爸时常谈起住院的孩子们以及他们何等需要受人关怀吧？他还说这件事很难，因为医生和护士们都非常忙？好，那你花些时间和爸爸一起来解决这个问题怎么样？譬如说开办一项每周一次的定期阅读计划。你和爸爸。你和Philip Stewart医生每星期就去小儿科病房一、两次，为他们朗读。\nEllen: Not bad. Not a bad idea, Robbie. As a matter of fact, it fits right in with something I\u0026rsquo;m working on right now with the school-board committee. I\u0026rsquo;ve been trying to work out a program in the public school that will bring parents and teachers together once a week to read to the students—their own children, really. By doing that, it will encourage reading. / 不错。蛮好的主意，Robbie。事实上，这跟我正在进行的某项小组工作不谋而合，与联合校董会有关。我一直努力想研拟一项计划，在公立学校中让家长们及教师每星期一次共同为学生们——其实就是他们自己的孩子——朗读。这样做能鼓励阅读。\nEllen: I\u0026rsquo;m going to talk to Daddy about it right now. / 我现在就去跟爸爸谈谈这件事。\nRobbie: But Dad was so exhausted when he came home from work. Why don\u0026rsquo;t you talk to him about it tomorrow? / 但爸爸工作回来时已经累得不得了了。你何不明天再跟他谈？\nEllen: You are a very smart young man, Robbie. I think I\u0026rsquo;ll wait until tomorrow. / 你是个绝顶聪明的年轻人，Robbie。我想我就等明天再谈。\n（第二天早晨，Ellen和Philip在院子里讨论）\nEllen: Philip, I\u0026rsquo;ve been working on this special project with the school board, and I\u0026rsquo;d like your opinion about it. I\u0026rsquo;ve been trying to find a way to encourage reading. / Philip，我一直在研拟一项特别计划，和联合校董会一起，我需要你的意见。我一直在寻求鼓励阅读的办法。\nPhilip: I work with families every day, Ellen. I see how people spend their leisure time—young and old. Mostly watching television. Well, that would be OK if, and I repeat, if people took the time to read. / 我每天的工作就是接触一些家庭，Ellen。我看到人们怎样利用闲暇时间——不管是年轻的，还是年老的。大部分是看电视。那倒没有什么关系，只要，我重复一遍，只要人们肯花时间去阅读。\nEllen: I couldn\u0026rsquo;t agree with you more. The question is, how do we get them to read more? / 我彻底同意你的看法。问题是，我们怎样才能使他们多阅读？\nPhilip: I think you\u0026rsquo;re going to give me the answer to that question. You have that look in your eye. / 你是要给我这个问题的答案。你的眼睛里显示出你已有了答案。\nEllen: I do have an answer, Philip. Or at least I think I do. The plan is a simple one. Involve the entire family in a reading project. / 我确实有一个答案，Philip。至少我想我有了答案。计划很简单。让整个家庭都参与阅读计划。\nPhilip: But how do you plan to do that? / 但你预备怎么做呢？\nEllen: By arranging with the public schools to schedule one hour a week—to start with. During that time parents are invited to attend—and to read along with the children—their children. / 首先，从公立学校开始，安排一星期一个小时。在那一小时，家长被邀请来参加并和孩子们——他们的孩子们——一起阅读。\nPhilip: It can go beyond the school system, Ellen. I guarantee you it would go very well in the hospitals. My patients—mostly kids—would love to read and be read to. / 这可以推广到学校体制以外，Ellen。我保证在医院这种计划会推行得很好。我的病人——大多数是孩子们——会喜欢阅读并喜欢别人读给他们听。\nEllen: Maybe we can experiment with your patients and see how the plan works. / 也许我们可以在你的病人中试试，看看这项计划实施得如何。\nPhilip: I love the idea. Would you work with me on it? / 我喜欢这个主意。你愿意和我一起来做吗？\nEllen: I would love to, Philip. And that way, we\u0026rsquo;ll spend more time together, Ellen. We just don\u0026rsquo;t see each other anymore. / 我当然愿意，Philip。而且那样的话，我们会有更多的时间在一起，Ellen。我们彼此差不多见不到面了。\nPhilip: You and I are very busy these days. This is true. We need to find time to be together more, to do things together more—you and I. This would be a wonderful way to accomplish that. / 这些天来我们俩都很忙。这倒是事实。我们确实需要多找时间相聚一起，也需要多在一起工作——你和我。这倒是达到这个目的的绝佳办法。\n（他们在医院为孩子们朗读Robert Frost的诗）\nEllen: \u0026ldquo;Stopping by Woods on a Snowy Evening\u0026rdquo; by Robert Frost. / \u0026ldquo;雪夜林边小驻\u0026rdquo;，Robert Frost作。\nWhose woods these are I think I know. / 这是谁的林子，我想我知道， His house is in the village though; / 虽然他的屋子是在村子里； He will not see me stopping here / 他不会看到我驻足此地 To watch his woods fill up with snow. / 注视他落满雪花的林子。\nGrandpa: You two belong on stage! That was wonderful! / 你们俩简直是职业演员！念得太棒了！\nRobbie: Dad \u0026hellip; Robbie. When did you come? / 爸爸……Robbie。你们什么时候来的？\nGrandpa: We\u0026rsquo;ve been listening to you both. These are lucky kids. / 我们一直在听你们朗诵。这是一群幸运的孩子。\nPhilip: Do you enjoy reading together? / 你们喜欢在一起朗诵吗？\nEllen: Well, we may read together aloud at home. / 嗯，我们或许可以在家里一起大声朗诵。\nRobbie: You were right, Robbie. / 你做对了，Robbie。\nRobbie: I know. / 我知道。\n重难点分析 \u0026ldquo;ships that pass in the night\u0026rdquo; — 英语谚语，比喻两个人虽然短暂相遇但很快分开，就像夜里交错而过的船只。这里形容Philip和Ellen因为太忙而很少见面。\n\u0026ldquo;quality time\u0026rdquo; — \u0026ldquo;高品质时光\u0026rdquo;，指与家人共度的有意义的、专注的时间，而非仅仅是待在一起。\n\u0026ldquo;I couldn\u0026rsquo;t agree with you more.\u0026rdquo; — \u0026ldquo;我完全同意你\u0026rdquo;，字面意思是\u0026quot;我不能再更同意了\u0026quot;，表示强烈赞同。\n\u0026ldquo;You have that look in your eye.\u0026rdquo; — \u0026ldquo;你的眼神告诉我你有主意了\u0026rdquo;，非常地道的口语表达。\n\u0026ldquo;work out a program\u0026rdquo; — \u0026ldquo;研拟/制定一项计划\u0026rdquo;。\n\u0026ldquo;fit right in with\u0026rdquo; — \u0026ldquo;与……恰好吻合/配合\u0026rdquo;。\n核心词汇 词汇 释义 例句 school-board 校董会 She went to a school-board meeting. exhausted 精疲力尽的 Aren\u0026rsquo;t you exhausted? schedule 时间表、日程 Our schedules are so different. committee 委员会 Mom is at a committee meeting. quality time 高品质时光 How little quality time you spend. reading program 阅读计划 Setting up a regular weekly reading program. encourage 鼓励 It will encourage reading. experiment 实验 We can experiment with your patients. involve 使参与 Involve the entire family. accomplish 完成、达成 A wonderful way to accomplish that. leisure time 闲暇时间 How people spend their leisure time. 口语中的应用 \u0026ldquo;I don\u0026rsquo;t know how she does it.\u0026rdquo; — 表达对某人能力的赞叹，\u0026ldquo;我不知道她是怎么做到的\u0026rdquo;。\n\u0026ldquo;She sure keeps busy.\u0026rdquo; — \u0026ldquo;她真的很忙\u0026rdquo;，\u0026ldquo;sure\u0026rdquo; 在这里是副词，表示强调。\n\u0026ldquo;I don\u0026rsquo;t have time to be exhausted.\u0026rdquo; — 幽默表达\u0026quot;忙到没时间累\u0026quot;。\n\u0026ldquo;I couldn\u0026rsquo;t agree with you more.\u0026rdquo; — 强烈赞同对方。\n\u0026ldquo;You have that look in your eye.\u0026rdquo; — 说某人眼神中透露出有主意了。\n\u0026ldquo;You two belong on stage!\u0026rdquo; — \u0026ldquo;你们俩应该去当演员！\u0026quot;，极高的赞美。\n核心练习句型 ships that pass in the night — 比喻很少见面的两个人。 quality time — 高品质时光。 I couldn\u0026rsquo;t agree with you more. — 我完全同意。 have that look in one\u0026rsquo;s eye — 眼神透露出有主意。 fit right in with + 某事：It fits right in with something I\u0026rsquo;m working on. work out a program — 制定计划。 belong on stage — 适合登台表演。 ","permalink":"/posts/2026-06-14-family-album-usa-lesson-20/","summary":"\u003ch2 id=\"课文原文双语对话\"\u003e课文原文（双语对话）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eRobbie:\u003c/strong\u003e Where\u0026rsquo;s Mom? / 妈妈呢？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eGrandpa:\u003c/strong\u003e She went to a school-board meeting. / 她去参加联合校董会会议了。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRobbie:\u003c/strong\u003e I don\u0026rsquo;t know how she does it. She sure keeps busy. / 我不知道她怎么办到的。她真的是忙个不停。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eGrandpa:\u003c/strong\u003e It\u0026rsquo;s important to her. There are lots of places to go, lots of things to do. She can\u0026rsquo;t sit around and do nothing. / 这对她来说很重要。有很多地方要去，许多事情要做。她总不能闲坐着无所事事呀。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRobbie:\u003c/strong\u003e Philip works late. I guess you\u0026rsquo;re right. I wish I had her energy. / Philip工作到很晚。我想你说得对。我希望我有她那样的精力。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第20课：家庭阅读计划"},{"content":"课文原文（Bilingual Dialogue） 场景： Susan和Harry一家面临是否搬到洛杉矶的重大决定。\nSusan: I really like this one, Susan. Do you? Susan: 我真的很喜欢这一件，你呢？\nMichelle: Turn around, Michelle. Let me see the back of it. Michelle: 转过去一下，Michelle。让我看看它的背面。\nSusan: I like it a lot. It fits well. Susan: 我非常喜欢。它很合身。\nHarry: It doesn\u0026rsquo;t need any alterations. We must\u0026rsquo;ve bought the right size. Harry: 不需作任何修改。我们一定是买对了尺寸。\nSusan: I like the color. She looks good in blue. Susan: 我喜欢这颜色。她穿蓝色的很好看。\nMichelle: I like blue, too, Daddy. Michelle: 我也喜欢蓝色的，爸爸。\nSusan: Try on the skirt and blouse outfit, Michelle — the one that Daddy wanted you to wear. Susan: 试试上衣和裙子的那一套吧，Michelle——爸爸要你穿的那一套。\nHarry: Michelle has been a different kid since we\u0026rsquo;ve been married. She\u0026rsquo;s never been happier. Harry: 自从我们结婚之后，Michelle变成另一个人了。她从来没有像现在这样快乐过。\nSusan: And I\u0026rsquo;ve never been happier, Harry. Susan: 我也从来没有这样快乐过，Harry。\nHarry: I love her very much. She\u0026rsquo;s been a joy. Harry: 我很爱她。她是个讨人喜欢的孩子。\nSusan: We\u0026rsquo;re very lucky, the three of us\u0026hellip; and becoming part of the Stewart family, too. We couldn\u0026rsquo;t ask for anything more, could we? Susan: 我们非常幸运，我们三个……而且成为Stewart家庭的一份子。我们再没什么可求的了，对吗？\nHarry: Well\u0026hellip; Harry: 嗯……\nSusan: Well\u0026hellip;? Could we ask for anything more? Susan: 嗯……？我们还有什么可求的吗？\nMichelle: How do you like it, Daddy? Michelle: 你觉得怎样，爸爸？\nHarry: It\u0026rsquo;s my favorite outfit. It\u0026rsquo;s good for every day. It will be good for school, Michelle. Harry: 这是我喜欢的那一套。这套衣服每天都可以穿。它适合上学时穿，Michelle。\nSusan: I like it, too. I always like skirts that go like this. Susan: 我也喜欢它。我一直喜欢能像这样飘动的裙子。\nMichelle: Do you want to see the winter jacket on me, Susan? Michelle: 你想看看我穿上冬季的夹克怎样吗，Susan？\nSusan: Yes, I do. Change back into your jeans, and put on the new winter jacket we bought today. Susan: 是的，我想看看。换回你的牛仔裤，也把我们今天买的冬季夹克穿上。\nHarry: What did you mean by \u0026ldquo;well\u0026hellip;\u0026rdquo;? You had something on your mind when I said we couldn\u0026rsquo;t ask for anything more. Is everything all right? Harry: 你说「嗯……」的意思是什么？你显然有话要说，在我说我们再没什么可求的了的时候。一切都好吗？\nSusan: Everything is fine, Michelle. Susan: 一切都好，Michelle。\nMichelle: It\u0026rsquo;s kind of warm. Michelle: 它很暖和。\nHarry: It is. That\u0026rsquo;s why we bought it for you. This will be a perfect jacket for the wintertime when it\u0026rsquo;s very cold out. Harry: 是的。这就是我们买给你的原因。这一件夹克就很受用，冬天外面很冷的时候。\nMichelle: But it\u0026rsquo;s kind of small also. We must\u0026rsquo;ve bought the wrong size. Michelle: 但它也有点小了。我们一定买错了尺寸。\nHarry: Looks like we should\u0026rsquo;ve bought a bigger one. I guess we\u0026rsquo;ll have to exchange it, too. Harry: 看来我们应该买一件大些的。我想我们还得去换一件。\nSusan: I\u0026rsquo;m sure the store has others. Susan: 我相信那家店一定还有其它的尺寸。\nMichelle: I look silly! It is too small! Michelle: 我看来很滑稽！它太小了！\nHarry: You\u0026rsquo;re growing so fast, Michelle. Harry: 你长得太快了，Michelle。\nMichelle: Can I take it off? I\u0026rsquo;m hot! Michelle: 我可以脱掉吗？我好热！\nHarry: Sure. Put it back in your room, and we\u0026rsquo;ll hang everything up later. Harry: 当然。将它放回你的房间，过一会儿我们来一件件挂起来。\nSusan: Well, are you going to tell me what\u0026rsquo;s on your mind, Harry? Susan: 好了，你要不要告诉我你在想什么，Harry？\nHarry: I have been offered a job with a major accounting company in Los Angeles. Harry: 有一家大会计公司提供我一个工作，在Los Angeles。\nSusan: Los Angeles? That\u0026rsquo;s a big decision. Susan: Los Angeles？这可是个大决定。\nHarry: I know. It will also affect you and your job, if we decide to go. Harry: 我知道。假如我们决定去的话，也会影响到你和你的工作。\nSusan: Wow! It sure will. But first tell me about the job, Harry. If it\u0026rsquo;s a good one, then we\u0026rsquo;ll make it work for us. Susan: 喔！当然会。但首先告诉我是什么样的工作，Harry。假如它是个好工作，我们就顺水推舟。\nHarry: I have a client in the garment business, on Seventh Avenue. I do his taxes every year. He has a big sales office in Los Angeles, and the company in Los Angeles that does his major accounting work is looking for an executive. And he recommended me. Harry: 我有个客户在Seventh Avenue从事成衣生意。我每年为他处理税务。他在Los Angeles有一个大的销售办事处，而在Los Angeles承办他主要会计工作的那家公司正在物色一位主管。他推荐了我。\nSusan: That\u0026rsquo;s wonderful, Harry. Susan: 那太棒了，Harry。\nHarry: Yes, but it would mean that we\u0026rsquo;d have to move to L.A. Harry: 是的。但这意味着我们必须搬到Los Angeles。\nSusan: What about the salary? Susan: 薪水怎么样？\nHarry: The real discussion comes tomorrow. Susan, I don\u0026rsquo;t plan to make any decisions until I have a chance to talk with you about it. Harry: 明天才会正式商谈。Susan，我不打算做决定，除非我有机会跟你谈过。\nSusan: I understand, Harry. Susan: 我了解，Harry。\nHarry: And I don\u0026rsquo;t have to make a quick decision. They know that I\u0026rsquo;m married and that I have a family. Harry: 而且我也不需很快下决定。他们知道我结婚了，有一个家。\nSusan: Well, there\u0026rsquo;s a lot to think about. If it\u0026rsquo;s a good job, then I\u0026rsquo;ve got to do some thinking about my career opportunities in Los Angeles. Susan: 噢，有许多事需要考虑。假如它是个好工作，那么我就必须考虑考虑我在Los Angeles的事业机会。\n（Susan与祖父Malcolm交谈）\nGrandpa: Hello. Hello there. Are you ready for lunch with your grandpa? 爷爷: 哈罗。哈罗。你准备好跟你的祖父一起吃午饭吗？\nSusan: Oh! Hi, Grandpa. Yes, of course, I am, but my mind isn\u0026rsquo;t. Susan: 噢，嗨，爷爷。是的，当然，我准备好了，但是有点心事。\nGrandpa: What\u0026rsquo;s the matter, Susan? 爷爷: 怎么了，Susan？\nSusan: A real dilemma. Susan: 一个大伤脑筋的事。\nGrandpa: Does it have anything to do with you and Harry? 爷爷: 是关于你和Harry的事吗？\nSusan: Yes, but I don\u0026rsquo;t know where to start. Susan: 是的，但我不知道从何说起。\nGrandpa: Maybe I can help. Tell me what it is, Susan. 爷爷: 也许我能帮忙。说给我听听，Susan。\nSusan: Thanks, Grandpa. Please sit down. Oh! Harry has been offered a job in Los Angeles. Susan: 谢谢你，爷爷。请坐。噢！有人聘请Harry到Los Angeles工作。\nGrandpa: Well, this is something to think about. 爷爷: 噢，这种事确实需要想一想。\nSusan: There are so many things to consider. There\u0026rsquo;s Michelle. I wonder if a move would be a bad thing for her. And my job. I don\u0026rsquo;t know if I can get a good job in Los Angeles. And what about our family? Susan: 要考虑的事太多了。首先是Michelle。我不知道搬家对她来说是否是件坏事。还有我的工作。我不知道我能否在Los Angeles找到好工作。另外就是我们家的人怎么办？\nGrandpa: Can I tell you what I think? I think that you\u0026rsquo;re very successful and that you have a fantastic reputation in the toy industry. I think you could talk to Mr. Marchetta, and I think he could help you find a real good job in Los Angeles. He was very helpful to me, remember? 爷爷: 让我来告诉你我的想法好吗？我认为你事业有成，而且在玩具界有很好的声誉。我想你可以跟Marchetta先生谈谈，我觉得他能够帮你在Los Angeles找个很好的工作。他帮过我大忙，记得吗？\nSusan: I suppose I could call him. But I\u0026rsquo;m not so sure that I want to leave New York, you, and the rest of our family. Susan: 我想我可以打电话给他，但我不能确定我真想离开纽约、你和我们家的其他人。\nGrandpa: Well, I\u0026rsquo;m not going to kid you, Susan. You know we\u0026rsquo;d all miss you. But this should be your decision. It\u0026rsquo;s something that only you and Harry can work out. If moving to L.A. is in Harry\u0026rsquo;s best interest, I have to do what I can do to support him. In every marriage, sacrifices have to be made by one partner from time to time. 爷爷: 噢，我可不想哄你，Susan。你知道我们都会思念你。但这必须由你做决定。这件事只有你和Harry才能定夺。假如搬到L.A.对Harry最有利的话，我就应该尽我的力量来支持他。婚姻中，总要有一方必须不时做些牺牲。\n（Harry与Bill York交谈）\nBill: Harry, it\u0026rsquo;s the perfect job for you. You\u0026rsquo;ll love it. Bill: Harry，那是份最适合你的工作。你会喜欢的。\nHarry: It\u0026rsquo;s a big decision for me, Bill. And I have to discuss it with my wife. I don\u0026rsquo;t know if it\u0026rsquo;s right for her. Harry: 对我来说这是个大决定，Bill。我必须跟我的太太讨论。我不知道这事对她是否恰当。\nBill: She\u0026rsquo;ll love it. It\u0026rsquo;s a once-in-a-lifetime offer, Harry. Bill: 她也会喜欢的。这是个千载难逢的机会，Harry。\nHarry: OK. Tell it to me again. Harry: 好吧，再说给我听听。\nBill: The company is Craft and Craft, the biggest accounting company in the country. Bill: 这家公司叫Craft and Craft，是全国最大的会计公司。\nHarry: I know the company well. It\u0026rsquo;s big. Harry: 这家公司我很清楚。是大公司。\nBill: The biggest. Bill: 最大的。\nHarry: Yeah, yeah. The biggest. When do I have to let you know? Harry: 是的，是的，最大的。我什么时候该给你回音？\nBill: Talk it over. Think it over. Let me know by the end of the week. Bill: 好好地谈一谈。好好地想一想。这个周末以前让我知道你的决定。\nHarry: When would we have to move? Harry: 什么时候我们得搬家？\nBill: As soon as possible. Bill: 越快越好。\nHarry: I also have my daughter to consider. I don\u0026rsquo;t want to interrupt her school year. Harry: 我还要考虑我女儿。我不愿意打断她这个学年。\nBill: Let me know by the end of the week. It\u0026rsquo;s a great opportunity for you, Harry. Believe me. Bill: 这个周末前给我回音。这对你是个大好机会，Harry。相信我。\n（Harry与Susan最终交谈）\nHarry: I met with Bill York today. Harry: 今天我跟Bill York会面了。\nSusan: And I talked with Mr. Marchetta. Did York make the offer? Susan: 我也和Marchetta先生谈了。York是否跟你谈那个工作机会？\nHarry: Yup. He asked me if I want the job. Harry: 是的。他问我要不要接受那份工作。\nSusan: That\u0026rsquo;s exciting, Harry. What was it? Susan: 太令人兴奋了，Harry。是什么样的工作？\nHarry: A vice-presidency with the biggest accounting company in the country — Craft and Craft. Harry: 副总裁，全国最大的会计公司——Craft and Craft。\nSusan: Aren\u0026rsquo;t you excited about that? Susan: 你不感到兴奋吗？\nHarry: Sure I am. But there\u0026rsquo;s so much more to consider. Harry: 我当然兴奋。但是还有那么多问题需要考虑。\nSusan: I talked to Mr. Marchetta. I want what\u0026rsquo;s best for you, and I think I can get a good job through Mr. Marchetta in Los Angeles also. Susan: 我跟Marchetta先生谈了。我要的是对你最有利的事，而且我想我也可以找到一份好工作，透过Marchetta先生的帮助在Los Angeles。\nHarry: You\u0026rsquo;re kidding. Harry: 你在说笑吧。\nSusan: No, I\u0026rsquo;m not kidding. I talked with him, and he understands completely. He has a major toy buyer in Los Angeles, and he\u0026rsquo;s pretty sure that I can get a good job there. Susan: 不，我不是说笑。我与他谈了，他完全了解。他在Los Angeles有一个玩具大买主，他相当肯定我可以在那儿弄到一份好工作。\nHarry: Unbelievable! Harry: 真不敢相信！\n（与Michelle的对话）\nSusan: But I think we should talk to Michelle about all of this. Susan: 但我认为我们应该跟Michelle谈谈这整件事。\nHarry: You\u0026rsquo;re right. We\u0026rsquo;ll talk to her about it. Harry: 你说得对。我们要跟她谈谈。\nSusan: And how do you feel about taking the job in Los Angeles? Susan: 你对于到Los Angeles接受这份工作有何感想？\nMichelle: How should I feel? It\u0026rsquo;s the biggest company in the country. Michelle: 我该作何感想？它是全国最大的。\nSusan: Well, then you feel good about taking it? Susan: 嗯，那你觉得接受它很对了？\nMichelle: Well\u0026hellip; I feel fine about it. Why shouldn\u0026rsquo;t I? I love my school. I have so many good friends there now. I wouldn\u0026rsquo;t miss a day even if I were really sick. Michelle: 嗯……我觉得不错。为什么不呢？我喜欢我的学校。我现在有那么多好朋友在那里。即使我真的病了也不想错过一天。\nSusan: Come and sit down for a minute, Michelle. I\u0026rsquo;d like to talk to you about something. Something important. Susan: 过来坐一会儿，Michelle。我想跟你谈一件事。一件重要的事。\nMichelle: What\u0026rsquo;s wrong, Susan? Michelle: 有什么问题吗，Susan？\nSusan: Oh, there\u0026rsquo;s nothing wrong, Michelle. But your daddy and I are talking about something that I\u0026rsquo;d like your opinion about. Susan: 噢，没什么，Michelle。但你爸爸和我正在讨论一件事，我需要你的意见。\nMichelle: I know. I heard you talking about it the other night when I was trying on my new clothes. It\u0026rsquo;s about moving to Los Angeles. Michelle: 我知道。我听到你们谈论的那件事了，也就是我试新衣服的那天晚上。是关于搬家到Los Angeles的事。\nSusan: You\u0026rsquo;re right. How do you feel about it? Susan: 你说对了。你觉得怎么样？\nMichelle: Well, I really wouldn\u0026rsquo;t want to move, but\u0026hellip; But if you and Daddy wanted to, I guess you know what\u0026rsquo;s best for the family and for me. Michelle: 噢，我实在不愿意搬家，但是……但是假如你和爸爸想搬的话，我猜想你们一定知道怎样做对整个家庭和我是最有利的。\nSusan: That\u0026rsquo;s very considerate of you, Michelle. But what about your friends? Susan: 真会体谅别人，Michelle。但你的朋友怎么办？\nMichelle: I\u0026rsquo;d miss them a lot, but I know what it feels like to miss someone. Michelle: 我会非常想念他们的，但我知道想念一个人是什么样的滋味。\nSusan: Honey, we don\u0026rsquo;t have to move if you\u0026rsquo;re not going to be happy about it. Susan: 亲爱的，我们将不搬家，假如你会因为这种事而不快乐的话。\nMichelle: Does Daddy want to move? Michelle: 爸爸想要搬吗？\nSusan: I think so. He\u0026rsquo;s going to tell us tonight about the job offer. Susan: 我想是这样。他今天晚上会告诉我们关于那份工作的事。\n（Harry回家）\nHarry: Well, how was everybody\u0026rsquo;s day today? Harry: 喂，今天各位过得怎么样？\nSusan: Michelle was chosen to do the school poster for the play this year. Susan: Michelle被挑选去制作今年学校话剧的海报。\nHarry: Congratulations, Michelle! That\u0026rsquo;s something! Harry: 恭喜你，Michelle！太好了！\nSusan: And how was your day, Harry? I see you\u0026rsquo;re in a good mood. Why don\u0026rsquo;t you tell us about your day. Susan: 那你今天过得怎么样，Harry？我看你心情很好。何不告诉我们你这一天过得如何？\nHarry: I met with Bill York. Harry: 我与Bill York会面了。\nSusan: It\u0026rsquo;s OK to talk about it, Harry. Michelle knows all about it. Susan: 这件事可以摊开来谈，Harry。Michelle已经全知道了。\nHarry: Really? Harry: 真的？\nSusan: Really, Harry. Michelle and I have all kinds of feelings about leaving New York, the family, and friends. But if you think you should take the job, we\u0026rsquo;re behind you. Susan: 真的，Harry。Michelle和我感觉很复杂，对于离开纽约、家人、朋友。但如果你认为你应该接受这份工作，我们支持你。\nHarry: What about Michelle\u0026rsquo;s school? Harry: 那Michelle的学校怎么办？\nSusan: We\u0026rsquo;ll move after the school term. Susan: 我们等这学期结束后再搬。\nHarry: What about her new friends? Harry: 那她的新朋友呢？\nMichelle: I\u0026rsquo;ll make new friends wherever we are as long as we\u0026rsquo;re together. Michelle: 只要我们能在一起，无论在哪儿我都能交到新朋友。\nSusan: We\u0026rsquo;re a family, Harry. Whatever you think is right for you is right for us. Susan: 我们是一家人，Harry。你认为对你是好的对我们来说也是好的。\nHarry: I am so touched. The two of you are really something. Harry: 我太感动了。你们俩个真是了不起。\nMichelle: We love you, Daddy. Michelle: 我们爱你，爸爸。\nHarry: And I love you. Harry: 我也爱你们。\nSusan: OK. Now, tell us about your talk with Mr. York. Did you take the job? Susan: 好啦，现在告诉我们你跟York先生的谈话吧。你接受了那份工作吗？\nHarry: Nope. Harry: 没有。\nSusan: What? Susan: 什么？\nMichelle: No? You didn\u0026rsquo;t take it? Michelle: 没有？你没有接受？\nHarry: No, I did not take the job. Harry: 对，我没有接受那份工作。\nSusan: But, Daddy, I thought\u0026hellip; Susan: 但是，爸爸，我想……\nHarry: Harry, you didn\u0026rsquo;t turn it down because of me\u0026hellip; Harry: Harry，你拒绝它该不是因为我……\nMichelle: Or me? Michelle: 或者我？\nHarry: No, no. I turned it down because of me. Harry: 不，不。我因为我自己而拒绝了它。\nSusan: How\u0026rsquo;s that? Susan: 这是怎么一回事？\nHarry: Well, I began to think about you and about Michelle, and then I asked myself, do I really want to work for the biggest company in the country? And I don\u0026rsquo;t. I went into business for myself because I like being my own boss. I run my own company. I\u0026rsquo;m a big fish in a little pond. I\u0026rsquo;m not really sure I want to be a little fish in a big pond. Harry: 噢，我开始想到你和Michelle，然后我问自己，我真的想替全国最大的公司工作吗？我并不想这样。我当初自己开业，是因为我喜欢自己当老板。我经营自己的公司。我是一条小池里的大鱼。我不是真的很确定我想成为一条大池里的小鱼。\nMichelle: Oh, Daddy, does that mean we don\u0026rsquo;t have to move? Michelle: 噢，爸爸，你的意思是我们不必搬家了？\nHarry: That\u0026rsquo;s right, sweetheart. Harry: 是的，宝贝。\nSusan: Are you sure? Susan: 你确定？\nHarry: I couldn\u0026rsquo;t be more sure, Susan. Harry: 我再确定不过了，Susan。\nSusan: I\u0026rsquo;m glad if you are, Harry. Susan: 假如你很确定，我就高兴，Harry。\nHarry: And besides, how could I live in Los Angeles when all my favorite people live here? Harry: 更何况，我怎么能住在Los Angeles，而所有我喜欢的人都在这里？\nSusan: Your favorite people? Who\u0026rsquo;s that? Susan: 你喜欢的人？谁呀？\nHarry: The Stewart family, of course. Harry: 当然是Stewart一家人。\n重难点分析 \u0026ldquo;must\u0026rsquo;ve bought\u0026rdquo; / \u0026ldquo;should\u0026rsquo;ve bought\u0026rdquo; / \u0026ldquo;could\u0026rsquo;ve bought\u0026rdquo;\n这是\u0026quot;must have bought\u0026quot;、\u0026ldquo;should have bought\u0026rdquo;、\u0026ldquo;could have bought\u0026quot;的口语缩略形式。 \u0026ldquo;must have + 过去分词\u0026quot;表示对过去事情的肯定推测：\u0026ldquo;一定是……了\u0026rdquo; \u0026ldquo;should have + 过去分词\u0026quot;表示过去应该做而没做的事：\u0026ldquo;本应该……\u0026rdquo; 在口语中常缩略为\u0026quot;must\u0026rsquo;ve\u0026rdquo;、\u0026ldquo;should\u0026rsquo;ve\u0026rdquo;、\u0026ldquo;could\u0026rsquo;ve\u0026rdquo; \u0026ldquo;I have been offered a job\u0026rdquo;\n被动语态的现在完成时，表示\u0026quot;有人提供我一个工作\u0026rdquo; 结构：have/has been + 过去分词 强调动作已经发生且对现在有影响 \u0026ldquo;a big fish in a little pond\u0026rdquo; vs \u0026ldquo;a little fish in a big pond\u0026rdquo;\n非常地道的英语习语 \u0026ldquo;小池里的大鱼\u0026rdquo;：在小范围内有影响力的人 \u0026ldquo;大池里的小鱼\u0026rdquo;：在大范围内无足轻重的人 Harry用这个比喻说明他宁愿在自己的小公司当老板，也不愿在大公司当小角色 \u0026ldquo;I couldn\u0026rsquo;t be more sure\u0026rdquo;\n使用比较级的否定形式表示最高级含义 相当于\u0026quot;I\u0026rsquo;m absolutely sure\u0026rdquo;（我百分之百确定） 类似表达：I couldn\u0026rsquo;t agree more（我完全同意） \u0026ldquo;on your mind\u0026rdquo; / \u0026ldquo;what\u0026rsquo;s on your mind\u0026rdquo;\n表示\u0026quot;心里有事\u0026quot;、\u0026ldquo;在想什么\u0026rdquo; 与\u0026quot;in your mind\u0026quot;（在你的脑海里）不同 核心词汇 英文 中文 说明 alteration 修改，改动 指衣服的修改 outfit 套装，全套服装 搭配好的一套衣服 dilemma 两难困境，进退两难 需要艰难抉择的局面 sacrifice 牺牲 婚姻中需要互相做出牺牲 opportunity 机会，机遇 once-in-a-lifetime opportunity 千载难逢的机会 vice-presidency 副总裁职位 公司高级管理职位 major 主要的，重要的 a major accounting company 大会计公司 executive 主管，行政人员 公司管理层人员 salary 薪水 与wage（时薪）不同，salary指年薪或月薪 considerate 体贴的，考虑周到的 That\u0026rsquo;s very considerate of you. touch 感动 I am so touched. 我太感动了。 口语中的应用 \u0026ldquo;We couldn\u0026rsquo;t ask for anything more.\u0026rdquo;\n用于表达对现状非常满意，别无他求 类似表达：We have everything we need. / Life is perfect. \u0026ldquo;What\u0026rsquo;s on your mind?\u0026rdquo;\n非常实用的日常用语，询问对方在想什么或有什么心事 回答可以说：I was just thinking about\u0026hellip; / Nothing, just daydreaming. \u0026ldquo;It\u0026rsquo;s a once-in-a-lifetime offer.\u0026rdquo;\n形容机会极其难得，一生只有一次 类似表达：It\u0026rsquo;s a golden opportunity. / This opportunity doesn\u0026rsquo;t come around often. \u0026ldquo;We\u0026rsquo;re behind you.\u0026rdquo;\n表示\u0026quot;我们支持你\u0026quot; 类似表达：We support you. / We\u0026rsquo;ve got your back. \u0026ldquo;I\u0026rsquo;m a big fish in a little pond.\u0026rdquo;\n非常生动的比喻，形容在小范围内有影响力 反义：a little fish in a big pond 核心练习句型 推测过去：must have + 过去分词\nWe must\u0026rsquo;ve bought the right size. 练习：他一定是忘了。→ He must\u0026rsquo;ve forgotten. 本应该做某事：should have + 过去分词\nLooks like we should\u0026rsquo;ve bought a bigger one. 练习：我本应该早点来。→ I should\u0026rsquo;ve come earlier. 被动语态现在完成时：have/has been + 过去分词\nI have been offered a job. 练习：她被告知了这个消息。→ She has been told the news. 最高级含义的否定比较级\nI couldn\u0026rsquo;t be more sure. 练习：我完全同意。→ I couldn\u0026rsquo;t agree more. 条件状语从句：if + 现在时，主句用将来时\nIf it\u0026rsquo;s a good one, then we\u0026rsquo;ll make it work for us. 练习：如果下雨，我们就不去了。→ If it rains, we won\u0026rsquo;t go. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-21/","summary":"\u003ch2 id=\"课文原文bilingual-dialogue\"\u003e课文原文（Bilingual Dialogue）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003e场景：\u003c/strong\u003e Susan和Harry一家面临是否搬到洛杉矶的重大决定。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eSusan:\u003c/strong\u003e I really like this one, Susan. Do you?\n\u003cstrong\u003eSusan:\u003c/strong\u003e 我真的很喜欢这一件，你呢？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMichelle:\u003c/strong\u003e Turn around, Michelle. Let me see the back of it.\n\u003cstrong\u003eMichelle:\u003c/strong\u003e 转过去一下，Michelle。让我看看它的背面。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eSusan:\u003c/strong\u003e I like it a lot. It fits well.\n\u003cstrong\u003eSusan:\u003c/strong\u003e 我非常喜欢。它很合身。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHarry:\u003c/strong\u003e It doesn\u0026rsquo;t need any alterations. We must\u0026rsquo;ve bought the right size.\n\u003cstrong\u003eHarry:\u003c/strong\u003e 不需作任何修改。我们一定是买对了尺寸。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eSusan:\u003c/strong\u003e I like the color. She looks good in blue.\n\u003cstrong\u003eSusan:\u003c/strong\u003e 我喜欢这颜色。她穿蓝色的很好看。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMichelle:\u003c/strong\u003e I like blue, too, Daddy.\n\u003cstrong\u003eMichelle:\u003c/strong\u003e 我也喜欢蓝色的，爸爸。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第21课：A Big Decision（一个重大的决定）"},{"content":"课文原文（Bilingual Dialogue） 场景： Marilyn在思考是否回去工作，还是全职照顾Max。家人给了她很多建议。\n（Marilyn在哼摇篮曲）\nMarilyn: \u0026ldquo;Rock-a-bye, baby, on the tree top, When the wind blows, The cradle will rock. When the bough breaks, The cradle will fall, And down will come baby, Cradle and all.\u0026rdquo; Marilyn: \u0026ldquo;摇呀摇，小宝宝，在树梢，风儿轻轻吹，摇篮跟着晃。树枝若折断，摇篮会掉落，宝宝跌下来，摇篮一道摔。\u0026rdquo;\nRichard: Hi, Marilyn. What are you doing? Richard: 嗨，Marilyn。你在做什么？\nMarilyn: Just sketching. Marilyn: 只是画些草图。\nRichard: I\u0026rsquo;ve been thinking a lot about our responsibilities in the past few weeks. Richard: 我对于我们的职责想了很多在最近几个星期。\nMarilyn: I never stop thinking about them. Marilyn: 我一直在思考这些问题，从未间断。\nMarilyn: I\u0026rsquo;ve been wrestling with the question of whether I go back to work or not. Marilyn: 我一直左思右想为我是否回去工作这个问题。\nRichard: I see. Richard: 这一下我明白了。\nMarilyn: And I\u0026rsquo;m torn. I really want to go back to work, use my talents, and pursue my career in fashion design like we always thought I would. But now\u0026hellip; I want to be with Max as a full-time mother, especially when he\u0026rsquo;s a baby. Marilyn: 但我不知如何取舍。我真的想回去工作，发挥我的才智，追求我在时装设计方面的事业，就像我们一向认定的那样。但是现在……我又想和Max在一起，做个全职的母亲，特别是，他还是个婴儿的时候。\nRichard: I really understand, Marilyn. But you never have to worry about Max. There\u0026rsquo;s Mother and Grandpa\u0026hellip; and I can always arrange my photo schedule around your schedule, if that will help. Richard: 我真的能理解，Marilyn。但你根本不用担心Max。有妈妈和祖父呢……而且我也能随时安排我的摄影工作配合你的时间表，假如那样有所帮助的话。\nMarilyn: It\u0026rsquo;s not the same, Richard. Marilyn: 那是不一样的，Richard。\nRichard: Have you discussed going back to work with your boss? Richard: 你已跟你的老板讨论过回去工作的事吗？\nMarilyn: Rita Mae called yesterday. Marilyn: Rita Mae昨天打电话来了。\nRichard: Ah! That\u0026rsquo;s what\u0026rsquo;s got you thinking, isn\u0026rsquo;t it? Richard: 噢！就是那通电话使你开始思量起来的，是吗？\nMarilyn: She wants to know when I think I\u0026rsquo;ll be returning to the boutique. Marilyn: 她想知道我打算什么时候回去时装店工作。\nRichard: And you said\u0026hellip;? Richard: 那你怎么说的？\nMarilyn: I said I\u0026rsquo;d give her an answer in a few days\u0026hellip; that I wasn\u0026rsquo;t sure. Marilyn: 我说这几天给她回答……我说我不能确定。\nRichard: I\u0026rsquo;m sure Rita Mae will understand and wait until you\u0026rsquo;re ready to go back to work. Richard: 我相信Rita Mae会理解的，而且会等你准备好了才回去工作。\nMarilyn: Well, maybe she will, and maybe she won\u0026rsquo;t. Who knows? If I don\u0026rsquo;t accept her offer, maybe she\u0026rsquo;ll find someone else in the meantime, and when I\u0026rsquo;m ready to go back, there won\u0026rsquo;t be a job for me. Marilyn: 嗯，也许她会，也许她不会。谁知道？假如我不接受她这个工作机会，她也许会在这段时间找别的人。而当我准备好要回去时，已经没有空缺了。\nRichard: That\u0026rsquo;s something to consider. Richard: 这是需要考虑的一点。\nMarilyn: You\u0026rsquo;ve got yourself to think about, too. Marilyn: 你也得为自己着想。\nRichard: But I am thinking about myself. Don\u0026rsquo;t you see? Richard: 但我就是在为自己着想呀。你不知道吗？\nMarilyn: What do you mean? Marilyn: 你是什么意思？\nRichard: It\u0026rsquo;s not just the job. It\u0026rsquo;s also my career as Max\u0026rsquo;s mother. That\u0026rsquo;s the way I look at it. Richard: 不只是那项工作而已。当Max的母亲也是我的事业。我就是这么看这件事的。\nMarilyn: I have two career opportunities at the same time. My career as a fashion designer and my career as a mother. Marilyn: 我同时有两个事业机会。时装设计事业和担任Max母亲的事业。\nRichard: I never really thought about being a mother as a career. I guess you do have two career opportunities and a decision to make. Richard: 我真的从来没有想到做母亲还是一种事业。我想你的确是有两个事业机会，而且必须做一个抉择。\n（Marilyn和Ellen交谈）\nEllen: Speaking of being a mother, I\u0026rsquo;ve been meaning to ask you what you were thinking about regarding going back to work. I know Rita Mae called. I can imagine what is going through your head. Ellen: 谈到当母亲，我一直想问你是否打算回去工作。我知道Rita Mae打电话给你了。我能想像你的头脑里正在考虑什么事。\nMarilyn: I\u0026rsquo;m sure you can, Ellen. There are so many things to consider. Marilyn: 你说的没错，Ellen。是有许多事情要考虑。\nEllen: One thing that makes it easier for you is that you have us. Max will always have a family member to watch over him while you\u0026rsquo;re at work. I didn\u0026rsquo;t have that when Richard and Susan were born. Ellen: 有一件事可以使你作起决定来比较容易些，就是有我们帮你。家里总会有一个人照顾Max，在你工作的时候。在Richard和Susan出生时我可没有人帮忙。\nMarilyn: What did you do? Marilyn: 那你怎么办呢？\nEllen: I chose to continue with my career as a music teacher. We hired a woman to watch Richard and then Susan, and I continued with my career. Ellen: 我选择继续我的音乐教师的事业。我们雇用一名女士来照顾Richard，后来又照顾Susan，而我则继续我的事业。\nMarilyn: Do you think you made the right decision? Marilyn: 你认为你的决定正确吗？\nEllen: I think I did. But when Robbie was born, I decided to give full-time attention to raising Robbie. I felt differently at that time. Ellen: 我想是的。但当Robbie出生后，我决定全力抚育他。那时我的感觉又不一样了。\nMarilyn: And you gave up your career as a music teacher? Marilyn: 那么你就放弃了音乐教师的事业？\nEllen: Not exactly. I continued to teach piano lessons at home. Ellen: 不完全。我继续在家教钢琴。\nMarilyn: How did you feel about being away when Susan and Richard were babies? Marilyn: 你对出外工作作何感觉，当Richard和Susan还很小时？\nEllen: I think I did the right thing for them and for myself and for Philip. We needed the money. Remember? Ellen: 我觉得我做了一件对的事为他们、为我自己和Philip。我们当时需要钱。记得吗？\nMarilyn: Well, we do too, Ellen. Everything I earn helps us towards getting that house we want and need. Marilyn: 嗯，我们也需要，Ellen。我的每一笔进帐都可帮助我们得到那幢房子我们盼望而且也需要的。\n（Susan来访）\nSusan: I miss Max and think about him all week long. Susan: 我想念Max，一整个星期都在想他。\nEllen: We talk about him at dinnertime. Ellen: 我们吃晚餐时总谈起他。\nSusan: Will you please try to relax? I\u0026rsquo;ve never seen you so wound up. Susan: 你能不能放轻松些？我从来没有看过你绷得这么紧。\nMarilyn: You seem to be enjoying the pressure. Marilyn: 你看起来好像很乐于承受压力。\nSusan: The truth is, I am. My job is not an easy one, but I really enjoy it. Susan: 事实上，我的确如此。我的工作并不轻松，但我确实乐在工作。\nMarilyn: That is exactly what I wanted to talk to you about, Susan. Marilyn: 这正是我想要跟你谈的，Susan。\nSusan: What\u0026rsquo;s the problem? Susan: 什么问题啦？\nMarilyn: Marilyn\u0026rsquo;s career. Marilyn: Marilyn的事业。\nSusan: Well, my choice of careers. Susan: 是的，我的事业抉择问题。\nMarilyn: Choice? Marilyn: 抉择？\nSusan: My career as a fashion designer versus my career as a mother. Susan: 我以时装设计为事业，或是以当个母亲为事业。\nEllen: Why does it have to be one or the other? Ellen: 为什么非得「有这个就没有那个」？\nSusan: That\u0026rsquo;s what I said. Susan: 我也是这么说。\nMarilyn: How\u0026rsquo;s that? Marilyn: 那怎么成呢？\nSusan: Why can\u0026rsquo;t you do both? Susan: 你为什么不能两样一起做？\nEllen: She\u0026rsquo;s right. Ellen: 她说得对。\nMarilyn: Both? Marilyn: 一起？\nSusan: Well, that\u0026rsquo;s what I do. I have a job, and I have Michelle. I take care of both to the best of my ability. It\u0026rsquo;s not easy, but what is? Susan: 是啊，我正是这么做的。我有工作，我也有Michelle。我尽我所能把两方面都照顾好。这不容易，但什么事又容易了？\nEllen: And that\u0026rsquo;s what I did. I did both with Richard and Susan, and I did both with Robbie. Ellen: 我也这样做的。有Richard和Susan时我这样做，有Robbie时我也这样做的。\nMarilyn: I thought you stayed home with Robbie? Marilyn: 我还以为你是跟Robbie待在家里的？\nEllen: I did. But I was lucky enough to have a career as a music teacher which I could continue at home. Ellen: 是的。但我很幸运，有一个音乐教师的事业可以在家中继续从事。\nSusan: Why can\u0026rsquo;t you work at home, Marilyn? You\u0026rsquo;re very talented. Designing dresses is a career you could establish out of your home, couldn\u0026rsquo;t you? Susan: 你为什么不能在家中工作呢，Marilyn？你非常有才华。设计时装是一种职业你可以在家中开创，不是吗？\nMarilyn: I don\u0026rsquo;t know why I didn\u0026rsquo;t think of it. It seems so simple now. Marilyn: 我不知道为什么我没有想到这一点。现在事情显得很简单了。\nMarilyn: For a year or two I could stay at home with Max and do my dress designs. Marilyn: 在一两年内，我可以和Max待在家里并从事我的服装设计。\nSusan: And you could make your dresses at home. Susan: 你可以在家做衣服。\nEllen: Sounds like a great way to solve the problem. Ellen: 听起来好像是个解决问题的好办法。\nSusan: That could solve your problem, Marilyn. Susan: 这样可以解决你的问题，Marilyn。\nMarilyn: I\u0026rsquo;m going to call Rita Mae at home and ask her to come by and talk about it. She wants to see Max, anyway. Marilyn: 我会打电话到Rita Mae家里，请她过来谈谈这件事。毕竟，她也想看Max。\n（Rita Mae来访）\nRita Mae: OK, Marilyn. You sounded like you\u0026rsquo;ve made a decision when you called me. I\u0026rsquo;m all ears. Rita Mae: 好了，Marilyn，你好像已经作了决定，当你打电话给我的时候。我洗耳恭听。\nMarilyn: I have made a decision, Rita Mae. I\u0026rsquo;ve decided to stay at home and be a full-time mother. Marilyn: 我已经做了决定，Rita Mae。我决定留在家里做一个专职母亲。\nRita Mae: I\u0026rsquo;m disappointed, but I respect your decision. If I had a child as cute as Max, I might do the same thing. But I haven\u0026rsquo;t finished telling you the other half of my decision. Rita Mae: 我很失望，但我尊重你的决定。假如我有一个像Max这样可爱的孩子，我也可能会做同样的决定。但我还没有对你说完我这个决定的另一半。\nMarilyn: The other half? Marilyn: 另一半？\nRita Mae: Yes. I think I can stay at home and take care of Max and continue my career. Rita Mae: 是的。我觉得我可以待在家里，一面照顾孩子，同时继续我的事业。\nMarilyn: Sounds interesting. Let me hear it. Marilyn: 听起来很有趣。说给我听听。\nRita Mae: Do you remember our talks about custom-designed dresses for the boutique? Why can\u0026rsquo;t I design dresses for you here at home? And make them here. Have the fittings here, too. And I could do the selling and the pricing at the boutique. Rita Mae: 你记得我们曾经谈过为时装店设计订制的服装吗？为什么我不能在家里为你设计服装呢？在这儿缝制。也在这里试穿。而我在时装店里负责销售和标价。\nMarilyn: Exactly. Marilyn: 就是这样。\nRita Mae: What kind of dresses would you design? Rita Mae: 你打算设计哪种服装？\nMarilyn: I\u0026rsquo;ve thought about that for some time. Marilyn: 我已经想过一阵子了。\nRita Mae: Yes? Rita Mae: 真的？\nMarilyn: Wedding dresses. Marilyn: 结婚礼服。\nRita Mae: Wedding dresses? Brilliant idea! There\u0026rsquo;s a big market today in wedding dresses. Rita Mae: 结婚礼服？这个主意真棒！结婚礼服在目前有很大的市场。\nMarilyn: That\u0026rsquo;s what I thought. Marilyn: 我也是这样想的。\nRita Mae: I like the idea very much. And if it\u0026rsquo;s successful, we can expand to all kinds of dresses. Rita Mae: 我很喜欢这个主意。假如成功的话，我们可以扩展到所有种类的服装。\nMarilyn: That\u0026rsquo;s what I thought. Marilyn: 我也正这样想。\nRita Mae: As a matter of fact, I have a customer for your first wedding dress. My niece is getting married, and I\u0026rsquo;ve been trying to find just the right thing for her. Marilyn, you\u0026rsquo;re going to design my niece\u0026rsquo;s dress. That\u0026rsquo;ll be our first one, and then we\u0026rsquo;ll use it to sell others. Rita Mae: 事实上，我已经有了你的第一套结婚礼服的顾客。我侄女即将结婚，而我一直在为她找件合适的东西。Marilyn，你现在就开始设计我侄女的结婚礼服。这将成为我们的第一件，然后我们再利用它来销售其他的。\nMarilyn: Do you really mean it? Marilyn: 你说的可是当真？\nRita Mae: I really mean it. It\u0026rsquo;s a simple idea, and it will work. You can certainly design dresses. I know that. And there\u0026rsquo;s no reason why you can\u0026rsquo;t do it from your home. Rita Mae: 当然是真的。这主意很简单，而且一定可行。你确实很能设计服装，我知道。而且也没有理由你不可以在家里做。\nMarilyn: I\u0026rsquo;m so excited! I can\u0026rsquo;t wait to tell Richard! Marilyn: 我好兴奋！我简直迫不及待想告诉Richard！\nRita Mae: If I had a baby like Max, I\u0026rsquo;d want to stay home and be near him all the time, too. You\u0026rsquo;re making the right decision for Max and for yourself too, Marilyn. Rita Mae: 假如我有一个像Max这样的宝贝，我也要整天在他身边。你做了一个正确的决定为Max，也为你自己，Marilyn。\nMarilyn: It all sounds so easy. Now the hard work begins. Marilyn: 一切听起来竟是如此简单。艰苦的工作现在开始了。\nRita Mae: Would you like to see some of my designs that I\u0026rsquo;ve been working on? Rita Mae: 你想不想看我正在设计的一些服装呢？\nMarilyn: I\u0026rsquo;d love to. Marilyn: 我想看。\n重难点分析 \u0026ldquo;I\u0026rsquo;ve been wrestling with the question\u0026hellip;\u0026rdquo;\n\u0026ldquo;wrestle with\u0026quot;本意是\u0026quot;与……摔跤\u0026rdquo;，引申为\u0026quot;与……搏斗、苦思冥想\u0026quot; 非常形象地表达内心挣扎的状态 \u0026ldquo;I\u0026rsquo;m torn\u0026rdquo;\n字面意思是\u0026quot;我被撕裂了\u0026quot;，表示内心矛盾、难以抉择 非常地道的表达方式，比\u0026quot;I\u0026rsquo;m conflicted\u0026quot;更生动 \u0026ldquo;Why can\u0026rsquo;t you do both?\u0026rdquo;\n这是本课的核心问题——为什么不能兼顾事业和家庭？ 使用反问句表达\u0026quot;完全可以同时做到\u0026quot;的意思 \u0026ldquo;I\u0026rsquo;m all ears\u0026rdquo;\n非常实用的口语表达，字面意思是\u0026quot;我全是耳朵\u0026quot; 表示\u0026quot;我洗耳恭听\u0026quot;、\u0026ldquo;我全神贯注地听\u0026rdquo; \u0026ldquo;There\u0026rsquo;s no reason why you can\u0026rsquo;t\u0026hellip;\u0026rdquo;\n双重否定表示强烈肯定 相当于\u0026quot;You certainly can\u0026hellip;\u0026quot; 核心词汇 英文 中文 说明 sketch 画草图，素描 设计师的初步设计 wrestle 挣扎，搏斗 wrestle with a problem 苦思一个问题 torn 矛盾的，犹豫不决的 内心被撕裂的感觉 pursue 追求，从事 pursue a career 追求事业 boutique 时装店，精品店 小型时装专卖店 full-time 全职的 full-time mother 全职母亲 custom-designed 定制的，量身设计的 根据客户需求设计 fitting 试穿 have the fittings 进行试穿 brilliant 极好的， brilliant idea 绝妙的主意 expand 扩展，扩大 expand to all kinds of dresses 口语中的应用 \u0026ldquo;I\u0026rsquo;ve been wrestling with\u0026hellip;\u0026rdquo;\n用于表达对某个问题苦思冥想、难以决定 例：I\u0026rsquo;ve been wrestling with whether to accept the job offer. \u0026ldquo;I\u0026rsquo;m torn.\u0026rdquo;\n表达内心矛盾、难以取舍 例：I\u0026rsquo;m torn between staying and leaving. \u0026ldquo;I\u0026rsquo;m all ears.\u0026rdquo;\n非常实用的口语，表示认真倾听 例：Tell me your story. I\u0026rsquo;m all ears. \u0026ldquo;It\u0026rsquo;s not the same.\u0026rdquo;\n表示\u0026quot;情况不同\u0026quot;、\u0026ldquo;不一样\u0026rdquo; 用于反驳对方的类比或建议 \u0026ldquo;You\u0026rsquo;ve got yourself to think about, too.\u0026rdquo;\n提醒对方也要为自己考虑 类似表达：Don\u0026rsquo;t forget about yourself. 核心练习句型 现在完成进行时：have/has been + doing\nI\u0026rsquo;ve been wrestling with the question. 练习：我一直在考虑这个问题。→ I\u0026rsquo;ve been thinking about this problem. 双重否定表示肯定：There\u0026rsquo;s no reason why\u0026hellip; can\u0026rsquo;t\nThere\u0026rsquo;s no reason why you can\u0026rsquo;t do it from your home. 练习：没有理由你不能成功。→ There\u0026rsquo;s no reason why you can\u0026rsquo;t succeed. 虚拟语气（与现在事实相反）：If + 过去时，would + 动词原形\nIf I had a child as cute as Max, I might do the same thing. 练习：如果我是你，我会接受。→ If I were you, I would accept it. 反问句：Why can\u0026rsquo;t\u0026hellip;?\nWhy can\u0026rsquo;t you do both? 练习：为什么我们不能试试？→ Why can\u0026rsquo;t we try? 表示\u0026quot;迫不及待\u0026quot;：can\u0026rsquo;t wait to\nI can\u0026rsquo;t wait to tell Richard! 练习：我迫不及待想见到你。→ I can\u0026rsquo;t wait to see you. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-22/","summary":"\u003ch2 id=\"课文原文bilingual-dialogue\"\u003e课文原文（Bilingual Dialogue）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003e场景：\u003c/strong\u003e Marilyn在思考是否回去工作，还是全职照顾Max。家人给了她很多建议。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e（Marilyn在哼摇篮曲）\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMarilyn:\u003c/strong\u003e \u0026ldquo;Rock-a-bye, baby, on the tree top, When the wind blows, The cradle will rock. When the bough breaks, The cradle will fall, And down will come baby, Cradle and all.\u0026rdquo;\n\u003cstrong\u003eMarilyn:\u003c/strong\u003e \u0026ldquo;摇呀摇，小宝宝，在树梢，风儿轻轻吹，摇篮跟着晃。树枝若折断，摇篮会掉落，宝宝跌下来，摇篮一道摔。\u0026rdquo;\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e Hi, Marilyn. What are you doing?\n\u003cstrong\u003eRichard:\u003c/strong\u003e 嗨，Marilyn。你在做什么？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMarilyn:\u003c/strong\u003e Just sketching.\n\u003cstrong\u003eMarilyn:\u003c/strong\u003e 只是画些草图。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e I\u0026rsquo;ve been thinking a lot about our responsibilities in the past few weeks.\n\u003cstrong\u003eRichard:\u003c/strong\u003e 我对于我们的职责想了很多在最近几个星期。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMarilyn:\u003c/strong\u003e I never stop thinking about them.\n\u003cstrong\u003eMarilyn:\u003c/strong\u003e 我一直在思考这些问题，从未间断。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第22课：Career Choices（事业抉择）"},{"content":"课文原文（Bilingual Dialogue） 场景： Grandpa的朋友Nat Baker因为社区中心计划被搁置而烦恼，大家决定一起行动。\nRobbie: Morning, Grandpa. Is something the matter, Grandpa? Robbie: 早安，爷爷。怎么了，爷爷？\nGrandpa: The editorial in this paper has my friend Nat Baker real upset. 爷爷: 这张报纸上的社论着实令我的朋友Nat Baker不高兴。\nGrandpa: Ah! I\u0026rsquo;ll read it to you. \u0026ldquo;The old library building on Chestnut Street, which has been vacant for over a year now, was supposed to be made into a community center to serve the senior citizens as well as the younger people of Riverdale. Due to lack of funds for the repainting of the interior of the building and for the furniture needed, the plans for the community center have been postponed indefinitely.\u0026rdquo; 爷爷: 啊！我来读给你听听。\u0026ldquo;Chestnut街老图书馆已空了一年多，原计划改成一个社区交谊中心，为Riverdale的老年人和年轻人服务。由于缺乏经费用来重新粉刷内部和购买必需家俱，这项修建社区中心的计划被迫无限期延缓。\u0026rdquo;\nRobbie: Is it that serious a problem, Grandpa? Robbie: 这个问题有那么重要吗，爷爷？\nGrandpa: It is. Nat\u0026rsquo;s not as lucky as I am, Robbie. He doesn\u0026rsquo;t have any family with him. He lives alone and depends on places like a community center to be with people — people his own age. 爷爷: 是的。Nat不像我这样幸运，Robbie。他没有家人和他在一起。他一个人生活，主要靠社区中心这样的地方和别人交往——像他那般年纪的人。\nRobbie: But there\u0026rsquo;s the old community center on Elm Street. Robbie: 但是在Elm街有一个旧的社区中心。\nGrandpa: It\u0026rsquo;s small, and the problem is that it\u0026rsquo;s set up primarily for kids to play. Ping-Pong tables, soda machines, and lots of music. It\u0026rsquo;s too noisy for some older people like Nat. 爷爷: 它小小的，而问题是它主要是让孩子们去玩的。乒乓球台，汽水贩卖机，热闹的音乐。它对于像Nat这样的老人来说太吵了。\nRobbie: I never realized that. Robbie: 我从来没有意识到这点。\nGrandpa: It\u0026rsquo;s hard for some older people to take all that noise. That\u0026rsquo;s why the new community center is a good idea. Part of the building for older people, part of the building for younger people. 爷爷: 一些老年人没办法忍受那些噪音。这就是为什么说新的社区中心是个好主意。建筑物中的一部分给老年人用，另一部分给年轻人用。\n（Alexandra来访）\nAlexandra: Hi, Robbie. Alexandra: 嗨！Robbie。\nRobbie: Hi, Alexandra. Come on in. Do you want something cold to drink? Robbie: 嗨，Alexandra。请进。你想喝点什么冰凉的东西吗？\nAlexandra: I\u0026rsquo;d love some cola, please. Alexandra: 请给我可乐。\nRobbie: Cola coming up. Robbie: 可乐马上就来了。\nAlexandra: I really appreciate you coming over to help me with my math. My final exam is next Tuesday. You\u0026rsquo;re so good in all your other subjects. I just can\u0026rsquo;t understand why you have so many problems with math. Alexandra: 我真的很感谢你过来帮我补习数学。期终考就在下周二。你别的功课都那样好。我就不懂为什么你在数学方面有那么多问题。\nGrandpa: Hi, Alexandra. 爷爷: 嗨，Alexandra。\nAlexandra: Hi, Mr. Stewart. Alexandra: 嗨，Stewart先生。\nGrandpa: I thought that was Nat Baker who rang the front doorbell. 爷爷: 我还以为是Nat Baker按大门门铃呢。\nAlexandra: Don\u0026rsquo;t let me interrupt you. Alexandra: 别让我打搅你们。\nGrandpa: No problem, Grandpa. 爷爷: 没有关系，爷爷。\nRobbie: We\u0026rsquo;re just having some cola before getting to the tough stuff — math. Robbie: 我们只是先喝点可乐，在对付难缠的东西——数学——之前。\nAlexandra: He\u0026rsquo;ll do anything to avoid getting down to math lessons, Mr. Stewart. Alexandra: 他老是设法想逃避数学，Stewart先生。\nGrandpa: I was the same way. Really. I didn\u0026rsquo;t like math. I wasn\u0026rsquo;t good at it, and I didn\u0026rsquo;t like studying it. 爷爷: 我当年也是这样。真的。我不喜欢数学。我不精于此道，也不爱去学它。\nRobbie: But you had to be good at math. You graduated from engineering school. Robbie: 但是你数学一定很好。你是从工学院毕业的。\nGrandpa: I was. But not in high school. For some reason, I couldn\u0026rsquo;t get a handle on it. Then, in college, I became good at it. 爷爷: 说的对。但高中时不好。因为某些原因，我就是开不了窍。然后，在大学里我变得很精于数学。\nAlexandra: Then there\u0026rsquo;s hope for Robbie. Alexandra: 看来Robbie还有希望。\nRobbie: I can\u0026rsquo;t wait. You think I can just skip it now and get to it at college? Robbie: 我迫不及待。你想我现在略过数学，等到上了大学再学，可以吗？\nGrandpa: You\u0026rsquo;ll never get to college to find out, Robbie, if you skip it now. 爷爷: 你根本就进不了大学去探究这个问题的答案，Robbie，假如你现在略过它的话。\n（Nat Baker来访）\nGrandpa: I\u0026rsquo;d like you to meet my friend Nat Baker. This is Alexandra Pappas, and this is my grandson Robbie, whom I think you\u0026rsquo;ve met once or twice before. 爷爷: 我来向你们介绍我的朋友Nat Baker。这是Alexandra Pappas，这是我孙子Robbie，我想你以前见过他一两次面。\nNat: Nice to meet you, Mr. Baker. Nat: 很高兴见到你，Baker先生。\nRobbie: Hi, Mr. Baker. We met before. Robbie: 嗨，Baker先生，我们以前见过面。\nNat: Where? Nat: 在哪里？\nRobbie: In town. At the hardware store. Robbie: 在镇上。在五金行里。\nNat: I remember now. Right. Hi. Nat: 我现在想起来了。对了。嗨。\nNat: Did you read the story in the paper, Malcolm? Nat: 你看到报纸上的新闻了吗，Malcolm？\nGrandpa: I did. It\u0026rsquo;s a serious matter for a lot of us. 爷爷: 看到了。对我们许多人来说这可是个严重的问题。\nNat: A serious matter. Nat: 一个严重的问题。\nGrandpa: It is. Come on out to the patio. We\u0026rsquo;ll talk about it out there. 爷爷: 的确如此。请到院子里来吧，我们到外头谈。\n（讨论解决方案）\nNat: There is a way, Malcolm. We get our friends to roll their sleeves up and get to work. Nat: 有一个办法，Malcolm。我们召集我们的朋友共同卷起袖子来做。\nGrandpa: It\u0026rsquo;s certainly a good idea. If I could take a look at the place, I could probably tell what it requires to fix it up. How much paint, how many hours of work\u0026hellip; 爷爷: 这的确是个好主意。假如我能看看那个地方的话，我大致能说出修复它需要些什么。多少油漆，多少小时的工作量……\nNat: That\u0026rsquo;s what I came to ask you to do, Malcolm. If you would supervise the refurbishing, I\u0026rsquo;ll find the people to help do it. Nat: 这正是我来请你做的，Malcolm。假如你能监督整修过程，我可以找人来帮忙。\nRobbie: I\u0026rsquo;ll help too, Mr. Baker. I can get some of my friends to go around the neighborhood and collect the furniture we need. Robbie: 我也要帮忙，Baker先生。我可以叫我的朋友们在这社区募集我们需要的家具。\nAlexandra: I\u0026rsquo;ll help. Alexandra: 我也来帮忙。\nNat: Tomorrow. Yes. We\u0026rsquo;ll meet tomorrow morning, right here. Nat: 明天。对，我们明天早晨会面，就在这儿。\nRobbie: Can we help? I\u0026rsquo;d really like to. Robbie: 我们可以帮忙吗？我真的希望帮忙。\nNat: Sure. We might need you to come through with your friends, Robbie. Not just to go around the neighborhood asking for furniture, but to help with the paint job. That\u0026rsquo;s backbreaking work and may be too much for us. Nat: 当然。我们也许需要你们多邀朋友来帮忙，Robbie。不仅在这社区募家具，还要帮忙粉刷。这可是累人的工作，我们可能负荷不了。\nRobbie: I\u0026rsquo;ll do it. I\u0026rsquo;ll talk to them. And tomorrow morning we\u0026rsquo;ll all meet here to discuss the plan? Robbie: 我来做，我去跟他们谈一谈。是不是明天早晨我们都聚到这里来讨论整修计划？\nNat: Tomorrow morning it is. Nat: 确定是明天早晨。\n（社区会议）\nGrandpa: Come in, come in. Please, come in. I\u0026rsquo;d like you to meet my friend Malcolm Stewart. Malcolm, this is Joanne Thompson. 爷爷: 请进，请进。请进来。我来为你介绍我的朋友Malcolm Stewart。Malcolm，这是Joanne Thompson。\nJoanne: Hello, Joanne. Nice to meet you. Joanne: 你好，Joanne。很高兴见到你。\nGrandpa: My pleasure, Malcolm. 爷爷: 我也很荣幸，Malcolm。\nGrandpa: And this is Abe Lucas. You must remember Abe. He ran the drugstore and used to play drums with the jazz band on weekends. 爷爷: 这是Abe Lucas。你一定记得Abe。他经营药房，周末还经常在爵士乐队中打鼓。\nGrandpa: Oh, sure I do. Hi, Abe. 爷爷: 噢，我当然记得。嗨，Abe。\nAbe: Hello, Mr. Stewart. Abe: 哈罗，Stewart先生。\nGrandpa: Malcolm, please. 爷爷: 请叫我Malcolm吧。\nJoanne: I understand you used to be in the construction business, Malcolm. I wonder if you would take a look at the old library and make sure that it is in good condition so that we don\u0026rsquo;t have to worry about any structural problems. Joanne: 听说你过去从事营造业，Malcolm。我不知道你是否可以看一看旧图书馆，确定它状况良好，我们就可以不用担心任何结构上的问题。\nGrandpa: When can I do that? I\u0026rsquo;d be happy to. 爷爷: 我什么时候可以去看？我很乐意做这项工作。\nNat: We\u0026rsquo;ve got permission to go inside the old building during the week — Tuesday or Wednesday. Nat: 我们已获准进入那栋老建筑物，在本周内——星期二或者星期三。\nGrandpa: That\u0026rsquo;s fine with me. I can do it either day. 爷爷: 对我来说时间很适合。两天中哪一天我都可以。\nJoanne: I think the building just needs a good cleaning. And a good paint job. Then we have to furnish it. Joanne: 我想那座建筑只需要好好地打扫一下。还需要好好的粉刷。然后我们还得装潢摆设。\nJoanne: As I said, mostly the building just needs a good cleaning. This place can be developed with one real intergenerational program. That\u0026rsquo;s an idea I like. A community center with the kinds of programs that fit everyone. And programs that don\u0026rsquo;t leave anyone out. Joanne: 就像我先前所说的，这栋建筑物大部份仅需要好好打扫一下。我们可以拓展这个地方用一套真正跨辈份的活动。我喜欢这样的主意。一个社区中心，拥有适合任何人的各式活动。而且是些不排拒任何人的活动。\n（Robbie和Alexandra带着报社编辑出现）\nRobbie: Hi, everyone. Sorry I\u0026rsquo;m late. But Alexandra and I have been busy at work this morning on the community-center project. And we brought someone along who can help. You remember Charles Maxwell, Grandpa? He\u0026rsquo;s the editor of the Riverdale paper. He wrote some nice articles on Mom when she was running for the school board.\nRobbie: 嗨，各位好。很抱歉我迟到了。但Alexandra和我一早上都在忙着为社区中心的事。而且我们带来了能帮助我们的人。你记得Charles Maxwell吗，爷爷？他是Riverdale报的编辑。他写了一些介绍妈妈的好文章，在妈妈竞选联合校董会席次时。\nGrandpa: Yes, I remember. You were a great help. 爷爷: 是的，我记得。你帮了个大忙。\nCharles: Hi, Mr. Stewart. Hope to be a bigger help on the new community-center project. From what Robbie and Alexandra have told me, you people are making one big story. Charles: 嗨，Stewart先生。希望能在新社区中心这件事上提供更大的帮助。从Robbie和Alexandra告诉我的情况看来，你们正在制造一件大新闻。\n（Charles Maxwell开始采访）\nCharles: OK. Now, I have\u0026hellip; first\u0026hellip; a couple of questions here. Have you talked to the community council? And have you had an engineer come in to do an inspection? OK, what do you need most of all? Charles: 好，现在，我有……第一……几个问题。你们跟社区的议会谈过了吗？你们可有一个工程师来做过检查吗？好，你们最需要的是什么？\nNat: People power. Men and women, young and old, to give us their time. Nat: 人力。不管男女老幼，请他们贡献时间。\nCharles: To do what? Charles: 做什么呢？\nNat: To help scrub the building interior clean. So that we can repaint it. Nat: 帮忙把建筑的内部擦洗干净。好让我们可以重新粉刷。\nCharles: And you also need bodies to do repainting? Charles: 你们也需要人手来重新粉刷吗？\nNat: That\u0026rsquo;s right. And we\u0026rsquo;ll also need some ladders and some brushes and some paint. Nat: 是的。而且我们还需要一些梯子、刷子和油漆。\nCharles: When do you need the volunteers, and where do they report? Charles: 你们什么时候需要义工？他们去哪儿报到？\nNat: I\u0026rsquo;ve got the council to agree to open the building for us on the next four weekends. Nat: 我已说服议会同意在往后四个周末开放那座建筑。\nCharles: How about furnishings? Are there any special requirements that I should list in the paper? Charles: 家具、摆设怎么办？有什么特别的需求要我列在报纸上的？\nNat: Yes. Here is a copy of all the things we need to start with. Nat: 是的。这是我们一开始就需要的所有东西的清单。\n（Charles的社论刊登后）\nCharles Maxwell lived up to his word. \u0026ldquo;At the Stewart family home on Linden Street yesterday, a group of caring Riverdale citizens gathered to plan the refurbishing of the old library to transform it into a new community center. The original plan by the council was tabled because of lack of funds. The new plan needs you. You could call it a community unity plan. It needs your time, and it needs your energy. And it needs your contributions of furniture, paint, brushes, ladders, lamps, et cetera. A list of these items and a volunteer form can be picked up at the Riverdale Press offices. By working together, this community can do anything to benefit its citizens, and we know you will all work together towards refurbishing the old library and making it a new community center. — Charles Maxwell, Editor.\u0026rdquo;\nCharles Maxwell兑现了他的诺言。 \u0026ldquo;昨天在Linden街Stewart的家中，一群热心公益的Riverdale居民聚集在一起计划重新整修老图书馆，将它转变成一个新的社区中心。议会原有的计划因为缺乏经费被无限期地搁置。这项新计划需要你的协助。你可以称它为社区团结计划。它需要你的时间，需要你的力气。而且也需要你捐献家具、油漆、刷子、梯子、灯等等。这些物品的清单和义工申请表格可以到Riverdale Press各办事处索取。透过共同工作，这个社区可做任何造福居民的事情，我们相信各位会共同出力去重新整修老图书馆，使它成为一个新的社区中心。——编辑，Charles Maxwell。\u0026rdquo;\n重难点分析 \u0026ldquo;get a handle on it\u0026rdquo;\n非常地道的习语，意为\u0026quot;掌握、理解、搞定\u0026quot; 相当于\u0026quot;understand\u0026quot;或\u0026quot;master\u0026quot;，但更口语化 例：I can\u0026rsquo;t get a handle on this math problem. \u0026ldquo;roll their sleeves up\u0026rdquo;\n字面意思是\u0026quot;卷起袖子\u0026quot;，引申为\u0026quot;准备努力工作\u0026quot; 非常生动的表达，暗示要干体力活或认真工作 \u0026ldquo;lived up to his word\u0026rdquo;\n\u0026ldquo;live up to\u0026quot;意为\u0026quot;不辜负、履行（诺言）\u0026rdquo; \u0026ldquo;live up to one\u0026rsquo;s word\u0026rdquo; = 履行诺言 类似表达：keep one\u0026rsquo;s promise \u0026ldquo;was tabled\u0026rdquo;\n注意英美差异：美语中\u0026quot;table\u0026quot;作动词意为\u0026quot;搁置（议案）\u0026quot; 而在英式英语中，\u0026ldquo;table\u0026quot;意为\u0026quot;提出（议案）\u0026rdquo; 根据上下文判断：这里是\u0026quot;被搁置\u0026quot;的意思 \u0026ldquo;people power\u0026rdquo;\n简洁有力的表达，\u0026ldquo;人力\u0026rdquo;、\u0026ldquo;人的力量\u0026rdquo; 强调人的参与比金钱更重要 核心词汇 英文 中文 说明 editorial 社论 报纸上表达编辑观点的文章 vacant 空的，闲置的 a vacant building 空置的建筑 community center 社区中心 为社区居民服务的活动场所 senior citizens 老年人 对老年人的礼貌称呼 postpone 推迟，延期 postpone indefinitely 无限期推迟 refurbish 整修，翻新 重新装修使焕然一新 supervise 监督，管理 负责指导和管理工作 backbreaking 累死人的，极其辛苦的 backbreaking work 非常辛苦的工作 intergenerational 跨代际的 涉及不同年龄层的 volunteer 志愿者，义工 自愿提供服务的人 口语中的应用 \u0026ldquo;Is that serious a problem?\u0026rdquo;\n口语中常用结构：\u0026ldquo;Is that + 形容词 + a/an + 名词？\u0026rdquo; 相当于\u0026quot;Is that such a serious problem?\u0026quot; \u0026ldquo;I can\u0026rsquo;t get a handle on it.\u0026rdquo;\n表示\u0026quot;搞不定\u0026quot;、\u0026ldquo;弄不明白\u0026rdquo; 非常地道，比\u0026quot;I don\u0026rsquo;t understand\u0026quot;更生动 \u0026ldquo;Roll up your sleeves.\u0026rdquo;\n表示\u0026quot;准备开始努力工作\u0026quot; 也可用于鼓励别人开始行动 \u0026ldquo;Live up to one\u0026rsquo;s word\u0026rdquo;\n表示\u0026quot;履行诺言\u0026quot; 类似：keep one\u0026rsquo;s word / be as good as one\u0026rsquo;s word \u0026ldquo;It\u0026rsquo;s asking a lot.\u0026rdquo;\n表示\u0026quot;要求很高\u0026quot;、\u0026ldquo;很不容易\u0026rdquo; 用于评价某项任务的难度 核心练习句型 \u0026ldquo;be supposed to\u0026rdquo; 表示\u0026quot;本应该、原计划\u0026quot;\nThe old library was supposed to be made into a community center. 练习：我们本应该昨天到的。→ We were supposed to arrive yesterday. \u0026ldquo;due to\u0026rdquo; 表示\u0026quot;由于\u0026quot;\nDue to lack of funds, the plans have been postponed. 练习：由于天气不好，比赛取消了。→ Due to bad weather, the game was canceled. \u0026ldquo;need + 人 + to do\u0026rdquo; 需要某人做某事\nWe need volunteers to help scrub the building. 练习：我需要你帮我做这个。→ I need you to help me with this. \u0026ldquo;There\u0026rsquo;s no way + (that) + 从句\u0026rdquo; 表示\u0026quot;不可能\u0026quot;\nThere\u0026rsquo;s no way we can complete this project. 练习：我不可能按时完成。→ There\u0026rsquo;s no way I can finish on time. \u0026ldquo;by + doing\u0026rdquo; 表示\u0026quot;通过做某事\u0026quot;\nBy working together, this community can do anything. 练习：通过努力学习，你可以通过考试。→ By studying hard, you can pass the exam. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-23/","summary":"\u003ch2 id=\"课文原文bilingual-dialogue\"\u003e课文原文（Bilingual Dialogue）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003e场景：\u003c/strong\u003e Grandpa的朋友Nat Baker因为社区中心计划被搁置而烦恼，大家决定一起行动。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRobbie:\u003c/strong\u003e Morning, Grandpa. Is something the matter, Grandpa?\n\u003cstrong\u003eRobbie:\u003c/strong\u003e 早安，爷爷。怎么了，爷爷？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eGrandpa:\u003c/strong\u003e The editorial in this paper has my friend Nat Baker real upset.\n\u003cstrong\u003e爷爷:\u003c/strong\u003e 这张报纸上的社论着实令我的朋友Nat Baker不高兴。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eGrandpa:\u003c/strong\u003e Ah! I\u0026rsquo;ll read it to you. \u0026ldquo;The old library building on Chestnut Street, which has been vacant for over a year now, was supposed to be made into a community center to serve the senior citizens as well as the younger people of Riverdale. Due to lack of funds for the repainting of the interior of the building and for the furniture needed, the plans for the community center have been postponed indefinitely.\u0026rdquo;\n\u003cstrong\u003e爷爷:\u003c/strong\u003e 啊！我来读给你听听。\u0026ldquo;Chestnut街老图书馆已空了一年多，原计划改成一个社区交谊中心，为Riverdale的老年人和年轻人服务。由于缺乏经费用来重新粉刷内部和购买必需家俱，这项修建社区中心的计划被迫无限期延缓。\u0026rdquo;\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第23课：The Community Center（社区中心）"},{"content":"课文原文（Bilingual Dialogue） 场景： Robbie想为即将回希腊的朋友Alexandra举办一个惊喜欢送派对。\nRobbie: Hi, Mom. Robbie: 嗨，妈。\nEllen: Hi, Robbie. You\u0026rsquo;re home from school early. Ellen: 嗨，Robbie。你今天从学校回来得早。\nRobbie: Yeah, they\u0026rsquo;re getting the assembly hall ready for the graduation ceremony, so we all got to go home early. Too noisy to study. Robbie: 是啊，他们在布置大礼堂，为毕业典礼做准备，所以我们都非早回家不可。太吵了，书看不下去。\nEllen: Well, now that you\u0026rsquo;re here, you can help me with dinner. I need those potatoes peeled and sliced. Ellen: 嗯，既然你回来了，你就来帮我准备晚餐。那些马铃薯需要剥皮和切片。\nRobbie: Mom, give me a break. Alexandra\u0026rsquo;s coming over to help me study for my math final. Robbie: 妈，让我喘口气。Alexandra就要来帮我温习数学，准备期末考试。\nEllen: Well, in that case, you can wash the dishes and clean up after dinner. Ellen: 嗯，既然这样，你就在晚餐后洗盘子，收拾桌子。\nRobbie: Can I invite Alexandra to stay for dinner? Robbie: 我可以请Alexandra留下来吃晚餐吗？\nEllen: Of course. Ellen: 当然可以。\nRobbie: Thanks, Mom. Robbie: 谢谢，妈。\nEllen: You and Alexandra have become good friends, haven\u0026rsquo;t you? Ellen: 你和Alexandra成了好朋友，不是吗？\nRobbie: Yes. I like her. She\u0026rsquo;s a terrific person. I\u0026rsquo;m going to miss her when she goes back to Greece. Robbie: 是的，我喜欢她。她人很好。我会想念她她回去希腊时。\nEllen: Would you like to give her a little farewell party? Ellen: 你要不要为她举行一个小型欢送派对？\nRobbie: Mom, that would be terrific! Maybe we could make it a surprise. Robbie: 那太棒了，妈！也许我们可以让它变成一场惊喜。\nEllen: Oh, I don\u0026rsquo;t know. Surprise parties don\u0026rsquo;t always work out. Ellen: 噢，这个我就不知道啦。惊喜派对并不是每次都成功的。\nRobbie: Well, we could tell her it\u0026rsquo;s a graduation party for me. When Alexandra arrives, we\u0026rsquo;ll surprise her. Robbie: 嗯，我们可以告诉她这是为我毕业所办的派对。等Alexandra到达时，我们再让她惊喜一下。\nEllen: Well, I suppose that might work. Ellen: 嗯，我想这样或许可以奏效。\nRobbie: I\u0026rsquo;d like to give her a nice going-away present. Robbie: 我很想送给她一件好的离别礼物。\nEllen: Fine. Ellen: 好啊。\nRobbie: There\u0026rsquo;s only one problem. Robbie: 只有一个问题。\nEllen: What\u0026rsquo;s that? Ellen: 什么问题？\nRobbie: I\u0026rsquo;m broke. I should have saved some money. Robbie: 我身无分文。我早该存些钱。\nEllen: I\u0026rsquo;m sure Alexandra would be happy with something simple, Robbie. Ellen: 我相信Alexandra会欣然接受简单的东西，Robbie。\nRobbie: I know. But, well, I\u0026rsquo;d like to give her something nice to remember me by. Maybe I could borrow some money from you and Dad. Robbie: 我知道。但是，嗯，我想给她一件精致的东西，让她看到东西就想到我。也许你和爸爸可以借我一点钱。\nEllen: It\u0026rsquo;s all right with me if it\u0026rsquo;s all right with your dad. Ellen: 我没有问题，假如你爸爸答应的话。\nRobbie: Thanks, Mom. I\u0026rsquo;ll talk to him. Is he still in his office? Robbie: 谢谢，妈。我会去跟他谈谈。他还在办公室吗？\nEllen: I think so. Ellen: 我想是的。\nRobbie: Thanks, Mom. Robbie: 谢谢，妈。\nEllen: Robbie! Good luck! Ellen: Robbie！祝你好运！\n（Robbie找爸爸Philip借钱）\nPhilip: Come in! Philip: 进来！\nRobbie: Hi, Son. Robbie: 嗨，儿子。\nPhilip: Hi, Dad. Am I interrupting you? Philip: 嗨！爸爸。我打搅了你吗？\nPhilip: No, no, no, no. What\u0026rsquo;s up? Philip: 不，不，不，不。什么事？\nRobbie: Can we talk? Robbie: 我们能谈谈吗？\nPhilip: Sure. Philip: 当然可以。\nRobbie: I need some help. Robbie: 我需要帮助。\nPhilip: Well, that\u0026rsquo;s what fathers are for. Philip: 嗯，父亲们的功用正在于此。\nRobbie: Well, before I go to college, I have the whole summer\u0026hellip; Robbie: 嗯，在我进大学之前，我有一整个暑假可以利用……\nPhilip: Yes\u0026hellip; Philip: 对呀……\nRobbie: And I\u0026rsquo;m planning to get a job for the summer. Robbie: 我想在暑假里打工。\nPhilip: And what sort of job? Philip: 哪一类的工作？\nRobbie: I applied for a job as a lifeguard at the community pool. Robbie: 我申请了社区游泳池的救生员工作。\nPhilip: Sounds pretty good. Philip: 听起来不错。\nRobbie: Yes. I\u0026rsquo;ll be earning pretty good money if I get it. But right now, I\u0026rsquo;m kind of short of cash. Robbie: 是的。假如我得到这份工作的话，我可以赚不少钱。但现在，我手头很紧。\nPhilip: Who isn\u0026rsquo;t? Philip: 有谁不紧？\nRobbie: And my friend Alexandra is going back to Greece\u0026hellip; Robbie: 我的朋友Alexandra就要回希腊去了……\nPhilip: Nice girl. We\u0026rsquo;ll all miss her. Philip: 好女孩。我们都会想念她的。\nRobbie: Mom says we can give her a going-away surprise party. Robbie: 妈妈说我们可以给她举行一个让她惊喜的欢送派对。\nPhilip: Good idea. Philip: 好主意。\nRobbie: And I\u0026rsquo;d like to get her a nice gift\u0026hellip; Robbie: 我还想给她一份精致礼物……\nPhilip: What\u0026rsquo;d you have in mind? Philip: 你心里有什么腹案？\nRobbie: Well, a wristwatch, so she\u0026rsquo;ll think of me when she looks at the time. Nothing flashy or expensive. Something simple — but a good one. Robbie: 嗯，一个手表，这样当她看表的时候就会想起我。不是什么俗丽或贵的。要简单的——但要精致。\nPhilip: Sounds fine, Robbie. Philip: 听起来不错，Robbie。\nRobbie: Well, I saw a nice watch. But I\u0026rsquo;ll need a loan. If you could lend me the money, I could pay you back out of my lifeguard salary. Robbie: 嗯，我已看中了一个好表。但我需要借钱。假如你能借钱给我的话，我可以从我当救生员的薪水里拿出来还你。\nPhilip: Well, I guess your mother and I can manage it. When do you need the money? Philip: 嗯，我想你妈和我可以设法帮这个忙。你什么时候需要钱？\nRobbie: Would tomorrow be OK? Robbie: 明天可以吗？\nPhilip: You\u0026rsquo;ve got it. Philip: 没问题。\nRobbie: Thanks, Dad. Robbie: 谢谢，爸爸。\nPhilip: My pleasure, Son. Philip: 不客气，儿子。\nPhilip: Oh, and, Robbie\u0026hellip; You\u0026rsquo;ll probably want the family car so you can drive her home after the party. Philip: 噢，还有，Robbie……你也许需要用家里的车，在派对结束后送她回家。\nRobbie: Could I? Robbie: 我可以用吗？\nPhilip: If you drive carefully. Philip: 只要你小心驾驶。\nRobbie: I will. Thanks, Dad. Robbie: 我会小心的。谢谢你，爸爸。\nPhilip: My pleasure. Philip: 不客气。\nRobbie: You\u0026rsquo;re OK, Dad. Robbie: 你很好，爸爸。\nPhilip: You\u0026rsquo;re not so bad yourself, Son. Philip: 你自己也不错，儿子。\n（Robbie和Alexandra学习）\nRobbie: You ready for the next problem? Robbie: 你准备好做下一道题了吗？\nAlexandra: You know what? I can\u0026rsquo;t look at another number. How about a lemonade break? Alexandra: 你知道吗？我简直一个数字也看不进去了。休息一下喝点柠檬水好吗？\nRobbie: Sure. Robbie: 当然可以。\nRobbie: Oh, by the way, when is your plane reservation for your flight to Athens? Robbie: 噢，顺便问一下，你飞Athens订的是什么时候的班机？\nAlexandra: Sunday. Why? Alexandra: 星期天。为什么问这？\nRobbie: Would you be able to come over Saturday night? Robbie: 你星期六晚上能过来吗？\nAlexandra: Yes. I should be finished packing by then. Alexandra: 能。到那时候我应该已经整理好行李了。\nRobbie: My folks are giving me a little graduation party. Robbie: 我的亲人要为我办一个小小的毕业派对。\nAlexandra: Terrific! Alexandra: 太棒了！\nRobbie: I\u0026rsquo;ll pick you up. Robbie: 我去接你。\nAlexandra: That isn\u0026rsquo;t necessary. Alexandra: 这倒不必。\nRobbie: My dad\u0026rsquo;s letting me borrow the car. Robbie: 我爸爸借我用汽车。\nAlexandra: Oh, well, that would be very nice. About eight o\u0026rsquo;clock? Alexandra: 噢，好吧，那倒很好。差不多八点钟好吗？\nRobbie: Eight o\u0026rsquo;clock is fine. Robbie: 八点钟可以。\nAlexandra: Great! It\u0026rsquo;s a date. Alexandra: 太好了！就说定了。\nAlexandra: Who\u0026rsquo;s going to be there? Alexandra: 有谁要参加？\nRobbie: Just my friend Mike and a few kids from school. Robbie: 只有我的朋友Mike和学校里的几个家伙。\nAlexandra: I\u0026rsquo;m going to miss all of you. You\u0026rsquo;ve been like a second family to me. Alexandra: 我会想念你们大家的。你们就像我的第二个家一样。\nRobbie: We\u0026rsquo;re going to miss you. Robbie: 我们也会想念你的。\nAlexandra: Maybe you could come to visit me in Greece? Alexandra: 也许你可以到希腊来看我？\nRobbie: I\u0026rsquo;m counting on it. Robbie: 我有这种打算。\nAlexandra: Wonderful! Alexandra: 太棒了！\nAlexandra: Are you excited about graduating from high school? Alexandra: 你从高中毕业会不会感到很兴奋呢？\nRobbie: Sure\u0026hellip; and a little scared. Robbie: 当然……还有一点紧张。\nAlexandra: Scared? Why? Aren\u0026rsquo;t you a little scared? Alexandra: 紧张？为什么？你不会感到有点紧张吗？\nRobbie: I was when I first came to the United States. I\u0026rsquo;d never been away from home, and I didn\u0026rsquo;t know what it would be like. But then I found out that people are the same everywhere once you get to know them. Robbie: 当我刚到美国来的时候，是感到有点紧张。我从来没有离开过家，而且我也不知道会是怎么一个样子。但是后来我发现，哪里的人都是一样的，一旦认识了周围的人以后。\nAlexandra: I\u0026rsquo;m glad I got to know you. Alexandra: 我很高兴能够认识你。\nRobbie: Thank you. I\u0026rsquo;m glad I got to know you — and your family. Robbie: 谢谢你。我也很高兴能够认识你——和你的一家人。\n（派对当晚）\nRobbie: How does that look, Rob? Robbie: 看起来怎么样，Rob？\nFriend: Great! Pass me the hammer. 朋友: 很好！把锤子给我。\nRobbie: You got it! Robbie: 给你啦！\nRobbie: You\u0026rsquo;re sure Alexandra\u0026rsquo;s going to be surprised? Robbie: 你确定Alexandra会很惊讶吗？\nFriend: Absolutely. She has no idea that the party is in her honor. 朋友: 绝对。她不知道这个派对是为她办的。\n（Alexandra来电）\nEllen: Robbie, there\u0026rsquo;s a phone call for you. It\u0026rsquo;s Alexandra. She sounds upset. Ellen: Robbie，有你的电话。是Alexandra。她听起来有点不对劲。\nRobbie: OK. Thanks, Mom. I\u0026rsquo;ll take it in there. Robbie: 好。妈，谢谢你。我在那里接。\nRobbie: Hi, Alexandra. Robbie: 嗨，Alexandra。\nRobbie: What? You what? Robbie: 什么？你怎样？\nRobbie: Oh no! Robbie: 噢，糟糕！\n（Robbie去了机场，但……）\nFriend: How about some music? 朋友: 来点音乐怎么样？\nEllen: No, let\u0026rsquo;s wait till Robbie gets back from the airport. Ellen: 不要。我们等Robbie从机场回来吧。\nEllen: Did she say why she had to leave today? Ellen: 她说了她为什么今天非走不可吗？\nFriend: She told Robbie that her flight tomorrow was canceled, so she had to take an earlier flight today. 朋友: 她告诉Robbie说，她明天的班机取消了，所以她不得不在今天搭早一班的班机。\nEllen: This is terrible. Ellen: 真是太糟了。\n（Robbie回来了）\nRobbie: Hi. Robbie: 嗨！\nFriend: How\u0026rsquo;d it go? 朋友: 怎么样啦？\nRobbie: OK, I guess. Especially when Alexandra gave me a surprise\u0026hellip; Robbie: 我想还好吧。特别是Alexandra给了我一个惊喜……\nFriend: Yeah? What was it? 朋友: 是吗？是什么惊喜？\nRobbie: This! Robbie: 这个！\nAlexandra: Alexandra! Alexandra: Alexandra！\nRobbie: Hi! What happened? Robbie: 嗨！怎么回事？\nAlexandra: I called my parents from the airport. When I told them my friends were giving me a party, they insisted that I stay. So now I\u0026rsquo;m taking a flight on Monday instead. Alexandra: 我从机场打电话给我父母。当我告诉他们我的朋友们为我举办了一个派对时，他们坚持要我留下来。所以我现在要改搭星期一的班机走。\nRobbie: That\u0026rsquo;s great! Terrific! Robbie: 那太好了！太棒了！\nFriend: But how did you know the party was for you? 朋友: 但是你怎么知道派对是为你举办的呢？\nAlexandra: Well, Robbie told me when he gave me this. Oh, it\u0026rsquo;s so pretty! It\u0026rsquo;s lovely, Robbie. Alexandra: 嗯，当Robbie送给我这个的时候，他告诉了我。噢，它好漂亮！它非常可爱，Robbie。\nRobbie: All right! Now we can really start the party! Robbie: 好啦！现在我们可以真正开始舞会了！\nAlexandra: No. Would you mind? I\u0026rsquo;d like to say something first. Alexandra: 不。你们不介意吧？我想先说几句话。\nAll: Hear, hear! 所有人: 我们洗耳恭听！\nAlexandra: I would just like to thank all of you, my friends, who have made my stay in the United States so wonderful. And to Robbie and the Stewart family for opening their home to me. Alexandra: 我只是想谢谢你们大家，我的朋友们。是你们使得我在美国的生活如此多采多姿。并且感谢Robbie和Stewart全家为我敞开大门。\nFriend: We should thank you. You\u0026rsquo;re a real friend! 朋友: 我们应当感谢你。你是个真正的朋友！\nAlexandra: And I also have a little surprise for you, Robbie. A little going-away present. Alexandra: 我也有一个小小的惊喜给你，Robbie。一个小小的临别礼物。\nRobbie: Thank you. Robbie: 谢谢你。\nAlexandra: Open it, please. I think you might be amused. Alexandra: 请打开看看。我想你可能会觉得有趣。\nRobbie: OK. I can\u0026rsquo;t believe it! I guess we were thinking the same thought. You had it engraved! Robbie: 好的。我简直无法相信！我想我们的心意相同。你在上面刻了字！\nAlexandra: Read it, Robbie. Alexandra: 读出来，Robbie。\nRobbie: \u0026ldquo;In friendship, always. Alexandra.\u0026rdquo; I knew we thought alike, but this is too much! Thank you. Robbie: \u0026ldquo;友情永不渝，Alexandra。\u0026ldquo;我知道我们心意相同，但是这太令人难以置信了！谢谢你。\nAll: All right! Let\u0026rsquo;s have some music! 所有人: 好了！我们来点音乐吧！\n重难点分析 \u0026ldquo;give me a break\u0026rdquo;\n非常常用的口语表达 字面意思是\u0026quot;让我休息一下\u0026rdquo;，引申为\u0026quot;饶了我吧\u0026rdquo;、\u0026ldquo;别烦我了\u0026rdquo; 也可以表示\u0026quot;给我一个机会\u0026quot; \u0026ldquo;I\u0026rsquo;m broke\u0026rdquo;\n表示\u0026quot;我身无分文\u0026quot;、\u0026ldquo;我没钱了\u0026rdquo; 比\u0026quot;I have no money\u0026quot;更地道、更口语化 类似表达：I\u0026rsquo;m short of cash. / I\u0026rsquo;m flat broke. \u0026ldquo;You\u0026rsquo;ve got it\u0026rdquo;\n表示\u0026quot;没问题\u0026quot;、\u0026ldquo;成交\u0026rdquo;、\u0026ldquo;你得到了\u0026rdquo; 相当于\u0026quot;It\u0026rsquo;s yours\u0026quot;或\u0026quot;Sure thing\u0026quot; \u0026ldquo;It\u0026rsquo;s a date\u0026rdquo;\n表示\u0026quot;说定了\u0026quot;、\u0026ldquo;就这么约好了\u0026rdquo; 不一定是浪漫约会，也可以是朋友间的约定 \u0026ldquo;Hear, hear!\u0026rdquo;\n表示赞同的欢呼声，相当于\u0026quot;说得好！\u0026quot;、\u0026ldquo;听听！\u0026rdquo; 常用于演讲或祝酒时表示支持 核心词汇 英文 中文 说明 assembly hall 大礼堂 学校用于集会的场所 graduation ceremony 毕业典礼 学校毕业仪式 farewell party 欢送会 为即将离开的人举办的派对 surprise party 惊喜派对 被邀请者不知情的派对 broke 身无分文的 非常口语化的表达 lifeguard 救生员 游泳池或海滩的安全人员 loan 借款，贷款 向他人借的钱 wristwatch 手表 戴在手腕上的表 engraved 雕刻的，刻字的 在物品上刻字留念 terrific 极好的，太棒了 比\u0026quot;great\u0026quot;更强烈的赞美 口语中的应用 \u0026ldquo;Give me a break.\u0026rdquo;\n多种用法：请求休息、表示难以置信、表示不满 例：Give me a break! I\u0026rsquo;ve been working all day. \u0026ldquo;I\u0026rsquo;m broke.\u0026rdquo; / \u0026ldquo;I\u0026rsquo;m short of cash.\u0026rdquo;\n表示缺钱、手头紧 例：Can you lend me $20? I\u0026rsquo;m broke. \u0026ldquo;What\u0026rsquo;s up?\u0026rdquo;\n非常常见的打招呼方式，相当于\u0026quot;怎么了？\u0026quot;、\u0026ldquo;什么事？\u0026rdquo; 回答：Not much. / Nothing. \u0026ldquo;You\u0026rsquo;ve got it.\u0026rdquo;\n表示同意或确认 类似表达：Sure. / No problem. / You bet. \u0026ldquo;I\u0026rsquo;m counting on it.\u0026rdquo;\n表示\u0026quot;我指望着呢\u0026quot;、\u0026ldquo;我有这个打算\u0026rdquo; 类似表达：I\u0026rsquo;m looking forward to it. 核心练习句型 \u0026ldquo;now that\u0026rdquo; 表示\u0026quot;既然\u0026quot;\nNow that you\u0026rsquo;re here, you can help me with dinner. 练习：既然你来了，我们开始吧。→ Now that you\u0026rsquo;re here, let\u0026rsquo;s begin. \u0026ldquo;would like to\u0026rdquo; 表示\u0026quot;想要\u0026quot;（礼貌表达）\nWould you like to give her a little farewell party? 练习：我想介绍你认识我的朋友。→ I\u0026rsquo;d like to introduce you to my friend. \u0026ldquo;should have + 过去分词\u0026rdquo; 表示\u0026quot;本应该做某事（但没做）\u0026quot;\nI should have saved some money. 练习：我本应该早点告诉你的。→ I should have told you earlier. \u0026ldquo;so that\u0026rdquo; 表示\u0026quot;以便、为了\u0026quot;\nShe\u0026rsquo;ll think of me when she looks at the time. 练习：我早点来以便能占到好座位。→ I came early so that I could get a good seat. \u0026ldquo;instead\u0026rdquo; 表示\u0026quot;代替、反而\u0026quot;\nSo now I\u0026rsquo;m taking a flight on Monday instead. 练习：我不喝茶，改喝咖啡。→ I\u0026rsquo;ll have coffee instead of tea. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-24/","summary":"\u003ch2 id=\"课文原文bilingual-dialogue\"\u003e课文原文（Bilingual Dialogue）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003e场景：\u003c/strong\u003e Robbie想为即将回希腊的朋友Alexandra举办一个惊喜欢送派对。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRobbie:\u003c/strong\u003e Hi, Mom.\n\u003cstrong\u003eRobbie:\u003c/strong\u003e 嗨，妈。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eEllen:\u003c/strong\u003e Hi, Robbie. You\u0026rsquo;re home from school early.\n\u003cstrong\u003eEllen:\u003c/strong\u003e 嗨，Robbie。你今天从学校回来得早。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRobbie:\u003c/strong\u003e Yeah, they\u0026rsquo;re getting the assembly hall ready for the graduation ceremony, so we all got to go home early. Too noisy to study.\n\u003cstrong\u003eRobbie:\u003c/strong\u003e 是啊，他们在布置大礼堂，为毕业典礼做准备，所以我们都非早回家不可。太吵了，书看不下去。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eEllen:\u003c/strong\u003e Well, now that you\u0026rsquo;re here, you can help me with dinner. I need those potatoes peeled and sliced.\n\u003cstrong\u003eEllen:\u003c/strong\u003e 嗯，既然你回来了，你就来帮我准备晚餐。那些马铃薯需要剥皮和切片。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRobbie:\u003c/strong\u003e Mom, give me a break. Alexandra\u0026rsquo;s coming over to help me study for my math final.\n\u003cstrong\u003eRobbie:\u003c/strong\u003e 妈，让我喘口气。Alexandra就要来帮我温习数学，准备期末考试。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第24课：A Surprise Party（惊喜派对）"},{"content":"课文原文（Bilingual Dialogue） 场景： Richard和Marilyn准备去乡村露营，Ellen帮忙照顾Max。\nRichard: Hot dogs. I love hot dogs. There is nothing better than a hot dog in the country. Hot dogs and mustard. Cooked outdoors over an open fire. I wish I had one now. Richard: 热狗。我喜欢热狗。在美国没有比热狗更好的东西了。热狗和芥末。在户外的火堆上烤。我真希望现在就来一个。\nMarilyn: Do you remember when Daddy and I used to take you and Susan and Robbie to Jones Beach? Marilyn: 你还记得爸爸和我常带你、Susan、Robbie去Jones海滨的事吗？\nRichard: Oh, I sure do. We\u0026rsquo;d wait until dark and make a fire, and we\u0026rsquo;d cook the hot dogs. Richard: 哦，我当然记得。我们等到天黑就升火，然后烤热狗。\nMarilyn: Oh, don\u0026rsquo;t forget the mustard. Marilyn: 噢，不要忘了芥末。\nRichard: And, oh, does anybody want ketchup? I might as well take it along. Richard: 噢，有人要蕃茄酱吗？我还是一道带着。\nRichard: And now to make sure we\u0026rsquo;ve got the hamburger patties. Richard: 再来，务必要带汉堡碎肉饼。\nMarilyn: I have to remember to put them in the bag tomorrow morning before we leave. Marilyn: 我必须记得将它们放进袋里在明天早上临走之前。\nRichard: I\u0026rsquo;ll remind you, Richard. Richard: 我会提醒你的，Richard。\nMarilyn: Mom, we really appreciate your taking care of Max for the weekend and giving up your free time. Marilyn: 妈，我们真心感谢你在周末照顾Max，放弃你的闲暇时间。\nEllen: I love doing it. Susan and Harry have a sitter for Michelle in the city, and I\u0026rsquo;m taking care of Max. It\u0026rsquo;s no big deal. I am happy to do it for you. Ellen: 我爱这样做。Susan和Harry在城里给Michelle找到一位临时保姆，我就来照顾Max。这没有什么。我很高兴为你们做这件事。\nMarilyn: I guess Max is asleep by now. He\u0026rsquo;s not crying anymore. Marilyn: 我想Max现在已经睡觉了。他不再哭了。\nEllen: Oh, poor baby. He\u0026rsquo;s teething. Ellen: 噢，可怜的小宝贝。他正在长牙齿。\nRichard: Well, he\u0026rsquo;s asleep — finally. Richard: 好了，他终于睡着了。\nMarilyn: I feel so bad for him. It hurts so much when a baby gets his first teeth. Marilyn: 我为他难过。小孩子长第一颗牙齿时好痛哟。\nEllen: He\u0026rsquo;ll be fine, Marilyn. Ellen: 他不会有事的，Marilyn。\nMarilyn: Well, he wakes up several times during the night, and the pain is so bad. I\u0026rsquo;m really concerned about going away for the weekend, Ellen, and leaving you with the full responsibility of taking care of Max. Especially with his teething. I wish he felt better. Marilyn: 噢，他一夜醒了好几次，疼得很厉害。我这个周末出门实在放心不下，Ellen，还要把照顾Max的全部责任留给你。特别是他现在开始长牙。我真希望他现在好一点。\nEllen: Please don\u0026rsquo;t worry, Marilyn. Remember your father-in-law\u0026rsquo;s a pediatrician. We have a live-in doctor if there\u0026rsquo;s a problem I can\u0026rsquo;t handle. Ellen: 请别担心，Marilyn。记住你公公是小儿科医师。假如我遇到不能解决的问题，我们还有位驻家医生。\nRichard: I agree, Marilyn. We really don\u0026rsquo;t have to be overly concerned. Richard: 我同意，Marilyn。我们真的不需要过分担心。\n（出发前检查物品清单）\nMarilyn: Now, to check the list of things we need for the camping trip. We need to bring a flashlight. Marilyn: 现在，让我们检查一下露营旅行所需物品的清单吧。我们需要带一个手电筒。\nRichard: It\u0026rsquo;s in the right-hand drawer, next to the bottle openers. Richard: 在右边的抽屉里，就在开瓶器旁边。\nMarilyn: Do we have a bottle opener on the list, Marilyn? Marilyn: 清单上有开瓶器吗，Marilyn？\nRichard: No. No bottle opener. Richard: 没有，没有开瓶器。\nMarilyn: Is that one of the things Susan and Harry are bringing? Marilyn: 那是不是属于Susan和Harry要带的？\nRichard: No. Richard: 不是。\nMarilyn: And we\u0026rsquo;re bringing the ketchup, mustard, relish — all that stuff. And cooking utensils. Marilyn: 我们还要带蕃茄酱、芥末、调味酱——诸如此类的东西。还有厨具。\nRichard: Well, here\u0026rsquo;s the bottle opener, and here\u0026rsquo;s the flashlight. Richard: 哦，这是开瓶器，这是手电筒。\nMarilyn: Matches. Marilyn: 火柴。\nRichard: Matches? Richard: 火柴？\nMarilyn: Yes, of course. For when we build our campfire. I can\u0026rsquo;t build a fire by rubbing two pieces of wood together. Marilyn: 是的，当然。用来生营火的。我总不能靠着磨擦两片木柴来取火吧。\nRichard: And don\u0026rsquo;t forget your camera and film, Richard. Richard: 别忘了你的照相机和底片，Richard。\nMarilyn: All packed and ready. Marilyn: 都打包好了。\nRichard: And let\u0026rsquo;s not forget our cassette player and some tapes. Some music tapes and some blank tapes so that we can record our thoughts about the trip. Richard: 还别忘了带上我们的卡式录音机和一些录音带。带一些音乐带和一些空白带以便我们能录下旅行中的感想。\nMarilyn: Oh, that\u0026rsquo;s a nice idea. An audio diary. Marilyn: 噢，这是个好主意。来一段录音日记。\nRichard: That\u0026rsquo;s what I thought. Richard: 我就是这么想的。\n（到达乡村营地）\nSusan: Oh, I love it! I love it! To be away from the city on such a beautiful day is my idea of heaven! The grass. The trees. The fresh air. Susan: 哦，我太喜欢了！我太喜欢了！在这样美好的一天远离都市，正是我所谓的天堂！草地、树木、新鲜空气。\nHarry: I told you you\u0026rsquo;d like it. I\u0026rsquo;ve been doing this for years. Harry: 我告诉过你你会喜欢的。我多年来一直从事这项活动。\nSusan: You have the spirit of a teenager, Susan. Susan: 你有一股青少年的朝气，Susan。\nHarry: Wait till you see yourself jumping around. Harry: 等着看你那到处乱蹦的样子吧。\nMarilyn: That\u0026rsquo;s what I love about Susan. She works hard. She plays hard. She\u0026rsquo;s a real Stewart. Marilyn: 这就是我爱Susan的一点。工作起来拼命，玩起来也拼命。她是一个真正的Stewart家人。\nRichard: Come on, Richard. Help me get this stuff out of the car. Richard: 过来，Richard。帮我将这些东西拿下车子。\nHarry: Where does it go? Harry: 放在哪儿？\nRichard: Well, we\u0026rsquo;ll put everything over there. We\u0026rsquo;ll set up our tents over there by the edge of the woods. Then we\u0026rsquo;ll be able to make our fire there where it\u0026rsquo;s safe. Richard: 嗯，我们将所有的东西都放在那边。我们在林边搭帐蓬。然后我们就可以在那儿找一个安全的地方生火了。\nMarilyn: Oh, there\u0026rsquo;s our table and benches. All set for eating. Marilyn: 哦，那是我们的桌子和长板凳。吃饭用的一切都准备好了。\nHarry: That\u0026rsquo;s what makes this spot so good. Harry: 那就是为什么这个地点这样好的道理。\nSusan: Is anybody hungry? Susan: 有人饿了吗？\nHarry: I am. Harry: 我饿了。\nMarilyn: We just got here. Marilyn: 我们才刚刚到这儿。\nRichard: When you\u0026rsquo;re out in the fresh air like this, it makes you hungry. Aren\u0026rsquo;t you hungry, Marilyn? Richard: 当你来外面呼吸这么新鲜的空气时，就很容易饿。你不饿吗，Marilyn？\nMarilyn: I sure am. Marilyn: 我确实饿了。\nRichard: How about you, Richard? Richard: 你呢，Richard？\nHarry: Starving. Harry: 很饿。\nMarilyn: You guys are like three kids. Marilyn: 你们就像三个孩子。\nSusan: Aren\u0026rsquo;t you hungry, Harry? Susan: 你不饿吗，Harry？\nHarry: Well, yeah. Now that you mention it, I guess I am. I mean, how could a guy not be hungry with all this talk about eating? Harry: 嗯，饿啊。你们一提起来，我想我也饿了。我的意思是，当大家都在谈吃的，谁能不饿呢？\n（夜晚的宁静）\nSusan: This is heaven, Harry! It was such a great idea to spend the weekend this way. Susan: 这简直是天堂，Harry！这样过周末的主意简直太棒了。\nHarry: Thanks, Susan. I thought you\u0026rsquo;d all like it. Harry: 谢谢你，Susan。我料想你们都会喜欢的。\nSusan: Like it? I love it! Susan: 喜欢？我爱上它了！\nHarry: Listen to the sounds of the summer that surround us. It\u0026rsquo;s so calming. Harry: 仔细倾听环绕我们的夏夜声息。好宁谧。\nSusan: I\u0026rsquo;ve always liked camping out. Away from the telephones and account books. It\u0026rsquo;s refreshing for me. I always go back to the city in a wonderful state of mind. Susan: 我一直喜欢露营。远离电话和帐簿。这是我提振精神的方法。我再回到城里时，精神总是十分饱满。\nHarry: We\u0026rsquo;ve only been here for a day, and I\u0026rsquo;ve completely forgotten about all my business problems. The office seems so far away. Harry: 我们到这里仅仅一天，但我已经彻底抛开了我所有的业务上的问题。办公室好像变得那么遥远。\nSusan: I\u0026rsquo;m glad you like it, Susan. We\u0026rsquo;ll spend many more weekends like this. And next time we\u0026rsquo;ll bring Michelle. Susan: 我很高兴你喜欢它，Susan。我们以后可以多度几次这样的周末。下次我们要带Michelle来。\nHarry: I wish she were here with us to enjoy the country. Harry: 我真希望现在她就和我们在一起享受这乡村美景。\nSusan: And next time we\u0026rsquo;ll bring Michelle. Susan: 下次我们带Michelle来。\nHarry: Just listen to the sound. It\u0026rsquo;s so soothing. I can hardly keep my eyes open. Harry: 听听这些声音。是这样的安详。我简直睁不开眼睛了。\nMarilyn: If only we could bottle the fresh air. Wouldn\u0026rsquo;t it be wonderful? We could call it \u0026ldquo;Deep Sleep Country Air.\u0026rdquo; It puts you to sleep. Marilyn: 要是我们能用瓶子将新鲜空气装回去多好。那样岂不是太美妙了吗？我们可以称它为\u0026quot;沉睡的乡村空气\u0026quot;。它让你很快入睡。\nRichard: So does the sound. I\u0026rsquo;ve been having a hard time keeping my eyes open just listening to it. It\u0026rsquo;s like a special music. Richard: 这些声音也是。我一直挣扎着要让双眼睁开，听着这些声音时。它就像是一种特别的音乐。\nMarilyn: Too bad we can\u0026rsquo;t bottle the sound. Marilyn: 不能将声音装瓶真是太可惜了。\nRichard: But we can! Richard: 但我们能！\nMarilyn: Can what? Marilyn: 能做什么？\nRichard: Bottle the sound. Richard: 将声音装起来呀。\nMarilyn: Oh, yeah? Marilyn: 噢，做什么？\nRichard: Great idea! Let\u0026rsquo;s do it! Richard: 好主意！我们来录！\n（回家后）\nEllen: Welcome home — and I do mean welcome home. Ellen: 欢迎归来。我真心欢迎你们回来。\nRichard: Something wrong? Richard: 有什么不对劲吗？\nEllen: Oh, nothing\u0026rsquo;s wrong, Richard. Believe me, Max is fine. But his teeth hurt, and he just can\u0026rsquo;t get to sleep, poor dear. Neither can you. Ellen: 噢，没有什么事，Richard。相信我，Max很好。但他的牙疼，他不能入睡，可怜的小宝贝。你也不能入睡。\nMarilyn: Oh, I feel so bad. Marilyn: 噢，我真抱歉。\nEllen: Oh, I\u0026rsquo;m fine. How was your weekend? Ellen: 噢，我很好。你们的周末过得怎么样？\nRichard: We had a great time, Mom. It was wonderful. The weather couldn\u0026rsquo;t have been better. Richard: 我们玩得非常开心，妈。太好了。天气再好不过了。\nEllen: It was nice here, too. Did you get a chance to get outside at all? Ellen: 这儿也很好。你有时间出门吗？\nEllen: Oh, yes. Grandpa helped me yesterday afternoon. I went to the supermarket to get a few things, and I stayed out an extra half hour. The village was filled with people — the weather was so nice. Ellen: 噢，是的。昨天下午祖父帮我的忙。我去一趟超级市场，买了几样东西，我还特别多待了半个小时。镇上挤满了人，天气好的缘故。\nMarilyn: Harry\u0026rsquo;s a professional camper, Mom. He knows all there is to know, and he made the weekend very easy for us to enjoy. Marilyn: Harry是露营专家，妈。他无所不知，使得我们的周末过得非常轻松愉快。\nHarry: Come on. You all helped. Harry: 别这样说。你们都帮了忙。\nMarilyn: You were wonderful, Harry! Marilyn: 你真是了不起，Harry！\n（Max哭闹，Richard播放录音）\nRichard: Let\u0026rsquo;s see if it works. Richard: 让我们看看是不是有效果。\nEllen: What\u0026rsquo;s that? Ellen: 那是什么？\nRichard: A little special country music. Richard: 一点特殊的乡村音乐。\n（Max停止了哭泣）\nRichard: Max has stopped crying. Richard: Max不哭了。\nMarilyn: Yes. It works! It works! Marilyn: 不错。有效！有效！\nEllen: What works? Ellen: 什么有效？\nRichard: This. Richard: 这个。\nEllen: Oh. Oh, where did you get that? It sounds so nice. Ellen: 噢。噢，你们从哪儿弄来的？很好听。\nMarilyn: I think I\u0026rsquo;m falling asleep. Marilyn: 我想我要睡着了。\nRichard: Like Max did. Richard: 就像Max一样。\nMarilyn: Good night. Marilyn: 晚安。\nRichard: Good night. Richard: 晚安。\nEllen: Sounds of the country. The soothing sounds of the country. Ellen: 乡村音响。安详的乡村音响。\n重难点分析 \u0026ldquo;There is nothing better than\u0026hellip;\u0026rdquo;\n使用比较级的否定形式表示最高级 相当于\u0026quot;Nothing is better than\u0026hellip;\u0026quot;（没有什么比……更好的了） 类似表达：There\u0026rsquo;s nothing like\u0026hellip;（没有什么比得上……） \u0026ldquo;I might as well take it along.\u0026rdquo;\n\u0026ldquo;might as well\u0026quot;表示\u0026quot;不妨、还是……为好\u0026rdquo; 表示虽然没有强烈的理由，但这样做比较方便或合理 \u0026ldquo;It\u0026rsquo;s no big deal.\u0026rdquo;\n非常常用的口语表达 表示\u0026quot;没什么大不了的\u0026quot;、\u0026ldquo;小事一桩\u0026rdquo; \u0026ldquo;The weather couldn\u0026rsquo;t have been better.\u0026rdquo;\n使用否定形式表示最高级含义 相当于\u0026quot;The weather was perfect.\u0026quot;（天气好得不能再好了） \u0026ldquo;If only we could\u0026hellip;\u0026rdquo;\n表示\u0026quot;要是……就好了\u0026quot;，表达强烈的愿望 虚拟语气，与现在事实相反 核心词汇 英文 中文 说明 hot dog 热狗 美式经典户外食品 mustard 芥末 热狗的经典调味品 ketchup 番茄酱 美式常用调味酱 hamburger patty 汉堡碎肉饼 做汉堡用的肉饼 teething 长牙 婴儿长乳牙的过程 pediatrician 小儿科医生 专门给儿童看病的医生 camping 露营 户外搭帐篷过夜 flashlight 手电筒 露营必备用品 campfire 营火 露营时生的火 audio diary 录音日记 用录音记录的想法和感受 soothing 抚慰的，安详的 令人平静的声音或感觉 口语中的应用 \u0026ldquo;There\u0026rsquo;s nothing better than\u0026hellip;\u0026rdquo;\n表达最高级的喜爱 例：There\u0026rsquo;s nothing better than a cold drink on a hot day. \u0026ldquo;I might as well\u0026hellip;\u0026rdquo;\n表示\u0026quot;不妨\u0026quot;、\u0026ldquo;还是……为好\u0026rdquo; 例：I might as well finish it now. \u0026ldquo;It\u0026rsquo;s no big deal.\u0026rdquo;\n安慰别人或表示事情不严重 例：Don\u0026rsquo;t worry about it. It\u0026rsquo;s no big deal. \u0026ldquo;The weather couldn\u0026rsquo;t have been better.\u0026rdquo;\n用否定比较级表示最高级 类似：I couldn\u0026rsquo;t be happier. / It couldn\u0026rsquo;t be worse. \u0026ldquo;If only\u0026hellip;\u0026rdquo;\n表达愿望或遗憾 例：If only I had more time. 核心练习句型 \u0026ldquo;used to\u0026rdquo; 表示\u0026quot;过去常常做某事\u0026quot;\nDo you remember when Daddy and I used to take you to Jones Beach? 练习：我过去常常在周末钓鱼。→ I used to go fishing on weekends. \u0026ldquo;would\u0026rdquo; 表示\u0026quot;过去经常做\u0026quot;（描述过去的习惯）\nWe\u0026rsquo;d wait until dark and make a fire. 练习：我们过去常在沙滩上散步。→ We would walk on the beach. \u0026ldquo;so that\u0026rdquo; 表示\u0026quot;以便、为了\u0026quot;\nSo that we can record our thoughts about the trip. 练习：我早点来以便能和你谈谈。→ I came early so that I could talk to you. \u0026ldquo;否定 + 比较级\u0026rdquo; 表示最高级\nThe weather couldn\u0026rsquo;t have been better. 练习：我不能再高兴了。→ I couldn\u0026rsquo;t be happier. \u0026ldquo;If only + 虚拟语气\u0026rdquo; 表示愿望\nIf only we could bottle the fresh air. 练习：要是我是你就好了。→ If only I were you. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-25/","summary":"\u003ch2 id=\"课文原文bilingual-dialogue\"\u003e课文原文（Bilingual Dialogue）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003e场景：\u003c/strong\u003e Richard和Marilyn准备去乡村露营，Ellen帮忙照顾Max。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e Hot dogs. I love hot dogs. There is nothing better than a hot dog in the country. Hot dogs and mustard. Cooked outdoors over an open fire. I wish I had one now.\n\u003cstrong\u003eRichard:\u003c/strong\u003e 热狗。我喜欢热狗。在美国没有比热狗更好的东西了。热狗和芥末。在户外的火堆上烤。我真希望现在就来一个。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMarilyn:\u003c/strong\u003e Do you remember when Daddy and I used to take you and Susan and Robbie to Jones Beach?\n\u003cstrong\u003eMarilyn:\u003c/strong\u003e 你还记得爸爸和我常带你、Susan、Robbie去Jones海滨的事吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e Oh, I sure do. We\u0026rsquo;d wait until dark and make a fire, and we\u0026rsquo;d cook the hot dogs.\n\u003cstrong\u003eRichard:\u003c/strong\u003e 哦，我当然记得。我们等到天黑就升火，然后烤热狗。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第25课：Country Weekend（乡村周末）"},{"content":"课文原文（Bilingual Dialogue） 场景： Richard的摄影展《走遍美国》在Carlson画廊开幕，全家人都来支持他。\n（布展中）\nHarvey: A little further to the right, Tom. Harvey: 再往右一点，Tom。\nTom: Is this OK? Tom: 这样可以吗？\nHarvey: Good. What do you think, Richard? Harvey: 好。你看呢，Richard？\nRichard: I like it there. It\u0026rsquo;s the first thing people will see when they come in. It sets the tone for the whole show. Richard: 摆在那里很好。这是人们走进来所看到的第一件东西。它决定了整个展览的气氛。\nHarvey: The next thing they\u0026rsquo;ll see is this enlargement with the words Family Album, U.S.A. Harvey: 他们接着看到的是Family Album, U.S.A.这几个放大的字。\nRichard: I can\u0026rsquo;t believe this is really happening! Richard: 我不敢相信这一切真的发生了！\nHarvey: You\u0026rsquo;ve earned it. Years of work went into these pictures. Harvey: 这是你应得的报偿。多年心血换来这些照片。\nRichard: I know, but it\u0026rsquo;s still a dream come true. Richard: 我知道，但这终究是一个梦想实现了。\nHarvey: Well, remember, we\u0026rsquo;re not sure what the critics are going to write about your show yet. And you never know what the man from the New York Times is going to say about it. Harvey: 嗯，记住，我们还不能肯定评论家们会对你的展览写些什么。而你永远也猜不到纽约时报的那个人会说些什么。\nRichard: Are you worried? Richard: 你担心吗？\nHarvey: I always worry. The reviews of this show are important for the sales of your book. Harvey: 我一向担心。与这次展览有关的评论对于你这本书的销售很重要。\nRichard: When do we see the reviews? Richard: 什么时候我们可以看到评论？\nHarvey: Soon. One of the critics is coming over this morning for a preview. I hope he\u0026rsquo;s in a good mood. Harvey: 很快。一位评论家今天早上要来看预展。我希望他心情不错。\nRichard: So do I. Richard: 我也是。\nRichard: Marilyn and I hope to use money from the sales of this book to buy a new house. Richard: Marilyn和我希望用这本书销售的钱来买一栋新房子。\nHarvey: The book will be a success. And the show will help promote it. Harvey: 这本书会成功的。而这次展览会有利于促销它。\nRichard: Speaking of promoting the book, do I really have to autograph copies for the guests at the opening? Richard: 说起促销书的事，我是不是真的有必要在展览开幕时为客人在书上亲笔签名呢？\nHarvey: It\u0026rsquo;s common practice. Harvey: 这是惯例。\nRichard: I feel uncomfortable about it. Richard: 我对此感到满别扭的。\nHarvey: A lot of people come to openings just so they can get the autograph of somebody who may be famous someday. Harvey: 许多人参加开幕仪式，就是为了得到将来有可能成名的人的亲笔签名。\nRichard: Couldn\u0026rsquo;t we wait until I\u0026rsquo;m famous? Richard: 难道不能等到我成名了再说吗？\nHarvey: That might be sooner than you think. Harvey: 那也许比你想像的要快。\n（评论家Mitchell Johnson来访）\nHarvey: Harvey, how are you? Harvey: Harvey，你好吗？\nMitchell: Mitchell, so nice of you to come. Mitchell: Mitchell，欢迎光临。\nHarvey: Richard, this is Mitchell Johnson. Mitchell is one of the most important syndicated reviewers in the country. Harvey: Richard，这是Mitchell Johnson。Mitchell是我国最重要的报团评论家之一。\nMitchell: Well, you\u0026rsquo;re the young man who did all this. Mitchell: 嗯，你就是那位拍这些照片的年轻人。\nRichard: I\u0026rsquo;m afraid so. Richard: 不敢当。\nMitchell: Nice to meet you. Mitchell: 很高兴见到你。\nRichard: Nice to meet you, Mr. Johnson. Richard: 很高兴见到你，Johnson先生。\nHarvey: Mitchell has always encouraged new talent. Harvey: Mitchell总是在鼓励新人。\nMitchell: Well\u0026hellip; you mind if I look around and see what it says to me? Mitchell: 嗯……你们不介意我到处瞧瞧，看它给我什么样的感受吧？\nHarvey: Be our guest. Harvey: 请随意。\n（Mitchell发出\u0026quot;Mm-hmm\u0026quot;的声音）\nRichard: What does that mean when he goes, \u0026ldquo;Mm-hmm, mm-hmm, mm-hmm\u0026rdquo;? Richard: 他发出的声音代表什么意思，\u0026ldquo;Mm-hmm,mm-hmm,mm-hmm\u0026rdquo;？\nHarvey: It probably means he\u0026rsquo;s clearing his throat. I don\u0026rsquo;t know. Harvey: 也许表示他正在清喉咙。我不知道。\nTom: I don\u0026rsquo;t care what the critics say, Mr. Stewart. Your work is brilliant. Tom: 我不管评论家怎么说，Stewart先生。你的作品很好。\nRichard: Thank you, Tom. Richard: 谢谢你，Tom。\nHarvey: Tom is studying photography at NYU. He\u0026rsquo;s working with me during the summer months as an intern. Harvey: Tom正在NYU学摄影。在夏天的这几个月到我这里来当实习生。\nRichard: Oh, really? I\u0026rsquo;d like to see your work. Richard: 噢，真的？我希望能看到你的作品。\nTom: It\u0026rsquo;s not good enough to show. I\u0026rsquo;m still learning. Tom: 还不值得展示。我还在学习当中。\nRichard: Oh, I\u0026rsquo;d still like to see your work. You may be the next Ansel Adams and not even know it. Richard: 噢，我仍然希望看到你的作品。你或许是第二个Ansel Adams而不自知呢。\nTom: If you really mean it, I\u0026rsquo;ll bring some of my pictures into the gallery. Tom: 假如你是说真的，我就带一些我的摄影到艺廊来。\nRichard: I do mean it. Richard: 我的确是说真的。\n（Mitchell离开前）\nMitchell: Very interesting pictures, Mr. Stewart. You have a most unusual eye. Mitchell: 你的照片很有意思，Stewart先生。你有着极为不寻常的眼光。\nRichard: Thank you. I hope that\u0026rsquo;s a compliment. Richard: 谢谢你。我希望这是赞美之词。\nMitchell: It is. Mitchell: 它是的。\nHarvey: Are you going to be reviewing the show, Mitchell? Harvey: 你会评论这项展览吗，Mitchell？\nMitchell: Oh, yes. It\u0026rsquo;s definitely worth reviewing. Mitchell: 噢，是的。它着实值得评论。\nHarvey: Favorably? Harvey: 是好评？\nMitchell: Oh, you know I never answer that question, Harvey. I\u0026rsquo;d like an advance copy of the book, though, so I can study it. Mitchell: 噢，你知道我从不回答这类的问题，Harvey。但我想要一本新书的试印本，以便我好好研究。\n（开幕前，Richard和Marilyn在家准备）\nMarilyn: Do you like the dress? Marilyn: 你喜欢这套衣服吗？\nRichard: I love it. Richard: 我喜欢。\nMarilyn: I designed it myself. Marilyn: 这是我自己设计的。\nRichard: It\u0026rsquo;s beautiful. Richard: 它很漂亮。\nMarilyn: Are you ready? We\u0026rsquo;re supposed to be there before the guests arrive. Marilyn: 你准备好了吗？我们应当先到那儿在客人到达之前。\nRichard: I know. I know. Help me with this tie, will you? Honey, I\u0026rsquo;m scared to death. Richard: 我知道。我知道。帮我打领带，好吗？亲爱的，我害怕得要命。\nMarilyn: But this is what you\u0026rsquo;ve been working for all these years. Marilyn: 但你多年来的工作，为的就是这个呀。\nRichard: No, no. I worked to put together a book of photographs. This is show business. Richard: 不，不。我的工作是创作出一本摄影书。而今天这个却是演艺事业。\nMarilyn: Well, it\u0026rsquo;s all part of the same job. Just relax and enjoy it. Marilyn: 嗯，它们都是同一项工作的一部份。放轻松点，好好地享受它。\nRichard: You\u0026rsquo;re right. I earned this, and I\u0026rsquo;m going to enjoy it. As soon as I recover from my nervous breakdown. Richard: 你说得对。我辛苦赢得的，我要去享受它。只等我从神经崩溃中恢复过来。\nMarilyn: What are you afraid of? Marilyn: 你怕什么？\nRichard: Everything. A critic was there this morning. He probably hates my work. I have to sign copies of my book for a lot of people I never met before. My new shoes hurt my feet\u0026hellip; Richard: 每一样事情。一个评论家早上去过了。他也许讨厌我的作品。我还必须为许多人在我的书上签名我从未谋面过的人。我的新鞋弄痛了我的脚……\nMarilyn: You\u0026rsquo;re going to be a great success. Marilyn: 你会获得很大的成功的。\nRichard: Are you ready? Richard: 你准备好了吗？\nMarilyn: As soon as I get these cuff links on. Marilyn: 只等我将袖扣扣好。\nRichard: Let me help. Richard: 我来帮忙。\nMarilyn: Mom and Dad are already on their way down to the gallery. Marilyn: 妈妈和爸爸已经出发去画廊了。\nRichard: There! You look very attractive. Richard: 天！你看起来真帅！\nMarilyn: Thank you. Marilyn: 谢谢你。\nRichard: Well, I suppose I\u0026rsquo;ve run out of excuses. Richard: 噢，我想我再也找不出籍口了。\nMarilyn: Mm-hmm. Let\u0026rsquo;s go\u0026hellip; Marilyn: 嗯哼。我们走吧……\nRichard: Oh, one minute. Before we go to the gallery, I just want to tell you that I never could have done this book without your help and your love. I appreciate it. Thanks. Richard: 噢，再等一分钟。在我们去画廊之前，我想告诉你，我不可能完成这本书要不是你的帮助和爱。我很感激。谢谢。\nMarilyn: Now, no more stalling. Marilyn: 现在，不准再拖延了。\n（到达画廊）\nRichard: What is it? There\u0026rsquo;s nobody here! Richard: 怎么回事？这里一个人都没有！\nMarilyn: Of course not, Richard. Your show doesn\u0026rsquo;t begin until eight thirty. Marilyn: 当然不会有，Richard。你的展览八点半才开始。\nRichard: Oh. Right. Richard: 噢。对了。\n（家人到达）\nHarvey: Richard! Welcome! Good luck tonight! Harvey: Richard！欢迎！祝你今天晚上好运！\nRichard: Well, thanks. Richard: 噢，谢谢你。\nRichard: This is my publisher, Harvey Carlson. You\u0026rsquo;ve met my wife Marilyn\u0026hellip; Richard: 这是我的出版商Harvey Carlson。你曾经见过我太太Marilyn……\nHarvey: Charmed. Harvey: 荣幸见到你。\nRichard: My mother, Ellen Stewart. Richard: 我母亲Ellen Stewart。\nHarvey: Harvey Carlson. It\u0026rsquo;s good to meet you. Harvey: Harvey Carlson。很高兴见到你。\nEllen: It\u0026rsquo;s nice to meet you. Ellen: 很高兴见到你。\nRichard: This is my father, Dr. Philip Stewart\u0026hellip; Richard: 这是我父亲，Philip Stewart医生……\nHarvey: Nice to meet you, Mr. Carlson. Harvey: 很高兴见到你，Carlson先生。\nRichard: My brother Robbie\u0026hellip; Richard: 我弟弟Robbie……\nRichard: And this is my sister Susan and her husband Harry Bennett and his daughter Michelle. Richard: 这是我妹妹Susan和她丈夫Harry Bennett以及他女儿Michelle。\nHarvey: It\u0026rsquo;s nice to meet you. Harvey: 很高兴见到你。\nRichard: And this gentleman is my grandfather, Malcolm Stewart. Richard: 这位绅士是我祖父Malcolm Stewart。\nHarvey: Welcome, Mr. Stewart. Well, make yourselves comfortable. There are hors d\u0026rsquo;oeuvres at the table, fruit punch at the bar. Help yourselves. Harvey: 欢迎，Stewart先生。噢，请大家自便。在桌子上有小菜，柜台有水果调味饮品。请随便用。\n（评论出来了）\nHarvey: Ready? Harvey: 准备好了吗？\nRichard: Yes. Have the people arrived? Richard: 是的。客人来了吗？\nHarvey: The guests are waiting. Tom\u0026rsquo;s about to open the doors. Good luck! And stop worrying! They\u0026rsquo;re going to love it. Harvey: 客人们正等着呢。Tom准备要开门了。祝你好运！别再担心！他们会喜欢的。\nMarilyn: What\u0026rsquo;s this? Marilyn: 这是什么？\nRichard: Read it. Richard: 读出来吧。\nMarilyn: I can\u0026rsquo;t. Marilyn: 我不敢读。\nRichard: Would you read it, Marilyn? Richard: 请你读好吗，Marilyn？\nMarilyn: \u0026ldquo;Richard Stewart\u0026rsquo;s show at the Carlson Gallery is a collection of photographs from his new book entitled Family Album, U.S.A. There is power and beauty in Mr. Stewart\u0026rsquo;s work, and his book introduces us to a remarkable new talent.\u0026rdquo; Marilyn: \u0026ldquo;Richard Stewart在Carlson画廊展出的是选出的摄影作品从他的新书Family Album, U.S.A.。Stewart先生的作品中展现出力与美。他的书让我们看到一位卓越的新秀。\u0026rdquo;\nRichard: Oh, Richard, it\u0026rsquo;s wonderful! Congratulations! Richard: 噢，Richard，太棒了！恭喜你！\nMarilyn: Wow! I\u0026rsquo;m overwhelmed. Marilyn: 喔！我太感动了。\n（Harvey Carlson介绍Richard）\nHarvey: Ladies and gentlemen, if I may have your attention for a moment, please? I hope you\u0026rsquo;re all enjoying the exhibition. I know that I am. And I would like to introduce the young man who spent the last five years taking these remarkable pictures and writing the background for Family Album, U.S.A. — Mr. Richard Stewart. Harvey: 各位女士，各位先生！我想占用你们一点点时间，好吗？我希望你们都喜欢这个展览。我知道我是很喜欢。现在我希望向大家介绍这位年轻人用过去五年的时间来拍摄这些杰出作品并为Family Album, U.S.A.撰写背景说明的年轻人——Richard Stewart先生。\nRichard: Hello. I want to thank all of you for coming here tonight. I\u0026rsquo;d like to thank Harvey Carlson for his faith in my project. But most of all, I would like to thank my family for their love and support all through this adventure. Thank you. Richard: 你们好。我非常感谢你们大家今天晚上的赏光。我非常感谢Harvey Carlson对我工作计划的信心。但最重要的，我要感谢我的家人在这整个工作期间给予我的爱和支持。谢谢各位。\n（一位出版商找Richard）\nHarvey: Ah, Richard, Marilyn, I want you to meet John O\u0026rsquo;Neill. Harvey: 啊，Richard、Marilyn，我向你们介绍John O\u0026rsquo;Neill。\nJohn: Oh, how do you do? Nice to meet you. I\u0026rsquo;ve been looking forward to meeting your husband, Mrs. Stewart. I\u0026rsquo;m really impressed by your show. John: 噢，你好吗? 很高兴见到你。我一直希望能见到你先生，Stewart太太。你的展览让我留下了深刻的印象。\nRichard: Thank you. Richard: 谢谢。\nJohn: In fact, I\u0026rsquo;d like your autograph. John: 事实上，我想要你的签名。\nRichard: Oh, well, really\u0026hellip; Richard: 噢，哦，真的……\nJohn: On a contract. John: 在一份合同上面。\nHarvey: What\u0026rsquo;s this about, Harvey? Harvey: 这是怎么回事，Harvey？\nHarvey: Mr. O\u0026rsquo;Neill is the publisher of several magazines. Harvey: O\u0026rsquo;Neill先生是好几家杂志的发行人。\nRichard: Of course. I\u0026rsquo;ve seen you on television. Richard: 当然。我在电视上看见过你。\nHarvey: Mr. O\u0026rsquo;Neill was so impressed with your work that he wants to develop it into a magazine concept. Harvey: O\u0026rsquo;Neill先生被你的作品深深打动，他想要将它加以发展，使之成为一个杂志方面的构想。\nJohn: Well, that sounds very exciting, but where would I fit into the plan? John: 嗯，听起来很令人兴奋。但是我在这项计划中怎么定位呢？\nHarvey: I\u0026rsquo;d like you to be the photo editor of the magazine. Harvey: 我希望你能做杂志的摄影编辑。\nMarilyn: Oh, Richard, how exciting! Marilyn: 哦，Richard，好令人兴奋！\nRichard: It\u0026rsquo;s a wonderful opportunity, Richard. Richard: 这是一个好机会，Richard。\nRichard: Hold on. Wait a minute, please. What\u0026rsquo;s the problem, Richard? Richard: 等等。请稍等一下。有什么问题吗，Richard？\nRichard: The problem is that I\u0026rsquo;m a photographer, not an editor. I like what I do. In fact, I love what I do\u0026hellip; which is going out with a camera and a roll of film and seeing the wonder of humanity. Now, I appreciate your offer, but I\u0026rsquo;ve worked so hard on Family Album, U.S.A., and I\u0026rsquo;m giving some thought to a new book on a different subject. I\u0026rsquo;m flattered, but I enjoy taking pictures, and I want to continue doing that. Thank you, but I\u0026rsquo;m happy being a photographer. Richard: 问题是我是一个摄影师，不是一个编辑。我喜欢我所做的工作。事实上，我热爱我的工作……那就是带着照相机和一卷底片出去看众生奇景。因此，我感激你的提议。但是我一直为Family Album, U.S.A.辛勤工作，如今我又开始在构想另一本不同题材的新书。你的厚爱使我受宠若惊，但我喜欢拍照片，而且我要继续做这一行。谢谢你，但我乐于当一名摄影师。\nJohn: I understand, Richard. Richard, I know your next book will be a success. Congratulations! John: 我懂了，Richard。Richard，我相信你的下一本书会成功。恭喜你！\nRichard: Thanks. Richard: 谢谢。\nHarvey: You\u0026rsquo;re a real Stewart! Harvey: 你真不愧是Stewart家的人！\nRichard: Thanks. Richard: 谢谢。\n重难点分析 \u0026ldquo;a dream come true\u0026rdquo;\n固定搭配，意为\u0026quot;梦想成真\u0026quot; \u0026ldquo;come true\u0026quot;是动词短语作后置定语修饰\u0026quot;dream\u0026rdquo; 注意不是\u0026quot;a dream comes true\u0026quot; \u0026ldquo;I\u0026rsquo;m scared to death.\u0026rdquo;\n夸张的表达方式，字面意思是\u0026quot;我害怕得要死\u0026quot; 表示极度紧张或害怕 类似表达：I\u0026rsquo;m frightened to death. / I\u0026rsquo;m terrified. \u0026ldquo;run out of excuses\u0026rdquo;\n\u0026ldquo;run out of\u0026quot;表示\u0026quot;用完、耗尽\u0026rdquo; 这里表示\u0026quot;再也找不到借口了\u0026quot; \u0026ldquo;I never could have done this book without\u0026hellip;\u0026rdquo;\n虚拟语气，表示\u0026quot;如果没有……我就不可能完成\u0026quot; 相当于\u0026quot;If it hadn\u0026rsquo;t been for your help, I couldn\u0026rsquo;t have done it.\u0026quot; \u0026ldquo;I\u0026rsquo;m flattered\u0026rdquo;\n表示\u0026quot;受宠若惊\u0026quot;、\u0026ldquo;过奖了\u0026rdquo; 用于礼貌地回应别人的赞美或邀请 核心词汇 英文 中文 说明 enlargement 放大的照片 摄影作品的放大版 critic 评论家 对艺术作品进行评价的人 review 评论，评价 报纸或杂志上的评论文章 preview 预展，预览 正式开幕前的预先展示 autograph 亲笔签名 名人的签名 intern 实习生 在职场学习的学生 gallery 画廊，美术馆 展览艺术品的场所 promotion 推广，促销 提高知名度和销量的活动 publisher 出版商，发行人 负责出版书籍或杂志的人 talent 才华，人才 有天赋的人或能力 口语中的应用 \u0026ldquo;It sets the tone.\u0026rdquo;\n表示\u0026quot;奠定了基调\u0026quot;、\u0026ldquo;决定了氛围\u0026rdquo; 可用于各种场合：会议、活动、演讲等 \u0026ldquo;I\u0026rsquo;m scared to death.\u0026rdquo;\n夸张地表达紧张或害怕 例：I\u0026rsquo;m scared to death of public speaking. \u0026ldquo;It\u0026rsquo;s common practice.\u0026rdquo;\n表示\u0026quot;这是惯例\u0026quot;、\u0026ldquo;通常的做法\u0026rdquo; 用于解释某种常规做法 \u0026ldquo;Be our guest.\u0026rdquo;\n表示\u0026quot;请便\u0026quot;、\u0026ldquo;请随意\u0026rdquo; 比\u0026quot;Please go ahead\u0026quot;更礼貌、更热情 \u0026ldquo;I\u0026rsquo;m overwhelmed.\u0026rdquo;\n表示\u0026quot;我太感动了\u0026quot;或\u0026quot;我不知所措\u0026quot; 可以是正面（被感动）或负面（被压垮） 核心练习句型 \u0026ldquo;否定 + 比较级\u0026rdquo; 表示最高级\nThat might be sooner than you think. 练习：这比我想像的要难。→ This is harder than I thought. \u0026ldquo;could have + 过去分词\u0026rdquo; 表示\u0026quot;本来可以\u0026quot;\nI never could have done this book without your help. 练习：没有你的支持，我不可能成功。→ I couldn\u0026rsquo;t have succeeded without your support. \u0026ldquo;be supposed to\u0026rdquo; 表示\u0026quot;应该、被期望\u0026quot;\nWe\u0026rsquo;re supposed to be there before the guests arrive. 练习：你应该在八点前完成。→ You\u0026rsquo;re supposed to finish before eight. \u0026ldquo;be worth + doing\u0026rdquo; 表示\u0026quot;值得做\u0026quot;\nIt\u0026rsquo;s definitely worth reviewing. 练习：这本书值得一读。→ This book is worth reading. \u0026ldquo;I\u0026rsquo;d like to + 动词\u0026rdquo; 表示\u0026quot;我想……\u0026quot;（礼貌表达）\nI would like to thank my family. 练习：我想介绍我的朋友。→ I\u0026rsquo;d like to introduce my friend. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-26/","summary":"\u003ch2 id=\"课文原文bilingual-dialogue\"\u003e课文原文（Bilingual Dialogue）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003e场景：\u003c/strong\u003e Richard的摄影展《走遍美国》在Carlson画廊开幕，全家人都来支持他。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e（布展中）\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHarvey:\u003c/strong\u003e A little further to the right, Tom.\n\u003cstrong\u003eHarvey:\u003c/strong\u003e 再往右一点，Tom。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eTom:\u003c/strong\u003e Is this OK?\n\u003cstrong\u003eTom:\u003c/strong\u003e 这样可以吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHarvey:\u003c/strong\u003e Good. What do you think, Richard?\n\u003cstrong\u003eHarvey:\u003c/strong\u003e 好。你看呢，Richard？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard:\u003c/strong\u003e I like it there. It\u0026rsquo;s the first thing people will see when they come in. It sets the tone for the whole show.\n\u003cstrong\u003eRichard:\u003c/strong\u003e 摆在那里很好。这是人们走进来所看到的第一件东西。它决定了整个展览的气氛。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHarvey:\u003c/strong\u003e The next thing they\u0026rsquo;ll see is this enlargement with the words Family Album, U.S.A.\n\u003cstrong\u003eHarvey:\u003c/strong\u003e 他们接着看到的是Family Album, U.S.A.这几个放大的字。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第26课：Opening Night（开幕之夜）"},{"content":"课文原文 Excuse me. Can you help me? 对不起，你能帮帮我吗？\nSure, what do you want? 可以啊。什么事？\nWhere is 83 Wooster Street? Wooster街83号在哪里？\nThat\u0026rsquo;s easy. Walk to the corner. Then make a left turn. Then walk two blocks to the traffic light. Make another left to Wooster. 很好找。你走到拐角，然后向左转，再走两条街到红绿灯处，再向左转就到了Wooster街了。\nThank you. 谢谢你。\nTo the corner and then a left? 走到拐角向左转对吗？\nYeah. A left. 是的，向左转。\nHot dog? Only seventy-five cents. 要热狗吗？只要七十五分钱。\nNo. Thank you. I have a dinner date. 不，谢谢。我要去赴晚餐约会。\n555-9470\u0026hellip;and it\u0026rsquo;s busy\u0026hellip;. Try again. 555-9470……占线……再试一次。\n555-9470\u0026hellip;and it\u0026rsquo;s still busy. 555-9470……又占线。\nExcuse me, ma\u0026rsquo;am. I\u0026rsquo;m looking for 83 Wooster Street. 对不起，夫人，我想找Wooster街83号。\nYes. Wooster Street is two blocks, and 83 is to the right, about two houses. 噢，Wooster街还有两条街的距离，83号是在右边，大约过两栋房子就到了。\nThank you, thank you! 谢谢你，谢谢！\nYou\u0026rsquo;re welcome. 不用谢！\nWho is it? 谁呀？\nHarry Bennett. Is this Susan? Harry Bennett，是Susan吗？\nYes, it is. Come up. I\u0026rsquo;m on the top floor. 是的，是我。请上来，我在顶层。\nHello, Harry. It\u0026rsquo;s nice to meet you. 你好，Harry，很高兴见到你。\nNice to meet you, Susan. Sorry I\u0026rsquo;m late. The traffic. The parking. I was lost. 很高兴见到你，Susan。很抱歉我迟到了。交通拥挤，又找不到停车的地方。我又迷路了。\nWhat pretty flowers! Thank you. Oh, please come in. Don\u0026rsquo;t worry about being late. It\u0026rsquo;s fine. 好漂亮的花！谢谢你。噢，请进来。别为迟到挂心了，没有关系。\nExcuse the mess. I just moved here. 请不要介意这里乱得很，我刚刚搬来住。\nOh, I\u0026rsquo;d like you to meet my sister-in-law Marilyn. Marilyn Stewart, this is Harry Bennett. 噢，我来向你介绍我嫂子Marilyn。Marilyn Stewart，这是Harry Bennett。\nPleased to meet you. 很高兴见到你。\nNice to meet you, Harry. 我也很高兴见到你，Harry。\nAre we too late for our dinner reservation? 我们会不会错过晚餐订位时间？\nNo, the restaurant will hold our table. I know the owner very well. I eat there a lot. 不会，餐厅会保留我们的席位。我和老板很熟。我在那里吃过好多次。\nDo you know the phone number of the restaurant? I\u0026rsquo;d like to call home and leave the number with the baby-sitter. 你知道那家餐厅的电话号码吗？我想打电话回家，把餐厅的电话告诉临时保姆。\nSure. The number is\u0026hellip; five five five\u0026hellip;seventeen twenty. 没问题，号码是555-1720。\nMay I use the phone? 我可以用电话吗？\nFive five five\u0026hellip;one seven two oh. Hello? Hi, Michelle. It\u0026rsquo;s Daddy. Can I speak to Betty? I want to leave the phone number of the restaurant\u0026hellip;. Hi, Betty. I\u0026rsquo;ll be at five five five\u0026hellip;seventeen twenty. OK. Thanks. See you later. 555-1720，喂？嗨，Michelle，是爸爸。我能跟Betty说话吗？我要留餐厅的电话号码给她。你好，Betty，我的号码是555-1720。好，谢谢。再见。\nWell, that\u0026rsquo;s done. Shall we go? 好了，打完了。我们可以走了吗？\nI\u0026rsquo;m ready. See you later, Marilyn. 我准备好了。Marilyn，再见。\nHave a nice evening. 祝你们今晚愉快。\nBye, Marilyn. Hope to see you again. 再见，Marilyn。希望能再看到你。\nMe, too. Have fun! 我也是。祝你们愉快！\nThanks. After you. 谢谢。请先走。\nAh! Miss Stewart! Welcome! How are you? 嗨！Stewart小姐！欢迎。你好吗？\nFine, Somsak. And you? 很好，Somsak，你呢？\nFine, thank you. This is my friend Harry Bennett. 很好，谢谢你。这是我的朋友Harry Bennett。\nPleased to meet you. Very nice to meet you. Any friend of Miss Stewart\u0026rsquo;s is welcome at Somsak\u0026rsquo;s. Follow me, please. 很高兴见到你。很乐意见到你。Stewart小姐的任何朋友在Somsak餐厅都是受欢迎的。请跟我来。\nI like it here. 我喜欢这里。\nI do, too. I come here often. 我也是。我常来这里。\nA special place for special people. 这是为特殊人物而设的特别地方。\nThank you, Somsak. 谢谢你，Somsak。\nWell! Nice restaurant. 嘿，这是一家好餐厅。\nWould you like something to drink? 你们要点什么饮料吗？\nYes, I\u0026rsquo;d like a glass of ginger ale with ice. Harry, what would you like? 是的，我要一杯加冰块的姜味汽水。Harry，你要什么？\nDo you have a dry white wine? 你这里有干白葡萄酒吗？\nHow about a California chablis? 来一杯California白葡萄酒好吗？\nChablis is fine. 好的。\nWhat would you like to eat? 你们要吃点什么？\nI\u0026rsquo;d like the mee krob. Harry, would you like to see a menu? 我喜欢mee krob。Harry，你想看看菜单吗？\nNo, it\u0026rsquo;s Ok. I\u0026rsquo;ll have the mee krob also. 不用，没有关系。我也要mee krob。\nWhat is it? 那是什么？\nCrispy fried noodles. I love them. 酥炒面。我喜欢吃。\nMay I bring you a salad? 要不要来点沙拉呢？\nOh yes. 噢，好啊。\nWhat do you recommend today? 今天你推荐什么沙拉？\nI recommend rose-petal salad. Special for new friends. 我向你们推荐玫瑰花瓣沙拉。特地为新朋友准备的。\nRose-petal salad? Why not? 玫瑰花瓣沙拉好吗？有何不可？\nI\u0026rsquo;ll take care of everything. I hope you\u0026rsquo;re hungry. 我会好好照料一切。我希望你饿了。\nWhat? Oh, yes. Starving. Well, I\u0026hellip; 什么？噢，是，我很饿。好啦，我……\nWhat do you do at Universe Toy Company? 你在宇宙玩具公司做什么工作？\nI\u0026rsquo;m the vice-president of new toy development. 我是负责新玩具开发的副总裁。\nTerrific! I know you\u0026rsquo;re a CPA. 了不起！我知道你是一位会计师。\nThat\u0026rsquo;s true. Harry Bennett, certified public accountant. I love numbers. Your company\u0026rsquo;s accounting firm. 是的。Harry Bennett，立案会计师。我喜欢弄数字。我为贵公司的会计顾问公司做一些工作。\nAnd so\u0026hellip; Here we are. 所以……所以我们才有缘相见。\nYes. 是啊。\nI have a daughter. 我有一个女儿。\nI know. How old is she? 我知道。她多大了？\nShe\u0026rsquo;s nine years old. 她九岁。\nThat\u0026rsquo;s a nice age. What\u0026rsquo;s her name? 正是美妙年龄。她什么名字？\nMichelle. Michelle。\nDo you have a picture of her? 你有她的照片吗？\nShe\u0026rsquo;s very pretty. 她很漂亮。\nThank you. 谢谢你。\nRose-petal salad. And there\u0026rsquo;s a phone call for you, Mr. Bennett. 玫瑰花瓣沙拉。Bennett先生，有你的电话。\nExcuse me, Susan. 对不起，Susan。\nI hope nothing is wrong. 但愿没有事。\nI\u0026rsquo;ll get the rest of the dinner. 我去把晚餐的其余东西端来。\nExcuse me. 失陪。\nPlease forgive me, Susan, but\u0026hellip; I have to leave. I feel terrible, but\u0026hellip; 请原谅我，Susan，但……我得走了。真是糟糕透了，但……\nWhat\u0026rsquo;s the matter? 发生了什么事？\nMy daughter isn\u0026rsquo;t feeling well. 我女儿感到不舒服。\nOh no! Is it serious? 噢，糟糕！严重吗？\nI don\u0026rsquo;t know. The baby-sitter says she has a stomachache, and she\u0026rsquo;s crying. I\u0026rsquo;ll have to go home. Will you forgive me? 我不知道。临时保姆说她肚子疼，她一直哭。我必须回家一趟，你能原谅我吗？\nOf course. I\u0026rsquo;m so sorry for Michelle. And you didn\u0026rsquo;t have a chance to eat. 当然。我为Michelle担心。而且你什么也没有吃。\nOh, it\u0026rsquo;s OK. Let me take you home first. 噢，没关系。先让我送你回家吧。\nNo, no. Please, go ahead. It\u0026rsquo;s our first date. We\u0026rsquo;ll make another. Please don\u0026rsquo;t worry. 不用，不用。你走吧。这是我们的第一次约会。我们还可以再次约会。请别挂心。\nI\u0026rsquo;ll phone you. I hope your daughter is all right. Good-bye. 我会给你打电话的。我希望你女儿安然无恙。再见。\nGood-bye. 再见。\nWhat happened? 怎么了？\nThe baby-sitter called. His daughter is sick. 临时保姆打电话来了。他女儿生病了。\nWhat\u0026rsquo;s wrong? 什么病？\nI think she has a stomachache. 我想她肚子痛。\nHe\u0026rsquo;s a good father. 他是个好父亲。\nSo\u0026hellip; what do you think of him? 那么……你觉得他怎么样？\nHe\u0026rsquo;s very nice. But I think he was nervous tonight. It was his first date in two years. 他很不错。但我想他今晚有点紧张。这是他两年来第一次约会。\nWill you see him again? 你会再见他吗？\nI hope so. 我希望如此。\nThis food is delicious. He didn\u0026rsquo;t get a thing to eat. 这菜肴味道不错。他什么也没有吃。\nYou ordered enough for three or four people, but I\u0026rsquo;m not complaining. The food is delicious. 你叫了够三、四个人吃的菜，但我毫不在意。菜肴好吃极了。\nWho is that? Do you think it\u0026rsquo;s\u0026hellip; 那是谁呀？你想会是……\nNo. You won\u0026rsquo;t believe it, Marilyn! 不会。你简直无法相信，Marilyn。\nI believe it. Even without looking. 我能相信。即使不看我也知道。\nHi! 嗨！\nHow\u0026hellip;? 你怎么……？\nYour downstairs neighbor let me in. 你楼下的邻居让我进来的。\nDid you go home? 你回家了吗？\nI did, but everything is OK, so I decided to come back. To apologize for leaving so early, I brought you a little gift. It\u0026rsquo;s a bonsai tree for your new apartment. 回去了，但一切安好，于是我决定回来。为了表示我对提早走掉的歉意，我给你带了一件小礼物。这是一颗盆栽，祝贺你迁新居。\nHi, Marilyn. I hope it\u0026rsquo;s not too late. 你好，Marilyn，我希望我来得不算太晚。\nOh, not at all. We\u0026rsquo;re still eating. Please, come in. Join us. It\u0026rsquo;s our meal from the restaurant. 噢，没关系。我们还在吃着呢。请进。跟我们一起吃吧。这是从餐厅带回来的菜肴。\nAnd how is your daughter? 对了，你女儿怎么样？\nOh, she\u0026rsquo;s fine. It was only a tummy ache. 噢，她没事了。仅仅是肚子有点痛。\nIt\u0026rsquo;s good that you went back. 你回去是对的。\nYes, I think it\u0026rsquo;s important for me to be there since her mother died. 是的，我想我在场是非常重要的，因为她妈妈去世了。\nI agree. Aren\u0026rsquo;t you hungry? 我想是的。你饿了吗？\nAs a matter of fact\u0026hellip; I am hungry. 老实说……我饿了。\nThere\u0026rsquo;s lots of food left. 这里还剩下很多食物。\nMmm, this is delicious! 嗯，很好吃！\nEnjoy! 那就享受吧！\nI\u0026rsquo;m going to excuse myself. I have a lot of work to do to get ready for tomorrow. 很抱歉失陪。我得为明天做许多准备工作。\nGood night, Harry. It was nice meeting you. Harry，很高兴与你见面。\nBye, Marilyn. Good night, Susan. 再见，Marilyn。晚安，Susan。\nGood night, Marilyn. 晚安，Marilyn。\nShe\u0026rsquo;s going to a fashion show here in the city tomorrow. She is sleeping here so she won\u0026rsquo;t have to travel from Riverdale in the morning. 她将参加明天在本市举行的时装表演。她晚上住在这儿，免得早上从Riverdale赶过来。\nYou two must be close. 你们两个关系一定很好。\nWe are. The whole Stewart family is close. 是的。Stewart全家人相处得很好。\nI like that. 我喜欢这样。\nAnd then, two years ago, my wife died. 接着，两年前我妻子去世了。\nYou miss her. 你思念她。\nI do\u0026hellip;yes, but I have Michelle\u0026hellip; and with time\u0026hellip; 不错……是的，但我还有Michelle……而且随着时间流逝……\nIs there anyone else in your life? 在你生活中还有其他人吗？\nNo, not yet. What about you? 不，还没有。你呢？\nOh, I date occasionally, but my work keeps me busy. 哦，我偶尔约约会，但我老是忙于工作。\nOoh, speaking of keeping busy—I have an early start tomorrow, and the baby-sitter has to get home. Where did the time go? It\u0026rsquo;s midnight. 哦，说到忙于工作，我明天还得早起，而且临时保姆也该回家了。时间溜到哪里去了？都午夜了。\nThank you, Susan. I had a nice evening. 谢谢你，Susan，让我过了一个愉快的夜晚。\nMe, too, Harry. Harry? 我也很愉快，Harry。Harry？\nYes? 什么事？\nI\u0026rsquo;d like to meet your daughter someday. 我希望有一天能见到你女儿。\nDoes that mean that I can see you again? 是不是说我可以再见到你？\nOf course. 当然。\nWonderful. I\u0026rsquo;ll call you, and we\u0026rsquo;ll go out to dinner. 那太好了。我打电话给你，然后我们到外面吃晚饭。\nPlease do. 好呀。\nI promise I won\u0026rsquo;t leave early. 我发誓我再也不会早走了。\nIt was for a good reason. 你今天早走是有原因的。\nYou know something? 你知道吗？\nWhat? 什么？\nI think we\u0026rsquo;re going to be good friends. 我想我们可以成为好朋友。\nGood night, Susan. 再见，Susan。\nGood night, Harry. Have a safe trip home. 再见，Harry，路上小心点。\nAre you all right? 你怎么了？\nSorry. I never liked that umbrella stand. 对不起。我一直嫌那伞架碍事。\nGood night, Harry. 再见，Harry。\n重难点分析 Make a left turn / Make a left 指路时的常用表达，比\u0026quot;Turn left\u0026quot;更口语化。\nI have a dinner date. \u0026ldquo;date\u0026quot;指约会，可以是浪漫的约会也可以是普通社交约会。\nExcuse the mess. 家中凌乱时的客气说法，\u0026ldquo;mess\u0026quot;意为杂乱。\nSister-in-law 嫂子/弟媳/大姑子/小姑子——姻亲关系的表达。\nDinner reservation 餐厅订位，在西方文化中很常见。\nBaby-sitter 临时保姆，美国家庭中非常普遍。\nAfter you. 请先走——非常礼貌的社交用语。\nI\u0026rsquo;ll take care of everything. \u0026ldquo;我来处理一切\u0026rdquo;，表示服务周到。\nCPA (Certified Public Accountant) 美国注册会计师。\nI feel terrible. 表达歉意或感到难过时的常用语。\nAs a matter of fact 事实上，老实说——用于引出真实情况。\nSpeaking of\u0026hellip; \u0026ldquo;说到……\u0026quot;——转换话题的自然衔接语。\n核心词汇 词汇 词性 释义 例句 blind date n. 介绍约会（初次见面的约会） It was a blind date. block n. 街区 Walk two blocks to the traffic light. traffic light n. 红绿灯 Make another left to the traffic light. reservation n. 预订 Are we too late for our dinner reservation? baby-sitter n. 临时保姆 I\u0026rsquo;d like to leave the number with the baby-sitter. sister-in-law n. 嫂子/弟媳 I\u0026rsquo;d like you to meet my sister-in-law Marilyn. vice-president n. 副总裁 I\u0026rsquo;m the vice-president of new toy development. CPA n. 注册会计师 I know you\u0026rsquo;re a CPA. stomachache n. 肚子疼 She has a stomachache. bonsai n. 盆栽 I brought you a bonsai tree. apologize v. 道歉 To apologize for leaving so early. 口语中的应用 Excuse the mess. 当家里或办公室比较乱时，客人来了先说这句话表示歉意。\nAfter you. 进门或上车时让对方先走/先上的礼貌用语。\nI\u0026rsquo;ll take care of everything. 表示\u0026quot;一切包在我身上\u0026rdquo;，让对方放心。\nAs a matter of fact 用于补充真实情况或纠正误解：\u0026ldquo;As a matter of fact, I am hungry.\u0026rdquo;\nSpeaking of\u0026hellip; 自然转换话题的绝佳表达：\u0026ldquo;Speaking of keeping busy\u0026hellip;\u0026rdquo;\nI promise I won\u0026rsquo;t\u0026hellip; 做出承诺的句型，语气诚恳。\n核心练习句型 Can you help me? / Can you tell me how to get to\u0026hellip;? 请求帮助/问路\nCan you help me find this address? Can you tell me how to get to the museum? Would you like something to drink? 提供饮料/食物\nWould you like some coffee? Would you like to see a menu? What do you recommend? 征求推荐\nWhat do you recommend today? What do you recommend for dessert? I\u0026rsquo;d like to meet your daughter someday. 表达愿望\nI\u0026rsquo;d like to see you again. I\u0026rsquo;d like to call home. Does that mean that I can see you again? 确认对方的意图\nDoes that mean you agree? Does that mean we can go now? ","permalink":"/posts/2026-06-14-family-album-usa-lesson-2/","summary":"\u003ch2 id=\"课文原文\"\u003e课文原文\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eExcuse me. Can you help me?\u003c/strong\u003e\n对不起，你能帮帮我吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eSure, what do you want?\u003c/strong\u003e\n可以啊。什么事？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWhere is 83 Wooster Street?\u003c/strong\u003e\nWooster街83号在哪里？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eThat\u0026rsquo;s easy. Walk to the corner. Then make a left turn. Then walk two blocks to the traffic light. Make another left to Wooster.\u003c/strong\u003e\n很好找。你走到拐角，然后向左转，再走两条街到红绿灯处，再向左转就到了Wooster街了。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eThank you.\u003c/strong\u003e\n谢谢你。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eTo the corner and then a left?\u003c/strong\u003e\n走到拐角向左转对吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eYeah. A left.\u003c/strong\u003e\n是的，向左转。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHot dog? Only seventy-five cents.\u003c/strong\u003e\n要热狗吗？只要七十五分钱。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eNo. Thank you. I have a dinner date.\u003c/strong\u003e\n不，谢谢。我要去赴晚餐约会。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第2课：The Blind Date（介绍约会）"},{"content":"课文原文 Marilyn, you want coffee or tea? Marilyn，你要咖啡还是茶？\nCoffee, please. I am so excited! At this time tomorrow morning, Grandpa will be sitting in the kitchen with us. 请来点咖啡。我感到好兴奋！明早这时候，爷爷就和我们一起坐在厨房里啦。\nWhen does he arrive? 他什么时候到？\nAt six o\u0026rsquo;clock this evening. 今晚六点。\nBy plane? 坐飞机来？\nNo, by train. 不，坐火车。\nAre we picking him up at the station? 我们要去车站接他吗？\nNot Grandpa. He doesn\u0026rsquo;t want anybody picking him up. He likes to be independent. 爷爷不是这种人，他不愿意让别人接他，他独立性很强。\nHuh. 哦。\nOh, let\u0026rsquo;s go upstairs and prepare Grandpa\u0026rsquo;s room. 对，我们上去准备一下爷爷的房间。\nGreat! Let\u0026rsquo;s do it! 好，我们去！\nGood morning, Mom. 早安，妈妈。\nMorning. 早安。\nWell, hi, fellas. 你们大家好。\nHello. 哈罗。\nHi, honey. 嗨，亲爱的。\nMorning, Marilyn. 早安，Marilyn。\nWe are going upstairs to set up Grandpa\u0026rsquo;s room. 我们要上楼收拾一下爷爷的房间。\nThere\u0026rsquo;s coffee ready. 咖啡准备好了。\nI\u0026rsquo;m really excited about seeing Grandpa. 一想到要见到爷爷，我就觉得兴奋。\nMe, too. Milk, please. 我也一样。请递给我牛奶。\nHe\u0026rsquo;s so funny. He always makes me laugh. 他很逗趣，他总是让我笑。\nI hope Grandpa\u0026rsquo;s going to like living with us. 我希望爷爷喜欢和我们住在一起。\nI think he will. It just takes time to feel comfortable in a new place. 我想会的。总是需要一段时间才能适应一个新的环境。\nWon\u0026rsquo;t he miss being in Florida? 他不会想念佛罗里达吗？\nWell, he will. But I think he\u0026rsquo;ll like being here with the family. 他会的。但我想他也会喜欢和全家人住在这儿。\nAre you sure about that? It\u0026rsquo;s crazy here most of the time. 你真的这么想吗？这儿经常吵吵闹闹。\nBut it\u0026rsquo;s fun. 但很有趣。\nThat\u0026rsquo;s for sure. 说的也是。\nYou know, maybe I\u0026rsquo;ll put together some photos of Grandpa as a \u0026ldquo;welcome\u0026rdquo; present. 我说，或许我把爷爷的一些照片组合起来，作为欢迎他的一份礼物。\nThat\u0026rsquo;s a neat idea. What can I do? 这是个好主意，那我能做点什么呢？\nI\u0026rsquo;ve got it! I have a picture of Grandpa and Dad and me in my wallet. It\u0026rsquo;s from the Fathers and Sons\u0026rsquo; Breakfast at my junior high school graduation. 有啦！我皮夹里有一张照片，是爷爷、爸爸和我在一起照的。那是在父子早餐会上拍的，在我初中毕业的时候。\nOh, I remember this picture. 噢，我还记得这张照片。\nI\u0026rsquo;d really like to pick up Grandpa at the railroad station. 我真想去火车站接爷爷。\nRailroad stations or airports—Grandpa always tells us he\u0026rsquo;ll get here by himself. He\u0026rsquo;s something! 无论是火车站还是机场，爷爷总是说他会自个儿设法到这里。他真了不起！\nIs this all Grandpa\u0026rsquo;s stuff? 这里面都是爷爷的东西吗？\nThat\u0026rsquo;s it. But I\u0026rsquo;m sure he has a few bags with him on the train. 是的。不过我相信他在火车上还有几件行李的。\nWhat\u0026rsquo;s inside? 这里面是什么？\nI don\u0026rsquo;t know. It\u0026rsquo;s locked. 不知道，锁着呢。\nHi. 嗨！\nOh, hi, darling. 哦，亲爱的。\nMorning, Philip. 早安，Philip。\nI want to put some of my good hangers in Grandpa\u0026rsquo;s closet. 我想在爷爷的衣橱里放几个好的衣架。\nYou know I\u0026rsquo;m very excited about his arrival. 你知道我对他的到来是多么兴奋。\nWe are, too. 我们也很兴奋。\nSusan called early this morning. She\u0026rsquo;s unhappy because she\u0026rsquo;s had to go to Chicago on a business trip and can\u0026rsquo;t leave till tonight. She wants to be here for Grandpa. Susan一大早打电话来。她很不高兴，因为她得到芝加哥出差，而且要到今晚才能脱身。她原希望在此等爷爷。\nWell, Grandpa will be disappointed, too. He loves Susan. She always reminds him of Grandma. 爷爷也会感到失望。他喜欢Susan。Susan总是让他想起奶奶。\nWell, how\u0026rsquo;s everything here? 唔，东西都收拾好了吗？\nFine. We were just wondering about this trunk. It\u0026rsquo;s locked. 好啦。我们正纳闷这只大衣箱呢。它锁着。\nOh. I have the key. Grandpa sent it to me. 啊。钥匙在这里。爷爷寄来给我的。\nExcuse me. Is this seat taken? 对不起，请问这个座位有人吗？\nNo, it\u0026rsquo;s not taken. 没有，没人坐。\nOh, thank you. Oh, let me help you with this. 啊，谢谢！来，我帮你放好。\nOh, thank you. 谢谢你。\nDo you want to sit by the window? 你想靠窗坐吗？\nNo, no, no. I like the aisle seat better. Please, you sit by the window. 不，不，不。我喜欢坐在靠过道的地方。你请靠窗坐。\nMy name is Stewart\u0026hellip; Malcolm Stewart. Pleased to meet you. 我姓Stewart……Malcolm Stewart。很高兴遇见你。\nI\u0026rsquo;m Elsa Tobin. How do you do? 我叫Elsa Tobin，你好。\nDo you live in New York? 你住在纽约吗？\nNo, no. I\u0026rsquo;m from Florida. 不，我从佛罗里达来的。\nI am, too. But didn\u0026rsquo;t you just get on? 我也是。可是你不是刚上车的吗？\nNo, no. I just changed my seat. A man next to me was smoking, and smoke really bothers me. 不，不。我刚才换了一下座位。我旁边的那个人抽烟，我受不了。\nWhere are you from in Florida? 你从佛罗里达的什么地方来？\nTitusville. It\u0026rsquo;s near Orlando. Titusville，在Orlando附近。\nSmall world. I\u0026rsquo;m from Titusville, too. 世界真小。我也是从Titusville来的。\nReally? What part? 真的？什么地方？\nMy husband and I live near Spaceport. 我和我丈夫住在Spaceport附近。\nI know that area. My house is only a few miles from Spaceport. 我知道那地方。我的家离Spaceport只有几哩路。\nDo you still live there? 你还住在那儿吗？\nOh yes, yes. My husband\u0026rsquo;s there now. He couldn\u0026rsquo;t take time off to come to New York with me. 啊，对，对。我丈夫现在就在那儿。他走不开，没办法和我一起来纽约。\nDo you still live there? 你现在还住那儿吗？\nNo. I sold the house and the furniture, put a few personal things in an old trunk, and shipped it to my children in New York. That\u0026rsquo;s my destination. 不。我把房子和家俱都卖了，剩下一些东西放进一个旧衣箱，运到我孩子那儿去了，他们住在纽约。那是我要去的地方。\nAre you married? 你有家室吗？\nMy wife died four years ago. She was a wonderful woman. A real friend. 我妻子四年前去世了。她是个很好的女人，一个真正的朋友。\nI\u0026rsquo;m sorry. Really, I\u0026rsquo;m sorry. 我为你难过，真的为你难过。\nLots of wonderful memories. We were married almost fifty years. Well, forty-seven, to be exact. 留下的是许多美好的回忆。我们结婚将近五十年。准确点说，四十七年。\nJohn and I celebrate our fortieth anniversary next month. 下个月John和我将庆祝我们的结婚四十周年纪念。\nOh, congratulations! That\u0026rsquo;s nice. What does John do? 啊，恭喜你们！太好了。John现在做什么事？\nHe\u0026rsquo;s an aerospace engineer and works for Orlando Aircraft Corporation. He started with them almost forty years ago. 他担任航太工程师，为Orlando飞机公司工作。他在那里做了快四十年了。\nWhat do you do? 你现在做什么工作？\nI just retired. Had my own company. A construction company. Roads, bridges, big stuff. But I just sold it and retired. 我刚退休。我原来开一家公司，一家营造公司。修路，架桥，都是大工程。我前不久把它卖了，然后退休。\nExcuse me, ma\u0026rsquo;am. Ticket, please. 对不起，太太，车票请拿出来看一下。\nWould you kindly hold these keys, please? I have a ticket, I know. I was in the smoking section. 请帮我拿一下钥匙。我知道我有车票。我原本坐在吸烟车厢的。\nIt\u0026rsquo;s OK, lady. Take your time. I\u0026rsquo;m sure it\u0026rsquo;s in your purse, Mrs. Tobin. 没关系，太太。慢慢来。我相信是在你的皮包里，Tobin太太。\nOh, here it is. And here are your keys. 哦，在这里。你的钥匙。\nThank you. 谢谢。\nDo you have family in New York? 你在纽约有亲人吗？\nNo, no. But I do have very close friends in New York City. We like to go to the theater together. 没有。我在纽约有很要好的朋友。我们常一起去看戏。\nYou said you have family in New York. 你说你在纽约有亲人。\nYes, indeed. A son and his wife and their three children—my grandchildren. 对，没错。有个儿子，还有儿媳妇以及他们的三个孩子——我的孙儿女们。\nYou must be excited. 您一定很兴奋。\nI can\u0026rsquo;t wait to see them! 我恨不得马上见到他们。\nAre you going to live with them? 您打算和他们一起住吗？\nYes. 对。\nPermanently? 一直住下去？\nWell\u0026hellip; they want me to, but it\u0026rsquo;s too early to know for sure. I\u0026rsquo;m pretty independent. I tried to teach my kids the importance of independence, but I\u0026rsquo;m not sure I want to be alone. 这……他们希望这样，但我现在还不能决定。我是独立性很强的人。我总是告诫孩子们独立的重要，但我不知道我是否想一个人生活。\nSome people don\u0026rsquo;t mind being alone. I do. 有些人不在乎独自生活，我在乎。\nI understand. But tell me. Why did you stop working? 我能理解。告诉我，你为什么要退休？\nI retired because\u0026hellip; I wanted to be with my family. I didn\u0026rsquo;t want to be alone anymore! 我退休是因为……我想和全家人在一起。我不想再一个人独自生活了。\nLadies and gentlemen, Amtrak is happy to announce our arrival in New York City. The train will be stopping in five minutes. Please check to be sure you have your belongings. And have a good stay in the Big Apple. 各位女士，各位先生，我们很高兴报告诸位，Amtrak火车就要到达纽约了。火车将在五分钟后靠站，请记得带您的行李。祝您在纽约愉快。\nThank you. 谢谢。\nWell, here we are. It was so nice meeting you, Mr. Stewart. 好了，终于到啦。很高兴遇见你，Stewart先生。\nAnd nice meeting you, too, Mrs. Tobin. Please look us up. We\u0026rsquo;re in the phone book. Dr. Philip Stewart, in Riverdale. 我也很高兴见到你，Tobin太太。请和我们联络。我们家的电话号码你可以在电话簿上查到。Philip Stewart大夫，在Riverdale。\nYour son? 你的儿子？\nThat\u0026rsquo;s right. And have a good time in New York. And don\u0026rsquo;t be so independent. You\u0026rsquo;re very lucky to have a caring family. 对。祝你在纽约玩得愉快。不要再坚持独立个性了，你很幸运有一个温馨的家庭。\nWhen can we go fishing? 我们什么时候去钓鱼？\nRobbie, we\u0026rsquo;ll go fishing soon, and we\u0026rsquo;ll take your dad with us. Robbie啊，我们很快就会去。带你爸爸也一起去。\nI\u0026rsquo;m ready, Grandpa. You name the day. 我准备好啦，爷爷。哪一天随你挑吧。\nThat\u0026rsquo;s a great idea, Grandpa! Philip needs a day off. 这太好了，爷爷。Philip需要休假。\nLet\u0026rsquo;s give him our presents—now. 现在把我们的礼物送给爷爷吧。\nGood idea. Presents—for me? 好。礼物——给我的？\nFrom me and Marilyn. Marilyn和我送的。\nAnd this one\u0026rsquo;s from me. I looked all over the house to find it. 这张是我送的。我找遍了整间屋子才找到它。\nRichard, these are terrific pictures. This one really brings back memories. You remember that day, Robbie? Richard这些照片真棒。这一张的确唤起了许多的回忆。你还记得那天吗，Robbie？\nI sure do. It was fun. 当然。当时真有意思。\nOh, I\u0026rsquo;m sorry Susan isn\u0026rsquo;t here. I miss her very much. 啊，可惜Susan不在。我非常想她。\nShe feels bad, too, Grandpa. She called to say the plane was delayed. You know airports. 她也很沮丧，爷爷。她打电话回来，告诉我们飞机误点。机场的事你是知道的。\nI can\u0026rsquo;t wait to see her. She looks just like Grandma at that age. 我等不及要见她。她和她奶奶年轻时候长得一模一样。\nI\u0026rsquo;d better unpack. I started traveling twenty-four hours ago. I\u0026rsquo;m not so young anymore. 我还是先把行李打开吧。从出门到现在已经二十四小时了。我不再那么年轻了。\nDon\u0026rsquo;t you want something to eat? 您想吃点什么吗？\nNo, thanks. After a good night\u0026rsquo;s sleep, I\u0026rsquo;ll enjoy breakfast even more. 不用了，谢谢。好好睡一觉，明早吃早餐会更香。\nWell, come on, Dad. Ellen and I\u0026rsquo;ll take you to your room. 好，来吧，爸。Ellen和我带你去你房间。\nI\u0026rsquo;m sure glad you\u0026rsquo;re here, Grandpa. 您来这里我真高兴，爷爷。\nGood night, Grandpa. Pleasant dreams. 晚安，爷爷。祝你有个好梦。\nPhilip, do you have the key to the trunk? Philip，衣箱的钥匙在你那里吗？\nI have the key, but it doesn\u0026rsquo;t work. I sent the wrong key. 我有钥匙，但是开不开箱子。我寄错了钥匙。\nI have something for you. I made it myself. I think you\u0026rsquo;ll enjoy it. I researched it for over a year. It\u0026rsquo;s our family tree. 我有件东西给你们，是我亲手做的。我想你们会喜欢的。我研究了一年多。这是我们的家谱。\nOh, Grandpa! How exciting! Fabulous! Why, I didn\u0026rsquo;t know that your grandfather was born in Germany. 啊，爷爷，真了不起。真是令人难以置信。你看，我竟然不知道您的爷爷出生在德国。\nLots of interesting information about our family. A gift from me. 里面很多我们家有趣的东西呢，这是我的一件礼物。\nThank you so much. 太感谢你了。\nGrandpa! Grandpa! Oh, Grandpa, I\u0026rsquo;m so happy to see you! 爷爷，爷爷，啊，爷爷，见到您我真高兴。\nOh, you look so beautiful, Susan. My granddaughter. Like I always said, you look just like Grandma. 啊，你真漂亮，Susan，我的好孙女。我老是说，你真像你奶奶。\nI think you\u0026rsquo;re going to be very happy here with us. 我想你和我们住在一起会很愉快的。\nI know you will. I don\u0026rsquo;t feel alone anymore. 我想你会的。我再也不觉得孤独了。\n重难点分析 He likes to be independent. \u0026ldquo;independent\u0026quot;意为独立的、自立的，是描述人物性格的重要词汇。\nSet up Grandpa\u0026rsquo;s room \u0026ldquo;set up\u0026quot;在此意为\u0026quot;布置、整理\u0026rdquo;。\nIt just takes time to feel comfortable in a new place. 适应新环境需要时间——非常实用的表达。\nHe\u0026rsquo;s something! 口语中表示\u0026quot;他真了不起！\u0026quot;，是一种赞叹。\nThat\u0026rsquo;s a neat idea. \u0026ldquo;neat\u0026quot;在此意为\u0026quot;好主意\u0026rdquo;，口语中很常用。\nSmall world. 世界真小——偶遇熟人时的感叹。\nTake your time. \u0026ldquo;慢慢来，别着急\u0026rdquo;，非常实用的口语表达。\nTo be exact \u0026ldquo;准确地说\u0026rdquo;，用于纠正或精确化前面的说法。\nPlease look us up. \u0026ldquo;请和我们联系\u0026rdquo;，look up在此意为\u0026quot;拜访/联系\u0026rdquo;。\nYou name the day. \u0026ldquo;你说哪天就哪天\u0026rdquo;，表示完全由对方决定。\nBring back memories \u0026ldquo;唤起回忆\u0026rdquo;，非常地道的表达。\nI can\u0026rsquo;t wait to\u0026hellip; \u0026ldquo;我等不及要……\u0026quot;，表达急切期待的心情。\n核心词汇 词汇 词性 释义 例句 independent adj. 独立的 He likes to be independent. trunk n. 大衣箱 What\u0026rsquo;s inside the trunk? neat adj. 好的，整洁的 That\u0026rsquo;s a neat idea. railroad station n. 火车站 I\u0026rsquo;d like to pick up Grandpa at the railroad station. business trip n. 出差 She had to go to Chicago on a business trip. remind v. 提醒，使想起 She always reminds him of Grandma. retire v. 退休 I just retired. anniversary n. 周年纪念 We celebrate our fortieth anniversary. destination n. 目的地 That\u0026rsquo;s my destination. family tree n. 家谱 It\u0026rsquo;s our family tree. permanent adj. 永久的 Are you going to live with them permanently? 口语中的应用 Small world. 当发现和对方有共同点或共同认识的人时使用。\nTake your time. 让对方不要着急，慢慢来。\nI can\u0026rsquo;t wait to\u0026hellip; 表达迫不及待的心情：\u0026ldquo;I can\u0026rsquo;t wait to see them!\u0026rdquo;\nYou name the day. 让对方决定时间，表示尊重对方的安排。\nBring back memories 看到老照片或旧物时的感慨。\nPlease look us up. 邀请对方联系自己，比\u0026quot;Call me\u0026quot;更正式友好。\n核心练习句型 Is this seat taken? 询问座位是否有人\nIs this seat taken? Is this table available? Would you kindly\u0026hellip;? 礼貌请求\nWould you kindly hold these keys? Would you kindly help me with this? I can\u0026rsquo;t wait to\u0026hellip; 表达急切\nI can\u0026rsquo;t wait to see them. I can\u0026rsquo;t wait to meet your family. It takes time to\u0026hellip; 表达需要时间\nIt takes time to feel comfortable in a new place. It takes time to learn a new language. You must be\u0026hellip; 表示推测\nYou must be excited. You must be tired after the long trip. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-3/","summary":"\u003ch2 id=\"课文原文\"\u003e课文原文\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eMarilyn, you want coffee or tea?\u003c/strong\u003e\nMarilyn，你要咖啡还是茶？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCoffee, please. I am so excited! At this time tomorrow morning, Grandpa will be sitting in the kitchen with us.\u003c/strong\u003e\n请来点咖啡。我感到好兴奋！明早这时候，爷爷就和我们一起坐在厨房里啦。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWhen does he arrive?\u003c/strong\u003e\n他什么时候到？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAt six o\u0026rsquo;clock this evening.\u003c/strong\u003e\n今晚六点。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eBy plane?\u003c/strong\u003e\n坐飞机来？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eNo, by train.\u003c/strong\u003e\n不，坐火车。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAre we picking him up at the station?\u003c/strong\u003e\n我们要去车站接他吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eNot Grandpa. He doesn\u0026rsquo;t want anybody picking him up. He likes to be independent.\u003c/strong\u003e\n爷爷不是这种人，他不愿意让别人接他，他独立性很强。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第3课：Grandpa's Trunk（爷爷的衣箱）"},{"content":"课文原文 I am exhausted. My new exercise class is so hard. 我太累了。我那新的健身班太难了。\nYour new exercise class? 你的新健身班？\nYeah. My new advanced exercise class. 对，新的高级健身班。\nWhy advanced? 为什么是高级的？\nMy instructor thought that the beginner\u0026rsquo;s class was too easy for me. 老师认为初级课程对我来说太容易了。\nToo easy for you? 对你太容易了？\nDon\u0026rsquo;t laugh. In the beginner\u0026rsquo;s class, they give you a chance to rest between exercises. 别笑。在初级课程中，你有机会休息。\nSo? 那又怎么样？\nThe advanced class is nonstop. 高级课程里是没有休息的。\nI lift weights every morning for sixty minutes without stopping. No problem. 每天早晨我举重六十分钟，中间还不是没有休息。小事一桩。\nListen, Richard, doing aerobics for an hour is a lot different than lifting weights. 听着，Richard，一小时的有氧运动可与举重大不相同。\nYeah. Quite a bit different. I think aerobics is easy. I could work out in your class with no problem. 是啊，相当不一样。我觉得有氧运动很容易。如果我去你的班上做运动，一定不会觉得有问题。\nYou think so? 你这样认为？\nOh, without a doubt. 啊，毫无问题。\nWhen\u0026rsquo;s the next class? 下一次上课什么时候？\nTomorrow morning at ten o\u0026rsquo;clock. Try it. 明早上午十点。来试一试吧。\nTomorrow morning after lifting weights, I\u0026rsquo;ll try aerobics. 明早举完重，我去试试有氧运动。\nIt\u0026rsquo;s a nap. Tomorrow morning at ten o\u0026rsquo;clock. 简单得很。明早十点。\nAren\u0026rsquo;t you going to the aerobics class this morning? 今天上午你不是去上有氧运动课吗？\nOf course. Easy. No sweat. 当然，小事情。绝无问题。\nYou are not going to be able to move after this and the aerobics class. 你会动都动不了的，在你做完这个，又去上有氧运动课之后。\nAre you kidding me? 你在取笑我？\nIt\u0026rsquo;s going to be a piece of cake. 这种事不费吹灰之力。\nYou want to bet? 想打赌吗？\nYeah. What\u0026rsquo;s the bet? 好啊，赌什么？\nI bet I can go one hour in your class this morning and not feel a thing! 我打赌我今天上午到你的健身班运动一小时之后，丝毫不累。\nThe bet is — I win, and you cook dinner for the entire family. Or you win, and I cook dinner for the entire family. 这样赌好了——要是我赢了，全家晚餐你来煮。要是你赢了，我替全家做晚餐。\nIt\u0026rsquo;s a bet. 一言为定。\nOk. Call my instructor, Jack Davis, right now. His number is 555-8842. The advanced class starts at ten o\u0026rsquo;clock. 好，给我的老师Jack Davis打个电话，现在就打。他的电话是555-8842，高级健身课十点钟开始。\nWell, it\u0026rsquo;s eight twenty now. It only takes eight minutes by bicycle to the aerobics class. Give him a call. 现在是八点二十了。骑自行车去上有氧运动课只需要八分钟。打个电话给他。\nDavis Aerobics Center for Good Health. Davis有氧运动健身中心。\nJack Davis, please. 请找Jack Davis。\nThis is Jack Davis. 我就是Jack Davis。\nHello. This is Richard Stewart. My wife, Marilyn Stewart, is a member of your program. I\u0026rsquo;d like to come to the ten o\u0026rsquo;clock advanced class this morning. 你好，我是Richard Stewart。我太太Marily Stewart是你的学生。我想今早十点来上你的高级健身班。\nOh, fine, fine. Be here a few minutes early. You need to complete some forms before the class. 啊，好，好。请早几分钟到这。上课之前你得填一些表格。\nThanks. I\u0026rsquo;m on my way over. 谢谢，我马上就来。\nGood-bye. 再见。\nBye-bye. It\u0026rsquo;s all set. I\u0026rsquo;m going. 再见。都安排好了。我现在就去。\nBye. 再见。\nSee you later. 待会见。\nGood luck. 祝你好运。\nDon\u0026rsquo;t forget about the bet. Dinner for the entire family. And that includes Susan. 别忘了打赌的事。给全家做晚餐，包括Susan的。\nDon\u0026rsquo;t you forget. 你自己别忘了。\nOK, Richard. That\u0026rsquo;s terrific. Your pressure is 120 over 75, and that\u0026rsquo;s fine. Now stand up, please. Good, it\u0026rsquo;s 122 over 80. You can sit down now. 很好，Richard，真不错。你的收缩压是120，舒张压75。现在站起来。好，收缩压122，舒张压80。现在你可以坐下了。\nWhen was your last complete physical? 上一次全身检查是什么时候？\nSix months ago. 六个月以前。\nGood. Do you have any back or knee problems? 好。你的背部和膝关节有什么毛病吗？\nNope. I am in perfect health. 没有。我身体好的很。\nWhat do you do for a living, Mr. Stewart? 你是做哪一行的，Stewart先生？\nI\u0026rsquo;m a photographer. 我是摄影师。\nInteresting. What do you photograph? 很有意思。你拍些什么样的照片呢？\nEverything. The American scene. People, places, events. 什么都拍。美国风光。人物、地方、事件。\nDid you ever think of photographing an aerobics class? 你想过拍摄有氧运动课吗？\nNo\u0026hellip;I can\u0026rsquo;t remember taking pictures of people exercising. 没有，……我好像没有拍过人们练健身操的照片。\nBut don\u0026rsquo;t you think it\u0026rsquo;d be a good subject? 你不觉得这是个好题材吗？\nSure. 当然是。\nI need some good photos for my advertising, Mr. Stewart. Maybe you can photograph a class, and I can give you and Mrs. Stewart a month of classes free. 我做广告需要一些好照片，Stewart先生。也许你来拍一次上课的情形，我让你和你太太免费上一个月的课。\nWhen can I photograph a class? 我何时才来拍上课呢？\nAnytime. 什么时候都行。\nHow about today? 今天怎么样？\nTerrific! 太好了！\nHi. 嗨。\nOh, hi. 噢，嗨。\nAre we ready to go? 我们可以开始了吗？\nYeah. Yeah. Let\u0026rsquo;s get in our lines. We\u0026rsquo;re going to take it slow first. Stretch up\u0026hellip;and we\u0026rsquo;re going to go left first \u0026hellip; 2,3,4 \u0026hellip; now switch. \u0026hellip; OK, hold to the right. Sunrises. Stretch it out. Flat back. Bring it up \u0026hellip; and twists \u0026hellip; and side \u0026hellip; 2, 3 \u0026hellip; and left \u0026hellip; push \u0026hellip; push \u0026hellip; turn \u0026hellip; hit the floor. Take it side again \u0026hellip;. OK, and switch. Stretch it out. And we\u0026rsquo;re going to warm down with a tango. Left, right. Enjoy it. 是啊，是啊。请排好位置。开头我们要做慢一点。伸展……先向左……2，3，4……现在，左右交替……好，在右边停住。双手捧日。尽量伸展。平背拉回。身体打直……扭摆……侧身……2，3……向左……推……推……转身……坐地板。再侧身……好，左右交替。尽量伸展。我们用探戈舞步来舒缓，左，右。放松。\nRichard, did you go to the Davis Aerobics class today? Richard，你去上Davis有氧运动健身课了吗？\nYes, I went to the aerobics class today. 去了啦，我上了有氧运动课了。\nWhat is wrong with you? 你怎么啦？\nNothing. I am in excellent health. I have ideal blood pressure. A perfect heart. In other words, I\u0026rsquo;m in wonderful condition. 没什么。我身体好的很。我血压正常得很，心脏也很好。总之，我身体非常好。\nRichard, did you go to the aerobics class, really? Richard，你真的上了有氧运动课吗？\nAnd don\u0026rsquo;t forget to invite Susan for dinner. 别忘了请Susan来吃晚餐。\nAnd your legs don\u0026rsquo;t hurt? 你的腿不酸不痛？\nHurt? What do you mean? 酸痛？什么意思？\nWhat about your arms? Lift your arms up like this. And they don\u0026rsquo;t hurt? Not even a little? 你胳膊怎么样？手抬起来，像这样。不会酸痛？一点也不会？\nNope. 不会。\nYou are in great condition. I can\u0026rsquo;t believe it! 你的身体太好啦。我简直不敢相信。\nGrandpa, Ellen, Philip, Robbie, you and me. That\u0026rsquo;s six steaks. 爷爷、Ellen、Philip、Robbie、你和我。六份牛排。\nDon\u0026rsquo;t forget Susan. 别忘了Susan。\nSeven steaks. 七份牛排。\nCooking dinner for the entire family is not so easy. The shopping: the salad: tomatoes, lettuce, cucumbers, and onions. The main course: steak and potatoes. Richard, how much broccoli do I need for seven people? 给全家人做晚餐真不是件容易的事。采买项目：沙拉：蕃茄、莴苣、黄瓜、洋葱。主菜：牛排和马铃薯。Richard，七个人吃需要多少花椰菜？\nMarilyn, I have to tell you something. At today\u0026rsquo;s exercise class\u0026hellip; Marilyn，我得告诉你，今天上健身课的时候……\nYes, Richard. 说吧，Richard。\nWell, I didn\u0026rsquo;t really exercise. 嗯，我没有真的上健身课。\nI knew it! 我就知道！\nI wanted to, but Jack Davis needed a photographer. I\u0026rsquo;m sorry, Marilyn. 我真的想参加上课，但Jack Davis要我拍照。对不起，Marilyn。\nI don\u0026rsquo;t understand. Did you exercise or not? 我搞不懂，你到底作了健身操没有？\nNo. Instead of exercising, I photographed the class. 没有，没有，我在给他们拍照。\nAnd you didn\u0026rsquo;t exercise? 你没有参加健身操？\nNo. 没有。\nThere\u0026rsquo;s another advanced class today at four o\u0026rsquo;clock. We\u0026rsquo;ll go together. 今天下午四点钟还有一次高级班，我们一起去。\nWhat about the bet? 那打赌的事呢？\nOh, the bet is still on, but you shop for the groceries. Remember, you win, and I cook dinner for the entire family. You win, and I cook dinner for the entire family. Including Susan. 打赌仍然有效，但你去买菜。记得吗，你要是赢了，我给全家做晚餐。你赢了，我给全家做晚餐。包括Susan的。\nFour o\u0026rsquo;clock at the advanced exercise class. With me. Don\u0026rsquo;t forget to breathe. 四点钟去高级健身课，跟我一起。别忘了呼吸。\nSkip, hop, front. Twist\u0026hellip; again\u0026hellip;. OK, now\u0026hellip; scissors. This is fun. It\u0026rsquo;s a piece of cake. 跳，蹦，向前，扭摆……再来……好现在……张腿合腿。有意思，毫不费力。\nYeah. Just wait. 是啊，等着瞧吧。\n5, 6, 7, go right, 1, 2, back, 2, 3, 1, 2, 3, pony, pony\u0026hellip; 1, 2, 3, kick\u0026hellip; 1, 2, 3, kick\u0026hellip; pony. And twist, twist. 5，6，7，向右，1，2，后退，2，3，1，2，3，小马步，小马步，……1，2，3，踢，……1，2，3踢……小马步，扭摆，扭摆。\nOK. Let\u0026rsquo;s pick up the pace. 好，把节奏加快一些。\nHow are you doing, Richard? 现在怎么样，Richard？\nI can barely move. 我简直动不了啦。\n2, 3, 4, front. Now we\u0026rsquo;re going to run it off. Front\u0026hellip; knees up, knees up. OK. Finish off by jogging in place. OK. Keep those knees up. All right. That\u0026rsquo;s it for today. Thank you, everyone. See you next week. 2，3，4，前踢。现在，我们来快跑。前踢，膝盖抬高。好，结束之前在原地慢跑。好，膝盖抬高。行了。今天就做这些。谢谢大家。下星期见。\nThank you, Jack, but no thank you. 谢谢你，Jack，但不谢你。\nThe advanced exercise class is not so easy, huh? 高级健身班不是那么容易吧，对不对？\nNo, no, you were right. I was wrong. 确实不容易，你说对了。我错了。\nCome on, Richard. Get up. Let\u0026rsquo;s go. You have to cook dinner for the entire family. 好啦，Richard。起来。走吧。你今晚得替全家做晚餐呢。\nMarilyn, I\u0026rsquo;m exhausted. I can\u0026rsquo;t move. Marilyn，我太累了。简直动不了。\nOh, you\u0026rsquo;ll do it. It\u0026rsquo;s a piece of cake. 噢，你办得到的。这不费吹灰之力。\nExcuse me, Richard, Marilyn. You are a terrific instructor, Jack. 打扰一下，Richard，Marilyn。你真是个了不起的教练，Jack。\nThanks. But I have a question. Is this your very first advanced aerobics class? 谢谢。但我想问一下，这是你第一次上有氧运动高级班吗？\nYes, it is. 是的。\nYou are in great shape, Richard. Very few people last in this class for the full hour the very first time. 你的身体状况好极了，Richard。很少人能够第一次撑完一个小时的课。\nIt\u0026rsquo;s true. You are in great shape. 这是真的。你的身体很好。\nThanks! 谢谢。\nI think we\u0026rsquo;ll cook dinner together. 我想，我们一起做晚餐了。\n重难点分析 A piece of cake 非常地道的习语，意为\u0026quot;小菜一碟、轻而易举的事\u0026quot;。\nNo sweat 口语中表示\u0026quot;没问题、轻而易举\u0026quot;，字面意思是\u0026quot;没有汗\u0026quot;。\nIt\u0026rsquo;s a nap. 口语中表示\u0026quot;很简单\u0026quot;，nap意为小睡，比喻事情容易得像打个盹。\nYou want to bet? / It\u0026rsquo;s a bet. 打赌时的常用表达。\nWithout a doubt \u0026ldquo;毫无疑问\u0026rdquo;，强调肯定语气。\nIn other words \u0026ldquo;换句话说\u0026rdquo;，用于重新表述。\nI can barely move. \u0026ldquo;我几乎动不了了\u0026rdquo;，barely意为\u0026quot;几乎不\u0026quot;。\nPick up the pace \u0026ldquo;加快速度/节奏\u0026rdquo;，健身课常用语。\nIn great shape 身体状态好，shape在此指身体状况。\nLast in this class \u0026ldquo;撑完这节课\u0026rdquo;，last在此作动词，意为\u0026quot;坚持\u0026quot;。\nInstead of\u0026hellip; \u0026ldquo;而不是……\u0026quot;，表示替代关系。\nWhat do you do for a living? 询问职业的常用句型。\n核心词汇 词汇 词性 释义 例句 exhausted adj. 筋疲力尽的 I am exhausted. advanced adj. 高级的 My new advanced exercise class. aerobics n. 有氧运动 Doing aerobics for an hour. instructor n. 教练，指导者 My instructor thought\u0026hellip; bet n./v. 打赌 It\u0026rsquo;s a bet. blood pressure n. 血压 Your pressure is 120 over 75. physical n. 体检 When was your last complete physical? advertising n. 广告 I need some good photos for my advertising. grocery n. 食品杂货 You shop for the groceries. condition n. 状况，状态 I\u0026rsquo;m in wonderful condition. 口语中的应用 A piece of cake 最常用的习语之一，形容某事非常容易。\nNo sweat 轻松随意的表达，表示\u0026quot;没问题\u0026rdquo;。\nYou want to bet? 朋友间打趣或挑战时的常用语。\nIn other words 用于换一种方式解释或总结。\nPick up the pace 健身、工作、学习等各种场景中催促加快速度。\nWhat do you do for a living? 询问职业的标准问法，比\u0026quot;What\u0026rsquo;s your job?\u0026ldquo;更自然。\n核心练习句型 I can barely move. 表达几乎不能做某事\nI can barely hear you. I can barely stay awake. It\u0026rsquo;s a piece of cake. 表达某事很容易\nThis exam is a piece of cake. Learning to ride a bike is a piece of cake. Instead of\u0026hellip; 表示替代\nInstead of exercising, I photographed the class. Instead of going out, let\u0026rsquo;s stay home. What do you do for a living? 询问职业\nWhat do you do for a living? I\u0026rsquo;m a photographer / teacher / doctor. Let\u0026rsquo;s pick up the pace. 催促加快速度\nLet\u0026rsquo;s pick up the pace, we\u0026rsquo;re running late. We need to pick up the pace on this project. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-4/","summary":"\u003ch2 id=\"课文原文\"\u003e课文原文\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eI am exhausted. My new exercise class is so hard.\u003c/strong\u003e\n我太累了。我那新的健身班太难了。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eYour new exercise class?\u003c/strong\u003e\n你的新健身班？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eYeah. My new advanced exercise class.\u003c/strong\u003e\n对，新的高级健身班。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWhy advanced?\u003c/strong\u003e\n为什么是高级的？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMy instructor thought that the beginner\u0026rsquo;s class was too easy for me.\u003c/strong\u003e\n老师认为初级课程对我来说太容易了。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eToo easy for you?\u003c/strong\u003e\n对你太容易了？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eDon\u0026rsquo;t laugh. In the beginner\u0026rsquo;s class, they give you a chance to rest between exercises.\u003c/strong\u003e\n别笑。在初级课程中，你有机会休息。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eSo?\u003c/strong\u003e\n那又怎么样？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eThe advanced class is nonstop.\u003c/strong\u003e\n高级课程里是没有休息的。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI lift weights every morning for sixty minutes without stopping. No problem.\u003c/strong\u003e\n每天早晨我举重六十分钟，中间还不是没有休息。小事一桩。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第4课：A Piece of Cake（小菜一碟）"},{"content":"课文原文 Hi, Grandpa. 嗨，爷爷。\nHi, Robbie. Can I help? 嗨，Robbie。要我帮忙吗？\nYes, indeed. Hand me two eggs from the refrigerator, and I\u0026rsquo;ll make you two fried eggs. 对，正需要。替我从冰箱里拿两个蛋来，我给你煎两个蛋。\nHow about some bacon? I made enough for an army. 来点熏肉怎么样？我煎了一大堆。\nYou going to the baseball game today? 你今天要去看棒球赛吗？\nIt\u0026rsquo;s a perfect day for it—a little cloudy but nice and warm. 今天是最好的看球天——有点云，但舒适暖和。\nDad and I were planning to go to the game, but he has to work today, and my friends don\u0026rsquo;t want to go. It\u0026rsquo;s not an important game, anyway. 爸爸本来要和我一起去，但他今天工作忙，我的朋友们又不想去。话说回来，这场比赛不重要。\nDo you have any other plans for the day? 那么你今天有别的事吗？\nI\u0026rsquo;ll work on my computer. I have a new math program, and I want to learn how to use it. 我要练电脑。我有一个新的数学程式，我想学习怎样用。\nMaybe you can teach me how to work on a computer someday. 改天你教教我如何使用电脑吧。\nAnytime. It\u0026rsquo;s really easy, but, like anything, you need to work at it, Grandpa. 没问题。实在很容易，但是，和其它东西一样，你得常练它，爷爷。\nThis bacon is great. I love crispy bacon. 熏肉做得太好了。我喜欢脆熏肉。\nOh, what are you doing tomorrow? 噢，明天你打算干什么？\nNothing much. 没什么要紧的事。\nWell, maybe your dad and I could take you fishing with us. 嗯，也许你爸爸和我可以带你去钓鱼。\nI\u0026rsquo;d like that, but \u0026hellip; 我很想去，但是……\nBut what? 但是什么？\nBut Dad is always so busy. 但是爸爸总是那么忙。\nWell, can you come fishing with me tomorrow? 那么，你明天能和我一起去钓鱼吗？\nSure, I can. 当然，我可以。\nRobbie says you can\u0026rsquo;t take him to the game today. Robbie说你今天不能带他去看比赛。\nI really feel bad about it, but they need me at the hospital today, in the children\u0026rsquo;s ward. 我真过意不去，但今天医院有事，在小儿科病房那边。\nI understand. 我可以理解。\nMaybe we can spend some time together next weekend. 也许下个周末我们可以一起玩玩。\nDefinitely. We should. You and Robbie and me. 没问题。我们应该如此。你、Robbie和我。\nRemember our first fishing trip? 还记得我们第一次去钓鱼吗？\nI sure do\u0026hellip;. 我当然记得……\nWell, I\u0026rsquo;ve got to run, Dad. See you later. 嗯，我得赶紧走了，爸爸。再见。\nGoing fishing? 要去钓鱼？\nI\u0026rsquo;m thinking about it\u0026hellip;. 我正在考虑中……\nSo, how\u0026rsquo;s work? 工作还顺利吗？\nOh, the usual problems. 还不是那些老问题。\nYou\u0026rsquo;re working pretty hard these days. 你这阵子工作得很辛苦呀。\nI guess I am. 我想是吧。\nWhen did you last go fishing with Robbie? 你上一次和Robbie一起去钓鱼是什么时候啦？\nI remember exactly. It was on his birthday, June second, two years ago. We didn\u0026rsquo;t catch anything. 我记得很清楚。是在他生日那天。两年前的六月二日。我们什么也没有钓着。\nRemember our fishing trips? 还记得我们以前那些钓鱼之行吗？\nYes. I loved them. 记得。我好喜欢哟。\nRemember catching your first fish? 还记得你第一次钓到鱼的情形吗？\nHow can I forget? I fell out of the boat! 怎么忘得了？我摔到船外去了。\nWe had some good times together. 我们共渡许多美好时光。\nYes, we did. 确实如此。\nMaybe we should do it again. How about tomorrow? 也许我们该再来一次。明天怎么样？\nDon\u0026rsquo;t you have to work? 你明天不用上班吗？\nMy paper work will wait. 文书工作可以缓一缓。\nOh, Robbie will be thrilled. 啊，Robbie会高兴得不得了。\nI am, too, Son. I want to spend more time with Robbie. Tomorrow. It\u0026rsquo;ll be like old times for you and me. And Robbie will love it. 我也很高兴，儿子。我想多花点时间和Robbie在一起。明天，你我过去的美好时光又会重现。Robbie会喜欢的。\nWell, what\u0026rsquo;s the weather going to be like? 那么，明天的天气怎样？\nRadio says sunny and mild. 广播说是晴天，温暖适中。\nWell, I\u0026rsquo;ll tell Robbie. And thanks, Dad. 好，我告诉Robbie。谢谢你，爸爸。\nDon\u0026rsquo;t thank me. I\u0026rsquo;m just being a grandfather. 别谢我。我只是在尽一个爷爷的本份而已。\nThis is really neat! When do we eat? 太好了！我们什么时候吃？\nFirst, we have to catch some fish. In order to catch fish, you have to do this. Here we go. That\u0026rsquo;s it. Then drop it into the water. All of this comes before eating. OK? 首先，我们得钓几条鱼。要钓鱼你就得这样。现在可以开始了。就这样。然后把它扔到水里。这些都是在吃之前先得做的事，知道吗？\nHow do you know so much about fishing? 你对钓鱼怎么知道这么多？\nGrandpa taught me. We spent a lot of time fishing together. 爷爷教我的。我们以前常常一起钓鱼。\nNow, the important thing is to get the hook close to the fish. All right? Like this. 现在，重要的是让鱼钩靠近鱼。知道吗？像这样。\nI think I see some fish right under us, Dad. 爸爸，我想我看见一些鱼就在我们下方的水里。\nOh, not a chance! 啊，不可能。\nI just saw a big one! 我刚看见一条大的。\nHi, there! 你好！\nHi. 你好！\nWhat\u0026rsquo;s your name? 你叫什么名字？\nAlbert. Albert。\nAre you all alone? 就你一个人吗？\nYes, sir. 是的，先生。\nHow old are you, Albert? 几岁啦，Albert？\nI\u0026rsquo;m ten. 十岁。\nWhere\u0026rsquo;s your father? 你爸爸在哪？\nHe\u0026rsquo;s up there at the lodge. 他在那边小屋里。\nDoes he know you\u0026rsquo;re here? 他知道你在这里吗？\nYes, sir. 是的，先生。\nOK, Robbie, maybe you should watch him. The water\u0026rsquo;s pretty deep here. Robbie，也许你得看着他点。这里水相当深。\nI\u0026rsquo;ll watch him, Dad. 我会注意他的，爸爸。\nWhat time is it? 什么时间啦？\nIt\u0026rsquo;s almost lunchtime, and no fish yet. 差不多到午餐时间了，还没钓到鱼。\nI can go up to the lodge for some hot dogs and drinks. 我可以到那边小屋去弄些热狗和饮料来。\nNo way! We\u0026rsquo;re here to catch our lunch. 不行！我们要在这里钓我们的午餐。\nTo catch fish, you need the right magic. 要钓得到鱼，你得用对魔法。\nThat\u0026rsquo;s right. I forgot! The right magic. 对了。我忘记这招！正确的魔法。\nDo it for Robbie, Dad. 爸爸，给Robbie示范示范。\nYou remember? 你还记得吗？\nSure. Come on. Well, first, you have to turn your hat around like this. Then you close your eyes and say the magic words. Fish, fish, send me a fish. Fish, fish, send me a fish\u0026hellip;. I got one! 当然记得。你来吧。首先，你得把你的帽子转一下，像这样。然后，闭上眼睛念魔语。鱼，鱼，给我一条鱼。鱼，鱼，给我一条鱼，……我钓到了！\nSee, it works! It\u0026rsquo;s a big one! 瞧，真有效！真大哟！\nWell, it always worked for me, too. 嗯，这办法对我也累试不爽。\nGrandpa, get the net, please! 爷爷，请把网子拿来！\nDad, you got one, too! 爸爸，你也钓到一条！\nYou bet I have! Easy, Philip, easy. 我铁定已经钓到了！慢慢来，Philip，慢慢来。\nSorry, Dad. 抱歉，爸爸。\nWell, one more and I\u0026rsquo;ve got a pair of boots. 嗯，再钓一只我就有一双靴子了。\nYou didn\u0026rsquo;t say the magic words. 你没有念魔语。\nRobbie\u0026rsquo;s right. Robbie说对了。\nYes, but you did, and we\u0026rsquo;ve got our lunch. Let\u0026rsquo;s build a fire and cook it! 没错，但你念了，使我们钓到了午餐。咱们去升火煮鱼！\nCome on, Albert, you can help us! 走，Albert，你来帮忙！\nI want to stay here and fish. 我想待在这里钓鱼。\nAll right, but be careful. 好吧，但你得小心。\nIs it finished yet? 行了吗？\nI think so. I hope you like your fish well done. 我想行了。我希望你们喜欢吃熟透了的鱼。\nBurned, you mean. 你的意思是，烧焦的。\nHey, I\u0026rsquo;m a doctor, not a chef. 嘿，我是个医生，又不是厨师。\nHelp! Help! I can\u0026rsquo;t swim! 救命！救命！我不会游泳！\nDad! Grandpa! He fell in! 爸爸，爷爷，他掉下去了。\nEasy does it, Robbie. That a boy. That\u0026rsquo;s it. 慢慢来，Robbie。对了，就这样。\nHe\u0026rsquo;s not breathing, Philip! 他停止呼吸了，Philip！\nRobbie, run to the car! Bring a blanket and my medical bag. Robbie，快跑去车子上！拿一条毯子和我的医疗箱来。\nYes, Dad. 好的，爸爸。\nNow, come on, son. Come on, son. Breathe, Albert! 醒醒，孩子。醒醒，孩子。呼吸呀，Albert！\nHere\u0026rsquo;s the bag. 箱子拿来了。\nWill he be OK, Dad? 他会没事吗，爸爸？\nI hope so. That\u0026rsquo;s it. That\u0026rsquo;s the way. That\u0026rsquo;s it. There. Oh, it\u0026rsquo;s going to be all right. That\u0026rsquo;s it. 希望没事。对啦，就这样，很好。啊，不会有问题了。对了。\nWrap him in the blanket, Dad! 用毯子把他裹好，爸爸！\nThat\u0026rsquo;s it. That\u0026rsquo;s it. It\u0026rsquo;s all right, Albert. You\u0026rsquo;re going to be OK. 对了，就这样。不要紧了。Albert，你不会有问题了。\nI want my daddy! 我要我爸爸！\nWe\u0026rsquo;ll take you to him. Easy now. Easy does it. That\u0026rsquo;s it. 我们会送你去他那儿。放轻松，不要紧，对了。\nYour dad is quite a guy. 你爸爸真不赖。\nI know, Grandpa. 我知道，爷爷。\nHow is he, Philip? 他怎样了，Philip？\nHe\u0026rsquo;s asleep. He\u0026rsquo;s going to be fine. 他睡了。他不会有事了。\nHow can I thank all of you? 我该如何感谢你们呢？\nThank my son Robbie. He pulled him out of the water. 谢我儿子Robbie吧。是他把你孩子从水里拉上来的。\nI\u0026rsquo;m very grateful, Robbie. 非常感谢你，Robbie。\nDad saved him, not me. 是爸爸救了他，不是我。\nI\u0026rsquo;m so thankful to all of you. 非常感谢你们诸位。\nSo long. 再见。\nHe\u0026rsquo;s a lucky boy. 他是个幸运的孩子。\nWell, what do you say we get back to our fishing? 你们说，我们回去钓鱼怎样？\nThat\u0026rsquo;s a great idea. 好主意。\nUh-oh. It\u0026rsquo;s probably the hospital. I have to get to a phone. It probably means we can\u0026rsquo;t stay. 哎哟，可能是医院。我得去找个电话。看来我们不能待在这里了。\nThat\u0026rsquo;s OK. 没有关系。\nOne of my patients has a high fever, and I have to go to the hospital. I\u0026rsquo;m sorry, Robbie. I guess I ruined your day. 我的一位病人发高烧，我得赶去医院。对不起，Robbie，我想我扫了你今天的兴。\nYou didn\u0026rsquo;t ruin my day, Dad. I understand. I really do. 你没有扫我的兴，爸爸。我能理解，真的。\nWhy are you back so early? 你们怎么这么早回来？\nPhilip had to go back to the hospital. He had an emergency. Philip必须要回医院。他有紧急事情。\nOh, that\u0026rsquo;s too bad, Robbie. Did it spoil your fun? 啊，那太遗憾了，Robbie。会不会让你扫兴？\nNo, Mom. We had a great time. 不，妈妈。我们玩得很高兴。\nWell, did you do any fishing? 你们钓了鱼吗？\nYeah, we caught lots of them. Look! 当然，我们抓到不少鱼。看！\nThey had a special on frozen fish down at the supermarket. 超级市场里冷冻鱼特价。\nOh, you really had a bad day. 哦，你们真的没玩好。\nWe had a good day. Robbie pulled a boy out of the water. And Dad saved his life. He\u0026rsquo;s a terrific doctor, Mom. 我们今天玩得很开心。Robbie从水中救出一个孩子。爸爸救了他的命。爸爸是个了不起的医生，妈妈。\nI know. 我知道。\nHi, Pop. Hi, Son. 你好，爸。你好，儿子。\nHello, Dad. 你好，爸爸。\nWhat a day! How about a cup of coffee, Son? 今天好忙！来杯咖啡怎么样，孩子？\nI\u0026rsquo;d love a cup of coffee. 我是想来杯咖啡。\nHow was the patient? 病人怎么样了？\nShe\u0026rsquo;ll be fine. 她不会有事。\nWas it serious? 病得很重吗？\nNo. 不。\nUntil today, I was never really interested in medicine. 直到今天，我才对医学真正感兴趣。\nWell, it\u0026rsquo;s hard work. 嗯，这种工作很辛苦。\nNow I know. 我现在知道了。\nI had a good time today, Robbie. 我今天玩得很开心，Robbie。\nMe, too. 我也一样。\nWhy don\u0026rsquo;t we do it again? 我们再来一次怎么样？\nCan we? When? 行吗？什么时候？\nHow about next Saturday? 下周六如何？\nWon\u0026rsquo;t you be busy? 你不是有事吗？\nI\u0026rsquo;m changing my schedule. 我准备把工作重新安排一下。\nWell, do we have a date? 怎样？我们算是约定了吗？\nWe sure do, Dad. 当然，爸爸。\nGrandpa, can you come? 爷爷，你能去吗？\nI have other plans, Robbie. But I think you two can have a good time together without me. 我另有安排，Robbie。但我觉得，我不去你们也会玩得很开心。\nNo, Dad, and certainly not without the right magic. 不，爸爸，而且没有正确的魔法更是绝对不行。\n重难点分析 I made enough for an army. 夸张说法，\u0026ldquo;我做得够一个军队吃了\u0026rdquo;，表示做了很多。\nYou need to work at it. \u0026ldquo;你得下功夫/勤加练习\u0026rdquo;，work at意为\u0026quot;努力做\u0026quot;。\nI really feel bad about it. 表达歉意或遗憾，\u0026ldquo;对此我感到很过意不去\u0026rdquo;。\nNot a chance! \u0026ldquo;不可能！\u0026quot;，口语中强烈的否定表达。\nNo way! \u0026ldquo;不行！/没门！\u0026quot;，比\u0026quot;Not a chance\u0026quot;更强硬的拒绝。\nEasy does it. \u0026ldquo;慢慢来，小心点\u0026rdquo;，在需要谨慎操作时使用。\nThat a boy. \u0026ldquo;好孩子/对了\u0026rdquo;，鼓励他人的口语表达。\nQuite a guy. \u0026ldquo;真不赖/了不起的人\u0026rdquo;，表示赞赏。\nSo long. \u0026ldquo;再见\u0026rdquo;，较随意的告别语。\nWhat do you say we\u0026hellip;? \u0026ldquo;你觉得我们……怎么样？\u0026quot;，提出建议的委婉说法。\nRuined your day \u0026ldquo;扫了你的兴/毁了你的好日子\u0026rdquo;。\nDo we have a date? \u0026ldquo;我们算约定了吗？\u0026quot;，date在此指约定而非浪漫约会。\n核心词汇 词汇 词性 释义 例句 bacon n. 熏肉，培根 How about some bacon? crispy adj. 酥脆的 I love crispy bacon. fishing trip n. 钓鱼之旅 Remember our first fishing trip? hook n. 鱼钩 Get the hook close to the fish. magic n. 魔法 You need the right magic. net n. 网 Grandpa, get the net! blanket n. 毯子 Bring a blanket. emergency n. 紧急情况 He had an emergency. schedule n. 日程安排 I\u0026rsquo;m changing my schedule. thrilled adj. 非常兴奋的 Robbie will be thrilled. 口语中的应用 I made enough for an army. 做了很多食物时的幽默说法。\nNot a chance! / No way! 强烈否定或拒绝时的口语表达。\nEasy does it. 提醒别人小心、慢慢来。\nWhat do you say we\u0026hellip;? 委婉提出建议：\u0026ldquo;What do you say we get back to our fishing?\u0026rdquo;\nQuite a guy. 称赞某人很了不起。\nSo long. 非正式的告别语。\n核心练习句型 What do you say we\u0026hellip;? 提出建议\nWhat do you say we go to the movies? What do you say we take a break? I really feel bad about\u0026hellip; 表达歉意\nI really feel bad about missing your party. I really feel bad about the mistake. How about\u0026hellip;? 提出建议\nHow about some bacon? How about next Saturday? Easy does it. 提醒小心\nEasy does it, the floor is wet. Easy does it, don\u0026rsquo;t rush. Do we have a date? 确认约定\nDo we have a date for lunch? Do we have a date for the meeting? ","permalink":"/posts/2026-06-14-family-album-usa-lesson-5/","summary":"\u003ch2 id=\"课文原文\"\u003e课文原文\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eHi, Grandpa.\u003c/strong\u003e\n嗨，爷爷。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHi, Robbie. Can I help?\u003c/strong\u003e\n嗨，Robbie。要我帮忙吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eYes, indeed. Hand me two eggs from the refrigerator, and I\u0026rsquo;ll make you two fried eggs.\u003c/strong\u003e\n对，正需要。替我从冰箱里拿两个蛋来，我给你煎两个蛋。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eHow about some bacon? I made enough for an army.\u003c/strong\u003e\n来点熏肉怎么样？我煎了一大堆。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eYou going to the baseball game today?\u003c/strong\u003e\n你今天要去看棒球赛吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eIt\u0026rsquo;s a perfect day for it—a little cloudy but nice and warm.\u003c/strong\u003e\n今天是最好的看球天——有点云，但舒适暖和。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eDad and I were planning to go to the game, but he has to work today, and my friends don\u0026rsquo;t want to go. It\u0026rsquo;s not an important game, anyway.\u003c/strong\u003e\n爸爸本来要和我一起去，但他今天工作忙，我的朋友们又不想去。话说回来，这场比赛不重要。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第5课：The Right Magic（正确的魔法）"},{"content":"课文原文 OK, Philip. This is your third cup of coffee. 好啦，Philip。这是你第三杯咖啡了。\nWe should get to work, or we won\u0026rsquo;t be finished by dinnertime. 我们得开始做事了，要不然，晚餐时间到了我们还做不完。\nI guess we must. 我想咱们是该开始了。\nWe must. 我们是该开始了。\nOK. The beginning of my famous Thanksgiving apple pie. 好。开始做我拿手的感恩节苹果派。\nOne apple. Two apples. Three apples. Four apples. 一个苹果。两个苹果。三个苹果。四个苹果。\nCome on, Philip! Get busy with your famous apple pie. There\u0026rsquo;s much more to be done. 快点，Philip！快做你拿手的苹果派吧。要做的事太多了。\nNow, the ingredients. What goes into my apple pie besides apples? 现在，看看配料。除了苹果以外，我的派还要放什么呢？\nAh, yes. Flour, sugar, butter. Butter, nice and cold and hard. 对了。面粉、糖、牛油。牛油，新鲜又冷又硬。\nOK, here are the walnuts. 嗯，核桃在这里。\nLast but not least, the reason my apple pie is famous—cinnamon. 最后但同等重要的一样，我的苹果派就是靠它出名的——肉桂。\nCinnamon \u0026hellip; Ellen, where\u0026rsquo;s the cinnamon? 肉桂，……Ellen，肉桂放在哪？\nIf there is any cinnamon, it\u0026rsquo;s in the cabinet with the salt and pepper. 要是有的话，应该跟盐和胡椒一起放在橱柜里。\nSalt, pepper, dill weed, garlic powder, cinnamon. Ellen? 盐、胡椒、莳萝、大蒜粉、肉桂。Ellen？\nYes, Philip. 什么事，Philip？\nIs it possible that we forgot to buy cinnamon? 是不是我们忘了买肉桂？\nYes, it is possible that we forgot to buy cinnamon. 是的，我们可能忘了买肉桂。\nWell, how can I make my famous apple pie without cinnamon? 这下好啦，没有肉桂，我那道著名的苹果派怎么做呢？\nGood morning. 早安。\nOh, hi, Robbie. Good morning. 啊，Robbie，早安。\nGood morning. Robbie. 早安，Robbie。\nCan you do me a favor? 你能帮我个忙吗？\nSure, Dad. What? 当然，爸爸。什么事？\nRemember my apple pie on Thanksgiving? What do you love about it? 记得在感恩节我做的苹果派吗？你最喜欢中间的什么？\nThe apples? 苹果吗？\nNo. The sssss\u0026hellip; 不，是sssss……\nRight. We don\u0026rsquo;t have any cinnamon. 对。我们没有肉桂了。\nI\u0026rsquo;ll go down to Henry\u0026rsquo;s grocery. He\u0026rsquo;s always open. I\u0026rsquo;ll get some for you. 我到亨利杂货店去。那里总是开门营业的，我去替你买一些。\nThat\u0026rsquo;s my boy! 好儿子！\nOh, put your heavy jacket on, Robbie. It\u0026rsquo;s cold outside. 把你的厚夹克穿上，Robbie。外面很冷。\nAlexandra might call. Tell her I\u0026rsquo;ll call her right back. Alexandra可能会来电话。告诉她我会马上给她回电话的。\nOK. 好。\nThanks, Son. 谢谢你，孩子。\nUh, why does he always have to slam the door? 唉，为什么他老是砰一声地关上门？\nHello\u0026hellip;. Hello, Alexandra. How are you? \u0026hellip; Fine. Robbie just went to the store. He\u0026rsquo;ll be back soon. He said he\u0026rsquo;ll call you. \u0026hellip; Oh, oh, I see\u0026hellip;. Oh \u0026hellip; certainly. Well, do you have the phone number there? \u0026hellip; Oh \u0026hellip; I see\u0026hellip;. Please, I know he wants to talk to you\u0026hellip;. Thank you, and happy Thanksgiving to you and your family, too. Try to come by later for dessert\u0026hellip;. Bye. 你好……Alexandra。你好吗？……很好。Robbie刚去商店。他很快就回来。他说了他要给你打电话。……嗯，嗯，我知道了。……嗯……一定。那么你有那儿的电话号码吗？……啊……我懂。……麻烦你，我知道他想跟你说话。谢谢你，祝你和你的全家感恩节愉快。晚一点尽量设法弯到这里来吃甜点。……再见。\nThat was Alexandra. She and the Molinas are going to spend Thanksgiving with their cousins. She doesn\u0026rsquo;t have the phone number. 是Alexandra打来的电话。她和Molinas一家人准备与亲戚一起过感恩节。她不知道那儿的电话号码。\nOh, Robbie will be disappointed. He\u0026rsquo;ll be grouchy. 啊，Robbie会很失望。他会发牢骚的。\nMaybe she\u0026rsquo;ll call back. She promised. 也许她会打电话回来。她说了。\nHere\u0026rsquo;s your cinnamon, Pop. It was a dollar and sixty cents. You forgot to ask me for the change. Or did you forget to give it to me? 这是你要的肉桂，爸爸。花了一元六角。你忘了问我要找回零钱。或许是你忘了给我吧？\nThanks, Son. 谢谢你，儿子。\nAlexandra called. Alexandra来电话了。\nI\u0026rsquo;ll call her back. 我给她回电话。\nShe said she\u0026rsquo;ll call you later. She\u0026rsquo;s not at home. 她说她等会儿给你电话。她现在不在家。\nYou should have your breakfast, Son. Make you feel better. Protein, vitamins. 你应该吃早点，孩子。这样才会让你觉得舒服些。蛋白质，维他命。\nShe said she\u0026rsquo;ll call back? 她说过她会打电话回来？\nYes, she did. 是的，她说了。\nGood morning, everyone! Happy Turkey Day! 各位早安！火鸡节快乐！\nWhat\u0026rsquo;s wrong? 怎么啦？\nNothing. Absolutely nothing. 没有啊。什么事也没有。\nWhat\u0026rsquo;s gotten into him? 他怎么搞的？\nHe missed a phone call. 他没接到一通电话。\nFrom \u0026hellip;? 打来的人是……？\nYes, Alexandra. 对，Alexandra。\nIt\u0026rsquo;s nice to see young love\u0026hellip;. Oh, to be young again! 真高兴看见年轻人相爱……。啊，能再恢复年轻多好！\nWhere\u0026rsquo;s the coffee? Cinnamon! 咖啡在哪？肉桂！\nI love parades. The Thanksgiving Day parade is always such great fun. 我爱看游行。感恩节的游行总是如此有趣。\nLook at that Superman balloon! Wowee! Just floating along high above Central Park West. Don\u0026rsquo;t you just love it? 你看那个超人气球！啊哈！高高飘浮在中央公园西路上空前进！你能不喜欢吗？\nOh, and the bands and the music. John Philip Sousa. I love his music. 还有那乐队和音乐。John Philip Sousa的曲子。我喜欢他的作品。\nDa dada da da dada da da da da da da dada. 哒，哒哒，哒，哒，哒哒，哒，哒，哒，哒，哒，哒，哒哒。\nOh, look at that float, Robbie. Look at those funny-looking clowns. 噢，你看那花车，Robbie。你看那些滑稽的小丑。\nIt\u0026rsquo;s for kids. 这是给小孩看的。\nMaybe so, but parades always make me feel like a kid. 也许是，但这些游行总是让我觉得像小孩子。\nRemember when you and your dad and I went to the Thanksgiving Day parade? You were four or five years old, I think. 还记得你、你爸爸，和我去参加感恩节游行吗？当时你才四、五岁，我想。\nHello, hello\u0026hellip;. Oh, hi, Susan. How are you?\u0026hellip; Here\u0026rsquo;s Mom. 喂，喂……啊，嗨，Susan，你好吗？……妈妈就来了。\nHello, Susan. Yes, he missed a phone call from Alexandra. Yes, I know, but he\u0026rsquo;ll get over it. 喂，Susan。对，他没接到Alexandra打来的电话。是的，我知道，过一下就会好的。\nGood. Then you\u0026rsquo;ll be here about five? Oh, fine. I look forward to seeing you and Harry and Michelle. Drive carefully. Good-bye. 很好。那么你大约在五点左右来。嗯，很好。我等着见你、Harry和Michelle。开车时小心。再见。\nTaste Ellen\u0026rsquo;s turkey dressing. It\u0026rsquo;s delicious. 尝一尝Ellen的火鸡填料。味道好极了。\nI\u0026rsquo;m not surprised. It\u0026rsquo;s Grandma\u0026rsquo;s recipe. It\u0026rsquo;s my favorite part of the meal. 我一点也不觉得奇怪。这是奶奶的配方。这是全餐中我最爱吃的部份。\nWhat about my famous apple pie? 我那著名的苹果派呢？\nDad, your apple pie is my favorite dessert. 爸爸，你做的苹果派是我最爱吃的甜点。\nHow\u0026rsquo;s the parade? 游行怎么样？\nOK. 还好。\nMom! Is it for me? 妈妈！是我的吗？\nNo, Robbie. 不，Robbie。\nWho was it? 谁来的电话？\nWrong number. 打错号码。\nPhilip, would you join me in the kitchen, please? It\u0026rsquo;s getting late. We have vegetables to prepare. Philip，请你跟我来厨房好吗？时间不早了。我们还得准备蔬菜。\nCan I help with anything? 我能帮什么忙吗？\nNo, honey. You just relax with Grandpa. I\u0026rsquo;ll get you to help serve later. 不用，亲爱的。你只要放轻松，陪爷爷就行了。等一会我会叫你帮忙分菜。\nEllen reminds me so much of Grandma. Ellen真让我想起奶奶。\nWhat time does the Michigan football game come on? Michigan足球赛何时开始？\nFour. 四点钟。\nPhilip! Philip！\nI\u0026rsquo;ll be back to see the game. 我到时候来看比赛。\nGrandpa, when did Dad graduate from Michigan? 爷爷，爸爸是什么时候从Michigan毕业的？\nLet me think. He graduated from medical school in 1960 and from the University of Michigan in 1956. 让我想想。他在一九六零年从医学院毕业，一九五六年从Michigan大学毕业。\nDid you go to Michigan, too, Grandpa? 你也念Michigan吗，爷爷？\nYup. I graduated in 1937. 是的。我是一九三七年毕业的。\nI\u0026rsquo;ve got to start thinking about college soon. 我很快也得开始考虑大学的事了。\nOK, everybody. I want to welcome Harry and his daughter Michelle to Thanksgiving with us. 好啦，各位。我想对Harry和他女儿Michelle来参加我们的感恩节晚餐表示欢迎。\nThank you, Dr. Stewart. 谢谢你，Stewart大夫。\nCall me Philip. 叫我Philip。\nOK. 好的。\nBut first, I think we should take a moment and remember the meaning of Thanksgiving. 不过首先，我想我们应该用一两分钟来追忆一下感恩节的意义。\nPhilip, I took Michelle to a school play about the first Thanksgiving. Philip，我带Michelle看过学校里演出的第一次感恩节历史剧。\nWell, why don\u0026rsquo;t you tell us about that, Michelle? 那好，你能否给我们讲一讲，Michelle？\nThanksgiving was about the Pilgrims, the first settlers in America. They shared the first harvest with the Indians and gave thanks. 感恩节是关于清教徒的，他们是第一批来美国定居的移民。他们与印第安人分享首次收成，并感恩。\nAll right. 很正确。\nThen in that spirit let each of us give thanks. Each in his own way. Who wants to begin? 现在，本着同样心意，让我们开始感恩。每个人用自己的方式来表达。谁先开始？\nI will. I give thanks for being here with my family and for being well, so I can enjoy you all. 我来。我感谢能在这里和家人同住并且很健康，让我享受到你们大家的温馨。\nAll right! We love you, Grandpa. 太好了！我们爱你，爷爷。\nI\u0026rsquo;d like to give thanks for a healthy year, a good job, and for meeting Harry and Michelle. 我感谢这一年来身体健康，工作顺遂，认识了Harry和Michelle。\nWe\u0026rsquo;d like to give thanks for meeting Susan and the Stewart family. I love you, Daddy. 我们要感谢认识了Susan和Stewart一家人。我爱你，爸爸。\nThanks, Harry. That was very kind of you. 谢谢你，Harry。你真周到。\nI\u0026rsquo;d like to give thanks for Grandpa coming to live with us. And I\u0026rsquo;d also like to thank my math teacher for giving me a passing grade. And call me, Alexandra. 我感谢爷爷到这里和我们一起生活。我还要感谢我的数学老师给我及格分数。还有，打电话给我，Alexandra。\nOh, Robbie! She\u0026rsquo;ll call. 啊，Robbie！她会打的。\nYou go first, Marilyn. 你先讲，Marilyn。\nI\u0026rsquo;m thinking. You go first. 我还在想。你先来。\nWell, you all know I\u0026rsquo;m working on my photo album. It\u0026rsquo;s not finished yet. And I\u0026rsquo;d like to thank Marilyn for being so patient. 好吧，你们都知道我正在进行我的写真集。现在还没有完成。我要感谢Marilyn付出的耐心。\nThanks, Richard. I should thank you for encouraging me to keep working on my fashion designs. I\u0026rsquo;m lucky to have a husband with an artistic eye. 谢谢你，Richard。我应该感谢你一直鼓励我继续我的服装设计工作。我很庆幸，我丈夫具有艺术的眼光。\nOh, we have a lot to be thankful for. For the food on this table. Just like the Pilgrims. 啊，我们有很多需要感谢的事情。感谢这桌上的丰盛食物。就像早年清教徒那样。\nI\u0026rsquo;ll go along with that, Ellen. 我也有同感，Ellen。\nWell, help me serve, Robbie. 好，帮我分菜，Robbie。\nIt was a wonderful meal, Mrs. Stewart. 真是一顿精美的晚餐，Stewart太太。\nThank you. 谢谢你。\nAnd now to see the end of the football game. 现在去看看足球赛的最后一段。\nExactly. 正合我意。\nWhere are you going, Philip? Remember, the Michigan football game? And Michigan needs a touchdown. 你上哪去，Philip？记得吗？Michigan足球赛？Michigan队需要达阵得分。\nDid you forget something? 你是否忘了什么东西？\nDad, your famous apple pie. 爸爸，你最著名的苹果派。\nJust let me see the score, Ellen. 让我去看看比数，Ellen。\nGo ahead, Philip. We should all take a little break before dessert. 去吧，Philip。吃甜点之前我们大家应该稍微休息一下。\nOh, who could that be? 啊，这会是谁呢？\nOh, it must be Alexandra. I invited her to come by for dessert. 一定是Alexandra。我邀请她来吃甜点。\nYou did? 你请了她？\nI like Ellen. 我喜欢Ellen。\nYou know everyone, Alexandra. No, she doesn\u0026rsquo;t know Harry Bennett and his daughter Michelle. 你认识每一位吧，Alexandra。不，她不认识Harry Bennett和他女儿Michelle。\nNice to meet you. Hi. Hi. 幸会。你好。你好。\nHello, Alexandra. Hello, Alexandra. Hi, Marilyn. Hi, Susan. Happy Thanksgiving. 你好，Alexandra。你好，Alexandra。嗨，Marilyn。嗨，Susan。感恩节快乐。\nAnd Alexandra brought us a pumpkin pie. Alexandra给我们带来了一个南瓜派。\nPlease sit down, Alexandra. 请坐，Alexandra。\nDad, Richard—Alexandra\u0026rsquo;s here. 爸爸、Richard——Alexandra来了。\nMichigan needs a touchdown. Three minutes to play. Michigan队需要一次达阵得分。还剩三分钟。\nHi, Alexandra. Welcome. 嗨，Alexandra。欢迎你。\nHello, Alexandra. Yes, Michigan needs a touchdown. One tiny little touchdown, with just three minutes to play. 你好，Alexandra。是啊，Michigan队需要一次达阵得分。一次小小的达阵得分，只剩下三分钟了。\nYou want Michigan to win. 你希望Michigan队赢球。\nHow\u0026rsquo;d you guess? 你怎么晓得？\nAnd Alexandra brought us a pumpkin pie. Alexandra给我们带来了一个南瓜派。\nWhat happened? 怎么啦？\nWe forgot to turn the oven on. 我们忘了开烤箱开关。\nWe did? 我们忘了吗？\nPhilip, why don\u0026rsquo;t you go watch the last three minutes of the game. I will serve coffee and pumpkin pie. Philip，你何不去看完那最后三分钟的球赛。我来准备咖啡和南瓜派。\nOK. I\u0026rsquo;ll be back in a few minutes. 好，过几分钟我就回来。\nRobbie, would you bring the dessert plates. And, Marilyn, would you pour coffee, please. Robbie，你把甜点盘子拿来好吗？Marilyn请你倒一下咖啡。\nSure, Ellen. 当然，Ellen。\nHow was your Thanksgiving dinner, Alexandra? 你的感恩节晚餐怎么样，Alexandra？\nJust wonderful, Mr. Stewart. The Molinas are a large family. I love being with them. 好极了，Stewart先生。Molina家是一个大家族。我喜欢和他们在一起。\nI\u0026rsquo;m glad you came by, Alexandra. 我很高兴你来，Alexandra。\nI am, too. 我也一样。\nTouchdown! Touchdown! Touchdown! 达阵得分！达阵得分！达阵得分！\nGreat Thanksgiving. Lots to be thankful for. Michigan scored a touchdown. Alexandra came by. And nobody misses Philip\u0026rsquo;s famous apple pie. 美好的感恩节。要感谢的事很多。Michigan队达阵得分。Alexandra来了。还有，没人再想到Philip著名的苹果派。\nOh, Grandpa! 啊，爷爷！\n重难点分析 Last but not least 常用短语，\u0026ldquo;最后但同样重要的\u0026rdquo;。\nCan you do me a favor? 请求帮助的标准用语，\u0026ldquo;你能帮我个忙吗？\u0026rdquo;\nThat\u0026rsquo;s my boy! 表示赞赏和骄傲，\u0026ldquo;真是我的好儿子！\u0026rdquo;\nSlam the door \u0026ldquo;砰地关上门\u0026rdquo;，slam是拟声词。\nHappy Turkey Day! \u0026ldquo;火鸡节快乐！\u0026quot;——感恩节的非正式说法。\nWhat\u0026rsquo;s gotten into him? \u0026ldquo;他怎么了？/他怎么搞的？\u0026quot;——对某人异常行为的疑问。\nHe\u0026rsquo;ll get over it. \u0026ldquo;他会没事的/他会恢复的\u0026rdquo;，get over意为\u0026quot;克服/恢复\u0026rdquo;。\nI look forward to\u0026hellip; \u0026ldquo;我期待……\u0026quot;，后面接名词或动名词。\nWrong number. \u0026ldquo;打错电话了\u0026rdquo;，接电话时的常用语。\nTake a moment \u0026ldquo;花一点时间\u0026rdquo;，常用于正式场合。\nI\u0026rsquo;ll go along with that. \u0026ldquo;我同意/我有同感\u0026rdquo;，表示赞同。\nCome by \u0026ldquo;顺便来访\u0026rdquo;，比\u0026quot;visit\u0026quot;更口语化。\n核心词汇 词汇 词性 释义 例句 Thanksgiving n. 感恩节 Happy Thanksgiving! ingredient n. 配料，成分 Now, the ingredients. cinnamon n. 肉桂 The reason my apple pie is famous—cinnamon. parade n. 游行 The Thanksgiving Day parade is always such great fun. float n. 花车 Look at that float. turkey n. 火鸡 Happy Turkey Day! dressing n. 填料（火鸡内的） Taste Ellen\u0026rsquo;s turkey dressing. recipe n. 食谱，配方 It\u0026rsquo;s Grandma\u0026rsquo;s recipe. Pilgrim n. 清教徒（早期移民） Thanksgiving was about the Pilgrims. touchdown n. （橄榄球）达阵得分 Michigan needs a touchdown. pumpkin pie n. 南瓜派 Alexandra brought us a pumpkin pie. 口语中的应用 Can you do me a favor? 请求帮助的标准礼貌用语。\nLast but not least 在列举事物时用于引出最后一项。\nThat\u0026rsquo;s my boy! 父母对孩子的赞赏表达。\nWhat\u0026rsquo;s gotten into him? 看到某人行为反常时的疑问。\nI look forward to\u0026hellip; 正式表达期待，常用于书信和口语中。\nI\u0026rsquo;ll go along with that. 表示同意对方意见。\nCome by 邀请别人顺便来访：\u0026ldquo;Try to come by later for dessert.\u0026rdquo;\n核心练习句型 Can you do me a favor? 请求帮助\nCan you do me a favor and open the door? Can you do me a favor? I need some help. I look forward to\u0026hellip; 表达期待\nI look forward to seeing you. I look forward to meeting your family. I\u0026rsquo;ll go along with that. 表示同意\nI\u0026rsquo;ll go along with your suggestion. I\u0026rsquo;ll go along with whatever you decide. Is it possible that\u0026hellip;? 委婉询问可能性\nIs it possible that we forgot to buy cinnamon? Is it possible that he\u0026rsquo;s already left? Why don\u0026rsquo;t you\u0026hellip;? 委婉建议\nWhy don\u0026rsquo;t you tell us about that? Why don\u0026rsquo;t you go watch the game? ","permalink":"/posts/2026-06-14-family-album-usa-lesson-6/","summary":"\u003ch2 id=\"课文原文\"\u003e课文原文\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eOK, Philip. This is your third cup of coffee.\u003c/strong\u003e\n好啦，Philip。这是你第三杯咖啡了。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWe should get to work, or we won\u0026rsquo;t be finished by dinnertime.\u003c/strong\u003e\n我们得开始做事了，要不然，晚餐时间到了我们还做不完。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI guess we must.\u003c/strong\u003e\n我想咱们是该开始了。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWe must.\u003c/strong\u003e\n我们是该开始了。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eOK. The beginning of my famous Thanksgiving apple pie.\u003c/strong\u003e\n好。开始做我拿手的感恩节苹果派。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eOne apple. Two apples. Three apples. Four apples.\u003c/strong\u003e\n一个苹果。两个苹果。三个苹果。四个苹果。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCome on, Philip! Get busy with your famous apple pie. There\u0026rsquo;s much more to be done.\u003c/strong\u003e\n快点，Philip！快做你拿手的苹果派吧。要做的事太多了。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eNow, the ingredients. What goes into my apple pie besides apples?\u003c/strong\u003e\n现在，看看配料。除了苹果以外，我的派还要放什么呢？\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第6课：Thanksgiving（感恩节）"},{"content":"课文原文（双语） Robbie, this new Walkman is absolutely wonderful. Robbie，这个新的随身听真棒。\nRichard and Marilyn bought it for me for my birthday. 这是Richard和Marilyn送给我的生日礼物。\nThey\u0026rsquo;re so thoughtful. 他们真周到。\nYou are very lucky, Robbie, to have such a nice family. Robbie，你真幸运，拥有一个这样温馨的家。\nIs something wrong, Alexandra? Alexandra，你怎么了？\nNo, nothing. 没有，没什么。\nYes, there is. I can tell. What\u0026rsquo;s the matter? 有，你有心事，我能觉察到。到底发生了什么事？\nCome on, you can tell me. What\u0026rsquo;s up? 说吧，告诉我。有什么事？\nI don\u0026rsquo;t know. Something\u0026rsquo;s wrong. 我也说不上来。有点不对劲。\nOK, let\u0026rsquo;s talk. 好吧，我们就来谈谈。\nI received a letter from my parents this morning. 今天早上我收到父母一封信。\nDid they write some bad news? 他们写了什么坏消息吗？\nNo. 没有。\nWell, then why are you so sad? 那，那你为什么如此难过？\nI miss them. I miss them very much. 我想念他们，我非常想他们。\nI\u0026rsquo;m sorry, Alexandra. But I understand. 我为你难过，Alexandra。但是我能理解。\nThe Molinas treat me so nicely, and I love being with your family so much \u0026hellip; but when I received the letter with photographs of my family, I cried. I cried because I miss them all. Molina一家人对我很好，我也很喜欢和你们家在一起……但是当我收到那封信连同家人照片时，我哭了。我哭，因为我想念他们。\nYou really miss your family, don\u0026rsquo;t you? 你非常惦念你的家人，是吗？\nYes. I know I must seem silly. It\u0026rsquo;s not like I have nobody. I like the Molinas very much, and they\u0026rsquo;re so kind to me. 是的，我知道我看来一定很可笑。我身边并非没有亲近的人。我很喜欢Molina一家人，他们对我真好。\nHey, why don\u0026rsquo;t we go out for a cheeseburger and french fries? That\u0026rsquo;ll cheer you up. And you can use my Walkman. 嘿，我们何不出去吃一顿起士汉堡和炸薯条？这样会让你舒畅些。你可以用我的随身听。\nThat\u0026rsquo;s a good idea. But if we go out, please don\u0026rsquo;t complain about your math teacher or your math homework. I want to have fun. 好主意。但是我们出去，你可别老抱怨你的数学老师或你的数学作业。我想要快快乐乐的。\nSo do I. 我也想。\nI have to turn off the lights, or else my father will get really angry. He says I never turn them out when I leave. If they come home and they\u0026rsquo;re on \u0026hellip; 我得关掉灯，要不然，我爸爸会很生气。他说我离开时从不关灯。要是他们回来看见灯开着……\nDo you hear something? 你听到什么了吗？\nYes. What was that? 是的。是什么呢？\nIt sounded like a dog barking. It sounded like a dog barking right here. 听起来像狗叫。好像有只狗就在这里叫。\nYeah. A dog! A springer spaniel! 对。狗！一只激飞狗！\nCome on in! Make yourself at home. 进来！不要客气。\nOh, you poor little thing. Come here. Come on. Poor baby. 可怜的小东西。过来。过来。可怜的小东西。\nWhere did you come from? 你从哪里来？\nHer name\u0026rsquo;s Gemma, and she belongs to Mr. and Mrs. Levinson. There\u0026rsquo;s a phone number \u0026ndash; five five five \u0026hellip; eight four four eight. 它叫做Gemma，是Levinson夫妇家的狗。有电话号码——555……8448。\nRobbie, maybe you should call them and tell the Levinsons we have their cute little spaniel. Robbie，也许你应该给他们打个电话，告诉Levinson夫妇他们可爱的小猎犬在我们这里。\nI\u0026rsquo;ve always wanted a springer spaniel. She\u0026rsquo;s so cute. 我一直想要一只激飞狗。这只狗真可爱。\nThe number you are calling \u0026ndash; 555-8448 \u0026ndash; is no longer in service. 你打的电话号码555—8448是空号。\nThe number\u0026rsquo;s no longer in service. 这个号码现在是空号。\nOh, you poor, poor baby. You\u0026rsquo;ve lost your family. 呵，可怜的小家伙，你无家可归了。\nWe\u0026rsquo;ll find them. Don\u0026rsquo;t worry, Alexandra. We\u0026rsquo;ll find the owner. 我们会找到他们的。别担心，Alexandra。我们会找到狗的主人的。\nHow, Robbie? 怎么找，Robbie？\nLet me think. Gemma, sit. Good Gemma. Give me your paw. Good Gemma. This dog is well trained. 让我想想。Gemma，坐。乖Gemma。把脚伸出来。乖Gemma。这只狗受过很好的训练。\nShe likes you, too. 它也喜欢你。\nSo how are we going to find the owners? 那么，我们如何去找狗的主人呢？\nWith a little help from the ASPCA, the American Society for the Prevention of Cruelty to Animals. They\u0026rsquo;re the ones. We once found a cat. She was caught in the branches of our tree. And Dad called the ASPCA. They came and solved the problem. 请ASPCA——美国禁止虐待动物协会帮个忙。找他们没错。我们有一次找到一只猫，被我们家树上的树枝夹住了，爸爸打电话给ASPCA，他们来了，也解决了问题。\nRobbie, let\u0026rsquo;s call them. Robbie，我们给他们打电话。\nLet me see \u0026ndash; ASPCA\u0026hellip;. Here it is. ASPCA Animal Shelter. 555-7700. 让我瞧瞧——ASPCA……在这里。ASPCA动物收容所。555—7700。\nHello, ASPCA. 喂，ASPCA。\nHello, my name is Robbie Stewart. I have a lost dog I\u0026rsquo;d like to bring to you. How late are you open? 喂，我叫Robbie Stewart，我这里有一只失散的狗，我想送来给你们。你们那里开到多晚？\nWe\u0026rsquo;re open till nine P.M. 我们开到晚上九点。\nThank you. I\u0026rsquo;ll bring the dog over by nine. Thanks. Bye. 谢谢，我在九点之前把狗送来。谢谢，再见。\nThey\u0026rsquo;re still open? 他们现在还开着？\nThey\u0026rsquo;re open until nine o\u0026rsquo;clock. We have two and a half hours. Let\u0026rsquo;s take Gemma by there now. They\u0026rsquo;ll find the owner. 他们开到九点。还有两个半小时。我们赶紧把Gemma送去。他们会找到主人的。\nI hope so. I\u0026rsquo;m so sad to see this little dog without her family. 希望如此。看到这只狗没有家，我真难过。\nI\u0026rsquo;m sure they\u0026rsquo;ll find the owner. But if they don\u0026rsquo;t, I\u0026rsquo;ll adopt her. She\u0026rsquo;s so cute. Look at those eyes. She\u0026rsquo;s hard to resist. Don\u0026rsquo;t you just love her? 我相信他们会找到狗的主人。如果找不到，我就收养它。它真逗人喜欢。你看它的眼睛。它真是人见人爱。你能说你不喜欢它吗？\nI\u0026rsquo;d like to keep her, too. But I\u0026rsquo;ll be going home to Greece at the end of the semester. 我也愿意收留它。但是我就要回希腊去了，就在这个学期结束的时候。\nShe just wants love and affection. Come on, Robbie. Let\u0026rsquo;s get her to the animal shelter, so they can find her owners quickly. 她需要爱和关怀。走吧，Robbie。我们把它送到动物收容所，好让他们很快找到它的主人。\nDon\u0026rsquo;t worry, Gemma. We\u0026rsquo;ll get you home. It\u0026rsquo;s not easy being away from home. 别担心，Gemma。我们会送你回家的。离家独闯不容易。\nCome on, poochie. Atta girl! Let\u0026rsquo;s go. We\u0026rsquo;re off to the animal shelter. 来吧，小家伙。好女孩！我们走。我们这就去动物收容所。\nYour name? 你的名字？\nRobbie Stewart. And this is Alexandra Pappas. Robbie Stewart。这位是Alexandra Pappas。\nYour name will do, Mr. Stewart. Your address? 你的名字就够了，Stewart先生。你的住址？\n46 Linden street, Riverdale. Riverdale，林登街46号。\nWhere did you find the dog? 你在什么地方找到这只狗的？\nShe found us. 它跑到我们那里去的。\nYou tried calling the number on the collar? 是否照狗脖子上项圈的电话号码打过电话了？\nYes, but the number\u0026rsquo;s no longer in service. 打过，但那个号码是空号。\nAnd there\u0026rsquo;s no address on the dog tag? 牌子上没有地址？\nThere\u0026rsquo;s no other information. No ID number. 没有其他资料。没有识别号码吗？\nWithout that, it\u0026rsquo;s hard. 没有就难办了。\nYou will try to find the dog\u0026rsquo;s owner. 你们会尽力去找寻狗的主人吧。\nOh, we\u0026rsquo;ll try, believe me. 哦，我们会想办法，相信我。\nAnd if you don\u0026rsquo;t? 要是你找不到呢？\nYes? 什么？\nIf you don\u0026rsquo;t \u0026hellip; can I \u0026hellip; can I adopt the dog? 要是你们找不到狗的主人，我可否……，我可否收养这只狗？\nWhy, yes. If the owners don\u0026rsquo;t claim the dog in forty-eight hours, then you can apply for adoption. 当然可以。如果狗的主人在四十八小时内不认领，你就可以申请收养它了。\nHow do I do that? 我该办什么手续呢？\nYou really want to? 你真想要这样做？\nYes, I\u0026rsquo;m serious. If no one comes to claim Gemma, I\u0026rsquo;d like to adopt her. 是的，我是真心的。如果没有人来认领Gemma，我愿意收养它。\nIt\u0026rsquo;s not difficult. OK. If you want to adopt an animal, first we need to know some references. 这不难。好，如果你想收养动物，首先，我们得知道你们有哪些备询人。\nReferences? People we know? Friends, teachers\u0026hellip;. 备询人？我们认识的人？朋友，老师……\nWe need to talk to some people about you. We want to be sure that you\u0026rsquo;re responsible and that you can take good care of an animal. 我们得向一些人打听你。我们要确定你是肯负责的，而且能够好好照料动物。\nThen you have to fill out this form about your family background. 然后你要填写这份表格，关于你的家庭背景的。\nIs that it? 就这些啦？\nNo, there\u0026rsquo;s more. We need to know about your history with animals. Have you ever owned an animal? 不，还有。我们要了解你以前与动物的关连。你是否曾养过动物？\nYes. We had a cat when I was eight years old. I love cats. 是的。我八岁时养过一只猫，我喜欢猫。\nDo you have any animals now? 你现在还养着什么动物吗？\nUnfortunately, no. 很遗憾，没有。\nAnything else? 还有别的事吗？\nWe also like to know your reasons for wanting an animal. 我们还想知道你要养动物的原因。\nJust to hold it and cuddle with it. Just to have as a pet. I love animals. To have a friend \u0026ndash; a pal. You know, man\u0026rsquo;s best friend is his dog. 只不过想抱抱它、搂搂它。只是要养来当宠物。我喜欢动物。想要一个朋友——一个伙伴。你知道的，人类最好的朋友就是狗。\nAnd one thing more. If you\u0026rsquo;re under twenty-one years of age \u0026hellip; 还有一件事。如果你还不到二十一岁……\nThat\u0026rsquo;s me. 我就是这种情况。\nThen an adult must sign for you. 那就必须有一位成年人来替你签字。\nUh-oh. No problem. My parents will think it\u0026rsquo;s a good idea. I\u0026rsquo;ll be back with them. 啊哈。没问题。我的父母会觉得这是件好事。我会带他们来。\nIf the real owners don\u0026rsquo;t come to claim Gemma \u0026hellip; 如果狗的主人没认领Gemma……\nAfter forty-eight hours. But please call first. 四十八小时后。不过，请你先打电话。\nThanks for your information and for being so helpful. 谢谢你的帮助和提供的讯息。\nIt\u0026rsquo;s my pleasure. Nice talking to both of you. 我很愿意效劳。很高兴与两位交谈。\nThanks again. Bye. 再次谢谢你。再见。\nMaybe the real owners will come to claim her. Her eyes look so sad. She must really miss them. 也许狗的主人会来认领它的。它的目光那么忧郁。她准是很想主人。\nI see you\u0026rsquo;re both animal lovers. 我看得出你们都是喜爱动物的人。\nWe are. 我们是。\nGood-bye, Miss Aborn. We\u0026rsquo;ll call in a couple of days. 再见，Aborn小姐。我们两三天后给你打电话。\nGood-bye, and thanks for bringing Gemma in. 再见，谢谢你们把Gemma送来。\nI keep thinking about the dog \u0026ndash; about Gemma, alone in the animal shelter. 我一直在想那只狗——Gemma，独自在动物收容所里。\nI know. But I promise you, Alexandra, the dog is just fine. They\u0026rsquo;re very kind to the animals. 我知道。但是，我向你保证，Alexandra，那只狗会很好的。他们照料动物很细心的。\nI know they are. I mean about her being alone. Even if they are kind to Gemma, she\u0026rsquo;s still alone, without her family. 我知道他们会。我是指它很孤单。即使他们对Gemma很好，它仍是孤单单的，找不到家。\nReady, folks? Are you ready, Alexandra? 可以点菜了吗，两位？你想好了吗，Alexandra？\nYes, I\u0026rsquo;m ready. I\u0026rsquo;ll have the chef\u0026rsquo;s salad, please. 是的，我想好了。我要主厨沙拉。\nI will have a cheeseburger, medium rare, with raw onion, and french fries, please. 我要一份起士汉堡，五分熟，加生洋葱，和炸薯条。\nAnything to drink? 要喝点什么吗？\nA diet cola, please. 一份健怡可乐。\nGinger ale with lots of ice for me, thank you. 姜味汽水，多加些冰块，谢谢。\nI\u0026rsquo;ve got it. Thanks. 我都记下了。谢谢。\nAren\u0026rsquo;t you surprised that the animal shelter is so careful about finding homes for the animals? 你不觉得很讶异吗？动物收容所需要如此小心为动物寻个家。\nNo, I\u0026rsquo;m not. 不，我不觉得。\nLater: The owners claimed Gemma! 后来：主人把狗领回去了！\nThe good news is that the Levinsons have come by to pick up the dog. The bad news is, you won\u0026rsquo;t be able to adopt the dog. 好消息是Levinson夫妇已来这儿把狗领回去了。坏消息是，你不能收养那只狗了。\nThat\u0026rsquo;s OK. Come by one day and look at some of the other dogs. I\u0026rsquo;m sure there\u0026rsquo;s one for you. 没有关系。有空来一趟，看看其他狗。我相信会有你喜欢的。\nThe owners claimed Gemma? 主人把狗领回去了吧？\nThat\u0026rsquo;s right. 对的。\nI\u0026rsquo;m glad for the dog. I guess I am, too. She said if I come by, she\u0026rsquo;ll help me find another dog. 我真替那只狗高兴。我想我也一样。她说，如果我去一趟，她会帮我另外找一只狗。\nCome on. Let\u0026rsquo;s dance. 来吧，咱们跳舞。\n重难点分析 \u0026ldquo;What\u0026rsquo;s up?\u0026rdquo; / \u0026ldquo;What\u0026rsquo;s the matter?\u0026rdquo; / \u0026ldquo;Is something wrong?\u0026rdquo; — 三个询问\u0026quot;怎么了\u0026quot;的表达方式，语气从随意到关切程度递增。 \u0026ldquo;It sounded like a dog barking.\u0026rdquo; — sound like + 名词/动名词，表示\u0026quot;听起来像……\u0026quot;。 \u0026ldquo;Make yourself at home.\u0026rdquo; — 固定表达，意为\u0026quot;别客气，就像在自己家一样\u0026quot;。 \u0026ldquo;no longer in service\u0026rdquo; — 表示\u0026quot;号码已停机/不再使用\u0026quot;，是电话场景中的常用语。 \u0026ldquo;man\u0026rsquo;s best friend is his dog\u0026rdquo; — 英语谚语，意为\u0026quot;人类最好的朋友是狗\u0026quot;。 \u0026ldquo;She\u0026rsquo;s hard to resist.\u0026rdquo; — hard to + 动词，表示\u0026quot;很难……\u0026quot;，如 hard to believe（难以置信）。 \u0026ldquo;claim the dog\u0026rdquo; — claim 在此表示\u0026quot;认领\u0026quot;。 \u0026ldquo;adopt\u0026rdquo; vs \u0026ldquo;claim\u0026rdquo; — adopt 是\u0026quot;收养\u0026quot;，claim 是\u0026quot;认领（原本属于自己的东西）\u0026quot;。 \u0026ldquo;I\u0026rsquo;m serious.\u0026rdquo; — 表示\u0026quot;我是认真的\u0026quot;，严肃表态的常用语。 \u0026ldquo;So do I.\u0026rdquo; — 倒装结构，表示\u0026quot;我也一样\u0026quot;，前面肯定句用 so，否定句用 neither。 核心词汇 词汇 音标 释义 absolutely /ˌæbsəˈluːtli/ 绝对地，完全地 thoughtful /ˈθɔːtfl/ 体贴的，周到的 miss /mɪs/ 想念；错过 complain /kəmˈpleɪn/ 抱怨 bark /bɑːrk/ 狗叫 springer spaniel /ˈsprɪŋər ˈspænjəl/ 激飞猎犬（一种狗） adopt /əˈdɑːpt/ 收养 shelter /ˈʃeltər/ 收容所，庇护所 reference /ˈrefrəns/ 推荐人，备询人 responsible /rɪˈspɑːnsəbl/ 负责任的 paw /pɔː/ 爪子 collar /ˈkɑːlər/ 项圈 affection /əˈfekʃn/ 喜爱，感情 resist /rɪˈzɪst/ 抵抗，抗拒 cuddle /ˈkʌdl/ 拥抱，搂抱 口语中的应用 \u0026ldquo;Come on, you can tell me.\u0026rdquo; — 鼓励对方说出心事，非常口语化且温暖。 \u0026ldquo;What\u0026rsquo;s up?\u0026rdquo; — 比\u0026quot;What\u0026rsquo;s the matter?\u0026ldquo;更随意，朋友间常用的问候/询问方式。 \u0026ldquo;Make yourself at home.\u0026rdquo; — 客人来访时的标准用语，表示欢迎和随意。 \u0026ldquo;She\u0026rsquo;s hard to resist.\u0026rdquo; — 形容某人或某物非常可爱/有吸引力，让人无法抗拒。 \u0026ldquo;I\u0026rsquo;m serious.\u0026rdquo; — 强调自己不是在开玩笑，表达认真态度。 \u0026ldquo;Atta girl!\u0026rdquo; — \u0026ldquo;That\u0026rsquo;s a girl!\u0026ldquo;的口语缩略，用于表扬女孩/雌性动物。 \u0026ldquo;Poor baby.\u0026rdquo; — 表示同情，可用于人也可用于动物。 \u0026ldquo;No problem.\u0026rdquo; — 表示\u0026quot;没问题\u0026rdquo;，轻松应对困难。 核心练习句型 询问对方状况：\nIs something wrong? What\u0026rsquo;s the matter? What\u0026rsquo;s up? 表达想念：\nI miss them very much. She must really miss them. 表达\u0026quot;听起来像\u0026rdquo;：\nIt sounded like a dog barking. It sounds like a good idea. 表达\u0026quot;我也一样\u0026rdquo;：\nSo do I. So am I. 表达\u0026quot;很难……\u0026quot;：\nShe\u0026rsquo;s hard to resist. It\u0026rsquo;s hard to believe. 打电话用语：\nHow late are you open? The number is no longer in service. I\u0026rsquo;ll bring the dog over by nine. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-7/","summary":"\u003ch2 id=\"课文原文双语\"\u003e课文原文（双语）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eRobbie, this new Walkman is absolutely wonderful.\u003c/strong\u003e\nRobbie，这个新的随身听真棒。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRichard and Marilyn bought it for me for my birthday.\u003c/strong\u003e\n这是Richard和Marilyn送给我的生日礼物。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eThey\u0026rsquo;re so thoughtful.\u003c/strong\u003e\n他们真周到。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eYou are very lucky, Robbie, to have such a nice family.\u003c/strong\u003e\nRobbie，你真幸运，拥有一个这样温馨的家。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eIs something wrong, Alexandra?\u003c/strong\u003e\nAlexandra，你怎么了？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eNo, nothing.\u003c/strong\u003e\n没有，没什么。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eYes, there is. I can tell. What\u0026rsquo;s the matter?\u003c/strong\u003e\n有，你有心事，我能觉察到。到底发生了什么事？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCome on, you can tell me. What\u0026rsquo;s up?\u003c/strong\u003e\n说吧，告诉我。有什么事？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI don\u0026rsquo;t know. Something\u0026rsquo;s wrong.\u003c/strong\u003e\n我也说不上来。有点不对劲。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eOK, let\u0026rsquo;s talk.\u003c/strong\u003e\n好吧，我们就来谈谈。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第7课：The Lost Dog（走失的狗）"},{"content":"课文原文（双语） Molly, I need your special talent for handling special matters. Molly，我需要你处理特殊状况的特殊才能。\nLike what special matters? 什么样的特殊状况？\nWell, I have a scheduling problem. 嗯，我在排工作方面遇到困难。\nYes? 是吗？\nI have three tonsillectomies set for Friday with Dr. Earl. 我排好要和Earl大夫在星期五进行三个扁桃腺切除手术。\nYes? 是吗？\nI need to fit a fourth operation into his schedule. And \u0026hellip; I know you can do it. 我得在他的工作表上再加第四个手术，这……我知道你办得到。\nWho\u0026rsquo;s the patient? 病人是谁？\nCarl Herrera. Carl Herrera。\nThe boy has infected tonsils, and we should remove them as soon as possible. 这孩子的扁桃腺受到感染了，我们要尽快把它切除。\nWell, I\u0026rsquo;ll try to arrange the schedule, Dr. Stewart. But it\u0026rsquo;s not going to be easy. 好吧，我尽力去安排，Stewart大夫。不过，这事可不容易。\nI know you\u0026rsquo;ll be able to take care of it. 我知道你能够处理好这件事。\nWell, Mrs. Herrera, Carl will be perfectly fine after we remove his tonsils. 好，Herrera太太，切除扁桃腺之后，Carl会完全恢复健康的。\nThank you for your reassurance, Dr. Stewart. He\u0026rsquo;s had so many colds and sore throats recently. 谢谢你消除了我的疑虑，Stewart大夫。他最近常常感冒喉咙痛。\nWell, it\u0026rsquo;s a very easy operation, Carl. You won\u0026rsquo;t feel a thing. 这是个很简单的手术，Carl。你一点也没有感觉。\nBut when do they do it? 但是什么时候动手术？\nThis Friday. 这个星期五。\nBut Saturday\u0026rsquo;s my birthday. 但星期六是我的生日。\nWell, we could reschedule the operation, Mrs. Herrera, but I don\u0026rsquo;t want to put it off too long. 这样吧，我们可以重新安排手术，Herrera太太。但我希望不要拖得太久。\nNo, I think it\u0026rsquo;s important to do it now. 不，我觉得还是应该现在动手术。\nWe can have a birthday party for you, Carl, when you come out of the hospital. 我们可以给你举行生日派对，Carl，在你病好出院后。\nBut it won\u0026rsquo;t be on my birthday. 但是那就不是在我生日那天了。\nBut your health is more important, Carl. Believe me. 可是你的身体更重要，Carl，相信我的话。\nI don\u0026rsquo;t want my tonsils out. 我不想把扁桃腺切除。\nNurse Baker, would you come in, please? Baker护士，请你来一下，好吗？\nHello, Mrs. Herrera. Hi, Carl, how you doing? 你好，Herrera太太，嗨，Carl，你怎么样啦？\nI don\u0026rsquo;t want my tonsils out. 我不想切除扁桃腺。\nCome with me, Carl. You and I will talk this over. 跟我来，Carl。我俩商量商量。\nShe has a special way with kids. 她对孩子很有一套。\nShe sure does. 她的确如此。\nCarl, does your throat hurt? Carl，你喉咙痛吗？\nYes. 是的。\nOK. Do you want to get better? 好，你想把病治好吗？\nYes. 是的。\nOK. We want you to get better, too. You\u0026rsquo;ll have your tonsils out tomorrow, and you won\u0026rsquo;t get so many colds anymore. 我们也希望你能恢复健康。明天，你的扁桃腺一切除，你就不会老患感冒了。\nBut if I have my tonsils out tomorrow, I\u0026rsquo;ll miss my birthday party on Saturday. 但是，我如果明天切除扁桃腺，就会错过星期六我的生日派对。\nI know. It\u0026rsquo;s a problem, isn\u0026rsquo;t it? Let me try to work something out. 我知道，这确实是个问题，不是吗？让我想个办法。\nWhat? 什么办法？\nI have to think about it. 我得想一想。\nYou\u0026rsquo;re fooling me. 你想骗我。\nOh, I\u0026rsquo;m not, Carl. Give me a chance to think about it, and I\u0026rsquo;ll come up with something. 噢，不骗你，Carl。给我一个机会想一想，我会想出个办法的。\nA surprise? 一个惊喜？\nMaybe. But you just put on your pajamas and robe, and I\u0026rsquo;ll think of a surprise. 也许是。你先把这睡衣裤穿上，我来想出一个惊喜。\nWill it hurt? 会痛吗？\nNo. 不痛。\nThere are other boys and girls here, and they\u0026rsquo;re having their tonsils out. You\u0026rsquo;ll meet them. 还有其他男孩女孩在这里，他们也将切除扁桃腺，你会见到他们的。\nI don\u0026rsquo;t want to. 我不想见。\nChange your clothes, Carl. Everything will be just fine. 把衣服换了，Carl，一切都会安好的。\nPlaying charades in the hospital room: （在病房里玩哑谜游戏：）\nDo you know how to play charades? 你们会打哑谜吗？\nFrank, you\u0026rsquo;ve never played charades? Frank，你从来没玩过哑谜？\nNope. 没有。\nCarl, you\u0026rsquo;re sure you\u0026rsquo;ve never played? Carl，你肯定你从来没玩过吗？\nOK, Betty, Tim, and Frank. We\u0026rsquo;re going to play charades. Frank, you can learn as we go. And, Carl, you join in at any time. 好，Betty、Tim、Frank，我们来玩哑谜。Frank，我们玩，你跟着学。还有Carl，你随时都可以加入。\nOK, let me think. OK, I\u0026rsquo;ve got one. 好，让我想想。好，我有了。\nAll right. 行了。\nA movie! 电影！\nA movie! Right. A movie. 电影！对。电影。\nOK. Six words. It has six words. 好。六个字。有六个字。\nThat\u0026rsquo;s easy. I can play. 这很容易。我也能玩。\nGood. OK. We\u0026rsquo;ve got a movie. The title \u0026hellip; Six words. 好的。我们知道是一部电影，名字……有六个字。\nRight. First word \u0026hellip; 对。第一个字……\nSounds like. 声音像……\nSounds like \u0026hellip; You got that part right. 声音像……你们这一部分猜对了。\nYes. Sounds like \u0026hellip; 是的。声音像……\nSounds like what? 声音像什么？\nSounds like no. 声音像\u0026quot;no\u0026quot;。\nAbsolutely right, Frank. Sounds like no. 完全正确，Frank。声音像\u0026quot;no\u0026quot;。\nOK. We\u0026rsquo;ve got a movie. Six words. The first word sounds like no. 好，我们知道是一部电影。六个字。第一个字音像\u0026quot;no\u0026quot;。\nRow. Row. Row。Row。\nGo. Go。\nNope. 不对。\nShow. Show。\nThat\u0026rsquo;s it\u0026ndash;show. 就是它——show。\nNo \u0026hellip; OK \u0026hellip; 不是……好……\nSnow. 雪。\nAbsolutely right, Betty. Sounds like no \u0026ndash; snow. 完全正确，Betty。音像\u0026quot;no\u0026quot;——\u0026ldquo;snow\u0026rdquo;。\nOK, a movie. Six words. The first word is snow. 好，一部电影。六个字。第一个字是\u0026quot;雪\u0026quot;。\nThis is fun. 很有意思。\nOh, OK. The fifth word. 噢，好了。第五个字。\nRight, fifth word. 对，第五个字。\nSeven? 七？\nAbsolutely right. Very good. The fifth word is seven. 完全正确。很好。第五个字是七。\nOK, we\u0026rsquo;ve got a movie. The first word is snow. Fifth word, seven. 好，我们知道有部电影。第一个字是\u0026quot;snow\u0026quot;。第五个字是\u0026quot;seven\u0026quot;。\nI got it! I got it! Snow White and the Seven Dwarfs. I got it. 我知道了！我知道了！Snow White and the Seven Dwarfs（白雪公主和七个小矮人）。我猜对了。\nFrank, you got it. Betty, you had it, but you didn\u0026rsquo;t say it. Frank，你猜对了。Betty，你知道答案，但是你没有说出来。\nI knew it. 我也知道了。\nCarl, now you know charades. Why don\u0026rsquo;t you join us? Carl，现在你知道什么是哑谜了。你何不加入我们的游戏呢？\nI don\u0026rsquo;t like charades. It\u0026rsquo;s for babies. 我不喜欢哑谜。这是给婴儿玩的。\nOh, I like it. 噢，我喜欢哑谜。\nWell, they\u0026rsquo;re babies. 嗯，他们都是婴儿。\nYou\u0026rsquo;re a sore loser. 你是个输不起的人。\nYeah. 对。\nNo arguing. Save your voices. Between now and tomorrow you\u0026rsquo;re all going to have your tonsils out. And you won\u0026rsquo;t be able to speak for a while. So save your voices till then. 别争了。留着点嗓子。从现在起到明天，你们都要切除扁桃腺。有一段时间，你们没有办法讲话。所以，留着点嗓子。\nHi, gang. Hi, everybody. 嗨，各位。\nWell, what\u0026rsquo;s going on? 噢，怎么啦？\nI sure am glad to see you, Dr. Stewart. This is a rough group. 真高兴见到你来，Stewart大夫。这是一群粗野的孩子。\nI didn\u0026rsquo;t want to play charades, so they\u0026rsquo;re angry at me. 我不想玩哑谜，所以他们生我的气。\nWhy don\u0026rsquo;t you want to play? 你为什么不玩？\nBecause I don\u0026rsquo;t want to be here. I don\u0026rsquo;t want my tonsils out. 因为我不想待在这里。我不想切除扁桃腺。\nWhy not? 为什么不想？\nBecause my birthday is tomorrow. My mother promised me a birthday party with a clown. 因为明天是我的生日。我妈妈答应给我办一个有小丑的生日派对。\nBut you can have one when you go home, Carl. 但你回去以后还可以办一个呀，Carl。\nBut my birthday is tomorrow! 但是我的生日就在明天！\nI\u0026rsquo;m sorry, Carl. Carl, you\u0026rsquo;ll have your party when you go home. 很抱歉，Carl。Carl，你回去以后就可以开个生日派对了。\nBut it won\u0026rsquo;t be on my birthday! And you promised me a surprise. 但那就不是在我生日那天了！而且你答应给我一个惊喜。\nDr. Stewart cheers up the kids with ice cream: （Stewart大夫用冰淇淋让孩子们开心起来：）\nIt hurts, doesn\u0026rsquo;t it? You\u0026rsquo;ll feel better tomorrow, Betty, believe me. Only one day, and it won\u0026rsquo;t hurt as much. 会痛，是不是？明天你就会好些，Betty，相信我。只要再一天，就不会像现在这样痛了。\nDo you feel like eating? Having some dinner? 你想吃东西吗？吃点晚餐？\nOh, don\u0026rsquo;t look so sad. Let me tell you about your dinner. It\u0026rsquo;s ice cream. Ice cream. All kinds of flavors. Chocolate. Strawberry? Vanilla? Vanilla, too? 噢，别显得那么无精打采。我告诉你晚餐是什么。是冰淇淋喔。冰淇淋。各种口味的都有。巧克力的。草莓的？香草的？香草的也要？\nI see you\u0026rsquo;re feeling better already, Betty. So you will have dinner? 我看得出来，你已经感觉好些了，Betty。那么你要吃晚饭喽？\nOK, honey, we\u0026rsquo;ll see to it that you have strawberry and vanilla ice cream. Just rest now. You need some rest to help you get better quickly. 好，亲爱的，我们一定设法让你吃到草莓和香草的冰淇淋。现在好好休息。你需要多休息，好让你很快恢复。\nHi, Frank. How you doing? 嗨，Frank。你怎么样了？\nOh, come on now. You\u0026rsquo;re a big boy. It doesn\u0026rsquo;t hurt that much, does it? 噢，别这样了。你是个大孩子了。这并没有那么痛，是吗？\nOh, I\u0026rsquo;m sorry it hurts so much, and you won\u0026rsquo;t be able to have dinner. You\u0026rsquo;re just going to have to have ice cream. Yes, ice cream. Lots of flavors. Want to hear them? Chocolate? Then chocolate it is. One scoop or two? Three scoops? Then three it will be. 啊，我很抱歉，你那么痛，你没有办法吃晚饭了。你只好得吃冰淇淋了。对，冰淇淋。有很多种口味的。你想听听吗？巧克力？那就吃巧克力的。一勺还是两勺？三勺？好，就三勺。\nYou want three scoops also? Chocolate, too? Well, I see you\u0026rsquo;re feeling better. Well, at least you\u0026rsquo;re acting like you feel better. Three scoops of chocolate ice cream for Tim coming up. 你也要三勺？也是巧克力的？嗯，我看得出你感觉好些了。不过，至少你表现得好像你感觉好多了。给Tim的三勺巧克力冰淇淋马上送来。\nHi, Carl. How you doing? I know it hurts. But it\u0026rsquo;ll be better tomorrow. In the meantime, what would you like? 嗨，Carl。你怎么样？我知道那里痛。但是明天就会好多了。对了，你想要点什么？\nSurprise. 惊喜。\nA surprise? I promised you a surprise, didn\u0026rsquo;t I? And it wasn\u0026rsquo;t just ice cream, was it? Your birthday is tomorrow, isn\u0026rsquo;t it? Well, maybe, just maybe, there will be a surprise. But first you have to smile. I just want to see one smile from you. No smile, no surprise. That\u0026rsquo;s the deal. No smile, no surprise. If you want a surprise, then you\u0026rsquo;ve got to smile first. 惊喜？我答应过要给你一件惊喜，不是吗？这惊喜还不仅是冰淇淋，对吗？你明天生日，是吗？嗯，或许，只是或许，会有一项让你惊喜的事。但首先你得笑一笑。我就想看你笑一个。不笑，就不给你惊喜。这是交换条件。不笑，就没有惊喜。如果你想要一项惊喜的事，你就得先笑一笑。\nHow you all doing? Well, I\u0026rsquo;m glad you\u0026rsquo;re feeling better because we have a little surprise for you today. It\u0026rsquo;s Carl\u0026rsquo;s birthday, and we have Popo the Clown to entertain you. And here he is\u0026ndash;Popo the Clown. Happy birthday, Carl. Happy birthday. 你们大家怎么样？我很高兴各位感觉好些，因为今天我们要给各位一项惊喜。今天是Carl的生日，我们请了小丑Popo来给大家表演助兴。这位就是小丑Popo。生日快乐，Carl。生日快乐。\nAll right, everybody. OK, Carl. It\u0026rsquo;s your birthday. What\u0026rsquo;s your wish? What would you like? Hmm? You want to play charades? 各位，你们好。好的，Carl。今天是你的生日。你有什么愿望？你想要什么？嗯？你想玩哑谜？\n重难点分析 \u0026ldquo;You won\u0026rsquo;t feel a thing.\u0026rdquo; — 口语中表示\u0026quot;你一点感觉都不会有\u0026quot;，用于安慰即将接受手术或打针的人。 \u0026ldquo;She has a special way with kids.\u0026rdquo; — have a way with\u0026hellip; 表示\u0026quot;对……有一套，善于处理……\u0026quot;。 \u0026ldquo;talk this over\u0026rdquo; — 表示\u0026quot;商量、讨论\u0026quot;，是 talk over 的用法。 \u0026ldquo;work something out\u0026rdquo; — 表示\u0026quot;想出办法，解决某个问题\u0026quot;。 \u0026ldquo;come up with something\u0026rdquo; — 表示\u0026quot;想出某个主意/办法\u0026quot;。 \u0026ldquo;You\u0026rsquo;re a sore loser.\u0026rdquo; — 固定表达，指\u0026quot;输不起的人\u0026quot;。 \u0026ldquo;Save your voices.\u0026rdquo; — 表示\u0026quot;留着嗓子/省着点力气说话\u0026quot;。 \u0026ldquo;Sounds like\u0026rdquo; — 在猜谜游戏中表示\u0026quot;听起来像……\u0026quot;，用于提示同音词。 \u0026ldquo;See to it that\u0026hellip;\u0026rdquo; — 表示\u0026quot;确保/设法做到……\u0026quot;。 \u0026ldquo;No smile, no surprise.\u0026rdquo; — 条件句的口语简化形式，相当于\u0026quot;If you don\u0026rsquo;t smile, there will be no surprise.\u0026quot; 核心词汇 词汇 音标 释义 tonsillectomy /ˌtɑːnsəˈlektəmi/ 扁桃腺切除术 infected /ɪnˈfektɪd/ 感染的 remove /rɪˈmuːv/ 切除，移除 schedule /ˈskedʒuːl/ 日程安排；安排时间 reschedule /ˌriːˈskedʒuːl/ 重新安排 reassurance /ˌriːəˈʃʊrəns/ reassurance，消除疑虑 sore throat /sɔːr θroʊt/ 喉咙痛 charades /ʃəˈreɪdz/ 哑谜猜字游戏 clown /klaʊn/ 小丑 entertain /ˌentərˈteɪn/ 娱乐，助兴 scoop /skuːp/ 一勺（冰淇淋） flavor /ˈfleɪvər/ 口味 surprise /sərˈpraɪz/ 惊喜 pajamas /pəˈdʒɑːməz/ 睡衣裤 robe /roʊb/ 浴袍，睡袍 口语中的应用 \u0026ldquo;How you doing?\u0026rdquo; — 非正式的\u0026quot;How are you doing?\u0026quot;，日常问候。 \u0026ldquo;You won\u0026rsquo;t feel a thing.\u0026rdquo; — 安慰他人时的常用语，特别在医疗场景。 \u0026ldquo;I\u0026rsquo;ve got one.\u0026rdquo; — 表示\u0026quot;我想到一个了\u0026quot;，在猜谜或想点子时使用。 \u0026ldquo;That\u0026rsquo;s the deal.\u0026rdquo; — 表示\u0026quot;就这么定了/这是条件\u0026quot;。 \u0026ldquo;See to it that\u0026hellip;\u0026rdquo; — 正式但常用的表达，表示确保某事发生。 \u0026ldquo;What\u0026rsquo;s going on?\u0026rdquo; — 询问\u0026quot;发生什么事了？\u0026quot;。 \u0026ldquo;Believe me.\u0026rdquo; — 强调自己说的是真的，让对方相信自己。 \u0026ldquo;Nope.\u0026rdquo; — \u0026ldquo;No\u0026quot;的口语说法。 核心练习句型 表达\u0026quot;对……有一套\u0026rdquo;：\nShe has a special way with kids. He has a way with animals. 表达\u0026quot;想出办法\u0026quot;：\nLet me try to work something out. I\u0026rsquo;ll come up with something. 表达\u0026quot;确保……\u0026quot;：\nWe\u0026rsquo;ll see to it that you have ice cream. See to it that the door is locked. 条件句的口语简化：\nNo smile, no surprise. No pain, no gain. No money, no honey. 表达\u0026quot;听起来像\u0026quot;：\nSounds like no. That sounds like a good idea. 表达\u0026quot;宁愿/想要\u0026quot;：\nWhat would you like? I\u0026rsquo;d like ice cream. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-8/","summary":"\u003ch2 id=\"课文原文双语\"\u003e课文原文（双语）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eMolly, I need your special talent for handling special matters.\u003c/strong\u003e\nMolly，我需要你处理特殊状况的特殊才能。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eLike what special matters?\u003c/strong\u003e\n什么样的特殊状况？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWell, I have a scheduling problem.\u003c/strong\u003e\n嗯，我在排工作方面遇到困难。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eYes?\u003c/strong\u003e\n是吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI have three tonsillectomies set for Friday with Dr. Earl.\u003c/strong\u003e\n我排好要和Earl大夫在星期五进行三个扁桃腺切除手术。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eYes?\u003c/strong\u003e\n是吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI need to fit a fourth operation into his schedule. And \u0026hellip; I know you can do it.\u003c/strong\u003e\n我得在他的工作表上再加第四个手术，这……我知道你办得到。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWho\u0026rsquo;s the patient?\u003c/strong\u003e\n病人是谁？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCarl Herrera.\u003c/strong\u003e\nCarl Herrera。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eThe boy has infected tonsils, and we should remove them as soon as possible.\u003c/strong\u003e\n这孩子的扁桃腺受到感染了，我们要尽快把它切除。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第8课：The Tonsillectomy（扁桃腺手术）"},{"content":"课文原文（双语） Who is it? 是谁？\nDad. 爸爸。\nCome on in, Dad. 请进来，爸爸。\nI thought you might be hungry. I brought you a chicken sandwich and a glass of milk. 我想你大概饿了。我替你带来一份鸡肉三明治和一杯牛奶。\nI am hungry. Thanks, Dad. What time is it, anyway? 我真是饿了，谢谢，爸爸。几点了？顺便问一下。\nTen o\u0026rsquo;clock. 十点钟。\nWhat are you working on? 你在干什么？\nI\u0026rsquo;m writing a story for the high-school paper. 我正在为高中校刊写一篇东西。\nCan\u0026rsquo;t you finish it tomorrow? 你明天完成它不行吗？\nNo, I have to turn it in in the morning. 不行，明天上午我得交出去。\nWhat\u0026rsquo;s it about? 是关于什么的？\nI\u0026rsquo;m writing an article on the feelings about graduation. 我在写一篇关于毕业感想的文章。\nAnd \u0026hellip; how do you feel? 那……你的感觉是什么？\nMe? A little scared. And excited, too. 我吗？有点害怕。也很兴奋。\nI felt the same way. The scary part\u0026rsquo;s leaving home and moving to college. 我当时也有这种感受。害怕的是要离开家搬到学校去。\nOh, leaving home is part of growing up. 呵，离开家是成熟过程的一部分。\nWell, don\u0026rsquo;t work all night. 好啦，别通宵工作。\nI don\u0026rsquo;t mind. I enjoy writing. 我不在乎。我喜欢写作。\nWell, maybe you should think about becoming a writer. 那么，也许你应考虑成为一名作家。\nMaybe I should. 也许我该这样。\nYou have lots of time to decide. 你有很多时间做决定。\nThat\u0026rsquo;s the worst part\u0026ndash;making decisions. 最伤脑筋的是——作决定。\nYou\u0026rsquo;ll be OK. Good night, Son. 你不会有问题的。晚安，孩子。\nGood night, Dad. 晚安，爸爸。\nThe next morning: （第二天早上：）\n\u0026ldquo;Hail to the victors valiant, Hail to the conquering heroes, Hail, Hail to Michigan, The champions of the West!\u0026rdquo; \u0026ldquo;向勇敢的胜利者致敬，向进取的英雄们致敬，致敬，向Michigan致敬，西部的优胜者！\u0026rdquo;\nAh, good morning, Robbie. 啊，早安，Robbie。\nGood morning, Dad. 早安，爸爸。\nHow\u0026rsquo;s my grandson? 我的孙子怎样啦？\nFine, Grandpa. Fine! 很好，爷爷，很好！\nWhat\u0026rsquo;s all the cheering about? Did the University of Michigan win another football game? 这么高兴是为什么？是不是Michigan大学又赢得了一场足球赛？\nBetter than that. Tell him, Philip. 比那种事更值得高兴。告诉他，Philip。\nI just spoke with Charley Rafer. 我刚和Charley Rafer通了电话。\nWho\u0026rsquo;s Charley Rafer? 谁是Charley Rafer？\nHe\u0026rsquo;s the Dean of Admissions for the University of Michigan. And it turns out he\u0026rsquo;s a classmate of Philip\u0026rsquo;s. We were both on the tennis team. 他是Michigan大学的新生注册主任。有意思的是，他和Philip是同班同学。我们都是网球队的队员。\nGreat! 真棒！\nIt is great. He\u0026rsquo;s going to be in New York tomorrow to interview applicants for admission. And he\u0026rsquo;s agreed to fit you into his schedule. 的确是太好了。明天，他要在纽约与申请入学者面谈。他同意明天把你安排进他的面谈名单里。\nBut I may not want to go to Michigan. 但是，我可能不去Michigan。\nIt\u0026rsquo;s one of the best schools in the country, Robbie. I studied medicine there. Your grandfather went to the Engineering School there. 这是全国最好的大学之一，Robbie。我在那里学医学。你爷爷进那里的工学院。\nI know that, but \u0026hellip; 这我知道，但是……\nYou said you wanted to be a doctor like your father. 你说过你希望像爸爸一样成为一名医生。\nNot exactly. 还不一定。\nYou couldn\u0026rsquo;t pick a finer medical school than Michigan. 你再也找不到一所比Michigan大学更好的医学院了。\nYes, I know that. 是的，我知道。\nLet\u0026rsquo;s meet with Charley at the university club. Ten o\u0026rsquo;clock tomorrow morning. It doesn\u0026rsquo;t mean you\u0026rsquo;re going to Michigan. It doesn\u0026rsquo;t mean you have to be a doctor. But the interview will be good experience for you. 我们就去大学俱乐部见见Charley吧。明早十点钟。这并不是说你就要去Michigan大学。这并不意味着你一定要当医生。但这次面谈对你来说是一次很好的经验。\nIn that case, it\u0026rsquo;s OK. 这么说，我就去。\nDad, growing up means making my own decisions, doesn\u0026rsquo;t it? 爸爸，长大了意味着我自己能做决定，对吗？\nYou\u0026rsquo;re right, Robbie. But, like your Grandpa suggested, have the interview. And then make your own decision. 你说得对，Robbie。但是，照你爷爷所建议的，去参加这次面谈。然后你自己做决定。\nThat sounds fine. 这样听起来蛮好的。\nI know it\u0026rsquo;s sudden, Robbie, but this is an important opportunity. We\u0026rsquo;ll head down there first thing tomorrow morning. OK? 我知道这件事很突然，Robbie，但这是一次很重要的机会。明早第一件事就是去那里，好吗？\nSure, Dad. 一定，爸爸。\nI want you to know something, Son. I\u0026rsquo;m \u0026hellip; very proud of you. 我希望你知道一件事，孩子。我很……以你为荣。\nThanks, Dad. 谢谢你，爸爸。\nWell, I\u0026rsquo;ve got an appointment at the hospital. I\u0026rsquo;ll see you all at dinnertime. 好啦，我在医院有事。吃晚饭时见面了。\nBye, Dad. 再见，爸爸。\nIs something still wrong, Robbie? 还有什么不对的地方吗，Robbie？\nI\u0026rsquo;ll be OK. Going away to college for the first time always makes one a little nervous. 没什么。第一次离家上大学总是让人有些紧张。\nI guess so. I\u0026rsquo;ll be OK. I just need time to think. 我猜是这样。我会适应的，我只是需要时间思考。\nAt the university club: （在大学俱乐部：）\nSorry, Robbie. Sorry to be late this morning, but, well, we\u0026rsquo;ve still got some time for a cup of coffee. I can\u0026rsquo;t wait to see my old pal Charley Rafer. 对不起，Robbie，对不起，今天早上迟了点，不过，我们还有喝杯咖啡的时间。我真想早点见到老朋友Charley Rafer。\nNeither can I. 我也一样。\nSo you thought about it, huh? 你考虑过了吗？\nYes, I have, Dad. 是的，我考虑了，爸爸。\nWell, I\u0026rsquo;m glad. I knew you\u0026rsquo;d realize that this interview could be an important experience for you. 好，我很高兴。我知道你会体会到这次面谈是一次很好的经验。\nI came to that conclusion. 我的结论也是这样。\nThat\u0026rsquo;s very wise, Robbie. Very wise. Now let\u0026rsquo;s head off for the city and the university club. 这是很明智的，Robbie。非常明智。现在，我们进城去，到大学俱乐部。\nThanks, Dad. 谢谢，爸爸。\nThanks \u0026hellip; for what? 谢什么？\nThanks for hearing me out. And \u0026hellip; 谢谢你听我的意见，而且……\nAnd \u0026hellip;? 而且……？\nAnd thanks for being such an understanding father. 而且谢谢你是这样一位善于了解我的父亲。\nWell, thank you, Robbie. Thank you. 嗯，谢谢你，Robbie，谢谢你。\nPhilip Stewart! It\u0026rsquo;s great to see you! Philip Stewart！真高兴见到你！\nCharley Rafer\u0026ndash;you look as young as ever. Charley Rafer——你还像当年那样年轻。\nYou must be Robbie. 你就是Robbie吧。\nHi. 你好。\nYes, this is my youngest son Robbie. Robbie, I want you to meet one of the best tennis players on the Michigan team\u0026ndash;Charley Rafer. 是的，这是我的小儿子Robbie。Robbie，我要你见过当年Michigan球队最好的网球选手——Charley Rafer。\nNice to meet you, Dean Rafer. 很高兴见到你，Rafer主任。\nWell, are you as good a tennis player as your dad? 嗯，你是否像爸爸那样是一名优秀的网球选手呢？\nNo, I\u0026rsquo;m not very good at it. 不，我网球不行。\nFrankly, neither was I. Charley was the star of the team. 坦白的说，我当年也不好。Charley是当时队里的明星。\nYeah. Thanks. 凑数的，谢谢你。\nWell, how\u0026rsquo;re you been, Philip? 嗯，这些年来怎么样，Philip？\nOh, working too hard. 噢，工作太累人了。\nDoesn\u0026rsquo;t show. 看不出来。\nHow\u0026rsquo;s Ellen? Ellen怎么样？\nFine, thank you. 很好，谢谢。\nAnd how\u0026rsquo;s Marge? Marge怎么样？\nShe\u0026rsquo;s still giving the toughest English history exams in the school and loving every minute of it. 她仍用最艰深的英国史试题考学生，在学校里，且乐此不疲，时时如此。\nAnd speaking of minutes, I have interviews until noon, so why don\u0026rsquo;t we get right to work? 谈到时间，我从现在到中午，有一系列的面谈，我们现在就开始工作，好吗？\nCan you have lunch with us later? 你能与我们一起共进午餐吗？\nI\u0026rsquo;d love to, Philip, but I\u0026rsquo;m afraid I can\u0026rsquo;t. I\u0026rsquo;m only here two days, and I have interviews with twenty-six applicants. 我很想，Philip，但是恐怕不行。我只有两天时间，而要面谈的申请人有二十六位。\nI understand. 我能了解。\nWell, thanks. I\u0026rsquo;ll wait outside. Good luck, Son. 噢，谢了。我到外面等。祝你好运，孩子。\nDid you bring your transcript from high school? 你把高中的成绩单带来了吗？\nYes, sir. Right here. 带来了，先生。在这里。\nThank you. Please sit down. 谢谢。请坐下。\nI see under \u0026ldquo;activities\u0026rdquo; that you\u0026rsquo;ve been writing for the school paper. 我注意到在\u0026quot;活动\u0026quot;项目中提到你为校刊写文章。\nYes, sir. 是的，先生。\nWhat kinds of articles have you written? 你写过一些什么样的文章？\nAll kinds\u0026ndash;sports, editorials, theater reviews. You name it, I\u0026rsquo;ve written it. 各种各样的——体育，社论，剧评。你说得出的，我都写过。\nHmmm. Well, have you ever thought of becoming a journalist? A professional writer? 嗯，好，你是否想过成为一名新闻从业人员？职业写作人员？\nNot until recently. 最近才考虑到。\nMichigan has a fine School of Journalism. Michigan大学有一个很好的新闻学院。\nYes, I know that. 是的，我知道。\nYou seem to have some reservations. 看起来你还有些犹豫。\nI\u0026rsquo;m a little uncertain. 我有点犹豫不决。\nIt\u0026rsquo;s been very nice talking to you. 很高兴与你交谈。\nNice talking to you, sir. 我也很高兴与您交谈，先生。\nOne piece of advice. The most important thing is for you to decide your own future. 给你一句忠告。最重要的是你要自己决定自己的未来。\nYes, sir. Good-bye, Dean Rafer. 是的，先生。再见，Rafer主任。\nGood-bye, Robbie. Good luck. 再见，Robbie，祝你好运。\nLater, Robbie talks with his friend Mike: （后来，Robbie与朋友Mike交谈：）\nI had an interview today, too. I had a great interview with Admissions at Columbia University. 我今天也参加了一次面谈。我参加了一次很精彩的面谈，与Columbia大学的招生人员。\nReally? What did they say? Will you get into the school? 真的？他们说什么？你会被录取吗？\nWell, they didn\u0026rsquo;t say anything for sure. But I figure that with my grades and with my personality, I\u0026rsquo;ll have no problem. 嗯，他们没有任何确切的答覆。但我想，凭我的成绩和我的品行，我不会有问题。\nColumbia\u0026rsquo;s a terrific school. What are you going to do? Columbia是一所很棒的学校。你打算读什么？\nDo? I don\u0026rsquo;t know. I also applied to NYU. 读什么？我不知道。我还申请了纽约大学。\nYou sound excited about Columbia. What\u0026rsquo;s your problem, Mike? 听起来你对Columbia大学跃跃欲试？你现在问题在哪里，Mike？\nIndecision. Indecision. It\u0026rsquo;s not easy, and this is an important decision we have to make. 下不了决心，下不了决心。实在不容易，这又是我们必须做的一个重大决定。\nWhat about you? How was your interview with Michigan? 你呢？你跟Michigan大学的人面谈得如何？\nThe interview was fine. It\u0026rsquo;s a great college. 面谈得很好。那是一所好大学。\nIt is. My father would like me to go there. He and my Grandpa both went there. Great medical school, too. 是的。我爸爸希望我去那儿。他和我爷爷都曾在那里读书。而且有很好的医学院。\nI know. You can follow in your father\u0026rsquo;s footsteps. 我知道。你可以跟随你父亲的足迹。\nAh! I\u0026rsquo;d like to follow in my own footsteps, Mike. 噢，我想走自己的路，Mike。\nWhat do you want to study? 你想学什么？\nI\u0026rsquo;ve been thinking. I think I want to study journalism to be a reporter\u0026ndash;a newspaperman. 我一直在考虑。我想学新闻学，将来当一名记者，一个新闻从业人员。\nYou do a pretty good job on the Riverdale High School paper. 你在Riverdale高中校刊做得有声有色。\nAnd I\u0026rsquo;ve been thinking about it a lot lately. 最近我一直就此事想了很多。\nHave you discussed it with your parents? 你和父母商量过了吗？\nNo. But I have to. 没有，但有此必要。\nRobbie talks with his father: （Robbie与父亲谈话：）\nHi, Son. Is everything all right? 嗨，孩子，一切都顺利吗？\nHi, Dad. Everything\u0026rsquo;s fine. I was just waiting for you to get home so we could talk. 嗨，爸爸。一切都好。我正等你回来，好跟你谈谈。\nAnything special you want to talk about? 有什么特殊的事要谈吗？\nThere is, Dad. 有，爸爸。\nI\u0026rsquo;m listening. 那就说吧。\nWell, I know you and Mom have given up a lot to save money for my college tuition. 嗯，我知道你和妈妈省吃俭用，存钱准备我的大学学费。\nWe want you to go to college, Robbie. 我们希望你上大学，Robbie。\nI know. I do. But? 我知道。我会的。那还有什么事？\nWell, I\u0026rsquo;ve thought a lot about which college, and one of them is Columbia. 嗯，我为了上哪一所大学想了很多，其中一所是Columbia大学。\nColumbia? Why Columbia? Columbia？为什么要去Columbia？\nFirst, they have an excellent School of Journalism. 首先，那里有个很优秀的新闻研究所。\nThey do. And your friends are planning to go to Columbia? 是的。而且你的朋友们也准备上Columbia大学，对吗？\nThat\u0026rsquo;s only part of it. It\u0026rsquo;s complicated. I\u0026rsquo;ll try to explain. Mike and I had a hamburger this afternoon, and we talked. 这只是一部分原因。原因很复杂。我会尽量给你解释。今天下午，Mike和我一起吃汉堡，一起讨论。\nYes? 是吗？\nWell, we talked about a lot of things. He applied to Columbia, and his interview was very successful. He thinks he\u0026rsquo;ll be accepted, and he really wants to go there. 嗯，我们谈了很多。他申请了Columbia大学，他的面谈很成功。他觉得他会被录取，他确实很想去那里。\nDean Rafer called me today. He told me he was very impressed with you. Rafer主任今天打电话给我。他告诉我他对你印象很好。\nHe\u0026rsquo;s a nice man. He was very kind. 他是个好人，对人和蔼。\nHe told me you had some doubts about wanting to go to Michigan. 他告诉我你对上Michigan大学有些疑虑。\nYes. I do. I\u0026rsquo;m just not sure about what I want to do. 是的，我有疑虑。我不知道该读什么？\nThat\u0026rsquo;s OK. You understand? 不去不要紧。你能谅解？\nLet me tell you something, Robbie. Something that might be surprising to you. 让我告诉你一件事，Robbie。一件也许会让你吃惊的事。\nWhat? Tell me. 什么事？说给我听听。\nWell, Grandpa wanted me to study engineering, like him. Well, I wasn\u0026rsquo;t clear about my future, but I knew engineering was not for me. 嗯，爷爷希望我像他一样学工程，我对自己的未来当时也不清楚，但我知道工程对我不合适。\nWhat did you tell Grandpa? 那你是如何对爷爷说的呢？\nThe truth. 实话实说。\nThen you\u0026rsquo;re not upset about my not wanting to go into medicine? 那么，你没有感到不快，对我不学医。\nI\u0026rsquo;m not upset at all. I\u0026rsquo;m just happy that we\u0026rsquo;re able to talk about it. 一点也不。我很高兴我们能够一起商讨这件事。\nI am too, Dad. 我也一样，爸爸。\nI suppose you want to apply to Columbia. 我猜想你会申请Columbia大学。\nYes, but I also want to apply to several other colleges. 是的，但我还想申请几所其他的大学。\nI thought you wanted to go to Columbia. 我还以为你只想上Columbia大学。\nWell, I might want to go to Columbia. But I might not. I just want to be able to make my own decision. 嗯，我也许去Columbia大学。但也许不去。我只想能够自己决定。\nYou\u0026rsquo;re a real Stewart! 你真是我们Stewart家的人！\nAnd if I think about it long enough, you never know \u0026hellip; 如果我一直考虑下去的话，说不定……\nNever know what? 说不定什么？\nIf I make my own decision, I might choose Michigan. 如果我自己作决定的话，我说不定选择Michigan大学。\nRobbie, you\u0026rsquo;re something! You know, when I was your age, I said exactly the same thing to Grandpa. Robbie，你真是有骨气！要知道，当我像你这么大的时候，我跟你爷爷说了同样的话。\n重难点分析 \u0026ldquo;turn it in\u0026rdquo; — 表示\u0026quot;上交（作业、稿件等）\u0026quot;，是校园常用短语。 \u0026ldquo;I felt the same way.\u0026rdquo; — 表示\u0026quot;我也有同感\u0026quot;，表达共鸣。 \u0026ldquo;That\u0026rsquo;s the worst part\u0026ndash;making decisions.\u0026rdquo; — 口语中常用 the worst/best part 来强调某事物的最……方面。 \u0026ldquo;Dean of Admissions\u0026rdquo; — 大学招生办主任。 \u0026ldquo;fit you into his schedule\u0026rdquo; — 表示\u0026quot;把你安排进他的日程中\u0026quot;。 \u0026ldquo;Not exactly.\u0026rdquo; — 表示\u0026quot;不完全是/还不一定\u0026quot;，委婉否定。 \u0026ldquo;In that case\u0026rdquo; — 表示\u0026quot;如果是那样的话\u0026quot;。 \u0026ldquo;head off for\u0026rdquo; — 表示\u0026quot;前往（某地）\u0026quot;。 \u0026ldquo;hear me out\u0026rdquo; — 表示\u0026quot;听我把话说完\u0026quot;。 \u0026ldquo;You name it, I\u0026rsquo;ve written it.\u0026rdquo; — 固定表达，表示\u0026quot;你说得出的，我都写过\u0026quot;。 \u0026ldquo;follow in your father\u0026rsquo;s footsteps\u0026rdquo; — 固定表达，意为\u0026quot;步你父亲的后尘/继承父业\u0026quot;。 \u0026ldquo;follow in my own footsteps\u0026rdquo; — Robbie的巧妙改编，表示\u0026quot;走自己的路\u0026quot;。 \u0026ldquo;You\u0026rsquo;re something!\u0026rdquo; — 口语中表示\u0026quot;你真了不起/真有你的！\u0026quot;。 核心词汇 词汇 音标 释义 scared /skerd/ 害怕的 graduation /ˌɡrædʒuˈeɪʃn/ 毕业 interview /ˈɪntərvjuː/ 面谈，面试 applicant /ˈæplɪkənt/ 申请人 admission /ədˈmɪʃn/ 录取，入学 journalism /ˈdʒɜːrnəlɪzəm/ 新闻学 journalist /ˈdʒɜːrnəlɪst/ 新闻记者 editorial /ˌedɪˈtɔːriəl/ 社论 review /rɪˈvjuː/ 评论 transcript /ˈtrænskrɪpt/ 成绩单 reservation /ˌrezərˈveɪʃn/ 保留意见，疑虑 uncertain /ʌnˈsɜːrtn/ 不确定的 tuition /tuˈɪʃn/ 学费 complicated /ˈkɑːmplɪkeɪtɪd/ 复杂的 decision /dɪˈsɪʒn/ 决定 口语中的应用 \u0026ldquo;You name it.\u0026rdquo; — 表示\u0026quot;凡是你说得出的都有\u0026quot;，用于列举时表示种类齐全。 \u0026ldquo;Hear me out.\u0026rdquo; — 请求对方让自己把话说完。 \u0026ldquo;I\u0026rsquo;m listening.\u0026rdquo; — 表示\u0026quot;我在听你说\u0026quot;，鼓励对方继续说下去。 \u0026ldquo;That\u0026rsquo;s only part of it.\u0026rdquo; — 表示\u0026quot;这只是部分原因\u0026quot;。 \u0026ldquo;You\u0026rsquo;re something!\u0026rdquo; — 赞美对方，表示\u0026quot;你真了不起\u0026quot;。 \u0026ldquo;I came to that conclusion.\u0026rdquo; — 表示\u0026quot;我得出了那个结论\u0026quot;。 \u0026ldquo;One piece of advice.\u0026rdquo; — 表示\u0026quot;给你一个建议\u0026quot;。 \u0026ldquo;The truth.\u0026rdquo; — 简单有力的回答，表示\u0026quot;实话实说\u0026quot;。 核心练习句型 表达\u0026quot;我也一样\u0026quot;：\nNeither can I. I felt the same way. 表达\u0026quot;走自己的路/继承……\u0026quot;：\nFollow in your father\u0026rsquo;s footsteps. I\u0026rsquo;d like to follow in my own footsteps. 表达\u0026quot;不确定/犹豫\u0026quot;：\nI\u0026rsquo;m a little uncertain. I have some reservations. 表达\u0026quot;听某人说完\u0026quot;：\nThanks for hearing me out. Hear me out. 表达\u0026quot;以某人为荣\u0026quot;：\nI\u0026rsquo;m very proud of you. 表达\u0026quot;自己做决定\u0026quot;：\nI want to make my own decision. The most important thing is for you to decide your own future. ","permalink":"/posts/2026-06-14-family-album-usa-lesson-9/","summary":"\u003ch2 id=\"课文原文双语\"\u003e课文原文（双语）\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eWho is it?\u003c/strong\u003e\n是谁？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eDad.\u003c/strong\u003e\n爸爸。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCome on in, Dad.\u003c/strong\u003e\n请进来，爸爸。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI thought you might be hungry. I brought you a chicken sandwich and a glass of milk.\u003c/strong\u003e\n我想你大概饿了。我替你带来一份鸡肉三明治和一杯牛奶。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI am hungry. Thanks, Dad. What time is it, anyway?\u003c/strong\u003e\n我真是饿了，谢谢，爸爸。几点了？顺便问一下。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eTen o\u0026rsquo;clock.\u003c/strong\u003e\n十点钟。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eWhat are you working on?\u003c/strong\u003e\n你在干什么？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eI\u0026rsquo;m writing a story for the high-school paper.\u003c/strong\u003e\n我正在为高中校刊写一篇东西。\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCan\u0026rsquo;t you finish it tomorrow?\u003c/strong\u003e\n你明天完成它不行吗？\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eNo, I have to turn it in in the morning.\u003c/strong\u003e\n不行，明天上午我得交出去。\u003c/p\u003e","title":"走遍美国（Family Album U.S.A.）第9课：A Big Decision（重大决定）"},{"content":"欢迎来到 英语 分类。\n在这里，我会整理和分享与技术工作相关的英文学习笔记，包括：\n专业术语：Kubernetes、Docker、Linux 网络等领域的核心英文词汇 职场表达：日常工作中高频使用的英文邮件、会议、文档写作 技术文档阅读：如何高效阅读英文官方文档、man page、RFC 面试与认证：英文技术面试准备、AWS/Linux 认证英文题库 为什么要学技术英文？ 技术的源头在英文世界。掌握技术英文，就是掌握第一手信息。\n无论是阅读 Linux Kernel 邮件列表、Kubernetes KEP 提案，还是参与 GitHub 开源社区的讨论，英文都是绕不开的门槛。与其依赖机器翻译，不如主动提升自己的英文阅读和表达能力。\n第一期内容预告 Linux 系统管理常用英文动词（mount, attach, allocate, provision\u0026hellip;） Dockerfile 中的英文指令解读（FROM, RUN, CMD, ENTRYPOINT） 英文技术面试 10 个高频问题及回答模板 Stay tuned!\n","permalink":"/posts/2026-06-14-english-category-welcome/","summary":"\u003cp\u003e欢迎来到 \u003cstrong\u003e英语\u003c/strong\u003e 分类。\u003c/p\u003e\n\u003cp\u003e在这里，我会整理和分享与技术工作相关的英文学习笔记，包括：\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003e专业术语\u003c/strong\u003e：Kubernetes、Docker、Linux 网络等领域的核心英文词汇\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003e职场表达\u003c/strong\u003e：日常工作中高频使用的英文邮件、会议、文档写作\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003e技术文档阅读\u003c/strong\u003e：如何高效阅读英文官方文档、man page、RFC\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003e面试与认证\u003c/strong\u003e：英文技术面试准备、AWS/Linux 认证英文题库\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"为什么要学技术英文\"\u003e为什么要学技术英文？\u003c/h2\u003e\n\u003cblockquote\u003e\n\u003cp\u003e技术的源头在英文世界。掌握技术英文，就是掌握第一手信息。\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cp\u003e无论是阅读 Linux Kernel 邮件列表、Kubernetes KEP 提案，还是参与 GitHub 开源社区的讨论，英文都是绕不开的门槛。与其依赖机器翻译，不如主动提升自己的英文阅读和表达能力。\u003c/p\u003e\n\u003ch2 id=\"第一期内容预告\"\u003e第一期内容预告\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eLinux 系统管理常用英文动词（mount, attach, allocate, provision\u0026hellip;）\u003c/li\u003e\n\u003cli\u003eDockerfile 中的英文指令解读（FROM, RUN, CMD, ENTRYPOINT）\u003c/li\u003e\n\u003cli\u003e英文技术面试 10 个高频问题及回答模板\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eStay tuned!\u003c/p\u003e","title":"英语分类上线 —— 技术英文学习笔记"},{"content":"1.docker版本 网址：https://github.com/elliot-bia/nessus 该nessus版本已和谐，无限制使用。 2.安装启动 # 创建数据目录 mkdir /opt/nessus # 创建容器 docker run -itd --name=ramisec_nessus -v /opt/nessus/:/opt/nessus/var/nessus/ -p 8834:8834 ramisec/nessus 3.插件更新 docker exec -it ramisec_nessus /bin/bash /nessus/update.sh ","permalink":"/posts/docker-an-zhuang-nessus-lou-dong-sao-miao-gong-ju-w/","summary":"1.docker版本网址：https://github.com/elliot-bia/nessus该nessus版本已和谐，无限制使用。2.安装启动# 创建数据目录mkdir /opt/nessus# 创建容器docker run -itd \u0026ndash;name=ramisec_nessus -v /opt","title":"Docker安装Nessus漏洞扫描工具"},{"content":"1.lsblk来检查磁盘分区挂载点的状态，当然可以看出为分配空间 [root@samba ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT fd0 2:0 1 4K 0 disk sda 8:0 0 200G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 99G 0 part ├─centos-root 253:0 0 85.1G 0 lvm / ├─centos-swap 253:1 0 3.9G 0 lvm [SWAP] └─centos-home 253:2 0 10G 0 lvm /home sdb 8:16 0 300G 0 disk └─sdb1 8:17 0 300G 0 part /disk sr0 11:0 1 1024M 0 rom 以上可以看出sda1 和 sda2 是现有的分区。 sda 总容量为 214.7G，但 sda2 只占用了 103.8G，剩余部分（大约 110.9G）如果未显示，意味着它未被分区。 2.手动分区 启动fdisk工具 sudo fdisk /dev/sda 创建新分区 [root@samba ~]# fdisk /dev/sda 欢迎使用 fdisk (util-linux 2.23.2)。 更改将停留在内存中，直到您决定将更改写入磁盘。 使用写入命令前请三思。 命令(输入 m 获取帮助)：n Partition type: p primary (2 primary, 0 extended, 2 free) e extended Select (default p): p 分区号 (3,4，默认 3)： 起始 扇区 (209715200-419430399，默认为 209715200)： 将使用默认值 209715200 Last 扇区, +扇区 or +size{K,M,G} (209715200-419430399，默认为 419430399)： 将使用默认值 419430399 分区 3 已设置为 Linux 类型，大小设为 100 GiB 命令(输入 m 获取帮助)：t 分区号 (1-3，默认 3)： Hex 代码(输入 L 列出所有代码)：8e 已将分区“Linux”的类型更改为“Linux LVM” 命令(输入 m 获取帮助)：w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: 设备或资源忙. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) 正在同步磁盘。 报错解决：尝试通过 partprobe 命令强制内核重新读取分区表。 sudo partprobe /dev/sda 添加新分区到 LVM [root@samba ~]# pvcreate /dev/sda3 Physical volume \u0026#34;/dev/sda3\u0026#34; successfully created. [root@samba ~]# vgextend centos /dev/sda3 Volume group \u0026#34;centos\u0026#34; successfully extended [root@samba ~]# sudo lvextend -l +100%FREE /dev/mapper/centos-root Size of logical volume centos/root changed from 85.12 GiB (21791 extents) to \u0026lt;185.12 GiB (47390 extents). Logical volume centos/root successfully resized. [root@samba ~]# sudo xfs_growfs / meta-data=/dev/mapper/centos-root isize=512 agcount=7, agsize=3276800 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0 spinodes=0 data = bsize=4096 blocks=22313984, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=1 log =internal bsize=4096 blocks=6400, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 22313984 to 48527360 3.再次查看，发现硬盘剩余空间已经被扩展到root分区。 [root@samba ~]# df -hl 文件系统 容量 已用 可用 已用% 挂载点 devtmpfs 2.0G 0 2.0G 0% /dev tmpfs 2.0G 0 2.0G 0% /dev/shm tmpfs 2.0G 201M 1.8G 11% /run tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup /dev/mapper/centos-root 186G 76G 110G 41% / /dev/sdb1 296G 130G 151G 47% /disk /dev/sda1 1014M 136M 879M 14% /boot /dev/mapper/centos-home 10G 33M 10G 1% /home overlay 186G 76G 110G 41% /var/lib/docker/overlay2/d00d0b3eb629332ae9a00776a7f618b09b7445e23d8e25b06930747618a205f9/merged tmpfs 396M 0 396M 0% /run/user/0 [root@samba ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT fd0 2:0 1 4K 0 disk sda 8:0 0 200G 0 disk ├─sda1 8:1 0 1G 0 part /boot ├─sda2 8:2 0 99G 0 part │ ├─centos-root 253:0 0 185.1G 0 lvm / │ ├─centos-swap 253:1 0 3.9G 0 lvm [SWAP] │ └─centos-home 253:2 0 10G 0 lvm /home └─sda3 8:3 0 100G 0 part └─centos-root 253:0 0 185.1G 0 lvm / sdb 8:16 0 300G 0 disk └─sdb1 8:17 0 300G 0 part /disk sr0 11:0 1 1024M 0 rom ","permalink":"/posts/centos7-xi-tong-pan-sheng-yu-rong-liang-kuo-chong-dao-root-fen-qu/","summary":"\u003ch2 id=\"1lsblk来检查磁盘分区挂载点的状态当然可以看出为分配空间\"\u003e1.lsblk来检查磁盘分区挂载点的状态，当然可以看出为分配空间\u003c/h2\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[root@samba ~]# lsblk\nNAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT\nfd0               2:0    1    4K  0 disk \nsda               8:0    0  200G  0 disk \n├─sda1            8:1    0    1G  0 part /boot\n└─sda2            8:2    0   99G  0 part \n  ├─centos-root 253:0    0 85.1G  0 lvm  /\n  ├─centos-swap 253:1    0  3.9G  0 lvm  [SWAP]\n  └─centos-home 253:2    0   10G  0 lvm  /home\nsdb               8:16   0  300G  0 disk \n└─sdb1            8:17   0  300G  0 part /disk\nsr0              11:0    1 1024M  0 rom  \n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e以上可以看出sda1 和 sda2 是现有的分区。\u003c/li\u003e\n\u003cli\u003esda 总容量为 214.7G，但 sda2 只占用了 103.8G，剩余部分（大约 110.9G）如果未显示，意味着它未被分区。\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"2手动分区\"\u003e2.手动分区\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e启动fdisk工具\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esudo fdisk /dev/sda\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e创建新分区\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[root@samba ~]# fdisk /dev/sda\n欢迎使用 fdisk (util-linux 2.23.2)。\n\n更改将停留在内存中，直到您决定将更改写入磁盘。\n使用写入命令前请三思。\n\n\n命令(输入 m 获取帮助)：n\nPartition type:\n   p   primary (2 primary, 0 extended, 2 free)\n   e   extended\nSelect (default p): p\n分区号 (3,4，默认 3)：\n起始 扇区 (209715200-419430399，默认为 209715200)：\n将使用默认值 209715200\nLast 扇区, +扇区 or +size{K,M,G} (209715200-419430399，默认为 419430399)：\n将使用默认值 419430399\n分区 3 已设置为 Linux 类型，大小设为 100 GiB\n\n命令(输入 m 获取帮助)：t\n分区号 (1-3，默认 3)：  \nHex 代码(输入 L 列出所有代码)：8e\n已将分区“Linux”的类型更改为“Linux LVM”\n\n命令(输入 m 获取帮助)：w\nThe partition table has been altered!\n\nCalling ioctl() to re-read partition table.\n\nWARNING: Re-reading the partition table failed with error 16: 设备或资源忙.\nThe kernel still uses the old table. The new table will be used at\nthe next reboot or after you run partprobe(8) or kpartx(8)\n正在同步磁盘。\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e报错解决：尝试通过 partprobe 命令强制内核重新读取分区表。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esudo partprobe /dev/sda\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e添加新分区到 LVM\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[root@samba ~]# pvcreate /dev/sda3\n  Physical volume \u0026#34;/dev/sda3\u0026#34; successfully created.\n[root@samba ~]# vgextend centos /dev/sda3\n  Volume group \u0026#34;centos\u0026#34; successfully extended\n[root@samba ~]# sudo lvextend -l +100%FREE /dev/mapper/centos-root\n  Size of logical volume centos/root changed from 85.12 GiB (21791 extents) to \u0026lt;185.12 GiB (47390 extents).\n  Logical volume centos/root successfully resized.\n[root@samba ~]# sudo xfs_growfs /\nmeta-data=/dev/mapper/centos-root isize=512    agcount=7, agsize=3276800 blks\n         =                       sectsz=512   attr=2, projid32bit=1\n         =                       crc=1        finobt=0 spinodes=0\ndata     =                       bsize=4096   blocks=22313984, imaxpct=25\n         =                       sunit=0      swidth=0 blks\nnaming   =version 2              bsize=4096   ascii-ci=0 ftype=1\nlog      =internal               bsize=4096   blocks=6400, version=2\n         =                       sectsz=512   sunit=0 blks, lazy-count=1\nrealtime =none                   extsz=4096   blocks=0, rtextents=0\ndata blocks changed from 22313984 to 48527360\n\u003c/code\u003e\u003c/pre\u003e\u003ch2 id=\"3再次查看发现硬盘剩余空间已经被扩展到root分区\"\u003e3.再次查看，发现硬盘剩余空间已经被扩展到root分区。\u003c/h2\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[root@samba ~]# df -hl\n文件系统                 容量  已用  可用 已用% 挂载点\ndevtmpfs                 2.0G     0  2.0G    0% /dev\ntmpfs                    2.0G     0  2.0G    0% /dev/shm\ntmpfs                    2.0G  201M  1.8G   11% /run\ntmpfs                    2.0G     0  2.0G    0% /sys/fs/cgroup\n/dev/mapper/centos-root  186G   76G  110G   41% /\n/dev/sdb1                296G  130G  151G   47% /disk\n/dev/sda1               1014M  136M  879M   14% /boot\n/dev/mapper/centos-home   10G   33M   10G    1% /home\noverlay                  186G   76G  110G   41% /var/lib/docker/overlay2/d00d0b3eb629332ae9a00776a7f618b09b7445e23d8e25b06930747618a205f9/merged\ntmpfs                    396M     0  396M    0% /run/user/0\n[root@samba ~]# lsblk\nNAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT\nfd0               2:0    1     4K  0 disk \nsda               8:0    0   200G  0 disk \n├─sda1            8:1    0     1G  0 part /boot\n├─sda2            8:2    0    99G  0 part \n│ ├─centos-root 253:0    0 185.1G  0 lvm  /\n│ ├─centos-swap 253:1    0   3.9G  0 lvm  [SWAP]\n│ └─centos-home 253:2    0    10G  0 lvm  /home\n└─sda3            8:3    0   100G  0 part \n  └─centos-root 253:0    0 185.1G  0 lvm  /\nsdb               8:16   0   300G  0 disk \n└─sdb1            8:17   0   300G  0 part /disk\nsr0              11:0    1  1024M  0 rom  \n\u003c/code\u003e\u003c/pre\u003e","title":"Centos7系统盘剩余容量扩充到root分区"},{"content":"1.必要软件 yum install -y epel-release yum update -y yum install -y vim net-tools nmon htop rsync iptraf-ng tree lrzsz ntp iftop telnet tcpdump traceroute wget # 按需安装 yum install -y cmake make gcc gcc-c++ 2.设置同步时间 echo \u0026#34;0 8 * * * root ntpdate ntp.aliyun.com\u0026#34; \u0026gt;\u0026gt; /etc/crontab 3.关闭selinux及防火墙（防火墙按需关闭） sed -i \u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39; /etc/selinux/config systemctl stop firewalld systemctl disable firewalld 4.禁用DNS反向解析 sed -i \u0026#39;s@GSSAPIAuthentication yes@GSSAPIAuthentication no@\u0026#39; /etc/ssh/sshd_config sed -i \u0026#39;s@#UseDNS yes@UseDNS no@\u0026#39; /etc/ssh/sshd_config ","permalink":"/posts/centos7-fu-wu-qi-huan-jing-an-zhuang-biao-zhun/","summary":"\u003ch2 id=\"1必要软件\"\u003e1.必要软件\u003c/h2\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eyum install -y epel-release\nyum update -y\nyum install -y vim net-tools nmon htop rsync iptraf-ng tree lrzsz ntp iftop telnet tcpdump traceroute wget\n# 按需安装\nyum install -y cmake make gcc gcc-c++\n\u003c/code\u003e\u003c/pre\u003e\u003ch2 id=\"2设置同步时间\"\u003e2.设置同步时间\u003c/h2\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eecho \u0026#34;0 8 * * * root ntpdate ntp.aliyun.com\u0026#34; \u0026gt;\u0026gt; /etc/crontab\n\u003c/code\u003e\u003c/pre\u003e\u003ch2 id=\"3关闭selinux及防火墙防火墙按需关闭\"\u003e3.关闭selinux及防火墙（防火墙按需关闭）\u003c/h2\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esed -i \u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39; /etc/selinux/config\nsystemctl stop firewalld\nsystemctl disable firewalld\n\u003c/code\u003e\u003c/pre\u003e\u003ch2 id=\"4禁用dns反向解析\"\u003e4.禁用DNS反向解析\u003c/h2\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esed -i \u0026#39;s@GSSAPIAuthentication yes@GSSAPIAuthentication no@\u0026#39; /etc/ssh/sshd_config\nsed -i \u0026#39;s@#UseDNS yes@UseDNS no@\u0026#39; /etc/ssh/sshd_config\n\u003c/code\u003e\u003c/pre\u003e","title":"Centos7服务器环境安装标准"},{"content":"1.创建专用于 Zabbix组件容器的网络 docker network create --subnet 172.20.0.0/16 --ip-range 172.20.240.0/20 zabbix-net 2.启动zabbix专用Mysql服务器 docker run --name mysql-server -e MYSQL_DATABASE=\u0026#34;zabbix\u0026#34; -e MYSQL_USER=\u0026#34;zabbix\u0026#34; -e MYSQL_PASSWORD=\u0026#34;12345678\u0026#34; -e MYSQL_ROOT_PASSWORD=\u0026#34;12345678\u0026#34; -v /opt/zabbix_mysql:/var/lib/mysql --network=zabbix-net --restart unless-stopped -d mysql:8.0 --character-set-server=utf8 --collation-server=utf8_bin --default-authentication-plugin=mysql_native_password 3.启动zabbix java 网关 docker run --name zabbix-java-gateway -t --network=zabbix-net --restart unless-stopped -d zabbix/zabbix-java-gateway:alpine-5.4-latest 4.启动 Zabbix server 实例，并将其关联到已创建的 MySQL server 实例 docker run --name zabbix-server-mysql -t -e DB_SERVER_HOST=\u0026#34;mysql-server\u0026#34; -e MYSQL_DATABASE=\u0026#34;zabbix\u0026#34; -e MYSQL_USER=\u0026#34;zabbix\u0026#34; -e MYSQL_PASSWORD=\u0026#34;12345678\u0026#34; -e MYSQL_ROOT_PASSWORD=\u0026#34;12345678\u0026#34; -e ZBX_JAVAGATEWAY=\u0026#34;zabbix-java-gateway\u0026#34; --network=zabbix-net -p 10051:10051 -v /opt/zabbix_server/zabbix_server.conf:/etc/zabbix/zabbix_server.conf --restart unless-stopped -d zabbix/zabbix-server-mysql:alpine-5.4-latest 5.启动Zabbix Web界面，并将其关联到已创建的MySQL server和Zabbix server 实例 nginx配置详解附件 docker run --name zabbix-web-nginx-mysql -t -e ZBX_SERVER_HOST=\u0026#34;zabbix-server-mysql\u0026#34; -e DB_SERVER_HOST=\u0026#34;mysql-server\u0026#34; -e MYSQL_DATABASE=\u0026#34;zabbix\u0026#34; -e MYSQL_USER=\u0026#34;zabbix\u0026#34; -e MYSQL_PASSWORD=\u0026#34;12345678\u0026#34; -e MYSQL_ROOT_PASSWORD=\u0026#34;12345678\u0026#34; -p 9080:9080 -v /opt/zabbix_nginx/conf:/etc/nginx/http.d/ --network=zabbix-net --restart unless-stopped -d zabbix/zabbix-web-nginx-mysql:alpine-5.4-latest 6.问题处理：zabbix server：Zabbix anent is not available 查找zabbix-server-mysql的容器IP和网关 docker inspect zabbix-server-mysql | grep IPAddress docker inspect zabbix-server-mysql | grep Gateway 打开zabbix_agentd.conf，Server和ServerActive都修改为zabbix-server-mysql的容器IP Server=172.17.0.4 #zabbix server的地址 ServerActive=172.17.0.4 #同样是zabbix_server的地址 打开zabbix web，把zabbix server的Agent客户端地址修改为：zabbix-server-mysql的容器的网关 7.zabbix_agent安装 rpm -ivhF zabbix-agent.rpm # 修改配置 vim /etc/zabbix/zabbix_agentd.conf systemctl start zabbix-agent systemctl enable zabbix-agent ","permalink":"/posts/docker-an-zhuang-zabbix-fu-wu-qi/","summary":"1.创建专用于 Zabbix组件容器的网络docker network create \u0026ndash;subnet 172.20.0.0/16 \u0026ndash;ip-range 172.20.240.0/20 zabbix-net2.启动zabbix专用Mysql服务器docker run \u0026ndash;name mysql-ser","title":"Docker安装zabbix服务器"},{"content":"1. ftp服务开启及账号建立 sys ftp server enable aaa local-user jgsteelftp password cipher xxxxxxxx local-user jgsteelftp privilege level 3 local-user jgsteelftp service-type ftp local-user jgsteelftp ftp-directory cfcard:/ # cfcard:/ 是配置文件所在目录 2. ftp登录并下载配置文件 ftp 192.168.0.254 username password dir binary get vrpcfg.zip ","permalink":"/posts/hua-wei-jiao-huan-ji-tong-guo-ftp-bei-fen-pei-zhi-wen-jian/","summary":"\u003col\u003e\n\u003cli\u003eftp服务开启及账号建立sysftp server enableaaalocal-user jgsteelftp password cipher xxxxxxxxlocal-user jgsteelftp privilege level 3local-user jgsteelftp servi\u003c/li\u003e\n\u003c/ol\u003e\n","title":"华为交换机通过ftp备份配置文件"},{"content":"解决方法：\n以管理员方式打开 Powershell输入\nforeach ($n in (get-appxpackage).packagefamilyname) {checknetisolation loopbackexempt -a -n=\u0026#34;$n\u0026#34;} 等待执行完毕 ","permalink":"/posts/kai-qi-xi-tong-dai-li-zhi-hou-microsoftstore-deng-uwp-ying-yong-wu-fa-lian-wang/","summary":"\u003cp\u003e解决方法：\u003c/p\u003e\n\u003cp\u003e以管理员方式打开 Powershell输入\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-Plain\" data-lang=\"Plain\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eforeach ($n in (get-appxpackage).packagefamilyname) {checknetisolation loopbackexempt -a -n=\u0026#34;$n\u0026#34;}\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e等待执行完毕\u003c/li\u003e\n\u003c/ul\u003e","title":"开启系统代理之后，Microsoft Store 等 UWP 应用无法联网"},{"content":"1.创建配置文件和证书 docker run -v /volume1/docker/openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp://vpn.dingxiufeng.cn docker run -v /volume1/docker/openvpn:/etc/openvpn --rm -it kylemanna/openvpn ovpn_initpki 2.启动一个openvpnserver服务 docker run --restart=always -v /volume1/docker/openvpn:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn 3.创建一个openvpn客户端证书 docker run -v /volume1/docker/openvpn:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full client01 nopass 4.生成一个openvpn客户端配置文件 docker run -v /volume1/docker/openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_getclient client01 \u0026gt; client01.ovpn ","permalink":"/posts/docker-an-zhuang-openvpn-de-server-duan-ji-ke-hu-duan-zheng-shu-jian-li/","summary":"\u003ch3 id=\"1创建配置文件和证书\"\u003e1.创建配置文件和证书\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003edocker run -v /volume1/docker/openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp://vpn.dingxiufeng.cn\ndocker run -v /volume1/docker/openvpn:/etc/openvpn --rm -it kylemanna/openvpn ovpn_initpki\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2启动一个openvpnserver服务\"\u003e2.启动一个openvpnserver服务\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003edocker run --restart=always -v /volume1/docker/openvpn:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3创建一个openvpn客户端证书\"\u003e3.创建一个openvpn客户端证书\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003edocker run -v /volume1/docker/openvpn:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full client01 nopass\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"4生成一个openvpn客户端配置文件\"\u003e4.生成一个openvpn客户端配置文件\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003edocker run -v /volume1/docker/openvpn:/etc/openvpn --rm kylemanna/openvpn ovpn_getclient client01 \u0026gt; client01.ovpn\n\u003c/code\u003e\u003c/pre\u003e","title":"docker安装openvpn的server端及客户端证书建立"},{"content":"1. 在企业微信群聊中建立一个机器人 获取webhook地址 2. zabbix中选择管理\u0026ndash;报警媒介类型 创建媒体类型，填写以下内容 脚本内容参考下面的内容 var Qiyeweixin = { key: null, message: null, msgtype: \u0026#34;markdown\u0026#34;, proxy: null, sendMessage: function () { var params = { msgtype: Qiyeweixin.msgtype, markdown: { content: Qiyeweixin.message, }, }, data, response, request = new CurlHttpRequest(), url = \u0026#34;https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=\u0026#34; + Qiyeweixin.key; if (Qiyeweixin.proxy) { request.setProxy(Qiyeweixin.proxy); } request.AddHeader(\u0026#34;Content-Type: application/json\u0026#34;); data = JSON.stringify(params); // Remove replace() function if you want to see the exposed key in the log file. Zabbix.Log( 4, \u0026#34;[Qiyeweixin Webhook] URL: \u0026#34; + url.replace(Qiyeweixin.key, \u0026#34;\u0026lt;BOT KEY\u0026gt;\u0026#34;) ); Zabbix.Log(4, \u0026#34;[Qiyeweixin Webhook] params: \u0026#34; + data); response = request.Post(url, data); Zabbix.Log(4, \u0026#34;[Qiyeweixin Webhook] HTTP code: \u0026#34; + request.Status()); try { response = JSON.parse(response); } catch (error) { response = null; } if (request.Status() !== 200 || response.errcode !== 0) { if (typeof response.errmsg === \u0026#34;string\u0026#34;) { throw response.errmsg; } else { throw \u0026#34;Unknown error. Check debug log for more information.\u0026#34;; } } }, }; try { var params = JSON.parse(value); if (typeof params.Key === \u0026#34;undefined\u0026#34;) { throw \u0026#39;Incorrect value is given for parameter \u0026#34;Key\u0026#34;: parameter is missing\u0026#39;; } Qiyeweixin.key = params.Key; if (params.HTTPProxy) { Qiyeweixin.proxy = params.HTTPProxy; } Qiyeweixin.to = params.To; Qiyeweixin.message = params.Subject + \u0026#34;\\n\u0026#34; + params.Message; Qiyeweixin.sendMessage(); return \u0026#34;OK\u0026#34;; } catch (error) { Zabbix.Log(4, \u0026#34;[Qiyeweixin Webhook] notification failed: \u0026#34; + error); throw \u0026#34;Sending failed: \u0026#34; + error + \u0026#34;.\u0026#34;; } 选择Message templates，把所有默认的模板都添加上 3. zabbix点击配置\u0026ndash;动作 选择Trigger actions 编辑默认Report problems to Zabbix administrators 点击操作：添加 最后更新即可 4. zabbix点击管理\u0026ndash;用户 点击admin 点击报警媒介 点击添加，报警类型自行更改。 5. 附zabbix6.0代码 zabbix 6 主要修改webhook中的request函数为HttpRequest并作相应的调整，更新后的脚本如下：\nvar Wework = { url: null, token: null, to: null, message: null, parse_mode: null, sendMessage: function() { var params = { msgtype: \u0026#34;markdown\u0026#34;, //chat_id: Wework.to, markdown: { content:Wework.message } //disable_web_page_preview: true, //disable_notification: false }, data, response, request = new HttpRequest(), //url = Wework.url + Wework.token; url = \u0026#39;https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=\u0026#39; + Wework.token; if (Wework.parse_mode !== null) { params[\u0026#39;parse_mode\u0026#39;] = Wework.parse_mode; } request.addHeader(\u0026#39;Content-Type: application/json\u0026#39;); data = JSON.stringify(params); // Remove replace() function if you want to see the exposed token in the log file. Zabbix.Log(4, \u0026#39;[Wework Webhook] URL: \u0026#39; + url.replace(Wework.token, \u0026#39;\u0026lt;TOKEN\u0026gt;\u0026#39;)); Zabbix.Log(4, \u0026#39;[Wework Webhook] params: \u0026#39; + data); response = request.post(url, data); Zabbix.Log(4, \u0026#39;[Wework Webhook] HTTP code: \u0026#39; + request.getStatus()); Zabbix.Log(4, \u0026#39;[Wework Webhook] response: \u0026#39; + response); try { response = JSON.parse(response); } catch (error) { response = null; Zabbix.Log(4, \u0026#39;[Wework Webhook] response parse error\u0026#39;); } if (request.getStatus() !== 200 || response.errcode !== 0 || response.errmsg !== \u0026#39;ok\u0026#39;) { if (typeof response.errmsg === \u0026#39;string\u0026#39;) { throw response.errmsg; } else { throw \u0026#39;Unknown error. Check debug log for more information.\u0026#39; } } } } try { var params = JSON.parse(value); if (typeof params.Token === \u0026#39;undefined\u0026#39;) { throw \u0026#39;Incorrect value is given for parameter \u0026#34;Token\u0026#34;: parameter is missing\u0026#39;; } Wework.token = params.Token; if ([\u0026#39;Markdown\u0026#39;, \u0026#39;HTML\u0026#39;, \u0026#39;MarkdownV2\u0026#39;].indexOf(params.ParseMode) !== -1) { Wework.parse_mode = params.ParseMode; } Wework.to = params.To; Wework.message = params.Subject + \u0026#39;\\n\u0026#39; + params.Message; Wework.sendMessage(); return \u0026#39;OK\u0026#39;; } catch (error) { Zabbix.Log(4, \u0026#39;[Wework Webhook] notification failed: \u0026#39; + error); throw \u0026#39;Sending failed: \u0026#39; + error + \u0026#39;.\u0026#39;; } 使用方法： 在zabbix中选择administration-\u0026gt;media types,选择 create media type Parameters中的Token参数设置为群机器人字符串中的key 在script中粘贴上面的代码 在action中配置告警动作及接收的 media type ","permalink":"/posts/zabbix50-she-zhi-qi-ye-wei-xin-ji-qi-ren-tui-song/","summary":"\u003ch3 id=\"1-在企业微信群聊中建立一个机器人\"\u003e1. 在企业微信群聊中建立一个机器人\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e获取webhook地址\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"2-zabbix中选择管理报警媒介类型\"\u003e2. zabbix中选择管理\u0026ndash;报警媒介类型\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e创建媒体类型，填写以下内容\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cimg alt=\"image\" loading=\"lazy\" src=\"/upload/2024/04/image.png\"\u003e\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e脚本内容参考下面的内容\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-javascript\" data-lang=\"javascript\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003evar\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eQiyeweixin\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#a6e22e\"\u003ekey\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e:\u003c/span\u003e \u003cspan style=\"color:#66d9ef\"\u003enull\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#a6e22e\"\u003emessage\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e:\u003c/span\u003e \u003cspan style=\"color:#66d9ef\"\u003enull\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#a6e22e\"\u003emsgtype\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e:\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;markdown\u0026#34;\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#a6e22e\"\u003eproxy\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e:\u003c/span\u003e \u003cspan style=\"color:#66d9ef\"\u003enull\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#a6e22e\"\u003esendMessage\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e:\u003c/span\u003e \u003cspan style=\"color:#66d9ef\"\u003efunction\u003c/span\u003e () {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003evar\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eparams\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#a6e22e\"\u003emsgtype\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e:\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eQiyeweixin\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003emsgtype\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#a6e22e\"\u003emarkdown\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e:\u003c/span\u003e {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e          \u003cspan style=\"color:#a6e22e\"\u003econtent\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e:\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eQiyeweixin\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003emessage\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        },\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      },\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      \u003cspan style=\"color:#a6e22e\"\u003edata\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      \u003cspan style=\"color:#a6e22e\"\u003eresponse\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      \u003cspan style=\"color:#a6e22e\"\u003erequest\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#66d9ef\"\u003enew\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eCurlHttpRequest\u003c/span\u003e(),\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      \u003cspan style=\"color:#a6e22e\"\u003eurl\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#a6e22e\"\u003eQiyeweixin\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003ekey\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003eif\u003c/span\u003e (\u003cspan style=\"color:#a6e22e\"\u003eQiyeweixin\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eproxy\u003c/span\u003e) {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      \u003cspan style=\"color:#a6e22e\"\u003erequest\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003esetProxy\u003c/span\u003e(\u003cspan style=\"color:#a6e22e\"\u003eQiyeweixin\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eproxy\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    }\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#a6e22e\"\u003erequest\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eAddHeader\u003c/span\u003e(\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;Content-Type: application/json\u0026#34;\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#a6e22e\"\u003edata\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eJSON\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003estringify\u003c/span\u003e(\u003cspan style=\"color:#a6e22e\"\u003eparams\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e// Remove replace() function if you want to see the exposed key in the log file.\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#a6e22e\"\u003eZabbix\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eLog\u003c/span\u003e(\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      \u003cspan style=\"color:#ae81ff\"\u003e4\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;[Qiyeweixin Webhook] URL: \u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eurl\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003ereplace\u003c/span\u003e(\u003cspan style=\"color:#a6e22e\"\u003eQiyeweixin\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003ekey\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u0026lt;BOT KEY\u0026gt;\u0026#34;\u003c/span\u003e)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    );\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#a6e22e\"\u003eZabbix\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eLog\u003c/span\u003e(\u003cspan style=\"color:#ae81ff\"\u003e4\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;[Qiyeweixin Webhook] params: \u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003edata\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#a6e22e\"\u003eresponse\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003erequest\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003ePost\u003c/span\u003e(\u003cspan style=\"color:#a6e22e\"\u003eurl\u003c/span\u003e, \u003cspan style=\"color:#a6e22e\"\u003edata\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#a6e22e\"\u003eZabbix\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eLog\u003c/span\u003e(\u003cspan style=\"color:#ae81ff\"\u003e4\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;[Qiyeweixin Webhook] HTTP code: \u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003erequest\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eStatus\u003c/span\u003e());\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003etry\u003c/span\u003e {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      \u003cspan style=\"color:#a6e22e\"\u003eresponse\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eJSON\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eparse\u003c/span\u003e(\u003cspan style=\"color:#a6e22e\"\u003eresponse\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    } \u003cspan style=\"color:#66d9ef\"\u003ecatch\u003c/span\u003e (\u003cspan style=\"color:#a6e22e\"\u003eerror\u003c/span\u003e) {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      \u003cspan style=\"color:#a6e22e\"\u003eresponse\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#66d9ef\"\u003enull\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    }\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003eif\u003c/span\u003e (\u003cspan style=\"color:#a6e22e\"\u003erequest\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eStatus\u003c/span\u003e() \u003cspan style=\"color:#f92672\"\u003e!==\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e200\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e||\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eresponse\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eerrcode\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e!==\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e) {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      \u003cspan style=\"color:#66d9ef\"\u003eif\u003c/span\u003e (\u003cspan style=\"color:#66d9ef\"\u003etypeof\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eresponse\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eerrmsg\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e===\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;string\u0026#34;\u003c/span\u003e) {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#66d9ef\"\u003ethrow\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eresponse\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eerrmsg\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      } \u003cspan style=\"color:#66d9ef\"\u003eelse\u003c/span\u003e {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#66d9ef\"\u003ethrow\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;Unknown error. Check debug log for more information.\u0026#34;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      }\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    }\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  },\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e};\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003etry\u003c/span\u003e {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#66d9ef\"\u003evar\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eparams\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eJSON\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eparse\u003c/span\u003e(\u003cspan style=\"color:#a6e22e\"\u003evalue\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#66d9ef\"\u003eif\u003c/span\u003e (\u003cspan style=\"color:#66d9ef\"\u003etypeof\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eparams\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eKey\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e===\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;undefined\u0026#34;\u003c/span\u003e) {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003ethrow\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;Incorrect value is given for parameter \u0026#34;Key\u0026#34;: parameter is missing\u0026#39;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  }\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#a6e22e\"\u003eQiyeweixin\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003ekey\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eparams\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eKey\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#66d9ef\"\u003eif\u003c/span\u003e (\u003cspan style=\"color:#a6e22e\"\u003eparams\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eHTTPProxy\u003c/span\u003e) {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#a6e22e\"\u003eQiyeweixin\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eproxy\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eparams\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eHTTPProxy\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  }\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#a6e22e\"\u003eQiyeweixin\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eto\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eparams\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eTo\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#a6e22e\"\u003eQiyeweixin\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003emessage\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eparams\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eSubject\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\\n\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eparams\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eMessage\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#a6e22e\"\u003eQiyeweixin\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003esendMessage\u003c/span\u003e();\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#66d9ef\"\u003ereturn\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;OK\u0026#34;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e} \u003cspan style=\"color:#66d9ef\"\u003ecatch\u003c/span\u003e (\u003cspan style=\"color:#a6e22e\"\u003eerror\u003c/span\u003e) {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#a6e22e\"\u003eZabbix\u003c/span\u003e.\u003cspan style=\"color:#a6e22e\"\u003eLog\u003c/span\u003e(\u003cspan style=\"color:#ae81ff\"\u003e4\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;[Qiyeweixin Webhook] notification failed: \u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eerror\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#66d9ef\"\u003ethrow\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;Sending failed: \u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eerror\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;.\u0026#34;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e}\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e选择Message templates，把所有默认的模板都添加上\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cimg alt=\"image-1714283802397\" loading=\"lazy\" src=\"/upload/2024/04/image-1714283802397.png\"\u003e\u003c/p\u003e","title":"zabbix5.0设置企业微信机器人推送"},{"content":"一、修改成腾讯云镜像源 1、命令 npm config set registry http://mirrors.cloud.tencent.com/npm/ 2. 验证命令 npm config get registry 如果返回http://mirrors.cloud.tencent.com/npm/，说明镜像配置成功。\n二、修改成淘宝镜像源 1. 命令 npm config set registry https://registry.npmmirror.com 2. 验证命令 npm config get registry 如果返回https://registry.npmmirror.com，说明镜像配置成功。\n三、修改成华为云镜像源 1.命令 npm config set registry https://mirrors.huaweicloud.com/repository/npm/ 2. 验证命令 npm config get registry 如果返回https://mirrors.huaweicloud.com/repository/npm/，说明镜像配置成功。\n","permalink":"/posts/npm-shi-yong-guo-nei-jing-xiang-jia-su-de-fang-fa/","summary":"一、修改成腾讯云镜像源1、命令npm config set registry \u003ca href=\"http://mirrors.cloud.tencent.com/npm/\"\u003ehttp://mirrors.cloud.tencent.com/npm/\u003c/a\u003e验证命令npm config get registry如果返回http://mirrors.cloud.tencent.com/npm/，说明镜像配","title":"npm使用国内镜像加速的方法"},{"content":"1.sacaos的GitHub地址 https://github.com/IceWhaleTech/CasaOS 2.可访问GitHub用户执行以下命令即可 wget -qO- https://get.casaos.io | sudo bash 3.不能访问GitHub的用户，把get.casaos.io.sh上传到Linux，然后执行 bash get.casaos.io 4.视频 ","permalink":"/posts/yi-tiao-ming-ling-an-zhuang-yi-ge-yun-xi-tong-sacaos-guo-nei-ye-zhi-chi-an-zhuang/","summary":"\u003ch3 id=\"1sacaos的github地址\"\u003e1.sacaos的GitHub地址\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/IceWhaleTech/CasaOS\"\u003ehttps://github.com/IceWhaleTech/CasaOS\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"2可访问github用户执行以下命令即可\"\u003e2.可访问GitHub用户执行以下命令即可\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ewget -qO- https://get.casaos.io | sudo bash\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3不能访问github的用户把getcasaosiosh上传到linux然后执行\"\u003e3.不能访问GitHub的用户，把get.casaos.io.sh上传到Linux，然后执行\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ebash get.casaos.io\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"4视频\"\u003e4.视频\u003c/h3\u003e\n\u003ciframe src=\"//player.bilibili.com/player.html?bvid=BV18z4y1M7Qh\u0026page=1\" scrolling=\"no\" border=\"0\" frameborder=\"no\" framespacing=\"0\" allowfullscreen=\"true\"\u003e \u003c/iframe\u003e","title":"一条命令安装一个云系统sacaos，国内也支持安装"},{"content":"1.下载群晖系统套件： Virtual Machine Manager 2.从GitHub的lean大佬代码库下载编译好的X86固件 下载地址： https://github.com/coolsnowwolf/lede/releases/download/20220505/openwrt-x64-R22.5.5-generic-squashfs-combined-efi.rar 代理下载： https://ghproxy.com/https://github.com/coolsnowwolf/lede/releases/download/20220505/openwrt-x64-R22.5.5-generic-squashfs-combined-efi.rar 3.openwrt镜像解压后，上传到群晖虚拟机镜像库 4.创建openwrt虚拟机 5.修改IP地址，IP地址和您的局域网同一网段，最好后面几位 vi /etc/config/network 6.登录openwrt 账号：root 密码：password 7.视频 ","permalink":"/posts/qun-hui-xu-ni-ji-an-zhuang-openwrt-ruan-lu-you-xi-tong--zuo-wei-pang-lu-you-wei-ju-yu-wang-she-bei-ti-gong-fu-wu/","summary":"1.下载群晖系统套件：Virtual Machine Manager2.从GitHub的lean大佬代码库下载编译好的X86固件下载地址：https://github.com/coolsnowwolf/lede/releases/download/20220505/openwrt-x64-R22.5","title":"群晖虚拟机安装openwrt软路由系统，作为旁路由为局域网设备提供服务"},{"content":" 官网：https://hexo.io/\n1.环境准备 node.js：版本需不低于 10.13，下载地址：https://nodejs.cn/download/ git：下载地址：（windows）https://git-scm.com/download/win # Linux apt-get install git-core yum install git-core 2.检查环境 node -v git version 3.安装Hexo npm install -g hexo-cli 4.建站 hexo init test cd test npm install 5.使用 # 启动 hexo g hexo s -p 80 # 新建文章 hexo new \u0026#34;test post\u0026#34; # 生成的文章路径：test/source/_posts # markdown语法：https://markdown.com.cn/ # 发布文章 hexo g hexo s -p 80 6.视频 ","permalink":"/posts/zui-jian-bo-ke--zhi-shi-ku-hexo-da-jian-jiao-cheng/","summary":"官网：https://hexo.io/1.环境准备node.js：版本需不低于 10.13，下载地址：https://nodejs.cn/download/git：下载地址：（windows）https://git-scm.com/download/win# Linuxapt-get install","title":"最简博客、知识库hexo搭建教程"},{"content":"1.官网\nhttps://www.dokuwiki.org/dokuwiki 2.Docker安装文档 https://hub.docker.com/r/linuxserver/dokuwiki 3.步骤 镜像拉取 docker pull linuxserver/dokuwiki docker-compose version: \u0026#34;2.1\u0026#34; services: dokuwiki: image: lscr.io/linuxserver/dokuwiki:latest container_name: dokuwiki environment: - PUID=1000 - PGID=1000 - TZ=Asia/Shanghai volumes: - /path/to/appdata/config:/config ports: - 80:80 -443:443 restart: unless-stopped docker cli 命令安装 docker run -d --name=dokuwiki -e PUID=1000 -e PGID=1000 -e TZ=Asia/Shanghai -p 8000:80 -p 8443:443 -v /opt/dokuwiki:/config --restart unless-stopped lscr.io/linuxserver/dokuwiki:latest 4.视频 ","permalink":"/posts/qun-hui-docker-an-zhuang-dokuwiki-ge-ren-zhi-shi-guan-li-xi-tong/","summary":"1.官网https://www.dokuwiki.org/dokuwiki2.Docker安装文档https://hub.docker.com/r/linuxserver/dokuwiki3.步骤镜像拉取docker pull linuxserver/dokuwikidocker-composeve","title":"群晖docker安装dokuwiki个人知识管理系统"},{"content":"1.docker compose文件 version: \u0026#39;3\u0026#39; services: jellyfin: image: nyanmisaka/jellyfin:latest container_name: jellyfin volumes: - /volume1/docker/jellyfin/config:/config - /volume1/docker/jellyfin/cache:/cache - /volume2/Media:/media devices: - /dev/dri:/dev/dri ports: - \u0026#34;8096:8096\u0026#34; restart: always 2.备注 路径/volume1部分：代表你的群晖存储空间1 路径/docker/jellyfin/config部分：是你群晖file station看到的路径 视频 ","permalink":"/posts/qun-hui-dsm72-xi-tong-docker-da-jian-jellyfin-ying-shi-fu-wu/","summary":"1.docker compose文件version: '3'services:  jellyfin:    image: nyanmisaka/jellyfin:latest    container_name: jellyfin    volumes:      - /volume","title":"群晖DSM7.2系统docker搭建jellyfin影视服务"},{"content":"1.群晖安装虚拟机系统 2.创建DSM虚拟机获取SN和mac 3.通过磁盘精灵，替换启动U盘中的user-config.yml的SN和mac 4.激活AME # DSM7.1 curl -skL https://mi-d.cn/d/aem.py | python # DSM7.2 curl -skL https://mi-d.cn/d/ame72-3005.py | python 5.附件 ame72-3005.py aem 5.视频 ","permalink":"/posts/hei-qun-hui-ban-xi-bai-bu-zhou/","summary":"1.群晖安装虚拟机系统2.创建DSM虚拟机获取SN和mac3.通过磁盘精灵，替换启动U盘中的user-config.yml的SN和mac4.激活AME# DSM7.1curl -skL \u003ca href=\"https://mi-d.cn/d/aem.py\"\u003ehttps://mi-d.cn/d/aem.py\u003c/a\u003e | python# DSM7.2curl -skL https:","title":"黑群晖半洗白步骤"},{"content":"1.启动admin账号，同时设置一个密码 2.找到群晖SN序列号，保存下来 3.打开浏览器输入以下链接：替换IP和端口、admin密码 https://群晖内网IP:5001/webapi/auth.cgi?api=SYNO.API.Auth\u0026amp;version=3\u0026amp;method=login\u0026amp;account=admin\u0026amp;passwd=密码\u0026amp;format=cookie 注：显示success为true则开启成功\n4.继续输入以下链接：替换ip端口和群晖序列号 https://群晖内网IP:5001/webapi/auth.cgi?api=SYNO.ActiveBackup.Activation\u0026amp;method=set\u0026amp;version=1\u0026amp;activated=true\u0026amp;serial_number=群晖序列号 注：activated和success返回true则开启成功 安全考虑，关闭admin用户\n5.视频 ","permalink":"/posts/hei-qun-hui-dsm-xi-tong-ji-huo-activebackupforbusiness-tao-jian-de-fang-fa/","summary":"1.启动admin账号，同时设置一个密码2.找到群晖SN序列号，保存下来3.打开浏览器输入以下链接：替换IP和端口、admin密码https://群晖内网IP:5001/webapi/auth.cgi?api=SYNO.API.Auth\u0026amp;version=3\u0026amp;method=login\u0026amp;","title":"黑群晖DSM系统激活Active Backup for Business套件的方法"},{"content":"1.Github资源下载 链接：https://ghproxy.com/ 方法：要下载的github资源前加上面的网址 https://github.com/wjz304/arpl-i18n/releases/download/23.8.0/arpl-i18n-23.8.0.img.zip https://ghproxy.com/https://github.com/wjz304/arpl-i18n/releases/download/23.8.0/arpl-i18n-23.8.0.img.zip git clone https://ghproxy.com/https://xxxx.cn/xx.git 2.国内docker镜像下载问题 链接：https://dockerproxy.com # 新增文件： vi /etc/docker/daemon.json # 添加内容： { \u0026#34;registry-mirrors\u0026#34;: [ \u0026#34;https://dockerproxy.com\u0026#34; ] } # 重启docker service docker restart 使用方法： docker search ubuntu docker pull ubuntu docker pull dockerproxy.com/library/ubuntu docker pull dockerproxy.com/xhofe/alist ","permalink":"/posts/jie-jue-guo-nei-github-zi-yuan-he-docker-jing-xiang-xia-zai-nan-de-wen-ti/","summary":"\u003ch3 id=\"1github资源下载\"\u003e1.Github资源下载\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e链接：https://ghproxy.com/\u003c/li\u003e\n\u003cli\u003e方法：要下载的github资源前加上面的网址\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ehttps://github.com/wjz304/arpl-i18n/releases/download/23.8.0/arpl-i18n-23.8.0.img.zip\nhttps://ghproxy.com/https://github.com/wjz304/arpl-i18n/releases/download/23.8.0/arpl-i18n-23.8.0.img.zip\ngit clone https://ghproxy.com/https://xxxx.cn/xx.git\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2国内docker镜像下载问题\"\u003e2.国内docker镜像下载问题\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e链接：https://dockerproxy.com\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e# 新增文件：\nvi /etc/docker/daemon.json\n# 添加内容：\n{ \u0026#34;registry-mirrors\u0026#34;: [ \u0026#34;https://dockerproxy.com\u0026#34; ] }\n# 重启docker\nservice docker restart\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e使用方法：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003edocker search ubuntu\ndocker pull ubuntu\ndocker pull dockerproxy.com/library/ubuntu\ndocker pull dockerproxy.com/xhofe/alist\n\u003c/code\u003e\u003c/pre\u003e","title":"解决国内GitHub资源和docker镜像下载难的问题"},{"content":"1.Windows激活 slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx slmgr.vbs -skms kms.03k.org slmgr.vbs -ato 2.Office激活 cd \\Program Files\\Microsoft Office\\Office16 cscript ospp.vbs /sethst:kms.03k.org cscript ospp.vbs /inpkey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx cscript ospp.vbs /act cscript ospp.vbs /dstatusall 微软官方sn Windows: https://docs.microsoft.com/en-us/windows-server/get-started/kmsclientkeys Office 2013: https://technet.microsoft.com/en-us/library/dn385360.aspx Office 2016 \u0026amp; 2019: https://technet.microsoft.com/en-us/library/dn385360(v=office.16).aspx 3.公共kms服务器 kms.03k.org kms.chinancce.com kms.luody.info kms.lotro.cc kms.luochenzhimu.com kms8.MSGuides.com kms9.MSGuides.com ","permalink":"/posts/bu-zhuang-kms-fu-wu-qi-ru-he-ji-huo-windows-he-office/","summary":"\u003ch3 id=\"1windows激活\"\u003e1.Windows激活\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eslmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\nslmgr.vbs -skms kms.03k.org\nslmgr.vbs -ato\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2office激活\"\u003e2.Office激活\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ecd \\Program Files\\Microsoft Office\\Office16\ncscript ospp.vbs /sethst:kms.03k.org\ncscript ospp.vbs /inpkey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx\ncscript ospp.vbs /act\ncscript ospp.vbs /dstatusall\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"微软官方sn\"\u003e微软官方sn\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eWindows: https://docs.microsoft.com/en-us/windows-server/get-started/kmsclientkeys\nOffice 2013: https://technet.microsoft.com/en-us/library/dn385360.aspx\nOffice 2016 \u0026amp; 2019: https://technet.microsoft.com/en-us/library/dn385360(v=office.16).aspx\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3公共kms服务器\"\u003e3.公共kms服务器\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ekms.03k.org\nkms.chinancce.com\nkms.luody.info\nkms.lotro.cc\nkms.luochenzhimu.com\nkms8.MSGuides.com\nkms9.MSGuides.com\n\u003c/code\u003e\u003c/pre\u003e","title":"不装kms服务器如何激活windows和office"},{"content":"1.系统安装 系统更新及常用软件安装 yum update -y yum install wget wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo yum install -y vim net-tools nmon htop rsync iptraf-ng tree lrzsz ntp iftop telnet tcpdump traceroute 环境配置 echo \u0026#34;0 8 * * * root ntpdate ntp.volphi.com\u0026#34; \u0026gt;\u0026gt; /etc/crontab sed -i \u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39; /etc/selinux/config sed -i \u0026#39;s@GSSAPIAuthentication yes@GSSAPIAuthentication no@\u0026#39; /etc/ssh/sshd_config sed -i \u0026#39;s@#UseDNS yes@UseDNS no@\u0026#39; /etc/ssh/sshd_config firewall-cmd --add-port=3306/tcp --permanent firewall-cmd --add-port=3306/tcp firewall-cmd --add-port=33060/tcp --permanent firewall-cmd --add-port=33060/tcp 2.mysql8.0安装 上传mysql80-community-release-el7-7.noarch.rpm到服务器 yum install mysql80-community-release-el7-7.noarch.rpm yum -y install yum-utils yum install mysql-community-server-8.0.28 3.mysql8.0配置 [mysqld] # utf8默认库 character-set-server = utf8mb4 collation-server = utf8mb4_general_ci # 数据最大的连接数 max_connections =1000 binlog_format=mixed # 设定非交互式断开连接的时间30秒 wait_timeout=30 # 设定交互式断开连接的时间30秒 interactive_timeout = 30 # mysql数据的ID server-id=1144301 # master db binlog-ignore-db = mysql,information_schema,performance_schema,sys auto-increment-increment = 2 auto-increment-offset = 1 # slave db replicate-ignore-db = mysql,information_schema,performance_schema,sys log-slave-updates = ON datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid 4.用户创建和密码修改 grep \u0026#39;temporary password\u0026#39; /var/log/mysqld.log mysql -uroot -p mysql中操作 ALTER USER \u0026#39;root\u0026#39;@\u0026#39;localhost\u0026#39; IDENTIFIED BY \u0026#39;123456\u0026#39;; create user \u0026#39;admin@\u0026#39;%\u0026#39; identified by \u0026#39;123456\u0026#39;; grant all privileges on *.* to \u0026#39;admin\u0026#39;@\u0026#39;%\u0026#39;; create user \u0026#39;sync\u0026#39;@\u0026#39;%\u0026#39; identified by \u0026#39;123456\u0026#39;; grant all privileges on *.* to \u0026#39;sync\u0026#39;@\u0026#39;%\u0026#39;; ALTER USER \u0026#39;sync\u0026#39;@\u0026#39;%\u0026#39; IDENTIFIED WITH mysql_native_password BY \u0026#39;123456\u0026#39;; FLUSH PRIVILEGES; ","permalink":"/posts/centos7-zhong-mysql80-an-zhuang-guo-cheng/","summary":"\u003ch3 id=\"1系统安装\"\u003e1.系统安装\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e系统更新及常用软件安装\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eyum update -y\nyum install wget\nwget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo\nyum install -y vim net-tools nmon htop rsync iptraf-ng tree lrzsz ntp iftop telnet tcpdump traceroute\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e环境配置\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eecho \u0026#34;0 8 * * * root ntpdate ntp.volphi.com\u0026#34; \u0026gt;\u0026gt; /etc/crontab\nsed -i \u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39; /etc/selinux/config\nsed -i \u0026#39;s@GSSAPIAuthentication yes@GSSAPIAuthentication no@\u0026#39; /etc/ssh/sshd_config\nsed -i \u0026#39;s@#UseDNS yes@UseDNS no@\u0026#39; /etc/ssh/sshd_config\nfirewall-cmd --add-port=3306/tcp --permanent\nfirewall-cmd --add-port=3306/tcp\nfirewall-cmd --add-port=33060/tcp --permanent\nfirewall-cmd --add-port=33060/tcp\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2mysql80安装\"\u003e2.mysql8.0安装\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e上传mysql80-community-release-el7-7.noarch.rpm到服务器\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eyum install mysql80-community-release-el7-7.noarch.rpm\nyum -y install yum-utils\nyum install mysql-community-server-8.0.28\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3mysql80配置\"\u003e3.mysql8.0配置\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[mysqld]\n# utf8默认库\ncharacter-set-server = utf8mb4\ncollation-server = utf8mb4_general_ci\n\n# 数据最大的连接数\nmax_connections =1000\nbinlog_format=mixed\n\n# 设定非交互式断开连接的时间30秒\nwait_timeout=30\n# 设定交互式断开连接的时间30秒\ninteractive_timeout = 30\n\n# mysql数据的ID\nserver-id=1144301\n\n# master db\nbinlog-ignore-db = mysql,information_schema,performance_schema,sys\nauto-increment-increment = 2\nauto-increment-offset = 1\n# slave db\nreplicate-ignore-db = mysql,information_schema,performance_schema,sys\nlog-slave-updates = ON\n\ndatadir=/var/lib/mysql\nsocket=/var/lib/mysql/mysql.sock\n\nlog-error=/var/log/mysqld.log\npid-file=/var/run/mysqld/mysqld.pid\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"4用户创建和密码修改\"\u003e4.用户创建和密码修改\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003egrep \u0026#39;temporary password\u0026#39; /var/log/mysqld.log\nmysql -uroot -p\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003emysql中操作\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eALTER USER \u0026#39;root\u0026#39;@\u0026#39;localhost\u0026#39; IDENTIFIED BY \u0026#39;123456\u0026#39;;\ncreate user \u0026#39;admin@\u0026#39;%\u0026#39; identified by \u0026#39;123456\u0026#39;;\ngrant all privileges on *.* to  \u0026#39;admin\u0026#39;@\u0026#39;%\u0026#39;;\n\ncreate user \u0026#39;sync\u0026#39;@\u0026#39;%\u0026#39; identified by \u0026#39;123456\u0026#39;;\ngrant all privileges on *.* to  \u0026#39;sync\u0026#39;@\u0026#39;%\u0026#39;;\nALTER USER \u0026#39;sync\u0026#39;@\u0026#39;%\u0026#39; IDENTIFIED WITH mysql_native_password BY \u0026#39;123456\u0026#39;;\nFLUSH PRIVILEGES;\n\u003c/code\u003e\u003c/pre\u003e","title":"Centos7中Mysql8.0安装过程"},{"content":"BIOS设置 1、 确认BIOS中 Boot mode为【UEFI】 2、 确认BIOS中 Storage OpRom Policy 为【UEFI Only】 3、 确认BIOS中SATA mode为【Raid】 4、 确认BIOS中 SSATA mode为【IDE】 把raid卡驱动复制到U盘 联想官网下载megasr-17.01.2016.1107-1-rhel73-x86_64.iso，复制到U盘根目录。 开始安装 进入GRUB界面，选中Install CentOS Linux 7,按下e键。在第一项输入linux inst.dd modprobe.blacklist=ahci quiet，屏蔽ahci，在queit之前。 如图所示，我选择2，自动发现刚才放进去的ISO。以同样的方式选择rpm 然后按c继续。（该过程为自动发现，不需要操作），然后就能找到设备。 ","permalink":"/posts/lian-xiang-rd350-ban-zai-raid110i-an-zhuang-centos7-bu-shi-bie-raid-she-bei-md/","summary":"\u003ch3 id=\"bios设置\"\u003eBIOS设置\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e1、 确认BIOS中 Boot mode为【UEFI】\n2、 确认BIOS中 Storage OpRom Policy 为【UEFI Only】\n3、 确认BIOS中SATA mode为【Raid】\n4、 确认BIOS中 SSATA mode为【IDE】\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"把raid卡驱动复制到u盘\"\u003e把raid卡驱动复制到U盘\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e联想官网下载megasr-17.01.2016.1107-1-rhel73-x86_64.iso，复制到U盘根目录。\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"开始安装\"\u003e开始安装\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e进入GRUB界面，选中Install CentOS Linux 7,按下e键。在第一项输入linux inst.dd modprobe.blacklist=ahci quiet，屏蔽ahci，在queit之前。\n\u003cimg alt=\"245d1dd2-27e4-4913-a6be-0b7b90d459c5\" loading=\"lazy\" src=\"/upload/2023/12/245d1dd2-27e4-4913-a6be-0b7b90d459c5.png\"\u003e\u003c/li\u003e\n\u003cli\u003e如图所示，我选择2，自动发现刚才放进去的ISO。以同样的方式选择rpm\n\u003cimg alt=\"419f3c68-510f-4ee3-843d-815762e043a4\" loading=\"lazy\" src=\"/upload/2023/12/419f3c68-510f-4ee3-843d-815762e043a4.png\"\u003e\u003c/li\u003e\n\u003cli\u003e然后按c继续。（该过程为自动发现，不需要操作），然后就能找到设备。\n\u003cimg alt=\"ec773281-d9df-4043-b18c-4c32ed5703f0\" loading=\"lazy\" src=\"/upload/2023/12/ec773281-d9df-4043-b18c-4c32ed5703f0.png\"\u003e\u003c/li\u003e\n\u003c/ul\u003e","title":"联想RD350板载RAID110i，安装CentOS 7 不识别RAID设备.md"},{"content":"1.启动Windows Time服务 net start w32time 2.时间同步命令 # 自动同步 w32tm /resync # 与外部时间服务器同步 w32tm /config /manualpeerlist:\u0026#34;210.72.145.44\u0026#34; /syncfromflags:manual /reliable:yes /update /manualpeerlist 表示外部时间源服务器列表，多个服务器之间可用空格分隔。 /syncfromflags:manual 表示与指定的外部时间源服务器列表中的服务器进行同步。 /reliable:yes 设置此计算机是一个可靠的时间源。此设置只对域控制器有意义。 /update 向时间服务发出配置已更改的通知，使更改生效。 ","permalink":"/posts/windows-shi-jian-tong-bu-ming-ling/","summary":"\u003ch3 id=\"1启动windows-time服务\"\u003e1.启动Windows Time服务\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003enet start w32time\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2时间同步命令\"\u003e2.时间同步命令\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e# 自动同步\nw32tm /resync\n# 与外部时间服务器同步\nw32tm /config /manualpeerlist:\u0026#34;210.72.145.44\u0026#34; /syncfromflags:manual /reliable:yes /update\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e/manualpeerlist 表示外部时间源服务器列表，多个服务器之间可用空格分隔。\u003c/li\u003e\n\u003cli\u003e/syncfromflags:manual 表示与指定的外部时间源服务器列表中的服务器进行同步。\u003c/li\u003e\n\u003cli\u003e/reliable:yes 设置此计算机是一个可靠的时间源。此设置只对域控制器有意义。\u003c/li\u003e\n\u003cli\u003e/update 向时间服务发出配置已更改的通知，使更改生效。\u003c/li\u003e\n\u003c/ul\u003e","title":"windows时间同步命令"},{"content":"1.服务器证书过期 ./easyrsa renew server nopass 2.客户端证书过期 ./easyrsa renew test nopass ","permalink":"/posts/openvpn-fu-wu-duan-zheng-shu-guo-qi-jie-jue-fang-fa/","summary":"\u003ch3 id=\"1服务器证书过期\"\u003e1.服务器证书过期\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e./easyrsa renew server nopass\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2客户端证书过期\"\u003e2.客户端证书过期\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e./easyrsa renew test nopass\n\u003c/code\u003e\u003c/pre\u003e","title":"openvpn服务端证书过期解决方法"},{"content":"原因 由于windows系统下换行符为 \\r\\n，linux下换行符为 \\n，所以导致在windows下编写的文件会比linux下多回车符号 \\r。 解决方法 只需要去掉多余的 \\r 回车符 即可。操作办法可以用sed命令进行全局替换 sed \u0026#39;s/\\r//\u0026#39; -i test.sh ","permalink":"/posts/shell-jiao-ben-chu-xian-cuo-wu-binbashm-huai-de-jie-shi-qi--de-jie-jue-fang-fa/","summary":"\u003ch3 id=\"原因\"\u003e原因\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e由于windows系统下换行符为 \\r\\n，linux下换行符为 \\n，所以导致在windows下编写的文件会比linux下多回车符号 \\r。\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"解决方法\"\u003e解决方法\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e只需要去掉多余的 \\r 回车符 即可。操作办法可以用sed命令进行全局替换\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esed \u0026#39;s/\\r//\u0026#39; -i test.sh\n\u003c/code\u003e\u003c/pre\u003e","title":"shell脚本出现错误“/bin/bash^M：坏的解释器”的解决方法"},{"content":"1.更新系统 apt-get update -y apt-get upgrade -y 2.一键安装v2ray bash \u0026lt;(wget -qO- -o- https://git.io/v2ray.sh) 3.开放防火墙端口 # 根据实际情况开放端口 iptables -I INPUT -p tcp --dport 891 -j ACCEPT 端口测试网站 https://ping.eu/port-chk 4.开启BBR echo net.core.default_qdisc=fq \u0026gt;\u0026gt; /etc/sysctl.conf echo net.ipv4.tcp_congestion_control=bbr \u0026gt;\u0026gt; /etc/sysctl.conf sysctl -p # 查看是否开启 lsmod | grep bbr ","permalink":"/posts/ubuntu2004-da-jian-v2ray-fu-wu-vpn-de-jiao-cheng/","summary":"\u003ch3 id=\"1更新系统\"\u003e1.更新系统\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eapt-get update -y\napt-get upgrade -y\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2一键安装v2ray\"\u003e2.一键安装v2ray\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ebash \u0026lt;(wget -qO- -o- https://git.io/v2ray.sh)\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3开放防火墙端口\"\u003e3.开放防火墙端口\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e# 根据实际情况开放端口\niptables -I INPUT -p tcp --dport 891 -j ACCEPT\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e端口测试网站\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ehttps://ping.eu/port-chk\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"4开启bbr\"\u003e4.开启BBR\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eecho net.core.default_qdisc=fq \u0026gt;\u0026gt; /etc/sysctl.conf\necho net.ipv4.tcp_congestion_control=bbr \u0026gt;\u0026gt; /etc/sysctl.conf\nsysctl -p\n# 查看是否开启\nlsmod | grep bbr\n\u003c/code\u003e\u003c/pre\u003e","title":"Ubuntu20.04搭建v2ray服务vpn的教程"},{"content":"远程进入AP配置，默认是开启Stelnet的。 stelnet IP # 登录会创建账号密码 查看当前AP模式 display version 设置AP模式 ap-mode-switch fit AC中查看ap连接状态 dis ap all dis arp | include mac地址 ","permalink":"/posts/hua-wei-ap-xiu-gai-fat-he-fit-mo-shi/","summary":"\u003ch3 id=\"远程进入ap配置默认是开启stelnet的\"\u003e远程进入AP配置，默认是开启Stelnet的。\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003estelnet IP\n# 登录会创建账号密码\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"查看当前ap模式\"\u003e查看当前AP模式\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003edisplay version\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"设置ap模式\"\u003e设置AP模式\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eap-mode-switch fit\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"ac中查看ap连接状态\"\u003eAC中查看ap连接状态\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003edis ap all\ndis arp | include mac地址\n\u003c/code\u003e\u003c/pre\u003e","title":"华为AP修改fat和fit模式"},{"content":"从命令行创建网络共享 语法如下： net share sharename=folderpath /grant:username,permissions sharename: 要创建的共享名称 username : 可以访问共享该文件夹的用户ID permission: 访问共享文件夹的权限：Read, Change or Full 例如，与域中的每个人共享文件夹E:\\Documents并授予完全权限 net share Docs=C:\\Users\\Public\\Downloads /grant:everyone,FULL 如果允许多个用户访问共享，则可以限制同时访问共享的用户数量。这将防止对系统的性能影响。以下命令将限制设置为10个用户。 net share Docs=E:\\Documents /grant:everyone,FULL /users:10 与特定用户共享并仅授予读取权限的命令 net share Docs=E:\\Documents /grant:username,READ 从命令行删除网络共享（即禁用文件夹共享） 删除网络共享语法如下 net share sharename /delete 例如，要删除上面创建的共享，命令将如下所示。 net share Docs /delete 另外，我们也可以使用文件夹的物理位置来禁用共享 net share E:\\Docs /delete 列出在本地计算机上创建的共享 net share ","permalink":"/posts/windows-tong-guo-ming-ling-xing-gong-xiang-wen-jian-jia/","summary":"\u003ch3 id=\"从命令行创建网络共享\"\u003e从命令行创建网络共享\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e语法如下：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003enet share sharename=folderpath /grant:username,permissions\nsharename: 要创建的共享名称\nusername : 可以访问共享该文件夹的用户ID\npermission: 访问共享文件夹的权限：Read, Change or Full\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e例如，与域中的每个人共享文件夹E:\\Documents并授予完全权限\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003enet share Docs=C:\\Users\\Public\\Downloads /grant:everyone,FULL\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e如果允许多个用户访问共享，则可以限制同时访问共享的用户数量。这将防止对系统的性能影响。以下命令将限制设置为10个用户。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003enet share Docs=E:\\Documents /grant:everyone,FULL /users:10\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e与特定用户共享并仅授予读取权限的命令\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003enet share Docs=E:\\Documents /grant:username,READ\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"从命令行删除网络共享即禁用文件夹共享\"\u003e从命令行删除网络共享（即禁用文件夹共享）\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e删除网络共享语法如下\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003enet share sharename /delete\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e例如，要删除上面创建的共享，命令将如下所示。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003enet share Docs /delete\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e另外，我们也可以使用文件夹的物理位置来禁用共享\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003enet share E:\\Docs /delete\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"列出在本地计算机上创建的共享\"\u003e列出在本地计算机上创建的共享\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003enet share\n\u003c/code\u003e\u003c/pre\u003e","title":"Windows通过命令行共享文件夹"},{"content":"1.USB启动盘制作 找一个u盘至少8G大小。 打开github链接下载制作镜像，比如：tinycore-redpill.v0.9.4.3.img.gz https://github.com/pocopico/tinycore-redpill 解压后，使用Rufus制作工具，把镜像写入u盘 2.USB启动并制作引导 设置Bios，硬盘启动模式修改为ACHI模式，不要使用raid卡模式 把USB启动设置为第一启动，或者开机后按F11选择 3.进入USB系统后，在终端输入以下命令，遇到选择选“Y”，或者默认选项。 ./rploader.sh update ./rploader.sh fullupgrade ./rploader.sh serialgen DS3615xs ./rploader.sh identifyusb ./rploader.sh satamap ./rploader.sh build ds3615xs-7.1.1-42962 4.重启GEN8服务器 仍然从USB引导，选择第一项。 5.安装群晖系统 从官方下载：ds3615xs-7.1.1-42962安装包。 此时看不到启动的IP地址，可以从路由器中找到。 输入：IP:5000就可以安装了，安装完重启就可以设置了。 ","permalink":"/posts/hp-hui-pu-gen8-an-zhuang-hei-qun-hui/","summary":"\u003ch3 id=\"1usb启动盘制作\"\u003e1.USB启动盘制作\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e找一个u盘至少8G大小。\u003c/li\u003e\n\u003cli\u003e打开github链接下载制作镜像，比如：tinycore-redpill.v0.9.4.3.img.gz\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ehttps://github.com/pocopico/tinycore-redpill\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e解压后，使用Rufus制作工具，把镜像写入u盘\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"2usb启动并制作引导\"\u003e2.USB启动并制作引导\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e设置Bios，硬盘启动模式修改为ACHI模式，不要使用raid卡模式\u003c/li\u003e\n\u003cli\u003e把USB启动设置为第一启动，或者开机后按F11选择\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"3进入usb系统后在终端输入以下命令遇到选择选y或者默认选项\"\u003e3.进入USB系统后，在终端输入以下命令，遇到选择选“Y”，或者默认选项。\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e./rploader.sh update\n./rploader.sh fullupgrade\n./rploader.sh serialgen  DS3615xs\n./rploader.sh identifyusb\n./rploader.sh satamap\n./rploader.sh build ds3615xs-7.1.1-42962\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"4重启gen8服务器\"\u003e4.重启GEN8服务器\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e仍然从USB引导，选择第一项。\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"5安装群晖系统\"\u003e5.安装群晖系统\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e从官方下载：ds3615xs-7.1.1-42962安装包。\u003c/li\u003e\n\u003cli\u003e此时看不到启动的IP地址，可以从路由器中找到。\u003c/li\u003e\n\u003cli\u003e输入：IP:5000就可以安装了，安装完重启就可以设置了。\u003c/li\u003e\n\u003c/ul\u003e","title":"HP惠普Gen8安装黑群晖"},{"content":"1.安装wget yum install wget 2.备份原来的源 cd /etc/yum.repos.d mv CentOS-Base.repo CentOS-Base.repo.bak 3.下载替换源 wget http://mirrors.163.com/.help/CentOS7-Base-163.repo mv CentOS7-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo 4.清理缓存 yum clean all yum makecache 5.更新系统 yum update -y ","permalink":"/posts/centos7-yuan-geng-huan-wei-guo-nei-163-yuan/","summary":"\u003ch3 id=\"1安装wget\"\u003e1.安装wget\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eyum install wget\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2备份原来的源\"\u003e2.备份原来的源\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ecd /etc/yum.repos.d\nmv CentOS-Base.repo CentOS-Base.repo.bak\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3下载替换源\"\u003e3.下载替换源\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ewget http://mirrors.163.com/.help/CentOS7-Base-163.repo\nmv CentOS7-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"4清理缓存\"\u003e4.清理缓存\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eyum clean all\nyum makecache\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"5更新系统\"\u003e5.更新系统\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eyum update -y\n\u003c/code\u003e\u003c/pre\u003e","title":"centos7源更换为国内163源"},{"content":"1.修改所有redis.conf配置，如端口6001-1006 vim redis.conf bind 127.0.0.1 #69行，注释掉bind项或不修改，默认监听所有网卡 protected-mode no #88行，修改，关闭保护模式 port 6001 #92行，修改，redis监听端口， daemonize yes #136行，开启守护进程，以独立进程启动 cluster-enabled yes #832行，取消注释，开启群集功能 cluster-config-file nodes-6001.conf #840行，取消注释，群集名称文件设置（启动redis后自动生成） cluster-node-timeout 15000 #846行，取消注释群集超时时间设置 appendonly yes #700行，修改，开启AOF持久化 2.启动每一个redis服务 redis-server redis.conf 3.启动集群（IP和端口根据实际情况填写） redis-cli --cluster create 127.0.0.1:6001 127.0.0.1:6002 127.0.0.1:6003 127.0.0.1:6004 127.0.0.1:6005 127.0.0.1:6006 --cluster-replicas 1 4.给集群添加密码验证（密码必须相同） redis-cli -c -h 127.0.0.1 -p 6001 ...... config set masterauth passwd123 config set requirepass passwd123 config rewrite ","permalink":"/posts/redis-ji-qun-he-ji-qun-jia-mi-she-zhi/","summary":"\u003ch3 id=\"1修改所有redisconf配置如端口6001-1006\"\u003e1.修改所有redis.conf配置，如端口6001-1006\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003evim redis.conf\nbind 127.0.0.1\n#69行，注释掉bind项或不修改，默认监听所有网卡\nprotected-mode no\n#88行，修改，关闭保护模式\nport 6001\n#92行，修改，redis监听端口，\ndaemonize yes\n#136行，开启守护进程，以独立进程启动\ncluster-enabled yes\n#832行，取消注释，开启群集功能\ncluster-config-file nodes-6001.conf\n#840行，取消注释，群集名称文件设置（启动redis后自动生成）\ncluster-node-timeout 15000\n#846行，取消注释群集超时时间设置\nappendonly yes\n#700行，修改，开启AOF持久化\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2启动每一个redis服务\"\u003e2.启动每一个redis服务\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eredis-server redis.conf\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3启动集群ip和端口根据实际情况填写\"\u003e3.启动集群（IP和端口根据实际情况填写）\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eredis-cli --cluster create 127.0.0.1:6001 127.0.0.1:6002 127.0.0.1:6003 127.0.0.1:6004 127.0.0.1:6005 127.0.0.1:6006 --cluster-replicas 1\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"4给集群添加密码验证密码必须相同\"\u003e4.给集群添加密码验证（密码必须相同）\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eredis-cli -c -h 127.0.0.1 -p 6001\n......\nconfig set masterauth passwd123 \nconfig set requirepass passwd123 \nconfig rewrite \n\u003c/code\u003e\u003c/pre\u003e","title":"Redis集群和集群加密设置"},{"content":"前言： 测试环境ubuntu18.04 在两台服务器之间安装iperf3\napt install iperf3 -y 放脚本的服务器上必须安装了python3，且安装了paramiko模块\napt install python -y apt install python3-pip -y pip3 install paramiko #代码：\nimport smtplib,paramiko,os,sys from email.header import Header from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText hostname = \u0026#34;10.10.30.49\u0026#34; # 服务器的ip port = 33001 # 服务器的端口 username = \u0026#34;root\u0026#34; # 服务器的用户名 password = \u0026#34;%79@b!aqeTDtx\u0026#34; # 用户名对应的密码 # smtp服务器信息 smtp_server = \u0026#39;mail.southbaytech.co\u0026#39; server_port = 25 # 发送方信息 sender = \u0026#39;cherry_xu@southbaytech.co\u0026#39; mail_password = \u0026#39;xxxxxx\u0026#39; # 收件人地址，列表可发给多人 receivers = [\u0026#39;cherry_xu@southbaytech.co\u0026#39;] if(os.system(\u0026#39;ping -c 2 -W 1 %s\u0026#39; %hostname)==0): #ssh远程登录目标服务器 ssh = paramiko.SSHClient() policy = paramiko.AutoAddPolicy() ssh.set_missing_host_key_policy(policy) ssh.connect( hostname, #服务器的ip port, #服务器的端口 username, #服务器的用户名 password #用户名对应的密码 ) stdin,stdout,stderr = ssh.exec_command(\u0026#39;iperf3 -s -i 2\u0026#39;,get_pty=True) stdin.close() os.system(\u0026#39;iperf3 -c %s -u -i 2 -b 200M | tee /tmp/result.txt\u0026#39; %hostname) file=open(\u0026#39;/tmp/result.txt\u0026#39;,\u0026#39;r\u0026#39;) text=file.readlines() file.close() # 实例化，先添加正文内容 msg = MIMEMultipart() msg.attach(MIMEText(\u0026#39;服务器之间的速度测试\u0026#39;, \u0026#39;plain\u0026#39;, \u0026#39;utf-8\u0026#39;)) # 添加附件1 att1 = MIMEApplication(open(\u0026#39;/tmp/result.txt\u0026#39;, \u0026#39;rb\u0026#39;).read(), \u0026#39;utf-8\u0026#39;) att1[\u0026#39;Content-Disposition\u0026#39;] = \u0026#39;attachment; filename=\u0026#34;result.txt\u0026#34;\u0026#39; # filename随便起，是接收到的附件显示名称 # att1[\u0026#34;Content-Type\u0026#34;] = \u0026#39;application/octet-stream\u0026#39; Content-Type默认为application/octet-stream msg.attach(att1) # 邮件头信息 msg[\u0026#39;From\u0026#39;] = Header(sender) # 发件人 msg[\u0026#39;To\u0026#39;] = Header(\u0026#39;, \u0026#39;.join(receivers)) # 发到哪里，参数为字符串 msg[\u0026#39;Subject\u0026#39;] = Header(text[1]) # 邮件标题 # 发送邮件的操作 server=smtplib.SMTP(smtp_server,server_port) try: server.starttls() server.login(sender, mail_password) # 登录发信邮箱 server.sendmail(sender, receivers, msg.as_string()) # 发送邮件 print(\u0026#39;邮件发送成功\u0026#39;) except smtplib.SMTPException: print(\u0026#39;邮件发送失败\u0026#39;) ssh.close() else: ping_result = os.popen(\u0026#39;ping -c 2 -W 1 %s\u0026#39; % hostname).read() # 实例化，先添加正文内容 msg = MIMEMultipart() msg.attach(MIMEText(ping_result, \u0026#39;plain\u0026#39;, \u0026#39;utf-8\u0026#39;)) # 邮件头信息 msg[\u0026#39;From\u0026#39;] = Header(sender) # 发件人 msg[\u0026#39;To\u0026#39;] = Header(\u0026#39;, \u0026#39;.join(receivers)) # 发到哪里，参数为字符串 msg[\u0026#39;Subject\u0026#39;] = Header(\u0026#39;与目标服务器链接失败\u0026#39;) # 邮件标题 # 发送邮件的操作 server=smtplib.SMTP(smtp_server,server_port) try: server.starttls() server.login(sender, mail_password) # 登录发信邮箱 server.sendmail(sender, receivers, msg.as_string()) # 发送邮件 print(\u0026#39;邮件发送成功\u0026#39;) except smtplib.SMTPException: print(\u0026#39;邮件发送失败\u0026#39;) #静默执行脚本\nnohup python3 new_speed.py \u0026gt; /dev/null 2\u0026gt;\u0026amp;1 \u0026amp; 写入crontab中 vim /etc/crontab 0 8 * * * root nohup python3 new_speed.py \u0026gt; /dev/null 2\u0026gt;\u0026amp;1 \u0026amp; ","permalink":"/posts/linux-diao-yong-iperf3-ce-shi-fu-wu-qi-zhi-jian-de-chuan-shu-su-du--bing-fa-song-you-jian/","summary":"\u003ch1 id=\"前言\"\u003e前言：\u003c/h1\u003e\n\u003cp\u003e测试环境ubuntu18.04\n在两台服务器之间安装iperf3\u003c/p\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eapt install iperf3 -y\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003e放脚本的服务器上必须安装了python3，且安装了\u003ccode\u003eparamiko\u003c/code\u003e模块\u003c/p\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eapt install python -y\napt install python3-pip -y\npip3 install paramiko\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003e#代码：\u003c/p\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eimport smtplib,paramiko,os,sys\nfrom email.header import Header\nfrom email.mime.application import MIMEApplication\nfrom email.mime.multipart import MIMEMultipart\nfrom email.mime.text import MIMEText\n\nhostname = \u0026#34;10.10.30.49\u0026#34;  # 服务器的ip\nport = 33001  # 服务器的端口\nusername = \u0026#34;root\u0026#34;  # 服务器的用户名\npassword = \u0026#34;%79@b!aqeTDtx\u0026#34;  # 用户名对应的密码\n\n# smtp服务器信息\nsmtp_server = \u0026#39;mail.southbaytech.co\u0026#39;\nserver_port = 25\n\n# 发送方信息\nsender = \u0026#39;cherry_xu@southbaytech.co\u0026#39;\nmail_password = \u0026#39;xxxxxx\u0026#39;\n\n# 收件人地址，列表可发给多人\nreceivers = [\u0026#39;cherry_xu@southbaytech.co\u0026#39;]\n\nif(os.system(\u0026#39;ping -c 2 -W 1 %s\u0026#39; %hostname)==0):\n    #ssh远程登录目标服务器\n    ssh = paramiko.SSHClient()\n    policy = paramiko.AutoAddPolicy()\n    ssh.set_missing_host_key_policy(policy)\n    ssh.connect(\n        hostname, #服务器的ip\n        port, #服务器的端口\n        username, #服务器的用户名\n        password #用户名对应的密码\n    )\n    stdin,stdout,stderr = ssh.exec_command(\u0026#39;iperf3 -s -i 2\u0026#39;,get_pty=True)\n    stdin.close()\n    os.system(\u0026#39;iperf3 -c %s -u -i 2 -b 200M | tee /tmp/result.txt\u0026#39; %hostname)\n    file=open(\u0026#39;/tmp/result.txt\u0026#39;,\u0026#39;r\u0026#39;)\n    text=file.readlines()\n    file.close()\n\n    # 实例化，先添加正文内容\n    msg = MIMEMultipart()\n    msg.attach(MIMEText(\u0026#39;服务器之间的速度测试\u0026#39;, \u0026#39;plain\u0026#39;, \u0026#39;utf-8\u0026#39;))\n\n    # 添加附件1\n    att1 = MIMEApplication(open(\u0026#39;/tmp/result.txt\u0026#39;, \u0026#39;rb\u0026#39;).read(), \u0026#39;utf-8\u0026#39;)\n    att1[\u0026#39;Content-Disposition\u0026#39;] = \u0026#39;attachment; filename=\u0026#34;result.txt\u0026#34;\u0026#39;  # filename随便起，是接收到的附件显示名称\n    # att1[\u0026#34;Content-Type\u0026#34;] = \u0026#39;application/octet-stream\u0026#39;  Content-Type默认为application/octet-stream\n    msg.attach(att1)\n\n    # 邮件头信息\n    msg[\u0026#39;From\u0026#39;] = Header(sender) # 发件人\n    msg[\u0026#39;To\u0026#39;] = Header(\u0026#39;, \u0026#39;.join(receivers)) # 发到哪里，参数为字符串\n    msg[\u0026#39;Subject\u0026#39;] = Header(text[1]) # 邮件标题\n\n    # 发送邮件的操作\n    server=smtplib.SMTP(smtp_server,server_port)\n    try:\n        server.starttls()\n        server.login(sender, mail_password)  # 登录发信邮箱\n        server.sendmail(sender, receivers, msg.as_string()) # 发送邮件\n        print(\u0026#39;邮件发送成功\u0026#39;)\n\n    except smtplib.SMTPException:\n        print(\u0026#39;邮件发送失败\u0026#39;)\n    ssh.close()\nelse:\n    ping_result = os.popen(\u0026#39;ping -c 2 -W 1 %s\u0026#39; % hostname).read()\n    # 实例化，先添加正文内容\n    msg = MIMEMultipart()\n    msg.attach(MIMEText(ping_result, \u0026#39;plain\u0026#39;, \u0026#39;utf-8\u0026#39;))\n    # 邮件头信息\n    msg[\u0026#39;From\u0026#39;] = Header(sender) # 发件人\n    msg[\u0026#39;To\u0026#39;] = Header(\u0026#39;, \u0026#39;.join(receivers)) # 发到哪里，参数为字符串\n    msg[\u0026#39;Subject\u0026#39;] = Header(\u0026#39;与目标服务器链接失败\u0026#39;) # 邮件标题\n\n    # 发送邮件的操作\n    server=smtplib.SMTP(smtp_server,server_port)\n    try:\n        server.starttls()\n        server.login(sender, mail_password)  # 登录发信邮箱\n        server.sendmail(sender, receivers, msg.as_string()) # 发送邮件\n        print(\u0026#39;邮件发送成功\u0026#39;)\n\n    except smtplib.SMTPException:\n        print(\u0026#39;邮件发送失败\u0026#39;)\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003e#静默执行脚本\u003c/p\u003e","title":"linux调用iperf3测试服务器之间的传输速度，并发送邮件"},{"content":" 代码示例 # -*- coding: UTF-8 -*- #!/usr/bin/env python import time,math,socket,struct import MySQLdb,psutil ###### 内存信息 ####### def getMemoryState(): phymem = psutil.virtual_memory() total = long(phymem.total) used = long(phymem.used) # percent = phymem.percent # mem_str = \u0026#34;Total:\u0026#34;+ str(total/1024/1024) + \u0026#34;MB;Used:\u0026#34; + str(used/1024/1024) +\u0026#34;MB;Percent:\u0026#34; + str(percent) +\u0026#34;%\u0026#34; mem_list =[total/1024/1024,used/1024/1024] return mem_list ###### CPU信息 ####### def getCpuState(interval=1): cpu_util = psutil.cpu_percent(interval) return int(cpu_util) ###### 硬盘信息 ####### def getDiskState(): disk_total = 0 disk_used = 0 disk_free = 0 disk_list = psutil.disk_partitions() # disk_info_list = [] # 硬盘所有信息包含挂载点 for disk_part in disk_list: disk_sub_total = long(math.ceil(psutil.disk_usage(disk_part.mountpoint).total)) # 获取分区总容量 disk_sub_used = long(math.ceil(psutil.disk_usage(disk_part.mountpoint).used)) # 获取分区已使用 disk_sub_free = long(math.ceil(psutil.disk_usage(disk_part.mountpoint).free)) # 获取分区剩余 disk_sub_percent = str((math.ceil(psutil.disk_usage(disk_part.mountpoint).percent))) disk_sub_info = \u0026#34;point:\u0026#34; + disk_part.mountpoint + \u0026#34;;total:\u0026#34;+ str(disk_sub_total/1024/1024/1024) + \u0026#34;GB;used:\u0026#34; + str(disk_sub_used/1024/1024/1024) + \u0026#34;GB;free:\u0026#34; + str(disk_sub_free/1024/1024/1024) + \u0026#34;GB;percent:\u0026#34; + disk_sub_percent + \u0026#34;%\u0026#34; disk_total = disk_total + disk_sub_total disk_used = disk_used + disk_sub_used disk_free = disk_free + disk_sub_free # disk_info_list.append(disk_sub_info) # disk_percent = str(round(float(disk_used)/float(disk_total)*100,2)) # disk_info = \u0026#34;Total:\u0026#34; + str(disk_total/1024/1024/1024) + \u0026#34;GB;Used:\u0026#34; + str(disk_used/1024/1024/1024) + \u0026#34;GB;Free:\u0026#34; + str(disk_free/1024/1024/1024) + \u0026#34;GB;Percent:\u0026#34; + disk_percent + \u0026#34;%\u0026#34; # disk_info_list.append(disk_info) disk_info = [disk_total/1024/1024/1024,disk_used/1024/1024/1024] return disk_info ###### 网络信息 ####### def getNetState(): key_info, net_in, net_out = getNetDate(get_key) net_list = [] received = 0 send = 0 for key in key_info: i = unicode(key, errors=\u0026#39;ignore\u0026#39;) if i !=\u0026#34;lo\u0026#34; and (\u0026#34;Loopback\u0026#34; not in i): # j = i + \u0026#34;;received:\u0026#34; + str(net_in.get(key)) + \u0026#34;MB;send:\u0026#34; + str(net_out.get(key)) + \u0026#34;MB\u0026#34; # net_str = net_str + \u0026#34; \u0026#34; + j received = received + net_in.get(key) send = send + net_out.get(key) net_list.append(received) net_list.append(send) return net_list def getNetDate(func): key_info, old_recv, old_sent = func() # 上一秒收集的数据 time.sleep(1) key_info, now_recv, now_sent = func() # 当前所收集的数据 net_in = {} net_out = {} for key in key_info: net_in.setdefault(key, (now_recv.get(key) - old_recv.get(key)) / 1024 /1024) # 每秒接收速率 net_out.setdefault(key, (now_sent.get(key) - old_sent.get(key)) / 1024 /1024) # 每秒发送速率 return key_info, net_in, net_out def get_key(): # 获取网卡名称、收发字节 key_info = psutil.net_io_counters(pernic=True).keys() # 获取网卡名称 recv = {} sent = {} for key in key_info: recv.setdefault(key, psutil.net_io_counters(pernic=True).get(key).bytes_recv) # 各网卡接收的字节数 sent.setdefault(key, psutil.net_io_counters(pernic=True).get(key).bytes_sent) # 各网卡发送的字节数 return key_info, recv, sent ###### 获取主机名和IP地址 ####### def get_ip_host(): lis = [] hostname = socket.gethostname() # ip = socket.gethostbyname(hostname) lis.append(hostname) # lis.append(ip) info = psutil.net_if_addrs() for k,v in info.items(): for item in v: if item[0] == 2 and not item[1] == \u0026#39;127.0.0.1\u0026#39;: lis.append(item[1]) return lis ###### 执行数据库操作 ####### def mysql_sh(ip_host,machine_info): ### 数据初始化 ip = socket.ntohl(struct.unpack(\u0026#34;I\u0026#34;, socket.inet_aton(str(ip_host[1])))[0]) # if ip_host[2]: # print(\u0026#34;second ip is %s\u0026#34;% ip_host[2]) sql_search = \u0026#34;select * from machine where ip=\u0026#39;\u0026#34; + str(ip) + \u0026#34;\u0026#39;\u0026#34; machine_info_search = \u0026#34;select id from machine where ip=\u0026#39;\u0026#34; + str(ip) + \u0026#34;\u0026#39;\u0026#34; # 打开数据库连接 db = MySQLdb.connect(\u0026#34;itopdb.southbaytech.co\u0026#34;, \u0026#34;itop\u0026#34;, \u0026#34;itop\u0026#34;, \u0026#34;itop\u0026#34;,3304,charset=\u0026#39;utf8\u0026#39;) # 使用cursor()方法获取操作游标 cursor = db.cursor() # 查询插入machine_info cursor.execute(sql_search) results = cursor.fetchall() if results: cursor.execute(machine_info_search) server_search = cursor.fetchall() for j in server_search: machine_id = j[0] # 设定machine_info插入 disk_total = machine_info[\u0026#39;disk_state\u0026#39;][0] disk_used = machine_info[\u0026#39;disk_state\u0026#39;][1] mem_total = machine_info[\u0026#39;mem_state\u0026#39;][0] mem_used = machine_info[\u0026#39;mem_state\u0026#39;][1] net_received = machine_info[\u0026#39;net_state\u0026#39;][0] net_send = machine_info[\u0026#39;net_state\u0026#39;][1] create_time = int(time.time()) machine_info_insert = \u0026#39;insert into machine_info(machine_id,cpu_state,disk_total,disk_used,mem_total,mem_used,create_time,net_received,net_send) \\ values (%d,%f,%d,%d,%d,%d,%d,%d,%d)\u0026#39; % \\ (machine_id ,machine_info[\u0026#39;cpu_state\u0026#39;],disk_total,disk_used,mem_total,mem_used,create_time,net_received,net_send) # 执行server_info插入 try: cursor.execute(machine_info_insert) db.commit() except: db.rollback() else: print(\u0026#34;machine is not exist!\u0026#34;) # 关闭数据库连接 db.close() ###### 主程序 ####### if __name__==\u0026#39;__main__\u0026#39;: while 1 : try: machine_info = {} machine_info[\u0026#34;cpu_state\u0026#34;] = getCpuState() machine_info[\u0026#34;disk_state\u0026#34;] = getDiskState() machine_info[\u0026#34;mem_state\u0026#34;] = getMemoryState() machine_info[\u0026#34;net_state\u0026#34;] = getNetState() ip_host = get_ip_host() # 获取主机名和IP地址 mysql_sh(ip_host,machine_info) # 数据库插入更新 time.sleep(3) except KeyboardInterrupt: exit() ","permalink":"/posts/python-xie-de-fu-wu-qi-xing-neng-jian-kong-jiao-ben/","summary":"\u003cul\u003e\n\u003cli\u003e代码示例\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-python\" data-lang=\"python\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# -*- coding: UTF-8 -*-\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#!/usr/bin/env python\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eimport\u003c/span\u003e time\u003cspan style=\"color:#f92672\"\u003e,\u003c/span\u003emath\u003cspan style=\"color:#f92672\"\u003e,\u003c/span\u003esocket\u003cspan style=\"color:#f92672\"\u003e,\u003c/span\u003estruct\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eimport\u003c/span\u003e MySQLdb\u003cspan style=\"color:#f92672\"\u003e,\u003c/span\u003epsutil\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e###### 内存信息 #######\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003edef\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003egetMemoryState\u003c/span\u003e():\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    phymem \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e psutil\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003evirtual_memory()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    total \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e long(phymem\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003etotal)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    used \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e long(phymem\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eused)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# percent = phymem.percent\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# mem_str = \u0026#34;Total:\u0026#34;+ str(total/1024/1024) + \u0026#34;MB;Used:\u0026#34; + str(used/1024/1024) +\u0026#34;MB;Percent:\u0026#34; + str(percent) +\u0026#34;%\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    mem_list \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e[total\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e,used\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e]\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003ereturn\u003c/span\u003e mem_list\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e###### CPU信息 #######\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003edef\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003egetCpuState\u003c/span\u003e(interval\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e):\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    cpu_util \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e psutil\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003ecpu_percent(interval)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003ereturn\u003c/span\u003e int(cpu_util)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e###### 硬盘信息 #######\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003edef\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003egetDiskState\u003c/span\u003e():\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    disk_total \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    disk_used \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    disk_free \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    disk_list \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e psutil\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003edisk_partitions()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# disk_info_list = [] # 硬盘所有信息包含挂载点\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e disk_part \u003cspan style=\"color:#f92672\"\u003ein\u003c/span\u003e disk_list:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        disk_sub_total \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e long(math\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eceil(psutil\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003edisk_usage(disk_part\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003emountpoint)\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003etotal))  \u003cspan style=\"color:#75715e\"\u003e# 获取分区总容量\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        disk_sub_used \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e  long(math\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eceil(psutil\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003edisk_usage(disk_part\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003emountpoint)\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eused))   \u003cspan style=\"color:#75715e\"\u003e# 获取分区已使用\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        disk_sub_free \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e long(math\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eceil(psutil\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003edisk_usage(disk_part\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003emountpoint)\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003efree))    \u003cspan style=\"color:#75715e\"\u003e# 获取分区剩余\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        disk_sub_percent \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e str((math\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eceil(psutil\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003edisk_usage(disk_part\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003emountpoint)\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003epercent)))\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        disk_sub_info \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;point:\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e disk_part\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003emountpoint \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;;total:\u0026#34;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e str(disk_sub_total\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e) \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;GB;used:\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e str(disk_sub_used\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e) \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;GB;free:\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e str(disk_sub_free\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e) \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;GB;percent:\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e disk_sub_percent \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;%\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        disk_total \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e disk_total \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e disk_sub_total\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        disk_used \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e disk_used \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e disk_sub_used\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        disk_free \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e disk_free \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e disk_sub_free\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#75715e\"\u003e# disk_info_list.append(disk_sub_info)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# disk_percent = str(round(float(disk_used)/float(disk_total)*100,2))\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# disk_info = \u0026#34;Total:\u0026#34; + str(disk_total/1024/1024/1024) + \u0026#34;GB;Used:\u0026#34; + str(disk_used/1024/1024/1024) + \u0026#34;GB;Free:\u0026#34; + str(disk_free/1024/1024/1024) + \u0026#34;GB;Percent:\u0026#34; + disk_percent + \u0026#34;%\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# disk_info_list.append(disk_info)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    disk_info \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e [disk_total\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e,disk_used\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e]\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003ereturn\u003c/span\u003e disk_info\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e###### 网络信息 #######\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003edef\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003egetNetState\u003c/span\u003e():\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    key_info, net_in, net_out \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e getNetDate(get_key)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    net_list \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e []\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    received \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    send \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e key \u003cspan style=\"color:#f92672\"\u003ein\u003c/span\u003e key_info:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        i \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e unicode(key, errors\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;ignore\u0026#39;\u003c/span\u003e)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#66d9ef\"\u003eif\u003c/span\u003e i \u003cspan style=\"color:#f92672\"\u003e!=\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;lo\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003eand\u003c/span\u003e (\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;Loopback\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003enot\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003ein\u003c/span\u003e i):\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            \u003cspan style=\"color:#75715e\"\u003e# j = i + \u0026#34;;received:\u0026#34; + str(net_in.get(key)) + \u0026#34;MB;send:\u0026#34; + str(net_out.get(key)) + \u0026#34;MB\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            \u003cspan style=\"color:#75715e\"\u003e# net_str = net_str + \u0026#34;  \u0026#34; + j\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            received \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e received \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e net_in\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eget(key)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            send \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e send \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e net_out\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eget(key)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    net_list\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eappend(received)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    net_list\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eappend(send)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003ereturn\u003c/span\u003e net_list\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003edef\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003egetNetDate\u003c/span\u003e(func):\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    key_info, old_recv, old_sent \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e func()  \u003cspan style=\"color:#75715e\"\u003e# 上一秒收集的数据\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    time\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003esleep(\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    key_info, now_recv, now_sent \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e func()  \u003cspan style=\"color:#75715e\"\u003e# 当前所收集的数据\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    net_in \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e {}\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    net_out \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e {}\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e key \u003cspan style=\"color:#f92672\"\u003ein\u003c/span\u003e key_info:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        net_in\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003esetdefault(key, (now_recv\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eget(key) \u003cspan style=\"color:#f92672\"\u003e-\u003c/span\u003e old_recv\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eget(key)) \u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e)   \u003cspan style=\"color:#75715e\"\u003e# 每秒接收速率\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        net_out\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003esetdefault(key, (now_sent\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eget(key) \u003cspan style=\"color:#f92672\"\u003e-\u003c/span\u003e old_sent\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eget(key)) \u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e/\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1024\u003c/span\u003e)  \u003cspan style=\"color:#75715e\"\u003e# 每秒发送速率\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003ereturn\u003c/span\u003e key_info, net_in, net_out\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003edef\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eget_key\u003c/span\u003e():\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# 获取网卡名称、收发字节\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    key_info \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e psutil\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003enet_io_counters(pernic\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#66d9ef\"\u003eTrue\u003c/span\u003e)\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003ekeys()  \u003cspan style=\"color:#75715e\"\u003e# 获取网卡名称\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    recv \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e {}\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    sent \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e {}\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e key \u003cspan style=\"color:#f92672\"\u003ein\u003c/span\u003e key_info:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        recv\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003esetdefault(key, psutil\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003enet_io_counters(pernic\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#66d9ef\"\u003eTrue\u003c/span\u003e)\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eget(key)\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003ebytes_recv)  \u003cspan style=\"color:#75715e\"\u003e# 各网卡接收的字节数\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        sent\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003esetdefault(key, psutil\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003enet_io_counters(pernic\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#66d9ef\"\u003eTrue\u003c/span\u003e)\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eget(key)\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003ebytes_sent)  \u003cspan style=\"color:#75715e\"\u003e# 各网卡发送的字节数\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003ereturn\u003c/span\u003e key_info, recv, sent\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e###### 获取主机名和IP地址 #######\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003edef\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eget_ip_host\u003c/span\u003e():\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    lis \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e []\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    hostname \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e socket\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003egethostname()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# ip = socket.gethostbyname(hostname)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    lis\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eappend(hostname)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# lis.append(ip)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    info \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e psutil\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003enet_if_addrs()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e k,v \u003cspan style=\"color:#f92672\"\u003ein\u003c/span\u003e info\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eitems():\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e item \u003cspan style=\"color:#f92672\"\u003ein\u003c/span\u003e v:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            \u003cspan style=\"color:#66d9ef\"\u003eif\u003c/span\u003e item[\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e] \u003cspan style=\"color:#f92672\"\u003e==\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e2\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003eand\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003enot\u003c/span\u003e item[\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e] \u003cspan style=\"color:#f92672\"\u003e==\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;127.0.0.1\u0026#39;\u003c/span\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e                lis\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eappend(item[\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e])\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003ereturn\u003c/span\u003e lis\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e###### 执行数据库操作 #######\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003edef\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003emysql_sh\u003c/span\u003e(ip_host,machine_info):\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e### 数据初始化\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    ip \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e socket\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003entohl(struct\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eunpack(\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;I\u0026#34;\u003c/span\u003e, socket\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003einet_aton(str(ip_host[\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e])))[\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e])\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# if ip_host[2]:\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e#     print(\u0026#34;second ip is %s\u0026#34;% ip_host[2])\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    sql_search \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;select * from machine where ip=\u0026#39;\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e str(ip) \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u0026#39;\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    machine_info_search \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;select id from machine where ip=\u0026#39;\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e str(ip) \u003cspan style=\"color:#f92672\"\u003e+\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u0026#39;\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# 打开数据库连接\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    db \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e MySQLdb\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003econnect(\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;itopdb.southbaytech.co\u0026#34;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;itop\u0026#34;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;itop\u0026#34;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;itop\u0026#34;\u003c/span\u003e,\u003cspan style=\"color:#ae81ff\"\u003e3304\u003c/span\u003e,charset\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;utf8\u0026#39;\u003c/span\u003e)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# 使用cursor()方法获取操作游标\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    cursor \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e db\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003ecursor()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# 查询插入machine_info\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    cursor\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eexecute(sql_search)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    results \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e cursor\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003efetchall()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003eif\u003c/span\u003e results:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        cursor\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eexecute(machine_info_search)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        server_search \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e cursor\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003efetchall()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e j \u003cspan style=\"color:#f92672\"\u003ein\u003c/span\u003e server_search:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            machine_id \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e j[\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e]\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#75715e\"\u003e# 设定machine_info插入\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        disk_total \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e machine_info[\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;disk_state\u0026#39;\u003c/span\u003e][\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e]\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        disk_used \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e machine_info[\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;disk_state\u0026#39;\u003c/span\u003e][\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e]\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        mem_total \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e machine_info[\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;mem_state\u0026#39;\u003c/span\u003e][\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e]\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        mem_used \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e machine_info[\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;mem_state\u0026#39;\u003c/span\u003e][\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e]\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        net_received \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e machine_info[\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;net_state\u0026#39;\u003c/span\u003e][\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e]\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        net_send \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e machine_info[\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;net_state\u0026#39;\u003c/span\u003e][\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e]\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        create_time \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e int(time\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003etime())\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        machine_info_insert \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;insert into machine_info(machine_id,cpu_state,disk_total,disk_used,mem_total,mem_used,create_time,net_received,net_send) \u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#e6db74\"\u003e            values (\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e%d\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e,\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e%f\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e,\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e%d\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e,\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e%d\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e,\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e%d\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e,\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e%d\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e,\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e%d\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e,\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e%d\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e,\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e%d\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e)\u0026#39;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e%\u003c/span\u003e \\\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            (machine_id ,machine_info[\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;cpu_state\u0026#39;\u003c/span\u003e],disk_total,disk_used,mem_total,mem_used,create_time,net_received,net_send)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#75715e\"\u003e# 执行server_info插入\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#66d9ef\"\u003etry\u003c/span\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            cursor\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eexecute(machine_info_insert)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            db\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003ecommit()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#66d9ef\"\u003eexcept\u003c/span\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            db\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003erollback()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003eelse\u003c/span\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        print(\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;machine is not exist!\u0026#34;\u003c/span\u003e)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# 关闭数据库连接\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    db\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003eclose()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e###### 主程序 #######\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003eif\u003c/span\u003e __name__\u003cspan style=\"color:#f92672\"\u003e==\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;__main__\u0026#39;\u003c/span\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003ewhile\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e :\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#66d9ef\"\u003etry\u003c/span\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            machine_info \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e {}\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            machine_info[\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;cpu_state\u0026#34;\u003c/span\u003e] \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e getCpuState()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            machine_info[\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;disk_state\u0026#34;\u003c/span\u003e] \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e getDiskState()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            machine_info[\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;mem_state\u0026#34;\u003c/span\u003e] \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e getMemoryState()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            machine_info[\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;net_state\u0026#34;\u003c/span\u003e] \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e getNetState()\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            ip_host \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e get_ip_host()  \u003cspan style=\"color:#75715e\"\u003e# 获取主机名和IP地址\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            mysql_sh(ip_host,machine_info)  \u003cspan style=\"color:#75715e\"\u003e# 数据库插入更新\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            time\u003cspan style=\"color:#f92672\"\u003e.\u003c/span\u003esleep(\u003cspan style=\"color:#ae81ff\"\u003e3\u003c/span\u003e)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#66d9ef\"\u003eexcept\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003eKeyboardInterrupt\u003c/span\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e            exit()\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"python写的服务器性能监控脚本"},{"content":"A类地址 10.0.0.0/8 10.0.0.0 - 10.255.255.255 B类地址 172.16.0.0/12 172.16.0.0 - 172.31.255.255 C类地址 192.168.0.0/16 192.168.0.0 - 192.168.255.255 ","permalink":"/posts/ipv4-nei-wang-bao-liu-wang-duan/","summary":"\u003ch3 id=\"a类地址\"\u003eA类地址\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e10.0.0.0/8\n10.0.0.0 - 10.255.255.255\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"b类地址\"\u003eB类地址\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e172.16.0.0/12\n172.16.0.0 - 172.31.255.255\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"c类地址\"\u003eC类地址\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e192.168.0.0/16\n192.168.0.0 - 192.168.255.255\n\u003c/code\u003e\u003c/pre\u003e","title":"IPv4内网保留网段"},{"content":"1. 首先通过串口线与交换机的console连接登陆该交换机 2.不需要进入sys，可以直接在现有的状态下输入命令,然后选择Y reset saved-configuration 3.此时配置已经清空，现在进行重启操作。输入reboot，并在接下来的第一个询问中选择“N”，第二个询问中选择“Y”等待交换机重启。 ","permalink":"/posts/hua-wei-jiao-huan-ji-qing-kong-suo-you-pei-zhi/","summary":"\u003ch3 id=\"1-首先通过串口线与交换机的console连接登陆该交换机\"\u003e1. 首先通过串口线与交换机的console连接登陆该交换机\u003c/h3\u003e\n\u003ch3 id=\"2不需要进入sys可以直接在现有的状态下输入命令然后选择y\"\u003e2.不需要进入sys，可以直接在现有的状态下输入命令,然后选择Y\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ereset saved-configuration\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3此时配置已经清空现在进行重启操作输入reboot并在接下来的第一个询问中选择n第二个询问中选择y等待交换机重启\"\u003e3.此时配置已经清空，现在进行重启操作。输入reboot，并在接下来的第一个询问中选择“N”，第二个询问中选择“Y”等待交换机重启。\u003c/h3\u003e","title":"华为交换机清空所有配置"},{"content":"创建一个账户为is，密码为xxx #创建用户 aaa local-user is password cipher xxx local-user is privilege level 15 #最高权限 local-user is service-type ssh #走ssh协议 quit #创建ssh user ssh user is authentication-type password #is用户的认证方式为密码认证 ssh user is service-type stelnet #stelnet实际上就是ssh #创建本地秘钥对 rsa local-key-pair create #启用ssh服务 stelnet server enable #配置vty界面支持的登录协议 user-interface vty 0 4 authentication-mode aaa #认证方式为3a protocol inbound ssh #允许ssh登录 ","permalink":"/posts/hua-wei-jiao-huan-ji-kai-qi-3a-ren-zheng-ssh/","summary":"\u003ch3 id=\"创建一个账户为is密码为xxx\"\u003e创建一个账户为is，密码为xxx\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e\n#创建用户\n\naaa\n\nlocal-user is password cipher xxx\n\nlocal-user is privilege level 15    #最高权限\n\nlocal-user is service-type ssh    #走ssh协议\n\nquit\n\u003c/code\u003e\u003c/pre\u003e\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e\n#创建ssh user\n\nssh user is authentication-type password   #is用户的认证方式为密码认证\n\nssh user is service-type stelnet      #stelnet实际上就是ssh\n\u003c/code\u003e\u003c/pre\u003e\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e\n#创建本地秘钥对\n\nrsa local-key-pair create\n\u003c/code\u003e\u003c/pre\u003e\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e\n#启用ssh服务\n\nstelnet server enable\n\u003c/code\u003e\u003c/pre\u003e\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e\n#配置vty界面支持的登录协议\n\nuser-interface vty 0 4\n\nauthentication-mode aaa    #认证方式为3a\n\nprotocol inbound ssh       #允许ssh登录\n\u003c/code\u003e\u003c/pre\u003e","title":"华为交换机开启3a认证（ssh）"},{"content":"user-interface console 0 authentication-mode password set authentication password cipher idle-timeout 20 0 #设置空闲超时时间为20分钟，默认10分钟 display this #查看配置结果 ","permalink":"/posts/hua-wei-she-bei-pei-zhi-console-kou-can-shu/","summary":"\u003cpre tabindex=\"0\"\u003e\u003ccode\u003euser-interface console 0\nauthentication-mode password\nset authentication password cipher\nidle-timeout 20 0 #设置空闲超时时间为20分钟，默认10分钟\ndisplay this #查看配置结果\n\u003c/code\u003e\u003c/pre\u003e","title":"华为设备配置console口参数"},{"content":"1.配置登录管理的用户名、认证级别、口令 local-user admin password simple satelit service-type telnet level 3 save 2.H3C提权 超级终端（基础密码system）\nsuper 3 sys local-user admin password simple system #设置密码为system level 3 service-type telnet save 3.修改H3C的默认密码 telnet 172.21.100.1 password: #输入原密码 super 3 system user-int vty 0 4 #改telnet密码 user-int console 0 #改console口密码 user-int aux 0 #改aux口密码 set aut pass cip abcde #设置密码 ","permalink":"/posts/h3c-xin-jian-yong-hu-bing-she-zhi-xi-tong-zui-gao-quan-xian/","summary":"\u003ch3 id=\"1配置登录管理的用户名认证级别口令\"\u003e1.配置登录管理的用户名、认证级别、口令\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003elocal-user admin\npassword simple satelit\nservice-type telnet\nlevel 3\nsave\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2h3c提权\"\u003e2.H3C提权\u003c/h3\u003e\n\u003cp\u003e超级终端（基础密码system）\u003c/p\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esuper 3\nsys\nlocal-user admin\npassword simple system #设置密码为system\nlevel 3\nservice-type telnet\nsave\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3修改h3c的默认密码\"\u003e3.修改H3C的默认密码\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003etelnet 172.21.100.1\npassword:   #输入原密码\nsuper 3\nsystem\nuser-int vty 0 4   #改telnet密码\nuser-int console 0  #改console口密码\nuser-int aux 0   #改aux口密码\nset aut pass cip abcde #设置密码\n\u003c/code\u003e\u003c/pre\u003e","title":"H3C新建用户并设置系统最高权限"},{"content":"华为防火墙配置跨三层MAC识别 1.需求 FW作为企业的出口网关，内网用户通过三层交换机与FW相连，并通过FW访问Internet。FW需要以MAC地址为匹配条件配置安全策略、策略路由、带宽策略等来控制内网流量。\n拓扑图 2. S5700交换机为例 开启snmp [Switch] snmp-agent [Switch] snmp-agent sys-info version v2c [Switch] snmp-agent community read Public@123 3. 防护墙配置 配置FW的接口IP地址。 [FW] interface GigabitEthernet 1/0/2 [FW-GigabitEthernet1/0/2] ip address 192.168.2.100 24 [FW-GigabitEthernet1/0/2] quit [FW] firewall zone trust [FW-zone-trust] add interface GigabitEthernet 1/0/2 配置Local到Trust区域的安全策略，允许防火墙向交换机发送SNMP报文。 [FW] security-policy [FW-policy-security] rule name policy_sec [FW-policy-security-rule-policy_sec] source-zone local [FW-policy-security-rule-policy_sec] destination-zone trust [FW-policy-security-rule-policy_sec] destination-address 192.168.2.110 32 [FW-policy-security-rule-policy_sec] action permit 配置跨三层MAC识别。 [FW] snmp-server arp-sync enable [FW] snmp-server target-host arp-sync address 192.168.2.110 community Public@123 v2c [FW] snmp-server arp-sync interval 5 timeout 3 ","permalink":"/posts/hua-wei-fang-huo-qiang-pei-zhi-kua-san-ceng-mac-shi-bie/","summary":"\u003ch1 id=\"华为防火墙配置跨三层mac识别\"\u003e华为防火墙配置跨三层MAC识别\u003c/h1\u003e\n\u003ch3 id=\"1需求\"\u003e1.需求\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cp\u003eFW作为企业的出口网关，内网用户通过三层交换机与FW相连，并通过FW访问Internet。FW需要以MAC地址为匹配条件配置安全策略、策略路由、带宽策略等来控制内网流量。\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e拓扑图\n\u003cimg alt=\"image-1673591649298\" loading=\"lazy\" src=\"/upload/2023/01/image-1673591649298.png\"\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"2-s5700交换机为例\"\u003e2. S5700交换机为例\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e开启snmp\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[Switch] snmp-agent\n[Switch] snmp-agent sys-info version v2c\n[Switch] snmp-agent community read Public@123\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3-防护墙配置\"\u003e3. 防护墙配置\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e配置FW的接口IP地址。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[FW] interface GigabitEthernet 1/0/2\n[FW-GigabitEthernet1/0/2] ip address 192.168.2.100 24\n[FW-GigabitEthernet1/0/2] quit\n[FW] firewall zone trust\n[FW-zone-trust] add interface GigabitEthernet 1/0/2\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e配置Local到Trust区域的安全策略，允许防火墙向交换机发送SNMP报文。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[FW] security-policy\n[FW-policy-security] rule name policy_sec\n[FW-policy-security-rule-policy_sec] source-zone local\n[FW-policy-security-rule-policy_sec] destination-zone trust\n[FW-policy-security-rule-policy_sec] destination-address 192.168.2.110 32\n[FW-policy-security-rule-policy_sec] action permit\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e配置跨三层MAC识别。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[FW] snmp-server arp-sync enable\n[FW] snmp-server target-host arp-sync address 192.168.2.110 community Public@123 v2c\n[FW] snmp-server arp-sync interval 5 timeout 3\n\u003c/code\u003e\u003c/pre\u003e","title":"华为防火墙配置跨三层MAC识别"},{"content":"1.需求 公司拥有多个部门且位于不同网段，各部门均有访问Internet需求。现要求用户通过三层交换机和防火墙访问外部网络，且要求三层交换机作为用户的网关。 拓扑图 2. 配置交换机 配置连接用户的接口和对应的VLANIF接口。 \u0026lt;HUAWEI\u0026gt; system-view [HUAWEI] sysname Switch [Switch] vlan batch 2 3 [Switch] interface gigabitethernet 0/0/2 [Switch-GigabitEthernet0/0/2] port link-type access //配置接口接入类型为access [Switch-GigabitEthernet0/0/2] port default vlan 2 //配置接口加入VLAN 2 [Switch-GigabitEthernet0/0/2] quit [Switch] interface gigabitethernet 0/0/3 [Switch-GigabitEthernet0/0/3] port link-type access [Switch-GigabitEthernet0/0/3] port default vlan 3 [Switch-GigabitEthernet0/0/3] quit [Switch] interface vlanif 2 [Switch-Vlanif2] ip address 192.168.1.1 24 [Switch-Vlanif2] quit [Switch] interface vlanif 3 [Switch-Vlanif3] ip address 192.168.2.1 24 配置连接防火墙的接口和对应的VLANIF接口。 [Switch] vlan batch 100 [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] port link-type access [Switch-GigabitEthernet0/0/1] port default vlan 100 [Switch-GigabitEthernet0/0/1] quit [Switch] interface vlanif 100 [Switch-Vlanif100] ip address 192.168.100.2 24 配置缺省路由。 [Switch] ip route-static 0.0.0.0 0.0.0.0 192.168.100.1 //缺省路由的下一跳是防火墙接口的IP地址192.168.100.1 配置DHCP服务器。 [Switch] dhcp enable [Switch] interface vlanif 2 [Switch-Vlanif2] dhcp select interface //DHCP使用接口地址池的方式为用户分配IP地址 [Switch-Vlanif2] dhcp server dns-list 114.114.114.114 223.5.5.5 //配置的DNS-List 114.114.114.114是公用的DNS服务器地址，是不区分运营商的。在实际应用中，请根据运营商分配的DNS进行配置 [Switch-Vlanif2] quit [Switch] interface vlanif 3 [Switch-Vlanif3] dhcp select interface [Switch-Vlanif3] dhcp server dns-list 114.114.114.114 223.5.5.5 [Switch-Vlanif3] quit 3.配置防火墙 配置连接交换机的接口对应的IP地址。 \u0026lt;USG6600\u0026gt; system-view [USG6600] interface gigabitethernet 1/0/1 [USG6600-GigabitEthernet1/0/1] ip address 192.168.100.1 255.255.255.0 配置连接公网的接口对应的IP地址。 [USG6600] interface gigabitethernet 1/0/2 [USG6600-GigabitEthernet1/0/2] ip address 1.1.1.2 255.255.255.0 //配置连接公网接口的IP地址和公网的IP地址在同一网段 配置缺省路由和回程路由。 [USG6600] ip route-static 0.0.0.0 0.0.0.0 1.1.1.1 //配置静态缺省路由的下一跳指向公网提供的IP地址1.1.1.1 [USG6600] ip route-static 192.168.0.0 255.255.0.0 192.168.100.2 //配置回程路由的下一跳就指向交换机上行接口的IP地址192.168.100.2 配置安全策略 [USG6600] firewall zone trust //配置trust域 [USG6600-zone-trust] add interface gigabitethernet 1/0/1 [USG6600-zone-trust] quit [USG6600] firewall zone untrust //配置untrust域 [USG6600-zone-untrust] add interface gigabitethernet 1/0/2 [USG6600-zone-untrust] quit 配置安全策略，允许域间互访。 [USG6600] security-policy [USG6600-policy-security] rule name policy1 [USG6600-policy-security-rule-policy1] source-zone trust [USG6600-policy-security-rule-policy1] destination-zone untrust [USG6600-policy-security-rule-policy1] source-address 192.168.0.0 mask 255.255.0.0 [USG6600-policy-security-rule-policy1] action permit [USG6600-policy-security-rule-policy1] quit [USG6600-policy-security] quit 配置PAT地址池，开启允许端口地址转换。 [USG6600] nat address-group addressgroup1 [USG6600-address-group-addressgroup1] mode pat [USG6600-address-group-addressgroup1] route enable [USG6600-address-group-addressgroup1] section 0 1.1.1.2 1.1.1.2 //转换的公网IP地址 [USG6600-address-group-addressgroup1] quit 配置源PAT策略，实现私网指定网段访问公网时自动进行源地址转换。 [USG6600] nat-policy [USG6600-policy-nat] rule name policy_nat1 [USG6600-policy-nat-rule-policy_nat1] source-zone trust [USG6600-policy-nat-rule-policy_nat1] destination-zone untrust [USG6600-policy-nat-rule-policy_nat1] source-address 192.168.0.0 mask 255.255.0.0 //允许进行PAT转换的源IP地址 [USG6600-policy-nat-rule-policy_nat1] action nat address-group addressgroup1 [USG6600-policy-nat-rule-policy_nat1] quit ","permalink":"/posts/hua-wei-fang-huo-qiang-he-san-ceng-jiao-huan-ji-dui-jie-shang-wang-pei-zhi/","summary":"\u003ch3 id=\"1需求\"\u003e1.需求\u003c/h3\u003e\n\u003cp\u003e公司拥有多个部门且位于不同网段，各部门均有访问Internet需求。现要求用户通过三层交换机和防火墙访问外部网络，且要求三层交换机作为用户的网关。\n拓扑图\n\u003cimg alt=\"image-1673582386613\" loading=\"lazy\" src=\"/upload/2023/01/image-1673582386613.png\"\u003e\u003c/p\u003e\n\u003ch3 id=\"2-配置交换机\"\u003e2. 配置交换机\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e配置连接用户的接口和对应的VLANIF接口。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e\u0026lt;HUAWEI\u0026gt; system-view\n[HUAWEI] sysname Switch\n[Switch] vlan batch 2 3\n[Switch] interface gigabitethernet 0/0/2\n[Switch-GigabitEthernet0/0/2] port link-type access   //配置接口接入类型为access\n[Switch-GigabitEthernet0/0/2] port default vlan 2   //配置接口加入VLAN 2\n[Switch-GigabitEthernet0/0/2] quit\n[Switch] interface gigabitethernet 0/0/3\n[Switch-GigabitEthernet0/0/3] port link-type access\n[Switch-GigabitEthernet0/0/3] port default vlan 3   \n[Switch-GigabitEthernet0/0/3] quit\n[Switch] interface vlanif 2\n[Switch-Vlanif2] ip address 192.168.1.1 24\n[Switch-Vlanif2] quit\n[Switch] interface vlanif 3\n[Switch-Vlanif3] ip address 192.168.2.1 24\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e配置连接防火墙的接口和对应的VLANIF接口。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[Switch] vlan batch 100\n[Switch] interface gigabitethernet 0/0/1\n[Switch-GigabitEthernet0/0/1] port link-type access\n[Switch-GigabitEthernet0/0/1] port default vlan 100   \n[Switch-GigabitEthernet0/0/1] quit\n[Switch] interface vlanif 100\n[Switch-Vlanif100] ip address 192.168.100.2 24\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e配置缺省路由。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[Switch] ip route-static 0.0.0.0 0.0.0.0 192.168.100.1   //缺省路由的下一跳是防火墙接口的IP地址192.168.100.1\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e配置DHCP服务器。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[Switch] dhcp enable   \n[Switch] interface vlanif 2\n[Switch-Vlanif2] dhcp select interface   //DHCP使用接口地址池的方式为用户分配IP地址\n[Switch-Vlanif2] dhcp server dns-list 114.114.114.114 223.5.5.5   //配置的DNS-List 114.114.114.114是公用的DNS服务器地址，是不区分运营商的。在实际应用中，请根据运营商分配的DNS进行配置\n[Switch-Vlanif2] quit\n[Switch] interface vlanif 3\n[Switch-Vlanif3] dhcp select interface\n[Switch-Vlanif3] dhcp server dns-list 114.114.114.114 223.5.5.5\n[Switch-Vlanif3] quit\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3配置防火墙\"\u003e3.配置防火墙\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e配置连接交换机的接口对应的IP地址。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e\u0026lt;USG6600\u0026gt; system-view\n[USG6600] interface gigabitethernet 1/0/1\n[USG6600-GigabitEthernet1/0/1] ip address 192.168.100.1 255.255.255.0 \n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e配置连接公网的接口对应的IP地址。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[USG6600] interface gigabitethernet 1/0/2\n[USG6600-GigabitEthernet1/0/2] ip address 1.1.1.2 255.255.255.0   //配置连接公网接口的IP地址和公网的IP地址在同一网段\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e配置缺省路由和回程路由。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[USG6600] ip route-static 0.0.0.0 0.0.0.0 1.1.1.1   //配置静态缺省路由的下一跳指向公网提供的IP地址1.1.1.1\n[USG6600] ip route-static 192.168.0.0 255.255.0.0 192.168.100.2   //配置回程路由的下一跳就指向交换机上行接口的IP地址192.168.100.2\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e配置安全策略\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[USG6600] firewall zone trust   //配置trust域\n[USG6600-zone-trust] add interface gigabitethernet 1/0/1\n[USG6600-zone-trust] quit\n[USG6600] firewall zone untrust   //配置untrust域\n[USG6600-zone-untrust] add interface gigabitethernet 1/0/2\n[USG6600-zone-untrust] quit\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e配置安全策略，允许域间互访。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[USG6600] security-policy\n[USG6600-policy-security] rule name policy1\n[USG6600-policy-security-rule-policy1] source-zone trust\n[USG6600-policy-security-rule-policy1] destination-zone untrust\n[USG6600-policy-security-rule-policy1] source-address 192.168.0.0 mask 255.255.0.0\n[USG6600-policy-security-rule-policy1] action permit\n[USG6600-policy-security-rule-policy1] quit\n[USG6600-policy-security] quit\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e配置PAT地址池，开启允许端口地址转换。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[USG6600] nat address-group addressgroup1    \n[USG6600-address-group-addressgroup1] mode pat\n[USG6600-address-group-addressgroup1] route enable\n[USG6600-address-group-addressgroup1] section 0 1.1.1.2 1.1.1.2    //转换的公网IP地址\n[USG6600-address-group-addressgroup1] quit\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e配置源PAT策略，实现私网指定网段访问公网时自动进行源地址转换。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e[USG6600] nat-policy    \n[USG6600-policy-nat] rule name policy_nat1\n[USG6600-policy-nat-rule-policy_nat1] source-zone trust\n[USG6600-policy-nat-rule-policy_nat1] destination-zone untrust\n[USG6600-policy-nat-rule-policy_nat1] source-address 192.168.0.0 mask 255.255.0.0   //允许进行PAT转换的源IP地址\n[USG6600-policy-nat-rule-policy_nat1] action nat address-group addressgroup1\n[USG6600-policy-nat-rule-policy_nat1] quit\n\u003c/code\u003e\u003c/pre\u003e","title":"华为防火墙和三层交换机对接上网配置"},{"content":" 地址栏输入： chrome://net-internals/#hsts 找到底部Delete domain security policies一栏，输入想处理的域名，点击delete。 ","permalink":"/posts/chrome-jie-jue-http-zi-dong-tiao-zhuan-https-wen-ti/","summary":"\u003cul\u003e\n\u003cli\u003e地址栏输入： chrome://net-internals/#hsts\u003c/li\u003e\n\u003cli\u003e找到底部Delete domain security policies一栏，输入想处理的域名，点击delete。\u003c/li\u003e\n\u003c/ul\u003e","title":"chrome解决http自动跳转https问题"},{"content":"1.修改启动选项时间 Root--\u0026gt;Misc---\u0026gt;Boot--\u0026gt;timeout项的number值改为想要等待的时间，单位秒\n2.取消开机日志 Root--\u0026gt;Misc---\u0026gt;Debug--\u0026gt;Target项的number值改为0即为关闭开机日志\n3.声卡ID注入与隐藏开机跑码 确保已加载Lilu.kext和AppleALC.kext驱动，然后确认自己的声卡型号，单击这里找到相应的声卡ID(例如ALC662的ID可以设置为17)。 Root\u0026ndash;\u0026gt;NVRAM\u0026ndash;\u0026gt;Add\u0026ndash;\u0026gt;boot-args的值改为-v keepsyms=1 debug=0x100 alcid=17 取消-v，将值变为keepsyms=1 debug=0x100 alcid=17即可隐藏开机跑码\n4.三码洗白 用GenSMBIOS-master工具获得三码。\n进入工具选3后回车。 输入iMac17,1 获得三码。 注入三码。 将三码分别写入Root--\u0026gt;PlatformInfo--\u0026gt;Generic下的MLB、SystemSerialNumber、SystemUUID中。 ","permalink":"/posts/hei-ping-guo-configplist-wen-jian-chang-yong-xiu-gai-xiang/","summary":"###1.修改启动选项时间Root\u0026ndash;\u0026gt;Misc\u0026mdash;\u0026gt;Boot\u0026ndash;\u0026gt;timeout项的number值改为想要等待的时间，单位秒###2.取消开机日志Root\u0026ndash;\u0026gt;Misc\u0026mdash;\u0026gt;Debug\u0026ndash;\u0026gt;Target项的number值改为0即为关闭开机日志###3.声卡I","title":"黑苹果Config.plist文件常用修改项"},{"content":"1.安装 brew install cliclick 2.使用 # 打印当前鼠标位置 $ /usr/local/bin/cliclick p # 点击指定位置坐标 $ /usr/local/bin/cliclick c:x,y (x横坐标，y纵坐标) 3.python代码 import os import time cmd1 = \u0026#34;/usr/local/bin/cliclick c:3451,392\u0026#34; for i in range(5): mess1 = os.system(cmd1) print(mess1) time.sleep(1) print(\u0026#39;----\u0026#39; + str(i+1) + \u0026#39;------\u0026#39;) ","permalink":"/posts/mac-mo-ni-shu-biao-dian-ji-gong-ju-cliclick/","summary":"\u003ch3 id=\"1安装\"\u003e1.安装\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003ebrew install cliclick\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2使用\"\u003e2.使用\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e# 打印当前鼠标位置\n$ /usr/local/bin/cliclick p\n# 点击指定位置坐标\n$ /usr/local/bin/cliclick c:x,y (x横坐标，y纵坐标)\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3python代码\"\u003e3.python代码\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eimport os\nimport time\n\ncmd1 = \u0026#34;/usr/local/bin/cliclick c:3451,392\u0026#34;\nfor i in range(5):\n    mess1 = os.system(cmd1)\n    print(mess1)\n    time.sleep(1)\n    print(\u0026#39;----\u0026#39; + str(i+1) + \u0026#39;------\u0026#39;)\n\u003c/code\u003e\u003c/pre\u003e","title":"Mac 模拟鼠标点击工具Cliclick"},{"content":"1.查看EFI所在分区 sudo diskutil list 2. 挂载分区 sudo diskutil mount disk0s1 3.允许任意安装源 sudo spctl --master-disable 4.查找端口对应的进程号 #以5000端口为例 lsof -i :5000 # 杀死进程 kill -9 xxx 5.强制刷新DNS服务器 sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; say DNS cache flushed 6.Macos下warp优选IP地址 # 载IP优选脚本，并执行 wget -N https://gitlab.com/Misaka-blog/warp-script/-/raw/main/files/warp-yxip/warp-yxip-mac.sh \u0026amp;\u0026amp; bash warp-yxip-mac.sh # 配置 cd /Applications/Cloudflare\\ WARP.app/Contents/Resources sudo ./warp-cli set-custom-endpoint IP ","permalink":"/posts/macos-chang-yong-ming-ling/","summary":"1.查看EFI所在分区sudo diskutil list2. 挂载分区sudo diskutil mount disk0s1###3.允许任意安装源sudo spctl \u0026ndash;master-disable4.查找端口对应的进程号#以5000端口为例lsof -i :5000# 杀死进程kill -9","title":"MacOS常用命令"},{"content":"1.comand + R 进入recover模式 2.清除格式化硬盘 3.reinstall mac 4.注意： 出现 this item is temporarily unavailable 开启mac按住：comand + option + r + p 重启多次后，再进入recovere模式 ","permalink":"/posts/mac-ping-guo-bi-ji-ben-zhong-xin-an-zhuang/","summary":"\u003ch3 id=\"1comand--r-进入recover模式\"\u003e1.comand + R 进入recover模式\u003c/h3\u003e\n\u003ch3 id=\"2清除格式化硬盘\"\u003e2.清除格式化硬盘\u003c/h3\u003e\n\u003ch3 id=\"3reinstall-mac\"\u003e3.reinstall mac\u003c/h3\u003e\n\u003ch3 id=\"4注意\"\u003e4.注意：\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e出现 this item is temporarily unavailable\u003c/li\u003e\n\u003cli\u003e开启mac按住：comand + option + r + p\u003c/li\u003e\n\u003cli\u003e重启多次后，再进入recovere模式\u003c/li\u003e\n\u003c/ul\u003e","title":"Mac苹果笔记本重新安装"},{"content":"截图 command + shift + 4 休眠 command + option + power 复制 command + c 粘帖 command + v 剪切 command + option + v 搜索 command + 空格 访问网络共享 command + k 网页刷新 command + r 网页强制刷新 command + shift + r 应用退出全屏 command + ctrl + f ","permalink":"/posts/mac-chang-yong-kuai-jie-jian/","summary":"\u003ch3 id=\"截图\"\u003e截图\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003ecommand + shift + 4\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"休眠\"\u003e休眠\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003ecommand + option + power\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"复制\"\u003e复制\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003ecommand + c\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"粘帖\"\u003e粘帖\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003ecommand + v\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"剪切\"\u003e剪切\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003ecommand + option + v\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"搜索\"\u003e搜索\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003ecommand + 空格\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"访问网络共享\"\u003e访问网络共享\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003ecommand + k\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"网页刷新\"\u003e网页刷新\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003ecommand + r\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"网页强制刷新\"\u003e网页强制刷新\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003ecommand + shift + r\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"应用退出全屏\"\u003e应用退出全屏\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003ecommand + ctrl + f\u003c/li\u003e\n\u003c/ul\u003e","title":"Mac常用快捷键"},{"content":"1.解决中文乱码问题 export NLS_LANG=\u0026#34;SIMPLIFIED CHINESE_CHINA.AL32UTF8\u0026#34; 2.环境变量设置 $ export ORACLE_SID=XE $ export ORAENV_ASK=NO $ . /opt/oracle/product/18c/dbhomeXE/bin/oraenv ","permalink":"/posts/oracle-shu-ju-ku-xiang-guan/","summary":"\u003ch3 id=\"1解决中文乱码问题\"\u003e1.解决中文乱码问题\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eexport NLS_LANG=\u0026#34;SIMPLIFIED CHINESE_CHINA.AL32UTF8\u0026#34;\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2环境变量设置\"\u003e2.环境变量设置\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e$ export ORACLE_SID=XE \n$ export ORAENV_ASK=NO \n$ . /opt/oracle/product/18c/dbhomeXE/bin/oraenv\n\u003c/code\u003e\u003c/pre\u003e","title":"oracle数据库相关"},{"content":"1. 安装 安装（略） 开启配置：服务器开启后，配置计算机名、配置远程管控功能开启、远程桌面开启、ip地址固定 2. 服务器配置 powershell命令，开启credssp C:\\Users\\Administrator\u0026gt;powershell PS C:\\Users\\Administrator\u0026gt; Enable-PSRemoting PS C:\\Users\\Administrator\u0026gt; Enable-WSManCredSSP -role server 关闭防火墙 PS C:\\Users\\Administrator\u0026gt; netsh advfirewall set currentprofile state off # 确定 3.客户端配置Hyper-V管理器 启用Hyper-V管理工具（不要勾选Hyper-V平台，否则会影响你的vm虚拟机） 修改hosts文件： 192.168.100.100 hyper-v-server 客户端工作组不能为“公用” Win-设置-网络和Internet-状态-更改连接属性，公用改为“专用” 修改组策略 gpedit.msc----本地计算机策略----管理工具----系统----凭证分配：允许分配新的凭证用于仅NTLM服务器身份验证 启用并添加一行值：wsman/HYPER-V-SERVER powershell执行命令： 开启winrm：winrm quickconfig winrm安全配置：Set-Item WSMan:\\localhost\\Client\\TrustedHosts -Value \u0026#34;HYPER-V-SERVER\u0026#34; winrm身份验证配置：Enable-WSManCredSSP -Role client -DelegateComputer \u0026#34;HYPER-V-SERVER\u0026#34; 4.hyper-v管理器连接服务器 客户端测试连接：windows管理工具中打开Hyper-V管理器 操作\u0026mdash;连接服务器，输入要连接的服务器即可 ","permalink":"/posts/hyper-vserver2016-an-zhuang--ke-hu-duan-yuan-cheng-guan-li--fei-jia-ru-yu-guan-li-fang-shi/","summary":"\u003col\u003e\n\u003cli\u003e安装安装（略）开启配置：服务器开启后，配置计算机名、配置远程管控功能开启、远程桌面开启、ip地址固定\u003c/li\u003e\n\u003c/ol\u003e\n","title":"hyper-v server 2016安装、客户端远程管理（非加入域管理方式）"},{"content":"1.打开注册表 regedit 2.执行一下操作 找到HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList 删除该目录下以.bak结尾的文件夹 ","permalink":"/posts/yu-yong-hu-deng-lu-shi-bian-cheng-lin-shi-zhuo-mian-jie-jue-fang-fa/","summary":"\u003ch3 id=\"1打开注册表\"\u003e1.打开注册表\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eregedit\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2执行一下操作\"\u003e2.执行一下操作\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e找到HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\u003c/li\u003e\n\u003cli\u003e删除该目录下以.bak结尾的文件夹\u003c/li\u003e\n\u003c/ul\u003e","title":"域用户登录时变成临时桌面解决方法"},{"content":"1. 关闭防火墙 netsh firewall set opmode disable 2. 查看硬盘和空间大小 wmic DiskDrive get Size /value # 查看所有 wmic LogicalDisk where \u0026#34;Caption=\u0026#39;C:\u0026#39;\u0026#34; get FreeSpace,Size /value # 查看C盘空间和剩余大小 3.分区和格式化diskpart 准备分区 diskpart #进入磁盘操作模式 list disk #查看都有哪些磁盘 select disk 0 #选择磁盘0 list partition #查看分区 clean #删除磁盘0中所有分区 convert mbr #将磁盘0转为mbr分区格式(装win8以上用convert gpt) 系统主分区 create partition primary size = 102400 #创建主分区, 大小为100G format quick #快速格式化此分区为ntfs格式 assign letter=C #将分区号C分配给该分区 active #将此分区激活, 用于安装系统 主分区2 create partition primary #剩余容量创建主分区2 format quick #快速格式化此分区为ntfs格式 assign letter=D #将分区号D分配给该分区 逻辑分区 create partition extended #创建扩展分区, 大小为300G create partition logical #将扩展分区全部划分为逻辑分区 format quick #快速格式化此分区为ntfs格式 assign letter=E #将分区号C分配给该分区 4.删除文件和文件夹 del 文件名 del /f /a /q #强制删除文件 rd 文件夹名 rd /s /q #强制删除文件夹 5.查看内存和CPU信息 systeminfo 6.命令行添加windows共享 net share \u0026#34;Downloads=C:\\Users\\Administrator\\Downloads\u0026#34; \u0026#34;/GRANT:EVERYONE,FULL\u0026#34; 7.hyper-v、windows启动服务配置界面命令 sconfig ","permalink":"/posts/window-chang-yong-ming-ling/","summary":"\u003col\u003e\n\u003cli\u003e关闭防火墙netsh firewall set opmode disable2. 查看硬盘和空间大小wmic DiskDrive get Size /value    # 查看所有wmic LogicalDisk where \u0026quot;Caption='C:'\u0026quot; g\u003c/li\u003e\n\u003c/ol\u003e\n","title":"Window常用命令"},{"content":"一、安装 1.添加安装源： touch /etc/yum.repos.d/mongodb-org-4.0.repo 添加以下内容： [mongodb-org-4.0] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc 2.安装最新版本 yum install -y mongodb-org 3.安装固定版本 sudo yum install -y mongodb-org-4.0.1 mongodb-org-server-4.0.1 mongodb-org-shell-4.0.1 mongodb-org-mongos-4.0.1 mongodb-org-tools-4.0.1 4.固定版本不升级 vim /etc/yum.conf 在文件中增加以下内容： exclude=mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools ","permalink":"/posts/centos7-xia-mongodb-de-an-zhuang-shi-yong-jiao-cheng/","summary":"\u003ch2 id=\"一安装\"\u003e一、安装\u003c/h2\u003e\n\u003ch3 id=\"1添加安装源\"\u003e1.添加安装源：\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etouch /etc/yum.repos.d/mongodb-org-4.0.repo\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e添加以下内容：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003emongodb-org-4.0\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ename\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eMongoDB Repository\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ebaseurl\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003ehttps://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egpgcheck\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eenabled\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egpgkey\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003ehttps://www.mongodb.org/static/pgp/server-4.0.asc\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2安装最新版本\"\u003e2.安装最新版本\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y mongodb-org\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3安装固定版本\"\u003e3.安装固定版本\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo yum install -y mongodb-org-4.0.1 mongodb-org-server-4.0.1 mongodb-org-shell-4.0.1 mongodb-org-mongos-4.0.1 mongodb-org-tools-4.0.1\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4固定版本不升级\"\u003e4.固定版本不升级\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/yum.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e在文件中增加以下内容：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eexclude\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003emongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos 7下mongodb的安装使用教程"},{"content":"一、概述 1.简介 Duplicati是一个备份客户端，可以在本地存储，云存储服务和远程文件服务器上安全地存储加密的，增量的压缩备份。Duplicati可以安装在各种操作系统上。最常见的平台是Windows，Linux和OSX。\nDuplicati是一款免费的开源软件 文件备份采用块备份机制，备份时文件将被分成小块数据（块） 可以备份选定的文件和文件夹 2.特性 采用强加密方式AES-256 Duplicati最初执行完全备份。之后，Duplicati仅通过添加更改的数据来更新初始备份。如果备份的文件夹不发生修改，则执行备份命令时不会产生新的备份版本 Duplicati带有Web界面。它可用于在本地计算机上配置和运行备份。 Duplicati通过duplicati-cli提供所有功能和功能。这允许您向脚本添加备份功能或在终端窗口中运行备份。 二、环境配置（以centos7 x64为例） 1.系统更新和基础环境 yum update -y yum install -y epel-release yum install -y vim net-tools nmon clamav htop rsync iptraf-ng tree lrzsz cmake make gcc gcc-c++ ntp iftop 2.duplicati依赖环境 yum install yum-utils rpm --import \u0026#34;http://keyserver.ubuntu.com/pks/lookup?op=get\u0026amp;search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF\u0026#34; yum-config-manager --add-repo http://download.mono-project.com/repo/centos7/ yum install mono-devel yum install desktop-file-utils yum install libappindicator 3.关闭selinux及防火墙 sed -i \u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39; /etc/selinux/config systemctl stop firewalld systemctl disable firewalld 三、duplicati安装 1.从官网下载安装包 https://www.duplicati.com/download duplicati-2.0.3.3-2.0.3.3_beta_20180402.noarch.rpm 2.上传至centos系统，然后执行安装 yum localinstall duplicati-2.0.3.3-2.0.3.3_beta_20180402.noarch.rpm 四、dulicati使用 1.备份文件 duplicati-cli backup \u0026#34;/home/backup\u0026#34; \u0026#34;/home/storage\u0026#34; --passphrase=123456\u0026gt;\u0026gt;/home/backup.log 备注： /home/backup 为备份至该文件夹 /home/storage 为所需备份的存储文件夹 \u0026ndash;passphrase=123456 为备份密码 backup.log 为备份日志 2.恢复文件 duplicati-cli restore /home/backup/ \u0026#34;ssl_certificates.tar.gz\u0026#34; --restore-path=\u0026#34;/home/restore\u0026#34; --version=1 --passphrase=123456\u0026gt;\u0026gt;/home/restore.log 备注： /home/backup/ 备份文件所在位置 ssl_certificates.tar.gz 为所需恢复的文件的名称，可以用*代替恢复所有文件 \u0026ndash;restore-path=\u0026quot;/home/restore\u0026quot; 为把文件恢复至/home/restore文件夹下，如果不指定 \u0026ndash;restore-path则恢复至原有位置，如果原有位置存在该文件，则重命名加上备份时的时间戳 \u0026ndash;version=1 指定为恢复文件的版本号为第1个版本 \u0026ndash;passphrase=123456 为恢复所需密码，和备份时一致 /home/restore.log 为恢复日志 ","permalink":"/posts/centos7-xia-duplicati-an-zhuang-ce-shi/","summary":"\u003ch2 id=\"一概述\"\u003e一、概述\u003c/h2\u003e\n\u003ch3 id=\"1简介\"\u003e1.简介\u003c/h3\u003e\n\u003cblockquote\u003e\n\u003cp\u003eDuplicati是一个备份客户端，可以在本地存储，云存储服务和远程文件服务器上安全地存储加密的，增量的压缩备份。Duplicati可以安装在各种操作系统上。最常见的平台是Windows，Linux和OSX。\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cul\u003e\n\u003cli\u003eDuplicati是一款免费的开源软件\u003c/li\u003e\n\u003cli\u003e文件备份采用块备份机制，备份时文件将被分成小块数据（块）\u003c/li\u003e\n\u003cli\u003e可以备份选定的文件和文件夹\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"2特性\"\u003e2.特性\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e采用强加密方式AES-256\u003c/li\u003e\n\u003cli\u003eDuplicati最初执行完全备份。之后，Duplicati仅通过添加更改的数据来更新初始备份。如果备份的文件夹不发生修改，则执行备份命令时不会产生新的备份版本\u003c/li\u003e\n\u003cli\u003eDuplicati带有Web界面。它可用于在本地计算机上配置和运行备份。\u003c/li\u003e\n\u003cli\u003eDuplicati通过duplicati-cli提供所有功能和功能。这允许您向脚本添加备份功能或在终端窗口中运行备份。\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"二环境配置以centos7-x64为例\"\u003e二、环境配置（以centos7 x64为例）\u003c/h2\u003e\n\u003ch3 id=\"1系统更新和基础环境\"\u003e1.系统更新和基础环境\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum update -y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y epel-release\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y vim net-tools nmon clamav htop rsync iptraf-ng tree lrzsz cmake make gcc gcc-c++ ntp iftop\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2duplicati依赖环境\"\u003e2.duplicati依赖环境\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install yum-utils\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erpm --import \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;http://keyserver.ubuntu.com/pks/lookup?op=get\u0026amp;search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum-config-manager --add-repo http://download.mono-project.com/repo/centos7/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install mono-devel\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install desktop-file-utils\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install libappindicator\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3关闭selinux及防火墙\"\u003e3.关闭selinux及防火墙\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39;\u003c/span\u003e /etc/selinux/config\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl stop firewalld\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl disable firewalld\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"三duplicati安装\"\u003e三、duplicati安装\u003c/h2\u003e\n\u003ch3 id=\"1从官网下载安装包\"\u003e1.从官网下载安装包\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ehttps://www.duplicati.com/download\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eduplicati-2.0.3.3-2.0.3.3_beta_20180402.noarch.rpm\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2上传至centos系统然后执行安装\"\u003e2.上传至centos系统，然后执行安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum localinstall duplicati-2.0.3.3-2.0.3.3_beta_20180402.noarch.rpm\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"四dulicati使用\"\u003e四、dulicati使用\u003c/h2\u003e\n\u003ch3 id=\"1备份文件\"\u003e1.备份文件\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eduplicati-cli backup \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;/home/backup\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;/home/storage\u0026#34;\u003c/span\u003e --passphrase\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e123456\u0026gt;\u0026gt;/home/backup.log\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"备注\"\u003e备注：\u003c/h4\u003e\n\u003cul\u003e\n\u003cli\u003e/home/backup 为备份至该文件夹\u003c/li\u003e\n\u003cli\u003e/home/storage 为所需备份的存储文件夹\u003c/li\u003e\n\u003cli\u003e\u0026ndash;passphrase=123456 为备份密码\u003c/li\u003e\n\u003cli\u003ebackup.log 为备份日志\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"2恢复文件\"\u003e2.恢复文件\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eduplicati-cli restore /home/backup/ \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;ssl_certificates.tar.gz\u0026#34;\u003c/span\u003e --restore-path\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;/home/restore\u0026#34;\u003c/span\u003e --version\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e --passphrase\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e123456\u0026gt;\u0026gt;/home/restore.log\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"备注-1\"\u003e备注：\u003c/h4\u003e\n\u003cul\u003e\n\u003cli\u003e/home/backup/ 备份文件所在位置\u003c/li\u003e\n\u003cli\u003essl_certificates.tar.gz 为所需恢复的文件的名称，可以用*代替恢复所有文件\u003c/li\u003e\n\u003cli\u003e\u0026ndash;restore-path=\u0026quot;/home/restore\u0026quot; 为把文件恢复至/home/restore文件夹下，如果不指定 \u0026ndash;restore-path则恢复至原有位置，如果原有位置存在该文件，则重命名加上备份时的时间戳\u003c/li\u003e\n\u003cli\u003e\u0026ndash;version=1 指定为恢复文件的版本号为第1个版本\u003c/li\u003e\n\u003cli\u003e\u0026ndash;passphrase=123456 为恢复所需密码，和备份时一致\u003c/li\u003e\n\u003cli\u003e/home/restore.log 为恢复日志\u003c/li\u003e\n\u003c/ul\u003e","title":"Centos7下duplicati安装测试"},{"content":"环境设置 时区设置： tzselect 选择:5--9--1--1 vim /etc/profile 添加： TZ=\u0026#39;Asia/Shanghai\u0026#39;; export TZ 系统更新、工具安装 yum update yum install vim 安装配置 Mongodb安装 vim /etc/yum.repos.d/mongodb-org-4.0.repo 添加以下内容： [mongodb-org-4.0] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc 安装： yum install -y mongodb-org 启动自启： service mongod start chkconfig mongod on leanote安装 下载linux二进制包到服务器/opt下解压,得到leanote文件夹 mongorestore -h localhost -d leanote --dir /opt/leanote/mongodb_backup/leanote_install_data/ bash /opt/leanote/bin/run.sh 给leanote添加数据库访问用户 mongo use leanote; db.createUser( { user: \u0026#34;user\u0026#34;, pwd: \u0026#34;passowrd\u0026#34;, roles: [ \u0026#34;readWrite\u0026#34;, \u0026#34;dbAdmin\u0026#34; ] } ); 修改配置文件，采用用户连接leanote vim /opt/leanote/conf/app.conf username = user password = passowrd 重启leanoe即可 开启MongoDB的auth vim /etc/mongodb.conf 添加： security: authorization: enabled 重启mongodb服务 Nginx 安装 rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm yum install nginx 配置 vim /etc/nginx/nginx.conf http{}中添加： upstream www.jbstudy.cn { server localhost:9000; ｝ vim /etc/nginx/conf.d/default.conf 替换为： # http server { listen 80; server_name www.jbstudy.cn; # 强制https # 如果不需要, 请注释这一行rewrite rewrite ^/(.*) https://www.jbstudy.cn/$1 permanent; location / { proxy_pass http://www.jbstudy.cn; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; #设置最大上传文件大小 } } # https server { listen 443 ssl; server_name www.jbstudy.cn; ssl_certificate /root/cert-1523341295544_www.jbstudy.cn.crt; ssl_certificate_key /root/cert-1523341295544_www.jbstudy.cn.key; location / { proxy_pass http://www.jbstudy.cn; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; client_max_body_size 10m; #设置最大上传文件大小 } } 修改leanoe安全配置 vim /opt/leanote/conf/app.conf http.addr=127.0.0.1 http.port=9000 site.url=http://www.jbstudy.cn ","permalink":"/posts/centos7-xia-leanote-bi-ji-an-zhuang-pei-zhi/","summary":"\u003ch2 id=\"环境设置\"\u003e环境设置\u003c/h2\u003e\n\u003ch3 id=\"时区设置\"\u003e时区设置：\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etzselect\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e选择:5--9--1--1\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/profile\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e添加：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eTZ\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;Asia/Shanghai\u0026#39;\u003c/span\u003e; export TZ\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"系统更新工具安装\"\u003e系统更新、工具安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum update\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install vim\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"安装配置\"\u003e安装配置\u003c/h2\u003e\n\u003ch3 id=\"mongodb安装\"\u003eMongodb安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/yum.repos.d/mongodb-org-4.0.repo\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e添加以下内容：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003emongodb-org-4.0\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ename\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eMongoDB Repository\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ebaseurl\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003ehttps://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egpgcheck\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eenabled\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egpgkey\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003ehttps://www.mongodb.org/static/pgp/server-4.0.asc\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e安装：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y mongodb-org\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e启动自启：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice mongod start\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echkconfig mongod on\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"leanote安装\"\u003eleanote安装\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e下载linux二进制包到服务器/opt下解压,得到leanote文件夹\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emongorestore -h localhost -d leanote --dir /opt/leanote/mongodb_backup/leanote_install_data/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ebash /opt/leanote/bin/run.sh\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e给leanote添加数据库访问用户\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emongo\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003euse leanote;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edb.createUser\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e   \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     user: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;user\u0026#34;\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     pwd: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;passowrd\u0026#34;\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     roles: \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;readWrite\u0026#34;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;dbAdmin\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e   \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e修改配置文件，采用用户连接leanote\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /opt/leanote/conf/app.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eusername \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e user\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epassword \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e passowrd\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e重启leanoe即可\u003c/li\u003e\n\u003cli\u003e开启MongoDB的auth\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/mongodb.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e添加：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esecurity:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  authorization: enabled\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e重启mongodb服务\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"nginx\"\u003eNginx\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e安装\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install nginx\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e配置\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/nginx/nginx.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ehttp\u003cspan style=\"color:#f92672\"\u003e{}\u003c/span\u003e中添加：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eupstream www.jbstudy.cn \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    server localhost:9000;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    ｝\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/nginx/conf.d/default.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e替换为：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# http\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eserver\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    listen 80;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    server_name www.jbstudy.cn;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# 强制https\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e# 如果不需要, 请注释这一行rewrite\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    rewrite ^/\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e.*\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e https://www.jbstudy.cn/$1 permanent;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    location / \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        proxy_pass http://www.jbstudy.cn;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        proxy_set_header Host $host;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        proxy_set_header X-Real-IP $remote_addr;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        client_max_body_size 10m; \u003cspan style=\"color:#75715e\"\u003e#设置最大上传文件大小\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# https\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eserver\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    listen \u003cspan style=\"color:#ae81ff\"\u003e443\u003c/span\u003e ssl;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    server_name www.jbstudy.cn;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    ssl_certificate /root/cert-1523341295544_www.jbstudy.cn.crt;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    ssl_certificate_key /root/cert-1523341295544_www.jbstudy.cn.key;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    location / \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        proxy_pass http://www.jbstudy.cn;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        proxy_set_header Host $host;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        proxy_set_header X-Real-IP $remote_addr;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        client_max_body_size 10m; \u003cspan style=\"color:#75715e\"\u003e#设置最大上传文件大小\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"修改leanoe安全配置\"\u003e修改leanoe安全配置\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /opt/leanote/conf/app.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ehttp.addr\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e127.0.0.1\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ehttp.port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e9000\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esite.url\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003ehttp://www.jbstudy.cn\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下leanote笔记安装配置"},{"content":"1.数据库安装（通过官方yum安装，略过） 2.创建并初始化数据目录 mkdir -p /data/mysql/{3301,3302,3303,3304,3305} chown mysql:mysql /data/mysql/* 3.通过配置文件指定并初始化数据目录 [root@localhost ~]# cp /etc/my.cnf /data/mysql/3301.cnf [root@localhost ~]# vim /data/mysql/3301.cnf [mysqld] port=3301 datadir=/data/mysql/3301/ socket=/tmp/mysql3301.sock symbolic-links=0 [mysqld_safe] log-error=/data/mysql/3301.log pid-file=/usr/local/mysql/data/3301.pid [client] port=3301 socket=/tmp/mysql3301.sock [root@localhost ~]# mysqld --defaults-file=/data/mysql/3301.cnf --initialize-insecure --user=mysql 3301.cnf初始化使用，后续不再需要，重复以上步骤完成3302-3306\n4.配置my.cnf文件集中管理多个实例 [root@localhost ~]# cp /etc/my.cnf /etc/my.cnf.bak [root@localhost ~]# vim /etc/my.cnf [mysqld_multi] mysqld=/usr/bin/mysqld_safe mysqladmin=/usr/bin/mysqladmin [mysqld3301] port=3301 socket=/tmp/mysql3301.sock datadir=/data/mysql/3301/ skip-external-locking log-bin=/data/mysql/3301/mysql-bin server-id=3301 user=mysql character-set-server = utf8 collation-server = utf8_general_ci ...... ...... [mysqld3306] port=3306 socket=/tmp/mysql3306.sock datadir=/data/mysql/3306/ skip-external-locking log-bin=/data/mysql/3306/mysql-bin server-id=3306 user=mysql character-set-server = utf8 collation-server = utf8_general_ci [mysql] no-auto-rehash mysqld_multi的配置文件和一般MySQL配置不同，没有[mysqld]段，取而代之的是[mysqld1]、[mysqld2]等配置段，每个配置段代表一个MySQL实例。\n5.启动多个MySQL实例 [root@localhost ~]# /etc/init.d/mysqld_multi start 3301-3306 [root@localhost ~]# /etc/init.d/mysqld_multi start 3302,3303 6.关闭多个MySQL实例 [root@localhost ~]# /etc/init.d/mysqld_multi stop 3301-3306 但此时发现无法关闭。\n7.解决无法通过mysqld_multi关闭mysql实例 给每个实例新建关闭权限的帐号 # 3301为例： shell\u0026gt; mysql -u root -S /tmp/mysql3301.sock -p Enter password: mysql\u0026gt; CREATE USER \u0026#39;multi_admin\u0026#39;@\u0026#39;localhost\u0026#39; IDENTIFIED BY \u0026#39;123456\u0026#39;; mysql\u0026gt; GRANT SHUTDOWN ON *.* TO \u0026#39;multi_admin\u0026#39;@\u0026#39;localhost\u0026#39;; 其他3302-3306重复该操作\n修改my.conf的[mysqld_multi]模块 [mysqld_multi] mysqld = /usr/bin/mysqld_safe mysqladmin = /usr/bin/mysqladmin user = multi_admin password = 123456 修改mysqld_multi命令 vim /usr/bin/mysqld_multi # 找到以下行 my $com= join \u0026#39; \u0026#39;, \u0026#39;my_print_defaults\u0026#39;, @defaults_options, $group; # 修改my_print_defaults为：my_print_defaults -s my $com= join \u0026#39; \u0026#39;, \u0026#39;my_print_defaults -s\u0026#39;, @defaults_options, $group; 再用mysqld_multi就能停库了。\n","permalink":"/posts/centos7-xia-mysql-dan-zhu-ji-duo-shi-li-an-zhuang--mysqldmulti/","summary":"\u003ch2 id=\"1数据库安装通过官方yum安装略过\"\u003e1.数据库安装（通过官方yum安装，略过）\u003c/h2\u003e\n\u003ch2 id=\"2创建并初始化数据目录\"\u003e2.创建并初始化数据目录\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e mkdir -p /data/mysql/\u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e3301,3302,3303,3304,3305\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e chown mysql:mysql /data/mysql/*\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"3通过配置文件指定并初始化数据目录\"\u003e3.通过配置文件指定并初始化数据目录\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eroot@localhost ~\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e# cp /etc/my.cnf /data/mysql/3301.cnf\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eroot@localhost ~\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e# vim /data/mysql/3301.cnf\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003emysqld\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eport\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e3301\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edatadir\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/data/mysql/3301/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esocket\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/tmp/mysql3301.sock\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esymbolic-links\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003emysqld_safe\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elog-error\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/data/mysql/3301.log\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epid-file\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/usr/local/mysql/data/3301.pid\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eclient\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eport\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e3301\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esocket\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/tmp/mysql3301.sock\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eroot@localhost ~\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e# mysqld --defaults-file=/data/mysql/3301.cnf --initialize-insecure --user=mysql\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e3301.cnf初始化使用，后续不再需要，重复以上步骤完成3302-3306\u003c/p\u003e\n\u003ch2 id=\"4配置mycnf文件集中管理多个实例\"\u003e4.配置my.cnf文件集中管理多个实例\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eroot@localhost ~\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e# cp /etc/my.cnf /etc/my.cnf.bak\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eroot@localhost ~\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e# vim /etc/my.cnf\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003emysqld_multi\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emysqld\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/usr/bin/mysqld_safe\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emysqladmin\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/usr/bin/mysqladmin\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003emysqld3301\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eport\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e3301\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esocket\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/tmp/mysql3301.sock\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edatadir\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/data/mysql/3301/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eskip-external-locking\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elog-bin\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/data/mysql/3301/mysql-bin\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eserver-id\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e3301\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003euser\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003emysql\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echaracter-set-server \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e utf8\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecollation-server \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e utf8_general_ci\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e......\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e......\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003emysqld3306\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eport\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e3306\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esocket\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/tmp/mysql3306.sock\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edatadir\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/data/mysql/3306/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eskip-external-locking\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elog-bin\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/data/mysql/3306/mysql-bin\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eserver-id\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e3306\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003euser\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003emysql\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echaracter-set-server \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e utf8\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecollation-server \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e utf8_general_ci\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003emysql\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eno-auto-rehash\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003emysqld_multi的配置文件和一般MySQL配置不同，没有[mysqld]段，取而代之的是[mysqld1]、[mysqld2]等配置段，每个配置段代表一个MySQL实例。\u003c/p\u003e","title":"Centos7下mysql单主机多实例安装-mysqld_multi"},{"content":"一、服务端 1.安装nfs yum -y install nfs-utils rpcbind 2.设置开机自动启动服务 systemctl enable nfs systemctl enable rpcbind 3.服务启动 systemctl start nfs systemctl start rpcbind 4.创建共享目录 mkdir /data/nfs-share chmod -R 777 /data/nfs-share 5.配置共享文件exports /data/nfs-share 192.168.1.0/24(rw,async,no_root_squash) 注：192.168.1.0该网段可以访问/data/nfs-share下的内容，并具有读写权限。\n6.刷新配置立即生效 exportfs -a 二、客户端 1. 同样需要安装nfs，才能挂载 yum -y install nfs-utils 2.查看服务器开放了哪些共享 showmount -e 192.168.1.1 3.挂载目录 mkdir /data/share-file mount 192.168.1.1:/data/nfs-share /data/share-file 4.卸载已挂载的目录 umount /data/share-file ","permalink":"/posts/centos7-xia-nfs-wen-jian-xi-tong-gua-zai/","summary":"\u003ch2 id=\"一服务端\"\u003e一、服务端\u003c/h2\u003e\n\u003ch3 id=\"1安装nfs\"\u003e1.安装nfs\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum -y install nfs-utils rpcbind\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2设置开机自动启动服务\"\u003e2.设置开机自动启动服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable nfs\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable rpcbind\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3服务启动\"\u003e3.服务启动\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl start nfs\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl start rpcbind\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4创建共享目录\"\u003e4.创建共享目录\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir /data/nfs-share\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echmod -R \u003cspan style=\"color:#ae81ff\"\u003e777\u003c/span\u003e /data/nfs-share\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5配置共享文件exports\"\u003e5.配置共享文件exports\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e/data/nfs-share 192.168.1.0/24\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003erw,async,no_root_squash\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e注：192.168.1.0该网段可以访问/data/nfs-share下的内容，并具有读写权限。\u003c/p\u003e\n\u003ch3 id=\"6刷新配置立即生效\"\u003e6.刷新配置立即生效\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eexportfs -a\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"二客户端\"\u003e二、客户端\u003c/h2\u003e\n\u003ch3 id=\"1-同样需要安装nfs才能挂载\"\u003e1. 同样需要安装nfs，才能挂载\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum -y install nfs-utils\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2查看服务器开放了哪些共享\"\u003e2.查看服务器开放了哪些共享\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eshowmount -e  192.168.1.1\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3挂载目录\"\u003e3.挂载目录\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir  /data/share-file\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emount 192.168.1.1:/data/nfs-share /data/share-file\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4卸载已挂载的目录\"\u003e4.卸载已挂载的目录\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eumount /data/share-file\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下NFS文件系统挂载"},{"content":"一、samba相关软件安装 yum install krb5-workstation krb5-devel pam_krb5 samba samba-client samba-winbind-clients -y 二、配置 1.更改主机名 vim /etc/hostname 修改为：testsamba vim /etc/hosts 修改行为： 127.0.0.1 testsamba.southbaytech.co testsamba 2.更改系统dns vim /etc/sysconfig/network-scripts/ifcfg-eth0 其中dns修改为： dns1=172.21.100.11 #ip地址为dns的AD域 3.禁用防火墙和Selinux chkconfig firewalld off sed -i \u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39; /etc/selinux/config 4.设置开机启动winbind，samba chkconfig winbind on chkconfig smb on 5.创建samba目录 mkdir /home/share chmod 777 /home/share 6.修改krb5配置 vim /etc/krb5.conf 修改为如下配置 [libdefaults] dns_lookup_realm = true default_realm = SOUTHBAYTECH.CO [realms] SOUTHBAYTECH.CO = { kdc = 172.21.100.11:88 admin_server = 172.21.100.11:749 } [domain_realm] .southbaytech.co = SOUTHBAYTECH.CO southbaytech.co = SOUTHBAYTECH.CO 7.修改nss配置 vim /etc/nsswitch.conf 修改为： passwd: files winbind shadow: files winbind group: files winbind 8.修改samba配置 vim /etc/samba/smb.conf 修改为： [global] # ----------------------- Network-Related Options ------------------------- workgroup = SOUTHBAYTECH netbios name = testsamba # ----------------------- Standalone Server Options ------------------------ #security = user #passdb backend = tdbsam # ----------------------- Domain Members Options ------------------------ security = ads realm = SOUTHBAYTECH.CO password server = 172.21.100.11 idmap uid = 16777216-33554431 idmap gid = 16777216-33554431 template shell = /bin/bash template homedir = /home/%U winbind use default domain = true winbind offline logon = true winbind enum groups = yes winbind enum users = yes winbind separator = / #============================ Share Definitions ============================== [share] comment = Home Directories path = /home/share browseable = yes (是否显示共享文件夹，默认yes) #writable = yes （是否可写，yes表示所有用户默认有写权限，write list无效；反之read list 无效） available = yes force group = nogroup create mask = 0777 directory mask = 0777 read list = asd （读权限） write list = asd （写权限） valid users = asd （有访问此共享文件夹权限的用户，默认表示所有用户都有访问权限） 9.重启服务器 reboot 10.将服务器加入域 kinit tab_ding@SOUTHBAYTECH.CO （测试是否可以加入域） net ads join -U tab_ding@SOUTHBAYTECH.CO（需要管理员权限） 注：如果出现无法加入域的情况，请检查服务器时间和AD域时间是否相差太多或者AD域中已存在该主机 11.重启winbind服务 service winbind restart 其他命令 net ads leave -U administrator （离开域） wbinfo -t （测试RPC调用是否正常） net ads testjoin （测试是否正常加入域） wbinfo -u （域内用户） wbinfo -g （域内组 三、配置日志(centos7) 1.创建日志目录 mkdir -p /home/log/samba 2.配置samba vim /etc/samba/smb.conf 添加如下配置： [global] vfs object = full_audit #设置审计日志格式 full_audit:prefix = %u|%I|%S #审计失败日志 full_audit:failure = connect #审计成功日志 full_audit:success = mkdir rmdir rename unlink kernel_flock #审计日志设备 full_audit:facility = local5 #审计日志安全等级 full_audit:priority = info 3. 配置syslog 其中*.info;mail.none;authpriv.none;cron.none /var/log/messages 为原来存在，新加local5.none vim /etc/rsyslog.conf 修改为： *.info;mail.none;authpriv.none;cron.none;local5.none /var/log/messages local5.info -/home/log/samba/smb.log 4.重启服务 systemctl restart rsyslog systemctl restart smb 四、配置回收站(centos7) 1.创建回收站目录 mkdir /home/share/.delete chmod 777 -R /home/share/.delete 2.配置samba 在共享模块share中添加以下内容： vfs objects = recycle #开启回收站 recycle:repository = /home/share/.delete/%U #回收站路径 recycle:keeptree = yes #保持原路径 recycle:versions = yes #开启版本控制 recycle:minsize = 100 #排除小于100字节的文件回收 recycle:maxsize = 1000000 #排除大于100万字节的文件回收 recycle:exclude_dir = tmp #排除tmp目录回收 recycle:exclude = *.log #排除.log结尾的文件进入回收站 3.重启服务 systemctl restart smb ","permalink":"/posts/centos7-xia-samba-fu-wu-da-jian-ji-tong-guo-huo-dong-mu-lu-ad-kong-zhi-zhang-hao/","summary":"\u003ch2 id=\"一samba相关软件安装\"\u003e一、samba相关软件安装\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install krb5-workstation krb5-devel pam_krb5 samba samba-client samba-winbind-clients -y\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"二配置\"\u003e二、配置\u003c/h2\u003e\n\u003ch3 id=\"1更改主机名\"\u003e1.更改主机名\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/hostname\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e修改为：testsamba\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/hosts\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e修改行为：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e127.0.0.1   testsamba.southbaytech.co   testsamba\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2更改系统dns\"\u003e2.更改系统dns\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/sysconfig/network-scripts/ifcfg-eth0\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e其中dns修改为：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edns1\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e172.21.100.11   \u003cspan style=\"color:#75715e\"\u003e#ip地址为dns的AD域\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3禁用防火墙和selinux\"\u003e3.禁用防火墙和Selinux\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echkconfig firewalld off\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39;\u003c/span\u003e /etc/selinux/config\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4设置开机启动winbindsamba\"\u003e4.设置开机启动winbind，samba\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echkconfig winbind on\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echkconfig smb on\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5创建samba目录\"\u003e5.创建samba目录\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir /home/share\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echmod \u003cspan style=\"color:#ae81ff\"\u003e777\u003c/span\u003e /home/share\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"6修改krb5配置\"\u003e6.修改krb5配置\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/krb5.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e修改为如下配置\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003elibdefaults\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edns_lookup_realm \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e true\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edefault_realm \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e SOUTHBAYTECH.CO\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003erealms\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e SOUTHBAYTECH.CO \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  kdc \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e 172.21.100.11:88\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  admin_server \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e 172.21.100.11:749\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003edomain_realm\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e .southbaytech.co \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e SOUTHBAYTECH.CO\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e southbaytech.co \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e SOUTHBAYTECH.CO\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"7修改nss配置\"\u003e7.修改nss配置\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/nsswitch.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e修改为：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epasswd:     files winbind\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eshadow:     files winbind\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egroup:      files winbind\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"8修改samba配置\"\u003e8.修改samba配置\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/samba/smb.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e修改为：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eglobal\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# ----------------------- Network-Related Options -------------------------\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    workgroup \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e SOUTHBAYTECH\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    netbios name \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e testsamba\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# ----------------------- Standalone Server Options ------------------------\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e#security = user\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e#passdb backend = tdbsam\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# ----------------------- Domain Members Options ------------------------\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    security \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e ads\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    realm \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e SOUTHBAYTECH.CO\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    password server \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e 172.21.100.11\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    idmap uid \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e 16777216-33554431\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    idmap gid \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e 16777216-33554431\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    template shell \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e /bin/bash\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    template homedir \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e /home/%U\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    winbind use default domain \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e true\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    winbind offline logon \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e true\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    winbind enum groups \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e yes\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    winbind enum users \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e yes\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    winbind separator \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e /\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#============================ Share Definitions ==============================\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eshare\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    comment \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e Home Directories\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    path \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e /home/share\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    browseable \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e yes        \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e是否显示共享文件夹，默认yes\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#75715e\"\u003e#writable = yes      （是否可写，yes表示所有用户默认有写权限，write list无效；反之read list 无效）\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    available \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e yes\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    force group \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e nogroup\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    create mask \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e0777\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    directory mask \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e0777\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    read list \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e asd       （读权限）\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    write list \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e asd      （写权限）\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    valid users \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e asd     （有访问此共享文件夹权限的用户，默认表示所有用户都有访问权限）\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"9重启服务器\"\u003e9.重启服务器\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ereboot\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"10将服务器加入域\"\u003e10.将服务器加入域\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ekinit tab_ding@SOUTHBAYTECH.CO （测试是否可以加入域）\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003enet ads join -U tab_ding@SOUTHBAYTECH.CO（需要管理员权限）\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"注如果出现无法加入域的情况请检查服务器时间和ad域时间是否相差太多或者ad域中已存在该主机\"\u003e注：如果出现无法加入域的情况，请检查服务器时间和AD域时间是否相差太多或者AD域中已存在该主机\u003c/h4\u003e\n\u003ch3 id=\"11重启winbind服务\"\u003e11.重启winbind服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice winbind restart\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"其他命令\"\u003e其他命令\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003enet ads leave -U administrator （离开域）\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ewbinfo -t （测试RPC调用是否正常）\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003enet ads testjoin （测试是否正常加入域）\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ewbinfo -u （域内用户）\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ewbinfo -g （域内组\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"三配置日志centos7\"\u003e三、配置日志(centos7)\u003c/h2\u003e\n\u003ch3 id=\"1创建日志目录\"\u003e1.创建日志目录\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir -p /home/log/samba\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2配置samba\"\u003e2.配置samba\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/samba/smb.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e添加如下配置：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eglobal\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evfs object \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e full_audit\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#设置审计日志格式\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efull_audit:prefix \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e %u|%I|%S\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#审计失败日志\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efull_audit:failure \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e connect\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#审计成功日志\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efull_audit:success \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e mkdir rmdir rename unlink kernel_flock\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#审计日志设备\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efull_audit:facility \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e local5\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#审计日志安全等级\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efull_audit:priority \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e info\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3-配置syslog\"\u003e3. 配置syslog\u003c/h3\u003e\n\u003ch4 id=\"其中infomailnoneauthprivnonecronnone-varlogmessages-为原来存在新加local5none\"\u003e其中*.info;mail.none;authpriv.none;cron.none /var/log/messages 为原来存在，新加local5.none\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/rsyslog.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e修改为：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e*.info;mail.none;authpriv.none;cron.none;local5.none    /var/log/messages\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elocal5.info                                           -/home/log/samba/smb.log\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4重启服务\"\u003e4.重启服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl restart rsyslog\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl restart smb\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"四配置回收站centos7\"\u003e四、配置回收站(centos7)\u003c/h2\u003e\n\u003ch3 id=\"1创建回收站目录\"\u003e1.创建回收站目录\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir /home/share/.delete\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echmod \u003cspan style=\"color:#ae81ff\"\u003e777\u003c/span\u003e -R /home/share/.delete\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2配置samba-1\"\u003e2.配置samba\u003c/h3\u003e\n\u003ch4 id=\"在共享模块share中添加以下内容\"\u003e在共享模块share中添加以下内容：\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evfs objects \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e  recycle                       \u003cspan style=\"color:#75715e\"\u003e#开启回收站        \u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erecycle:repository \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e /home/share/.delete/%U  \u003cspan style=\"color:#75715e\"\u003e#回收站路径\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erecycle:keeptree \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e yes                       \u003cspan style=\"color:#75715e\"\u003e#保持原路径\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erecycle:versions \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e yes                       \u003cspan style=\"color:#75715e\"\u003e#开启版本控制\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erecycle:minsize \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e100\u003c/span\u003e                        \u003cspan style=\"color:#75715e\"\u003e#排除小于100字节的文件回收\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erecycle:maxsize \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e1000000\u003c/span\u003e                    \u003cspan style=\"color:#75715e\"\u003e#排除大于100万字节的文件回收\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erecycle:exclude_dir \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e tmp                    \u003cspan style=\"color:#75715e\"\u003e#排除tmp目录回收\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erecycle:exclude \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e *.log                      \u003cspan style=\"color:#75715e\"\u003e#排除.log结尾的文件进入回收站\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3重启服务\"\u003e3.重启服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl restart smb\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下samba服务搭建及通过活动目录AD控制帐号"},{"content":"1.下载安装repo # 打开网站 https://dev.mysql.com/downloads/repo/yum/ # 下载 mysql80-community-release-el7-3.noarch.rpm # 安装 rpm -ivh mysql80-community-release-el7-3.noarch.rpm 2.更换yum可用community版本 # 查找当前可用版本 yum repolist enabled | grep \u0026#34;mysql.*-community.*\u0026#34; # 列出可用版本 yum repolist all | grep mysql # 安装yun-config-manager yum -y install yum-utils # 关闭和启用可安装版本 yum-config-manager --disable mysql57-community yum-config-manager --enable mysql56-community 3.安装 yum repolist enabled | grep mysql yum install mysql-community-server 4.启动 service mysqld start systemctl enable mysqld 5.保护MySQL安装 # 执行命令 mysql_secure_installation 6.创建个人账号 mysql -uroot -p GRANT ALL privileges ON *.* TO \u0026#39;tab\u0026#39;@\u0026#39;%\u0026#39; IDENTIFIED BY \u0026#39;123456\u0026#39; WITH GRANT OPTION; flush privileges; 7.开启防火墙 firewall-cmd --add-port=3306/tcp firewall-cmd --add-port=3306/tcp --permanent 8.默认密码查找 grep \u0026#39;temporary password\u0026#39; /var/log/mysqld.log ","permalink":"/posts/centos7-xia-yum-an-zhuang-mysql-community-ge-ban-ben/","summary":"\u003ch3 id=\"1下载安装repo\"\u003e1.下载安装repo\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 打开网站\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ehttps://dev.mysql.com/downloads/repo/yum/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 下载\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emysql80-community-release-el7-3.noarch.rpm\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 安装\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erpm -ivh mysql80-community-release-el7-3.noarch.rpm\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2更换yum可用community版本\"\u003e2.更换yum可用community版本\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 查找当前可用版本\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum repolist enabled | grep \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;mysql.*-community.*\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 列出可用版本\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum repolist all | grep mysql\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 安装yun-config-manager\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum -y install yum-utils\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 关闭和启用可安装版本\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum-config-manager --disable mysql57-community\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum-config-manager --enable mysql56-community\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3安装\"\u003e3.安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum repolist enabled | grep mysql\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install mysql-community-server\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4启动\"\u003e4.启动\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice mysqld start\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable mysqld\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5保护mysql安装\"\u003e5.保护MySQL安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 执行命令\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emysql_secure_installation\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"6创建个人账号\"\u003e6.创建个人账号\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emysql -uroot -p\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eGRANT ALL privileges ON *.* TO \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;tab\u0026#39;\u003c/span\u003e@\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;%\u0026#39;\u003c/span\u003e IDENTIFIED BY \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;123456\u0026#39;\u003c/span\u003e WITH GRANT OPTION; \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eflush privileges;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"7开启防火墙\"\u003e7.开启防火墙\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e3306/tcp\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e3306/tcp --permanent\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"8默认密码查找\"\u003e8.默认密码查找\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egrep \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;temporary password\u0026#39;\u003c/span\u003e /var/log/mysqld.log\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下yum安装mysql-community各版本"},{"content":"1.登录到qnap的ssh界面，并执行一下命令 chmod 777 /dev/dri/rederD128 2.使用一下命令启动docker docker run -d --name jellyfin --restart=always --device /dev/dri/renderD128:/dev/dri/renderD128 --device /dev/dri/card0:/dev/dri/card0 -v /share/TV:/media -p 8096:8096 -v 8920:8920 jellyfin/jellyfin 关键参数：\u0026ndash;device /dev/dri/renderD128:/dev/dri/renderD128 3.在jellyfin中开启硬解，如图： ","permalink":"/posts/jellyfin-zai-qnap-zhong-kai-qi-he-xian-ying-jie-de-fang-fa/","summary":"\u003ch3 id=\"1登录到qnap的ssh界面并执行一下命令\"\u003e1.登录到qnap的ssh界面，并执行一下命令\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echmod \u003cspan style=\"color:#ae81ff\"\u003e777\u003c/span\u003e /dev/dri/rederD128\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2使用一下命令启动docker\"\u003e2.使用一下命令启动docker\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edocker run -d --name jellyfin --restart\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003ealways --device /dev/dri/renderD128:/dev/dri/renderD128 --device /dev/dri/card0:/dev/dri/card0 -v /share/TV:/media -p 8096:8096 -v 8920:8920 jellyfin/jellyfin\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e关键参数：\u0026ndash;device /dev/dri/renderD128:/dev/dri/renderD128\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"3在jellyfin中开启硬解如图\"\u003e3.在jellyfin中开启硬解，如图：\u003c/h3\u003e\n\u003cp\u003e\u003cimg alt=\"3772512545\" loading=\"lazy\" src=\"/upload/2023/01/3772512545.png\"\u003e\u003c/p\u003e","title":"jellyfin在qnap中开启核显硬解的方法"},{"content":"1.下载自己喜欢的字体如苹果字体和如图中所示字体 2.把字体上传至linux文件系统中 3.在开启jellyfin的docker中，把该字体文件夹映射到jellyfin的docker容器中。如 -v /usr/share/fonts/truetype/mac:/share/Container/jellyfin_fonts 4.在jellyfin网页中开启备用字体，如图 ","permalink":"/posts/jellyfin-jie-jue-zi-mu-he-xian-shi-jie-mian-zhong-wen-fang-kuang-luan-ma-de-wen-ti/","summary":"\u003ch3 id=\"1下载自己喜欢的字体如苹果字体和如图中所示字体\"\u003e1.下载自己喜欢的字体如苹果字体和如图中所示字体\u003c/h3\u003e\n\u003cp\u003e\u003cimg alt=\"2016154958\" loading=\"lazy\" src=\"/upload/2023/01/2016154958.jpeg\"\u003e\u003c/p\u003e\n\u003ch3 id=\"2把字体上传至linux文件系统中\"\u003e2.把字体上传至linux文件系统中\u003c/h3\u003e\n\u003ch3 id=\"3在开启jellyfin的docker中把该字体文件夹映射到jellyfin的docker容器中如\"\u003e3.在开启jellyfin的docker中，把该字体文件夹映射到jellyfin的docker容器中。如\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e-v /usr/share/fonts/truetype/mac:/share/Container/jellyfin_fonts\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"4在jellyfin网页中开启备用字体如图\"\u003e4.在jellyfin网页中开启备用字体，如图\u003c/h3\u003e\n\u003cp\u003e\u003cimg alt=\"836908238\" loading=\"lazy\" src=\"/upload/2023/01/836908238.jpeg\"\u003e\u003c/p\u003e","title":"jellyfin解决字幕和显示界面中文方框乱码的问题"},{"content":" 安装 /bin/bash -c \u0026#34;$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)\u0026#34; 卸载 /bin/zsh -c \u0026#34;$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)\u0026#34; ","permalink":"/posts/mac-dian-nao-homebrew-guo-nei-yuan-an-zhuang-xie-zai-fang-fa/","summary":"\u003cul\u003e\n\u003cli\u003e安装\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e/bin/bash -c \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u003c/span\u003e\u003cspan style=\"color:#66d9ef\"\u003e$(\u003c/span\u003ecurl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh\u003cspan style=\"color:#66d9ef\"\u003e)\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e卸载\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e/bin/zsh -c \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u003c/span\u003e\u003cspan style=\"color:#66d9ef\"\u003e$(\u003c/span\u003ecurl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh\u003cspan style=\"color:#66d9ef\"\u003e)\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"MAC电脑HomeBrew国内源安装卸载方法"},{"content":"1.打开OMV主板中BIOS网络唤醒 2.OMV使用静态IP，并开启WOL 3.电源管理-计划任务，实现定时关机 ","permalink":"/posts/kai-qi-openmediavault-de-wang-luo-huan-xing-he-ding-shi-guan-ji/","summary":"\u003ch3 id=\"1打开omv主板中bios网络唤醒\"\u003e1.打开OMV主板中BIOS网络唤醒\u003c/h3\u003e\n\u003ch3 id=\"2omv使用静态ip并开启wol\"\u003e2.OMV使用静态IP，并开启WOL\u003c/h3\u003e\n\u003cp\u003e\u003cimg alt=\"926840956\" loading=\"lazy\" src=\"/upload/2023/01/926840956.jpeg\"\u003e\u003c/p\u003e\n\u003ch3 id=\"3电源管理-计划任务实现定时关机\"\u003e3.电源管理-计划任务，实现定时关机\u003c/h3\u003e\n\u003cp\u003e\u003cimg alt=\"2418825795\" loading=\"lazy\" src=\"/upload/2023/01/2418825795.jpeg\"\u003e\u003c/p\u003e","title":"开启openmediavault的网络唤醒和定时关机"},{"content":" [root@centos7 ~]$ hostnamectl set-hostname contenthub # 使用这个命令会立即生效且重启也生效 [root@centos7 ~]$ hostname # 查看下 contenthub [root@centos7 ~]$ vim /etc/hosts # 编辑下hosts文件， 给127.0.0.1添加hostname [root@centos7 ~]$ cat /etc/hosts # 检查 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 contenthub ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 ","permalink":"/posts/centos7-ru-he-zheng-que-xiu-gai-hostname/","summary":"\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eroot@centos7 ~\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e$ hostnamectl set-hostname contenthub             \u003cspan style=\"color:#75715e\"\u003e# 使用这个命令会立即生效且重启也生效\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eroot@centos7 ~\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e$ hostname                                                 \u003cspan style=\"color:#75715e\"\u003e# 查看下\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003econtenthub\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eroot@centos7 ~\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e$ vim /etc/hosts                                           \u003cspan style=\"color:#75715e\"\u003e# 编辑下hosts文件， 给127.0.0.1添加hostname\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eroot@centos7 ~\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e$ cat /etc/hosts                                           \u003cspan style=\"color:#75715e\"\u003e# 检查\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 contenthub\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e::1         localhost localhost.localdomain localhost6 localhost6.localdomain6\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7如何正确修改hostname"},{"content":"安裝 Nginx + php-fpm rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm yum install nginx wget php 要升級成 5.6 yum install epel-release rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm yum remove php-* 启用 [remi-php56] : [remi-php56] : enabled=1 : 安裝 php 5.6 yum install php php-fpm php-mbstring php-pdo php-gd php-xml php-mcrypt php-mysql 设定nginx 网站名 - wiki.ichiayi.com 网页路径 - /var/www/html vi /etc/nginx/conf.d/default.conf server { server_name wiki.ichiayi.com; listen 80; autoindex off; client_max_body_size 15M; client_body_buffer_size 128k; index index.html index.htm index.php doku.php; access_log /var/log/nginx/wiki.ichiayi.com/access.log; error_log /var/log/nginx/wiki.ichiayi.com/error.log; root /var/www/html; location / { try_files $uri $uri/ @dokuwiki; } location ~ ^/lib.*\\.(gif|png|ico|jpg)$ { expires 30d; } location = /robots.txt { access_log off; log_not_found off; } location = /favicon.ico { access_log off; log_not_found off; } location ~ /\\. { access_log off; log_not_found off; deny all; } location ~ ~$ { access_log off; log_not_found off; deny all; } location @dokuwiki { rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last; rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last; rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1\u0026amp;id=$2 last; rewrite ^/(.*) /doku.php?id=$1 last; } location ~ \\.php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } location ~ /(data|conf|bin|inc)/ { deny all; } location ~ /\\.ht { deny all; } } php-fpm 配置 - /etc/php-fpm.d/www.conf 安裝 Dokuwiki mkdir -p /var/www cd /var/www wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz tar -zxvf dokuwiki-stable.tgz mv dokuwiki-stable.tgz wiki-stable.tgz mv dokuwiki-* html 建立目录和权限设置 mkdir -p /var/log/nginx/wiki.ichiayi.com chown -R apache:apache /var/www/html/data chown -R apache:apache /var/www/html/conf 更改 /etc/php.ini 设定 vi /etc/php.ini : upload_max_filesize = 10M : post_max_size = 10M : : [Date] date.timezone = Asia/Taipei : 启动nginx + php-fpm systemctl enable nginx systemctl enable php-fpm systemctl start php-fpm systemctl start nginx ","permalink":"/posts/centos7-xia-an-zhuang-dokuwikinginx/","summary":"\u003ch2 id=\"安裝-nginx--php-fpm\"\u003e安裝 Nginx + php-fpm\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install nginx wget\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"php-要升級成-56\"\u003ephp 要升級成 5.6\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install epel-release\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum remove php-*\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e启用 [remi-php56]\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eremi-php56\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eenabled\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e安裝 php 5.6\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install php php-fpm php-mbstring php-pdo php-gd php-xml php-mcrypt php-mysql\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"设定nginx\"\u003e设定nginx\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e网站名 - wiki.ichiayi.com\u003c/li\u003e\n\u003cli\u003e网页路径 - /var/www/html\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evi /etc/nginx/conf.d/default.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eserver \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  server_name wiki.ichiayi.com;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  listen 80;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  autoindex off;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  client_max_body_size 15M;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  client_body_buffer_size 128k;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  index index.html index.htm index.php doku.php;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  access_log  /var/log/nginx/wiki.ichiayi.com/access.log;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  error_log  /var/log/nginx/wiki.ichiayi.com/error.log;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  root /var/www/html;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  location / \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    try_files $uri $uri/ @dokuwiki;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  location ~ ^/lib.*\u003cspan style=\"color:#ae81ff\"\u003e\\.\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003egif|png|ico|jpg\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e$ \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    expires 30d;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  location \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e /robots.txt  \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e access_log off; log_not_found off; \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  location \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e /favicon.ico \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e access_log off; log_not_found off; \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  location ~ /\u003cspan style=\"color:#ae81ff\"\u003e\\.\u003c/span\u003e          \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e access_log off; log_not_found off; deny all; \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  location ~ ~$           \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e access_log off; log_not_found off; deny all; \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  location @dokuwiki \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    rewrite ^/_media/\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e.*\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e /lib/exe/fetch.php?media\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e$1 last;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    rewrite ^/_detail/\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e.*\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e /lib/exe/detail.php?media\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e$1 last;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    rewrite ^/_export/\u003cspan style=\"color:#f92672\"\u003e([\u003c/span\u003e^/\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e+\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e/\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e.*\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e /doku.php?do\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eexport_$1\u0026amp;id\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e$2 last;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    rewrite ^/\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e.*\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e /doku.php?id\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e$1 last;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  location ~ \u003cspan style=\"color:#ae81ff\"\u003e\\.\u003c/span\u003ephp$ \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    try_files $uri \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e404;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_pass   127.0.0.1:9000;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_index  index.php;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    include /etc/nginx/fastcgi_params;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_param  QUERY_STRING     $query_string;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_param  REQUEST_METHOD   $request_method;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_param  CONTENT_TYPE     $content_type;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_param  CONTENT_LENGTH   $content_length;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_intercept_errors        on;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_ignore_client_abort     off;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_connect_timeout 60;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_send_timeout 180;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_read_timeout 180;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_buffer_size 128k;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_buffers \u003cspan style=\"color:#ae81ff\"\u003e4\u003c/span\u003e 256k;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_busy_buffers_size 256k;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    fastcgi_temp_file_write_size 256k;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  location ~ /\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003edata|conf|bin|inc\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e/ \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    deny all;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  location ~ /\u003cspan style=\"color:#ae81ff\"\u003e\\.\u003c/span\u003eht \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    deny  all;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003ephp-fpm 配置 - /etc/php-fpm.d/www.conf\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"安裝-dokuwiki\"\u003e安裝 Dokuwiki\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir -p /var/www\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd /var/www\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ewget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etar -zxvf dokuwiki-stable.tgz\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emv dokuwiki-stable.tgz wiki-stable.tgz\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emv dokuwiki-* html\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e建立目录和权限设置\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir -p /var/log/nginx/wiki.ichiayi.com\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown -R apache:apache /var/www/html/data\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown -R apache:apache /var/www/html/conf\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e更改 /etc/php.ini 设定\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evi /etc/php.ini\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eupload_max_filesize \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e 10M\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epost_max_size \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e 10M\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eDate\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edate.timezone \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e Asia/Taipei\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e启动nginx + php-fpm\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable nginx\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable php-fpm\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl start php-fpm\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl start nginx\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下安裝Dokuwiki、Nginx"},{"content":"支持 Exfat wget http://li.nux.ro/download/nux/dextop/el7/x86_64/fuse-exfat-1.0.1-1.el7.nux.x86_64.rpm wget http://li.nux.ro/download/nux/dextop/el7/x86_64/exfat-utils-1.0.1-1.el7.nux.x86_64.rpm rpm -ivh fuse-exfat-1.0.1-1.el7.nux.x86_64.rpm rpm -ivh exfat-utils-1.0.1-1.el7.nux.x86_64.rpm 支持 NTFS yum install epel-release -y yum install ntfs-3g -y ","permalink":"/posts/centos7-xia-gua-zai-ntfsexfat/","summary":"\u003ch3 id=\"支持-exfat\"\u003e支持 Exfat\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ewget http://li.nux.ro/download/nux/dextop/el7/x86_64/fuse-exfat-1.0.1-1.el7.nux.x86_64.rpm\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ewget http://li.nux.ro/download/nux/dextop/el7/x86_64/exfat-utils-1.0.1-1.el7.nux.x86_64.rpm\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erpm -ivh fuse-exfat-1.0.1-1.el7.nux.x86_64.rpm\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erpm -ivh exfat-utils-1.0.1-1.el7.nux.x86_64.rpm\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"支持-ntfs\"\u003e支持 NTFS\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install epel-release -y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install ntfs-3g -y\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"CentOS7下挂载NTFS、Exfat"},{"content":"1.更新系统及安装软件 yum install epel-release -y yum update -y 2.上传文件安装文件至服务器 将aspera安装包aspera-scp-p2p-3.7.4.147133-linux-64.rpm和license aspera-license，上传至服务器\n3.安装p2p rpm -ivh aspera-scp-p2p-3.7.4.147133-linux-64.rpm 4.导入license cp aspera-license /opt/aspera/etc/aspera-license 5.验证ascp ascp -A 6.修改ssh端口 vim /etc/ssh/sshd_config #修改port为33001 7.重启服务 service asperacentral restart service asperanoded restart service sshd restart 8.关闭selinux setenforce 0 sed -i \u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39; /etc/selinux/config 9.开防火墙端口 firewall-cmd --add-port 33001/tcp firewall-cmd --add-port 33001/udp firewall-cmd --add-port 33001/tcp --permanent firewall-cmd --add-port 33001/udp --permanent 10.创建用户 #创建用户目录 mkdir -p /data/aspera/test #创建用户 useradd -d /data/aspera/test/ -s /bin/aspshell -M test #设置用户密码 passwd test #设置用户目录权限 chown -R test:test /data/aspera/test #配置aspera文件 asconfigurator -x \u0026#34;set_user_data;user_name,test;absolute,/data/aspera/test;read_allowed,true;dir_allowed,ture;write_allowed,ture\u0026#34; 11.设置aspera-p2p帐号创建文件夹的权限为777 asconfigurator -x \u0026#34;set_user_data;user_name,test;file_create_mode,666;directory_create_mode,777\u0026#34; 12.通过命令行测试传输 export ASPERA_SCP_PASS=123456 #载入远程p2p服务器帐号的密码 ascp -T -l 500m -P 33001 -O 33001 -d --mode=send --user=test --host=192.168.1.100 abc/ / #通过test帐号以500Mbps的带宽把abc文件夹传送至192.168.1.100的p2p服务器的p2p用户根目录下 ","permalink":"/posts/centos7-xia-aspera-p2p-fu-wu-qi-da-jian/","summary":"\u003ch2 id=\"1更新系统及安装软件\"\u003e1.更新系统及安装软件\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install epel-release -y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum update -y\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"2上传文件安装文件至服务器\"\u003e2.上传文件安装文件至服务器\u003c/h2\u003e\n\u003cblockquote\u003e\n\u003cp\u003e将aspera安装包aspera-scp-p2p-3.7.4.147133-linux-64.rpm和license aspera-license，上传至服务器\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003ch2 id=\"3安装p2p\"\u003e3.安装p2p\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erpm -ivh aspera-scp-p2p-3.7.4.147133-linux-64.rpm\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"4导入license\"\u003e4.导入license\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e cp aspera-license /opt/aspera/etc/aspera-license\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"5验证ascp\"\u003e5.验证ascp\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e ascp -A\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"6修改ssh端口\"\u003e6.修改ssh端口\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/ssh/sshd_config\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#修改port为33001\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"7重启服务\"\u003e7.重启服务\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice asperacentral restart\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice asperanoded restart\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice sshd restart\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"8关闭selinux\"\u003e8.关闭selinux\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esetenforce \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39;\u003c/span\u003e /etc/selinux/config\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"9开防火墙端口\"\u003e9.开防火墙端口\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port 33001/tcp\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port 33001/udp\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port 33001/tcp --permanent\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port 33001/udp --permanent\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"10创建用户\"\u003e10.创建用户\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#创建用户目录\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir -p /data/aspera/test\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#创建用户\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003euseradd -d /data/aspera/test/ -s /bin/aspshell -M test\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#设置用户密码\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epasswd test\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#设置用户目录权限\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown -R test:test /data/aspera/test\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#配置aspera文件\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003easconfigurator -x \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;set_user_data;user_name,test;absolute,/data/aspera/test;read_allowed,true;dir_allowed,ture;write_allowed,ture\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"11设置aspera-p2p帐号创建文件夹的权限为777\"\u003e11.设置aspera-p2p帐号创建文件夹的权限为777\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003easconfigurator -x \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;set_user_data;user_name,test;file_create_mode,666;directory_create_mode,777\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"12通过命令行测试传输\"\u003e12.通过命令行测试传输\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eexport ASPERA_SCP_PASS\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e123456\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e#载入远程p2p服务器帐号的密码\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eascp -T -l 500m -P \u003cspan style=\"color:#ae81ff\"\u003e33001\u003c/span\u003e -O \u003cspan style=\"color:#ae81ff\"\u003e33001\u003c/span\u003e -d --mode\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003esend --user\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003etest --host\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e192.168.1.100 abc/ /\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#通过test帐号以500Mbps的带宽把abc文件夹传送至192.168.1.100的p2p服务器的p2p用户根目录下\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下aspera-p2p服务器搭建"},{"content":"1. 安装 Node.js 及相关包 yum update -y curl --silent --location https://rpm.nodesource.com/setup_12.x | bash - yum -y install nodejs npm install -g cnpm --registry=https://registry.npm.taobao.org 2. 安装 Ghost Client （ghost-cli） cnpm i -g ghost-cli 3. 安装 Ghost adduser ghost mkdir /var/www mkdir /var/www/ghost chown ghost /var/www/ghost su ghost cd /var/www/ghost ghost install local --db=sqlite3 4. Ghost命令 ghost stop ghost start ghost restart ","permalink":"/posts/centos7-xia-an-zhuang-ghost-bo-ke-xi-tong/","summary":"\u003ch3 id=\"1-安装-nodejs-及相关包\"\u003e1. 安装 Node.js 及相关包\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum update -y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecurl --silent --location https://rpm.nodesource.com/setup_12.x | bash -\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum -y install nodejs\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003enpm install -g cnpm --registry\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003ehttps://registry.npm.taobao.org\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2-安装-ghost-client-ghost-cli\"\u003e2. 安装 Ghost Client （ghost-cli）\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecnpm i -g ghost-cli\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3-安装-ghost\"\u003e3. 安装 Ghost\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eadduser ghost\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir /var/www\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir /var/www/ghost\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown ghost /var/www/ghost\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esu ghost\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd /var/www/ghost\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eghost install local --db\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003esqlite3\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4-ghost命令\"\u003e4. Ghost命令\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eghost stop\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eghost start\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eghost restart\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下安装ghost博客系统"},{"content":"系统环境 Centos7 64 服务端搭建 创建日志目录 mkdir /home/log 编辑rsyslog配置文件:/etc/rsyslog.conf $ModLoad imudp #开启UDP 514 $UDPServerRun 514 $ModLoad imtcp #开启TCP 514 $InputTCPServerRun 514 $template RemoteLogs,\u0026#34;/home/log/%HOSTNAME%/%PROGRAMNAME%.log\u0026#34; * #设置日志模板 *.* ?RemoteLogs \u0026amp; ~ 重启rsyslog服务 service rsyslog restart 开启防火墙端口 firewall-cmd --add-port 514/tcp firewall-cmd --add-port 514/tcp --permanent firewall-cmd --add-port 514/udp firewall-cmd --add-port 514/udp --permanent 关闭selinux setenforce 0 sed -i \u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39; /etc/selinux/config 回滚日志:/etc/logrotate.d/slog /home/log/*/*.log { monthly rotate 12 missingok delaycompress compress } 客户端配置:/etc/rsyslog.conf *.* @@172.21.100.77:514 #将日志发送到100.77 的 TCP 514端口 重启rsyslog服务 service rsyslog restart ","permalink":"/posts/centos7-xia-ri-zhi-fu-wu-qi-da-jian/","summary":"\u003ch2 id=\"系统环境\"\u003e系统环境\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eCentos7 64\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"服务端搭建\"\u003e服务端搭建\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e创建日志目录\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir /home/log\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e编辑rsyslog配置文件:/etc/rsyslog.conf\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e$ModLoad imudp                \u003cspan style=\"color:#75715e\"\u003e#开启UDP 514 \u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e$UDPServerRun \u003cspan style=\"color:#ae81ff\"\u003e514\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e$ModLoad imtcp                \u003cspan style=\"color:#75715e\"\u003e#开启TCP 514\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e$InputTCPServerRun \u003cspan style=\"color:#ae81ff\"\u003e514\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e$template RemoteLogs,\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;/home/log/%HOSTNAME%/%PROGRAMNAME%.log\u0026#34;\u003c/span\u003e *     \u003cspan style=\"color:#75715e\"\u003e#设置日志模板\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e*.* ?RemoteLogs               \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u0026amp; ~\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e重启rsyslog服务\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice rsyslog restart\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e开启防火墙端口\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port 514/tcp\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port 514/tcp --permanent\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port 514/udp\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port 514/udp --permanent\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e关闭selinux\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esetenforce \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39;\u003c/span\u003e /etc/selinux/config\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e回滚日志:/etc/logrotate.d/slog\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e/home/log/*/*.log \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    monthly\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    rotate \u003cspan style=\"color:#ae81ff\"\u003e12\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    missingok\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    delaycompress\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    compress\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e客户端配置:/etc/rsyslog.conf\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e*.* @@172.21.100.77:514        \u003cspan style=\"color:#75715e\"\u003e#将日志发送到100.77 的 TCP 514端口\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e重启rsyslog服务\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice rsyslog restart\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下日志服务器搭建"},{"content":"1.进入HP Raid配置界面，创建Raid逻辑盘 2.到www2.hpe.com搜索B120i 下载驱动（一定要下载对应的7.x版本） CentOS 7.2可以直接下载： http://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1903785255/v115075/hpvsa-1.2.14-113.rhel7u2.x86_64.dd.gz CentOS 7.3可以直接下载： http://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1903785255/v123365/hpvsa-1.2.16-102.rhel7u3.x86_64.dd.gz 3.通过dd程序将驱动文件恢复到U盘(这里U盘挂载/dev/sdb1) dd if=hpdsa-..x86_64.dd of=/dev/sdb1 4.安装选择画面按：ESC 进入 boot 启动命令行（以下参数为了去除ACHI对raid干扰）输入: linux modprobe.blacklist=ahci inst.dd 5.启动后会进驱动盘选择 选取驱动挂载目录（如果列表为空按 r 进行刷新） 按1选择驱动 按c继续，进行驱动安装 移除驱动U盘 按c继续，启动安装程序 6.进入CentOS安装界面后，按正常流程安装 ","permalink":"/posts/centos7-jia-zai-b120i-qu-dong-hp-gen8/","summary":"\u003ch3 id=\"1进入hp-raid配置界面创建raid逻辑盘\"\u003e1.进入HP Raid配置界面，创建Raid逻辑盘\u003c/h3\u003e\n\u003ch3 id=\"2到www2hpecom搜索b120i-下载驱动一定要下载对应的7x版本\"\u003e2.到www2.hpe.com搜索B120i 下载驱动（一定要下载对应的7.x版本）\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eCentOS 7.2可以直接下载：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ehttp://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1903785255/v115075/hpvsa-1.2.14-113.rhel7u2.x86_64.dd.gz\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003eCentOS 7.3可以直接下载：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ehttp://downloads.hpe.com/pub/softlib2/software1/pubsw-linux/p1903785255/v123365/hpvsa-1.2.16-102.rhel7u3.x86_64.dd.gz\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3通过dd程序将驱动文件恢复到u盘这里u盘挂载devsdb1\"\u003e3.通过dd程序将驱动文件恢复到U盘(这里U盘挂载/dev/sdb1)\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edd \u003cspan style=\"color:#66d9ef\"\u003eif\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003ehpdsa-..x86_64.dd of\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/dev/sdb1\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4安装选择画面按esc-进入-boot-启动命令行以下参数为了去除achi对raid干扰输入\"\u003e4.安装选择画面按：ESC 进入 boot 启动命令行（以下参数为了去除ACHI对raid干扰）输入:\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elinux modprobe.blacklist\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eahci inst.dd\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5启动后会进驱动盘选择\"\u003e5.启动后会进驱动盘选择\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e选取驱动挂载目录（如果列表为空按 r 进行刷新）\u003c/li\u003e\n\u003cli\u003e按1选择驱动\u003c/li\u003e\n\u003cli\u003e按c继续，进行驱动安装\u003c/li\u003e\n\u003cli\u003e移除驱动U盘\u003c/li\u003e\n\u003cli\u003e按c继续，启动安装程序\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"6进入centos安装界面后按正常流程安装\"\u003e6.进入CentOS安装界面后，按正常流程安装\u003c/h3\u003e","title":"Centos7加载B120i驱动(hp-gen8)"},{"content":"1.下载证书 阿里云创建完免费SSl证书后，选择证书下载\u0026ndash;Apache\u0026ndash;下载 下载后的文件解压后包括xxx.key、xxx_chain.crt、xxx_public.crt三个文件 2.上传到服务器并修改配置 修改Apache服务的配置 cd /etc/httpd/ vim conf.d/ssl.conf 以下字段替换 SSLCertificateFile /etc/httpd/xxx_public.crt SSLCertificateKeyFile /etc/httpd/xxx.key SSLCertificateChainFile /etc/httpd/xxx_chain.crt 3.重启验证 service httpd restart ","permalink":"/posts/a-li-yun-mian-fei-zheng-shu-wei-aspera-an-zhuang-ke-xin-ren-de-ssl-zheng-shu/","summary":"\u003ch3 id=\"1下载证书\"\u003e1.下载证书\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e阿里云创建完免费SSl证书后，选择证书下载\u0026ndash;Apache\u0026ndash;下载\u003c/li\u003e\n\u003cli\u003e下载后的文件解压后包括xxx.key、xxx_chain.crt、xxx_public.crt三个文件\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"2上传到服务器并修改配置\"\u003e2.上传到服务器并修改配置\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e修改Apache服务的配置\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd /etc/httpd/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim conf.d/ssl.conf\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e以下字段替换\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eSSLCertificateFile /etc/httpd/xxx_public.crt\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eSSLCertificateKeyFile /etc/httpd/xxx.key\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eSSLCertificateChainFile /etc/httpd/xxx_chain.crt\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3重启验证\"\u003e3.重启验证\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice httpd restart\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"阿里云免费证书为aspera安装可信任的SSL证书"},{"content":"1.下载证书 阿里云创建完免费SSl证书后，选择证书下载\u0026ndash;其他\u0026ndash;下载 下载后的文件解压后包括xxx.key、xxx.pem两个文件 2.上传到zimbra服务，修改证书类型 mkdir /opt/zimbra/ssl/aliyunssl/ cd /opt/zimbra/ssl/aliyunssl openssl pkcs8 -topk8 -inform PEM -in xxx.key -outform PEM -nocrypt -out privkey.pem mv xxx.pem cert.pem chown zimbra:zimbra /opt/zimbra/ssl/aliyunssl/* 3.创建证书链中间证书chain.pem 在 /opt/zimbra/ssl/aliyunssl/ 创建chain.pem 文件 也就是中级证书(mid-digicert-ca) + 根证书（root-digiert-ca） 将阿里云下载证书xxx.pem的第二部分，也就是第二个—–BEGIN CERTIFICATE—–到—–END CERTIFICATE—– copy到chain.pem中也就是中级证书(mid-digicert-ca)，再将发证机构的根证书追加到chain.pem中也就第二部分的根证书。 最新的免费root证书下载：Digicert-OV-DV-root.cer 如此chain.pem也制作完成 4.验证证书 su - zimbra cd /opt/zimbra/ssl/aliyunssl/ /opt/zimbra/bin/zmcertmgr verifycrt comm privkey.pem cert.pem chain.pem # 成功提示一下信息 ** Verifying \u0026#39;cert.pem\u0026#39; against \u0026#39;privkey.pem\u0026#39; Certificate \u0026#39;cert.pem\u0026#39; and private key \u0026#39;privkey.pem\u0026#39; match. ** Verifying \u0026#39;cert.pem\u0026#39; against \u0026#39;chain.pem\u0026#39; Valid certificate chain: cert.pem: OK 5.部署证书 原有证书备份 cp -a /opt/zimbra/ssl/zimbra /opt/zimbra/ssl/zimbra.$(date \u0026#34;+%Y%m%d%H%M%S\u0026#34;) 在Zimbra SSL路径下复制私钥 # 先备份再替换 cp /opt/zimbra/ssl/zimbra/commercial/commercial.key /opt/zimbra/ssl/zimbra/commercial/commercial.key.bak cp /opt/zimbra/ssl/aliyunssl/privkey.pem /opt/zimbra/ssl/zimbra/commercial/commercial.key 部署 su - zimbra cd /opt/zimbra/ssl/aliyunssl/ /opt/zimbra/bin/zmcertmgr deploycrt comm cert.pem chain.pem 重启zimbra服务 zmcontrol restart 6.通过网页查看证书是否生效 ","permalink":"/posts/a-li-yun-mian-fei-zheng-shu-wei-zimbra-an-zhuang-ke-xin-ren-de-ssl-zheng-shu/","summary":"\u003ch3 id=\"1下载证书\"\u003e1.下载证书\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e阿里云创建完免费SSl证书后，选择证书下载\u0026ndash;其他\u0026ndash;下载\u003c/li\u003e\n\u003cli\u003e下载后的文件解压后包括xxx.key、xxx.pem两个文件\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"2上传到zimbra服务修改证书类型\"\u003e2.上传到zimbra服务，修改证书类型\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir /opt/zimbra/ssl/aliyunssl/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd /opt/zimbra/ssl/aliyunssl\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eopenssl pkcs8 -topk8 -inform PEM -in xxx.key -outform PEM -nocrypt -out privkey.pem\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emv xxx.pem cert.pem\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown zimbra:zimbra /opt/zimbra/ssl/aliyunssl/*\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3创建证书链中间证书chainpem\"\u003e3.创建证书链中间证书chain.pem\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e在 /opt/zimbra/ssl/aliyunssl/ 创建chain.pem 文件 也就是中级证书(mid-digicert-ca) + 根证书（root-digiert-ca）\n将阿里云下载证书xxx.pem的第二部分，也就是第二个—–BEGIN CERTIFICATE—–到—–END CERTIFICATE—–\ncopy到chain.pem中也就是中级证书(mid-digicert-ca)，再将发证机构的根证书追加到chain.pem中也就第二部分的根证书。\u003c/li\u003e\n\u003cli\u003e最新的免费root证书下载：Digicert-OV-DV-root.cer\u003c/li\u003e\n\u003cli\u003e如此chain.pem也制作完成\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"4验证证书\"\u003e4.验证证书\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esu - zimbra\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd /opt/zimbra/ssl/aliyunssl/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e/opt/zimbra/bin/zmcertmgr verifycrt comm privkey.pem cert.pem chain.pem\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 成功提示一下信息\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e** Verifying \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;cert.pem\u0026#39;\u003c/span\u003e against \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;privkey.pem\u0026#39;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eCertificate \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;cert.pem\u0026#39;\u003c/span\u003e and private key \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;privkey.pem\u0026#39;\u003c/span\u003e match.\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e** Verifying \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;cert.pem\u0026#39;\u003c/span\u003e against \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;chain.pem\u0026#39;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eValid certificate chain: cert.pem: OK\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5部署证书\"\u003e5.部署证书\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e原有证书备份\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecp -a /opt/zimbra/ssl/zimbra /opt/zimbra/ssl/zimbra.\u003cspan style=\"color:#66d9ef\"\u003e$(\u003c/span\u003edate \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;+%Y%m%d%H%M%S\u0026#34;\u003c/span\u003e\u003cspan style=\"color:#66d9ef\"\u003e)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e在Zimbra SSL路径下复制私钥\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 先备份再替换\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecp /opt/zimbra/ssl/zimbra/commercial/commercial.key /opt/zimbra/ssl/zimbra/commercial/commercial.key.bak\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecp /opt/zimbra/ssl/aliyunssl/privkey.pem /opt/zimbra/ssl/zimbra/commercial/commercial.key\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e部署\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esu - zimbra\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd /opt/zimbra/ssl/aliyunssl/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e/opt/zimbra/bin/zmcertmgr deploycrt comm cert.pem chain.pem\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e重启zimbra服务\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ezmcontrol restart\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"6通过网页查看证书是否生效\"\u003e6.通过网页查看证书是否生效\u003c/h3\u003e","title":"阿里云免费证书为zimbra安装可信任的SSL证书"},{"content":"1.静态IP设置 Ubuntu18.04采用的是netplan来管理network。所以可以在/etc/netplan/目录下创建一个以yaml结尾的文件。在/etc/netplan/目录下有一个缺省文件：01-network-manager-all.yaml，我们可以自己为网卡再建一个文件，也可直接修改这个文件。\n# Let manual manage ens33 devices on this system network: version: 2 renderer: networkd ethernets: ens33: dhcp4: no addresses: [172.21.100.202/24] gateway4: 172.21.100.1 nameservers: addresses: [172.21.100.11, 202.96.107.28] 应用配置\nsudo netplan apply ip addr list 2.DNS配置 修改：/etc/systemd/resolved.conf 在【resolve】中加入DNS地址即可。\n[Resolve] DNS=172.21.100.11 #FallbackDNS= #Domains= #LLMNR=no #MulticastDNS=no #DNSSEC=no #Cache=yes #DNSStubListener=yes ","permalink":"/posts/ubuntu1804-yi-shang-ban-ben-she-zhi-jing-tai-ip-he-dns/","summary":"\u003ch2 id=\"1静态ip设置\"\u003e1.静态IP设置\u003c/h2\u003e\n\u003cp\u003eUbuntu18.04采用的是netplan来管理network。所以可以在/etc/netplan/目录下创建一个以yaml结尾的文件。在/etc/netplan/目录下有一个缺省文件：01-network-manager-all.yaml，我们可以自己为网卡再建一个文件，也可直接修改这个文件。\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# Let manual manage ens33 devices on this system\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003enetwork:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  version: \u003cspan style=\"color:#ae81ff\"\u003e2\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  renderer: networkd\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  ethernets:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    ens33:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      dhcp4: no\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      addresses: \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003e172.21.100.202/24\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      gateway4: 172.21.100.1\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e      nameservers:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        addresses: \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003e172.21.100.11, 202.96.107.28\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e应用配置\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo netplan apply\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eip addr list\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"2dns配置\"\u003e2.DNS配置\u003c/h2\u003e\n\u003cp\u003e修改：/etc/systemd/resolved.conf 在【resolve】中加入DNS地址即可。\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eResolve\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eDNS\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e172.21.100.11\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#FallbackDNS=\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#Domains=\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#LLMNR=no\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#MulticastDNS=no\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#DNSSEC=no\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#Cache=yes\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#DNSStubListener=yes\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"ubuntu18.04以上版本设置静态IP和DNS"},{"content":"一、安装openvpn 1.更新软件包 yum -y update 2.安装epel扩展源 yum -y install epel-release 3.安装openvpn和easy-rsa yum -y install openvpn easy-rsa 4.复制easy-rsa文件 cp -r /usr/share/easy-rsa/ /etc/openvpn/easy-rsa cd /etc/openvpn/easy-rsa/ \\rm 3 3.0 cd 3.0.6/ find / -type f -name \u0026#34;vars.example\u0026#34; | xargs -i cp {} . \u0026amp;\u0026amp; mv vars.example vars # 10年证书 vim vars set_var EASYRSA_CERT_EXPIRE 3650 二、生成CA证书 1.创建一个新的 PKI 和 CA ./easyrsa init-pki 2.创建新的CA，不使用密码 ./easyrsa build-ca nopass 3.生成的信息 Note: using Easy-RSA configuration from: ./vars Generating a 2048 bit RSA private key ......................+++ ................................................+++ writing new private key to \u0026#39;/etc/openvpn/easy-rsa/3.0.6/pki/private/ca.key.pClvaQ1GLD\u0026#39; ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter \u0026#39;.\u0026#39;, the field will be left blank. ----- Common Name (eg: your user, host, or server name) [Easy-RSA CA]: 回车 CA creation complete and you may now import and sign cert requests. Your new CA certificate file for publishing is at: /etc/openvpn/easy-rsa/3.0.6/pki/ca.crt 三、创建服务端证书 1.创建服务端证书 ./easyrsa gen-req server nopass 2.生成的信息 Note: using Easy-RSA configuration from: ./vars Generating a 2048 bit RSA private key ...........................+++ ..............................................................................+++ writing new private key to \u0026#39;/etc/openvpn/easy-rsa/3.0.6/pki/private/server.key.wy7Q0fuG6A\u0026#39; ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter \u0026#39;.\u0026#39;, the field will be left blank. ----- Common Name (eg: your user, host, or server name) [server]: 回车 Keypair and certificate request completed. Your files are: req: /etc/openvpn/easy-rsa/3.0.6/pki/reqs/server.req key: /etc/openvpn/easy-rsa/3.0.6/pki/private/server.key 3.签约服务端证书 ./easyrsa sign server server 4.生成的信息 Note: using Easy-RSA configuration from: ./vars You are about to sign the following certificate. Please check over the details shown below for accuracy. Note that this request has not been cryptographically verified. Please be sure it came from a trusted source or that you have verified the request checksum with the sender. Request subject, to be signed as a server certificate for 3650 days: subject= commonName = server Type the word \u0026#39;yes\u0026#39; to continue, or any other input to abort. Confirm request details: yes Using configuration from ./openssl-1.0.cnf Check that the request matches the signature Signature ok The Subject Distinguished Name is as follows commonName :ASN.1 12:\u0026#39;server\u0026#39; Certificate is to be certified until Apr 7 14:54:08 2028 GMT (3650 days) Write out database with 1 new entries Data Base Updated Certificate created at: /etc/openvpn/easy-rsa/3.0.8/pki/issued/server.crt 5.创建 Diffie-Hellman ./easyrsa gen-dh 6.生成的信息，时间较长 ............................................................ DH parameters of size 2048 created at /etc/openvpn/easy-rsa/3.0.6/pki/dh.pem 7.整理Server证书到/etc/openvpn/server目录 cd /etc/openvpn/server cp /etc/openvpn/easy-rsa/3.0.8/pki/dh.pem . cp /etc/openvpn/easy-rsa/3.0.8/pki/ca.crt . cp /etc/openvpn/easy-rsa/3.0.8/pki/issued/server.crt . cp /etc/openvpn/easy-rsa/3.0.8/pki/private/server.key . 四、创建客户端证书 1.复制用于生成客户证书的文件 cp -r /usr/share/easy-rsa/ /etc/openvpn/client # 首次创建客户端使用 cd /etc/openvpn/client/easy-rsa/ \\rm 3 3.0 # 首次创建客户端使用 cd 3.0.8/ find / -type f -name \u0026#34;vars.example\u0026#34; | xargs -i cp {} . \u0026amp;\u0026amp; mv vars.example vars # 首次创建客户端使用 2.创建一个新的 PKI,第一次建用户的时候需要，以后都不需要再执行 ./easyrsa init-pki 3.生成客户端证书 ./easyrsa gen-req tab_ding nopass 当然你也可以生成有密码的客户证书\n4.生成的信息 Note: using Easy-RSA configuration from: ./vars Generating a 2048 bit RSA private key ....................................................+++ ............+++ writing new private key to \u0026#39;/etc/openvpn/client/easy-rsa/3.0.6/pki/private/client.key.FkrLzXH9Bm\u0026#39; ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter \u0026#39;.\u0026#39;, the field will be left blank. ----- Common Name (eg: your user, host, or server name) [tab_ding]: 回车 Keypair and certificate request completed. Your files are: req: /etc/openvpn/client/easy-rsa/3.0.8/pki/reqs/tab_ding.req key: /etc/openvpn/client/easy-rsa/3.0.8/pki/private/tab_ding.key 5.签约客户端证书 cd /etc/openvpn/easy-rsa/3.0.8/ ./easyrsa import-req /etc/openvpn/client/easy-rsa/3.0.6/pki/reqs/tab_ding.req tab_ding ./easyrsa sign client tab_ding yes 签约密码123456\n6.整理用于客户端证书到/etc/openvpn/client目录 cd /etc/openvpn/client cp /etc/openvpn/easy-rsa/3.0.8/pki/ca.crt . # 首次创建客户端才执行 cp /etc/openvpn/easy-rsa/3.0.8/pki/issued/tab_ding.crt . cp /etc/openvpn/client/easy-rsa/3.0.8/pki/private/tab_ding.key . 7.创建客户端IP分配目录和私有配置 mkdir /etc/openvpn/ccd # 首次创建客户端才执行 vim /etc/openvpn/ccd/tab_ding # 添加以下内容 ifconfig-push 10.60.0.9 10.60.0.10 push \u0026#34;route 172.21.100.0 255.255.255.0\u0026#34; 8.客户端配置文件,以tab_ding.ovpn为例 client remote 172.21.100.98 1194 proto tcp dev tun comp-lzo ca ca.crt cert tab_ding.crt key tab_ding.key route-delay 2 route-method exe verb 3 9.客户端要用到的文件如下 ca.crt tab_ding.crt tab_ding.key tab_ding.ovpn 五、服务器配置及启动 1.新建配置文件 touch /etc/openvpn/server.conf 2.填写以下内容 port 1194 proto tcp-server dev tun server 10.60.0.0 255.255.255.0 ca /etc/openvpn/server/ca.crt cert /etc/openvpn/server/server.crt key /etc/openvpn/server/server.key dh /etc/openvpn/server/dh.pem client-config-dir /etc/openvpn/ccd persist-key keepalive 10 60 reneg-sec 0 comp-lzo tun-mtu 1468 tun-mtu-extra 32 mssfix 1400 push persist-key ;push persist-tun ;push redirect-gateway def1 push dhcp-option DNS 172.21.100.11 ;push dhcp-option DNS 8.8.8.8 ;push dhcp-option DNS 8.8.4.4 status openvpn-status.log log openvpn.log verb 3 3.系统配置和iptables转发 # 打开文件 vim /etc/sysctl.conf # 添加内容 net.ipv4.ip_forward = 1 # 执行 sysctl -p # iptables iptables -t nat -A POSTROUTING -s 10.60.0.0/24 -o eth0 -j MASQUERADE 4.openvpn服务启动 systemctl start openvpn@server 六、附客户端IP分配表 ifconfig-push 10.60.0.1 10.60.0.2 ifconfig-push 10.60.0.5 10.60.0.6 ifconfig-push 10.60.0.9 10.60.0.10 ifconfig-push 10.60.0.13 10.60.0.14 ...... openvpn只支持255.255.255.252 的子网，而且252的子网只有两个IP，一个分配给客户端，一个留给服务器用.\n七、删除Openvpn账号 1.执行 cd /etc/openvpn/easy-rsa/3.0.8/ ./easyrsa revoke someone ./easyrsa gen-crl 其中gen-crl会生成一份吊销证书的名单，放在/etc/openvpn/easy-rsa/3.0.6/pki/crl.pem文件里\n2.在server.conf文件中增加此项 crl-verify /etc/openvpn/easy-rsa/3.0.8/pki/crl.pem 特别说明：吊销的证书不会立刻被删除文件，所以要再次创建相同的证书则要删除crt文件，通常放在pki/issued文件夹下。\n八、网关模式配置 1. iptables # 如果你的网关是使用iptable,并且iptable默认情况下阻止该服务，那么请使用以下配置使openvpn正常运行。 首先，让我们在openvpn端口上进行tcp连接。 如果您使用的是udp或其他端口号，请相应地更改此行。 iptables -A INPUT -i enp3s0 -m state --state NEW -p udp --dport 1194 -j ACCEPT # 允许TUN接口连接到OpenVPN服务器 iptables -A INPUT -i tun+ -j ACCEPT # 允许通过其他接口转发TUN接口连接 iptables -A FORWARD -i tun+ -j ACCEPT iptables -A FORWARD -i tun+ -o enp3s0 -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i enp3s0 -o tun+ -m state --state RELATED,ESTABLISHED -j ACCEPT # NAT VPN客户端流量到Internet。 运行“ ifconfig”命令时，根据您的tun0结果信息更改IP地址掩码。 iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o enp3s0 -j MASQUERADE # 如果您的默认iptables OUTPUT的值不是ACCEPT的话，则还需要以下行： iptables -A OUTPUT -o tun+ -j ACCEPT # 最后记得保存iptables的防火墙配置 2. 服务器配置 # OpenVPN Port, Protocol and the Tun port 1194 proto tcp dev tun # OpenVPN Server Certificate - CA, server key and certificate ca /etc/openvpn/server/ca.crt cert /etc/openvpn/server/server.crt key /etc/openvpn/server/server.key #DH and CRL key dh /etc/openvpn/server/dh.pem #client-config-dir /etc/openvpn/ccd # Network Configuration - Internal network # Redirect all Connection through OpenVPN Server server 10.8.0.0 255.255.255.0 push \u0026#34;redirect-gateway def1\u0026#34; # Using the DNS from https://dns.watch push \u0026#34;dhcp-option DNS 8.8.8.8\u0026#34; #Enable multiple client to connect with same Certificate key duplicate-cn # TLS Security cipher AES-256-CBC tls-version-min 1.2 tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA256 auth SHA512 auth-nocache # Other Configuration keepalive 20 60 persist-key persist-tun comp-lzo yes daemon user nobody group nobody # OpenVPN Log log-append /var/log/openvpn.log verb 3 3.客户端配置 client dev tun proto tcp remote 115.239.233.26 1194 ca ca.crt cert tab_ding.crt key tab_ding.key cipher AES-256-CBC auth SHA512 auth-nocache tls-version-min 1.2 tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA256 resolv-retry infinite compress lzo nobind persist-key persist-tun mute-replay-warnings verb 3 ","permalink":"/posts/centos7-xia-an-zhuang-openvpn-qie-easy-rsa3-ban-ben/","summary":"一、安装openvpn1.更新软件包yum -y update2.安装epel扩展源yum -y install epel-release3.安装openvpn和easy-rsayum -y install openvpn easy-rsa4.复制easy-rsa文件cp -r /usr/share","title":"Centos7下安装openvpn且easy-rsa3版本"},{"content":"1.初始环境设置 必要的软件\nyum update -y yum install -y epel-release yum install -y vim net-tools nmon clamav htop rsync iptraf-ng tree lrzsz cmake make gcc gcc-c++ ntp iftop telnet tcpdump traceroute 设置时间同步\necho \u0026#34;0 8 * * * root ntpdate ntp.southbaytech.co\u0026#34; \u0026gt;\u0026gt; /etc/crontab 关闭selinux及防火墙\nsed -i \u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39; /etc/selinux/config systemctl stop firewalld systemctl disable firewalld 禁用DNS反向解析\nsed -i \u0026#39;s@GSSAPIAuthentication yes@GSSAPIAuthentication no@\u0026#39; /etc/ssh/sshd_config sed -i \u0026#39;s@#UseDNS yes@UseDNS no@\u0026#39; /etc/ssh/sshd_config 2.Docker旧版本卸载 sudo yum remove docker \\ docker-client \\ docker-client-latest \\ docker-common \\ docker-latest \\ docker-latest-logrotate \\ docker-logrotate \\ docker-engine 3.安装Docker CE 安装所需包\nyum install -y yum-utils device-mapper-persistent-data lvm2 设置软件源\nyum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo 安装\nyum install docker-ce docker-ce-cli containerd.io 4.开启Docker systemctl start docker 通过hello-world镜像验证docker是否安装成功\ndocker run hello-world 5.镜像加速 vim /etc/docker/daemon.json { \u0026#34;registry-mirrors\u0026#34;: [\u0026#34;http://hub-mirror.c.163.com\u0026#34;] } 6.registry服务器安装 配置启动文件： vim config.yml # 添加以下内容： version: 0.1 log: fields: service: registry storage: cache: blobdescriptor: inmemory filesystem: rootdirectory: /data/registry http: addr: :5000 headers: X-Content-Type-Options: [nosniff] auth: htpasswd: realm: basic-realm path: /etc/registry health: storagedriver: enabled: true interval: 10s threshold: 3 启动服务器 docker run -d -p 5000:5000 --restart=always --name registry -v `pwd`/config.yml:/etc/docker/registry/config.yml registry:2 ","permalink":"/posts/centos7-xia-an-zhuang-docker-ji-registry-fu-wu-qi-an-zhuang/","summary":"\u003ch3 id=\"1初始环境设置\"\u003e1.初始环境设置\u003c/h3\u003e\n\u003cp\u003e必要的软件\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum update -y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y epel-release\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y vim net-tools nmon clamav htop rsync iptraf-ng tree lrzsz cmake make gcc gcc-c++ ntp iftop telnet tcpdump traceroute\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e设置时间同步\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eecho \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;0 8 * * * root ntpdate ntp.southbaytech.co\u0026#34;\u003c/span\u003e \u0026gt;\u0026gt; /etc/crontab\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e关闭selinux及防火墙\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39;\u003c/span\u003e /etc/selinux/config\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl stop firewalld\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl disable firewalld\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e禁用DNS反向解析\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s@GSSAPIAuthentication yes@GSSAPIAuthentication no@\u0026#39;\u003c/span\u003e /etc/ssh/sshd_config\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s@#UseDNS yes@UseDNS no@\u0026#39;\u003c/span\u003e /etc/ssh/sshd_config\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2docker旧版本卸载\"\u003e2.Docker旧版本卸载\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo yum remove docker \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e                  docker-client \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e                  docker-client-latest \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e                  docker-common \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e                  docker-latest \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e                  docker-latest-logrotate \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e                  docker-logrotate \u003cspan style=\"color:#ae81ff\"\u003e\\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e                  docker-engine\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3安装docker-ce\"\u003e3.安装Docker CE\u003c/h3\u003e\n\u003cp\u003e安装所需包\u003c/p\u003e","title":"Centos7下安装Docker及registry服务器安装"},{"content":" 1、首先运行openvpn安装软件，点击“next”开始安装。 2、选择“next”继续下一步。 3、选择安装路径，一般使用默认安装路径，点击\u0026quot;install\u0026quot;安装。 4、等待安装完成。 5、安装完成之后，将管理员授权的lisense文件放到 C:\\Program Files\\OpenVPN\\config 目录下。 6、打开OpenVPN软件。 7、在本地计算机右下角找到OpenVPN图标，右键点击，选择\u0026quot;connect\u0026quot;进行连接。 8、等待OpenVPN连接。 9、连接成功后，会在本地计算机右下角跳出连接的IP信息，本次安装完成。 ","permalink":"/posts/windows-xia-openvpn-ke-hu-duan-an-zhuang-shi-yong-jiao-cheng/","summary":"\u003cul\u003e\n\u003cli\u003e\n\u003cp\u003e1、首先运行openvpn安装软件，点击“next”开始安装。\n\u003cimg alt=\"720642874\" loading=\"lazy\" src=\"/upload/2023/01/720642874.png\"\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e2、选择“next”继续下一步。\n\u003cimg alt=\"1822529684\" loading=\"lazy\" src=\"/upload/2023/01/1822529684.png\"\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e3、选择安装路径，一般使用默认安装路径，点击\u0026quot;install\u0026quot;安装。\n\u003cimg alt=\"2163193339\" loading=\"lazy\" src=\"/upload/2023/01/2163193339.png\"\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e4、等待安装完成。\n\u003cimg alt=\"2841482432\" loading=\"lazy\" src=\"/upload/2023/01/2841482432.png\"\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e5、安装完成之后，将管理员授权的lisense文件放到 C:\\Program Files\\OpenVPN\\config 目录下。\n\u003cimg alt=\"2355868478\" loading=\"lazy\" src=\"/upload/2023/01/2355868478.png\"\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e6、打开OpenVPN软件。\n\u003cimg alt=\"3232994035\" loading=\"lazy\" src=\"/upload/2023/01/3232994035.png\"\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e7、在本地计算机右下角找到OpenVPN图标，右键点击，选择\u0026quot;connect\u0026quot;进行连接。\n\u003cimg alt=\"4231153422\" loading=\"lazy\" src=\"/upload/2023/01/4231153422.png\"\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e8、等待OpenVPN连接。\n\u003cimg alt=\"503468482\" loading=\"lazy\" src=\"/upload/2023/01/503468482.png\"\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e9、连接成功后，会在本地计算机右下角跳出连接的IP信息，本次安装完成。\n\u003cimg alt=\"1175020499\" loading=\"lazy\" src=\"/upload/2023/01/1175020499.png\"\u003e\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ul\u003e","title":"Windows下OpenVPN客户端安装使用教程"},{"content":"1.生成密匙 cd ~/.ssh/ ssh-keygen Enter passphrase (empty for no passphrase): Enter same passphrase again: # 当提示输入密码时，只需敲两次回车键，不输入其他字符 2.将公匙拷贝至远程主机 接下来，执行ssh-copy-id将通过上面生成的公匙拷贝至远程主机。 ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.200.10 # 按照提示输入远程主机帐户和密码，然后公匙自动拷贝至远程主机。 3.无需密码执行rsync 现在，你可以不需要密码就可以ssh连接到远程主机。重新来执行之前rsync，现在应该就不会提示输入密码了。 rsync -avz -e ssh root@192.168.200.10:/data/ /data/ # 把远端数据同步至本地/data下面 ","permalink":"/posts/wu-xu-mi-ma-tong-guo-ssh-zhi-xing-rsync-lai-tong-bu-wen-jian-de-fang-fa/","summary":"\u003ch3 id=\"1生成密匙\"\u003e1.生成密匙\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd ~/.ssh/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003essh-keygen\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eEnter passphrase \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003eempty \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e no passphrase\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eEnter same passphrase again:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 当提示输入密码时，只需敲两次回车键，不输入其他字符\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2将公匙拷贝至远程主机\"\u003e2.将公匙拷贝至远程主机\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e接下来，执行ssh-copy-id将通过上面生成的公匙拷贝至远程主机。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003essh-copy-id -i ~/.ssh/id_rsa.pub 192.168.200.10\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 按照提示输入远程主机帐户和密码，然后公匙自动拷贝至远程主机。\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3无需密码执行rsync\"\u003e3.无需密码执行rsync\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e现在，你可以不需要密码就可以ssh连接到远程主机。重新来执行之前rsync，现在应该就不会提示输入密码了。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ersync -avz -e ssh  root@192.168.200.10:/data/    /data/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 把远端数据同步至本地/data下面\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"无需密码通过ssh执行rsync来同步文件的方法"},{"content":"1.停止docker服务 service docker stop 2.用ip命令使docker0网卡down掉 ip link set dev docker0 down 3.删除网卡 brctl delbr docker0 备：如果没有brctl命令，执行\nyum install -y bridge-utils ","permalink":"/posts/centos7-shan-chu-duo-yu-wang-ka-xin-xi---bao-kuo-docker-sheng-cheng-de-xu-ni-wang-ka/","summary":"\u003ch3 id=\"1停止docker服务\"\u003e1.停止docker服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice docker stop\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2用ip命令使docker0网卡down掉\"\u003e2.用ip命令使docker0网卡down掉\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eip link set dev docker0 down\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3删除网卡\"\u003e3.删除网卡\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ebrctl delbr docker0\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e备：如果没有brctl命令，执行\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y bridge-utils\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7删除多余网卡信息-包括docker生成的虚拟网卡"},{"content":"1. 安装自带版本 yum install redis 2. 安装最新版本 yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm yum --enablerepo=remi install redis 3. 开启服务和自启 systemctl start redis systemctl enable redis 4. 修改本地访问为任意ip访问 vim /etc/redis.conf # 将bind 127.0.0.1 改成了 bind 0.0.0.0 5. 设置redis访问密码 vim /etc/redis.conf requirepass 123456 ","permalink":"/posts/centos7-xia-yum-an-zhuang-redis-de-zui-xin-ban-ben-bing-she-zhi-mi-ma/","summary":"\u003ch3 id=\"1-安装自带版本\"\u003e1. 安装自带版本\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install redis\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2-安装最新版本\"\u003e2. 安装最新版本\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum --enablerepo\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eremi install redis\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3-开启服务和自启\"\u003e3. 开启服务和自启\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl start redis\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable redis\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4-修改本地访问为任意ip访问\"\u003e4. 修改本地访问为任意ip访问\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/redis.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 将bind 127.0.0.1 改成了 bind 0.0.0.0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5-设置redis访问密码\"\u003e5. 设置redis访问密码\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/redis.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erequirepass \u003cspan style=\"color:#ae81ff\"\u003e123456\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下yum安装redis的最新版本并设置密码"},{"content":"非活动目录控制 1.安装软件 yum install httpd subversion mod_dav_svn -y 2. 创建svn库并修改权限 mkdir /home/svn \u0026lt;创建svn目录\u0026gt; chown -R apache:apache /home/svn \u0026lt;变更文件所属权限，并应用到子文件夹\u0026gt; svnadmin create /home/svn \u0026lt;新建svn库\u0026gt; chmod -R g+rws /home/svn \u0026lt;修改文件读写属性，并应用到子文件夹\u0026gt; 3.修改svn配置文件，vim /etc/httpd/conf.modules.d/10-subversion.conf ，增加以下代码 \u0026lt;Location /svn\u0026gt; DAV svn SVNPath /home/svn AuthType Basic AuthName \u0026#34;SVN repository\u0026#34; AuthUserFile /etc/subversion/passwd AuthzSVNAccessFile /home/svn/conf/authz Require valid-user \u0026lt;/Location\u0026gt; 4.重启apache服务 service httpd restart 5.添加用户：vim /home/svn/conf/authz [groups] admin = tab [/] @admin = rw * = htpasswd -c /etc/subversion/passwd tab (创建passwd文件时需要打-c参数，tab为此svn第一个用户) 6.再次修改svn库权限 chown -R apache:apache /home/svn 7.防火墙上开放端口 firewall-cmd --add-port=80/tcp firewall-cmd --add-port=80/tcp --permanent 8.selinux 关闭 getenforce 检查是否开启 setenforce 0 临时关闭selinux sed -i \u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39; /etc/selinux/config 永久关闭 活动目录控制 1.安装软件 yum install httpd subversion mod_dav_svn mod_ldap -y 2.创建SVN目录 mkdir -p /home/svn/test svnadmin create /home/svn/test chmod -R g+rws /home/svn/test chown -R apache:apache /home/svn/test 3.编辑apache配置文件:/etc/httpd/conf.modules.d/10-subversion.conf,区分读写 \u0026lt;Location /svn/test\u0026gt; DAV svn SVNPath /home/svn/test AuthType Basic AuthBasicProvider ldap AuthName \u0026#34;test subversion repository\u0026#34; AuthLDAPURL \u0026#34;ldap://192.168.1.251:3268/dc=southbaytech,dc=co?sAMAccountName?sub?(objectCategory=person)\u0026#34; AuthLDAPBindDN svn@southbaytech.co AuthLDAPBindPassword svnpassword AuthzSVNAccessFile /home/svn/test/conf/authz Require valid-user \u0026lt;/Location\u0026gt; 4.编辑用户权限/home/svn/test/conf/authz [groups] admin = asd team = aaa [/] @admin = rw #(admin组用户有读写权限) @team = r #(team组用户有读权限) * = #（其他用户没权限） 5.当SVN访问账户都为读写时，编辑/etc/httpd/conf.modules.d/10-subversion.conf \u0026lt;Location /svn/test\u0026gt; DAV svn SVNPath /home/svn/test AuthType Basic AuthBasicProvider ldap AuthName \u0026#34;test subversion repository\u0026#34; AuthLDAPURL \u0026#34;ldap://192.168.1.251:3268/dc=southbaytech,dc=co?sAMAccountName?sub?(objectCategory=person)\u0026#34; AuthLDAPBindDN svn@southbaytech.co AuthLDAPBindPassword svnpassword Require ldap-user aaa asd \u0026lt;/Location\u0026gt; 其中 svn@southbaytech.co 为在活动目录下新创建的帐号 svn ，svnpassword 为其密码，此用来验证;aaa 和 asd 为访问SVN帐号。 6.重启Apache服务 service httpd restart 7.创建svn用户 在域主控制器1.251上 Users下创建一个普通账户svn，密码svnpassword，设置为密码永不过期 8.关闭selinux,编辑/etc/selinux/config SELINUX=disabled ","permalink":"/posts/centos7-xia-an-zhuang-svn-bing-tian-jia-ad-kong-zhi/","summary":"\u003ch3 id=\"非活动目录控制\"\u003e非活动目录控制\u003c/h3\u003e\n\u003ch4 id=\"1安装软件\"\u003e1.安装软件\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install httpd subversion mod_dav_svn -y\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"2-创建svn库并修改权限\"\u003e2. 创建svn库并修改权限\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir /home/svn \u0026lt;创建svn目录\u0026gt;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown -R apache:apache /home/svn \u0026lt;变更文件所属权限，并应用到子文件夹\u0026gt;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esvnadmin create /home/svn \u0026lt;新建svn库\u0026gt;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echmod -R g+rws /home/svn \u0026lt;修改文件读写属性，并应用到子文件夹\u0026gt;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"3修改svn配置文件vim-etchttpdconfmodulesd10-subversionconf-增加以下代码\"\u003e3.修改svn配置文件，vim /etc/httpd/conf.modules.d/10-subversion.conf ，增加以下代码\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u0026lt;Location /svn\u0026gt;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\tDAV svn\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\tSVNPath /home/svn\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\tAuthType Basic\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\tAuthName \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;SVN repository\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\tAuthUserFile /etc/subversion/passwd\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\tAuthzSVNAccessFile /home/svn/conf/authz\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\tRequire valid-user\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u0026lt;/Location\u0026gt;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"4重启apache服务\"\u003e4.重启apache服务\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice httpd restart\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"5添加用户vim-homesvnconfauthz\"\u003e5.添加用户：vim /home/svn/conf/authz\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003egroups\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eadmin \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e tab\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003e/\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e@admin \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e rw\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e* \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch5 id=\"htpasswd--c-etcsubversionpasswd-tab-创建passwd文件时需要打-c参数tab为此svn第一个用户\"\u003ehtpasswd -c /etc/subversion/passwd tab (创建passwd文件时需要打-c参数，tab为此svn第一个用户)\u003c/h5\u003e\n\u003ch4 id=\"6再次修改svn库权限\"\u003e6.再次修改svn库权限\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown -R apache:apache /home/svn\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"7防火墙上开放端口\"\u003e7.防火墙上开放端口\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e80/tcp\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e80/tcp --permanent\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"8selinux-关闭\"\u003e8.selinux 关闭\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egetenforce 检查是否开启\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esetenforce \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e 临时关闭selinux\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39;\u003c/span\u003e /etc/selinux/config  永久关闭\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"活动目录控制\"\u003e活动目录控制\u003c/h3\u003e\n\u003ch4 id=\"1安装软件-1\"\u003e1.安装软件\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install httpd subversion mod_dav_svn mod_ldap -y\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"2创建svn目录\"\u003e2.创建SVN目录\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir -p /home/svn/test\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esvnadmin create /home/svn/test\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echmod -R g+rws /home/svn/test\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown -R apache:apache /home/svn/test\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"3编辑apache配置文件etchttpdconfmodulesd10-subversionconf区分读写\"\u003e3.编辑apache配置文件:/etc/httpd/conf.modules.d/10-subversion.conf,区分读写\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u0026lt;Location /svn/test\u0026gt;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eDAV svn\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eSVNPath /home/svn/test\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthType Basic\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthBasicProvider ldap\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthName \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;test subversion repository\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthLDAPURL \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;ldap://192.168.1.251:3268/dc=southbaytech,dc=co?sAMAccountName?sub?(objectCategory=person)\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthLDAPBindDN svn@southbaytech.co\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthLDAPBindPassword svnpassword\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthzSVNAccessFile /home/svn/test/conf/authz    \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eRequire valid-user           \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u0026lt;/Location\u0026gt;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"4编辑用户权限homesvntestconfauthz\"\u003e4.编辑用户权限/home/svn/test/conf/authz\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003egroups\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\tadmin \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e asd  \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\tteam \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e aaa\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\t\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003e/\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\t@admin \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e rw  \u003cspan style=\"color:#75715e\"\u003e#(admin组用户有读写权限)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\t@team \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e r    \u003cspan style=\"color:#75715e\"\u003e#(team组用户有读权限)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\t* \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e          \u003cspan style=\"color:#75715e\"\u003e#（其他用户没权限）\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"5当svn访问账户都为读写时编辑etchttpdconfmodulesd10-subversionconf\"\u003e5.当SVN访问账户都为读写时，编辑/etc/httpd/conf.modules.d/10-subversion.conf\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u0026lt;Location /svn/test\u0026gt;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eDAV svn\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eSVNPath /home/svn/test\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthType Basic\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthBasicProvider ldap\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthName \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;test subversion repository\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthLDAPURL \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;ldap://192.168.1.251:3268/dc=southbaytech,dc=co?sAMAccountName?sub?(objectCategory=person)\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthLDAPBindDN svn@southbaytech.co\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAuthLDAPBindPassword svnpassword\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eRequire ldap-user aaa asd         \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u0026lt;/Location\u0026gt;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch5 id=\"其中--为在活动目录下新创建的帐号-svn-svnpassword-为其密码此用来验证aaa-和-asd-为访问svn帐号\"\u003e其中 \u003ca href=\"mailto:svn@southbaytech.co\"\u003esvn@southbaytech.co\u003c/a\u003e 为在活动目录下新创建的帐号 svn ，svnpassword 为其密码，此用来验证;aaa 和 asd 为访问SVN帐号。\u003c/h5\u003e\n\u003ch4 id=\"6重启apache服务\"\u003e6.重启Apache服务\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice httpd restart\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"7创建svn用户\"\u003e7.创建svn用户\u003c/h4\u003e\n\u003ch5 id=\"在域主控制器1251上-users下创建一个普通账户svn密码svnpassword设置为密码永不过期\"\u003e在域主控制器1.251上 Users下创建一个普通账户svn，密码svnpassword，设置为密码永不过期\u003c/h5\u003e\n\u003ch4 id=\"8关闭selinux编辑etcselinuxconfig\"\u003e8.关闭selinux,编辑/etc/selinux/config\u003c/h4\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eSELINUX=disabled\n\u003c/code\u003e\u003c/pre\u003e","title":"Centos7下安装svn并添加AD控制"},{"content":"1.更新系统 yum update -y 2.安装软件 yum install -y vim net-tools ntp 3.设置好域名 删除原文件并添加以下行\nvim /etc/hostname mail 删除原文件并添加以下行\nvim /etc/hosts 127.0.0.1 localhost 172.21.100.7 mail.dingxiufeng.cn mail 4.禁用系统自带MTA服务 systemctl disable postfix.service systemctl stop postfix.service 5.上传zimbra安装包到服务器 6.解压 tar zxvf zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz 7.进入解压目录并安装zimbra cd zcs-8.6.0_GA_1153.RHEL7_64.20141215151110 ./install.sh 过程\nOperations logged to /tmp/install.log.2328 Checking for existing installation... zimbra-ldap...NOT FOUND zimbra-logger...NOT FOUND zimbra-mta...NOT FOUND zimbra-dnscache...NOT FOUND zimbra-snmp...NOT FOUND zimbra-store...NOT FOUND zimbra-apache...NOT FOUND zimbra-spell...NOT FOUND zimbra-convertd...NOT FOUND zimbra-memcached...NOT FOUND zimbra-proxy...NOT FOUND zimbra-archiving...NOT FOUND zimbra-core...NOT FOUND PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE. ZIMBRA, INC. (\u0026#34;ZIMBRA\u0026#34;) WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT. License Terms for the Zimbra Collaboration Suite: http://www.zimbra.com/license/zimbra-public-eula-2-5.html Do you agree with the terms of the software license agreement? [N] y Checking for prerequisites... FOUND: NPTL MISSING: nmap-ncat FOUND: sudo-1.8.6p7-17 FOUND: libidn-1.28-4 FOUND: gmp-6.0.0-12 FOUND: libaio-0.3.109-13 FOUND: libstdc++-4.8.5-4 MISSING: unzip MISSING: perl-core Checking for suggested prerequisites... FOUND: perl-5.16.3 Unable to find expected sysstat. Found version 未安装软件包 sysstat instead. FOUND: sqlite ###WARNING### The suggested version of one or more packages is not installed. This could cause problems with the operation of Zimbra. Do you wish to continue? [N] Exit? [N] y Exiting. 根据提示安装相关依赖软件包\nyum install nmap-ncat unzip perl-core sysstat -y 继续执行\n./install.sh 过程\nOperations logged to /tmp/install.log.2542 Checking for existing installation... zimbra-ldap...NOT FOUND zimbra-logger...NOT FOUND zimbra-mta...NOT FOUND zimbra-dnscache...NOT FOUND zimbra-snmp...NOT FOUND zimbra-store...NOT FOUND zimbra-apache...NOT FOUND zimbra-spell...NOT FOUND zimbra-convertd...NOT FOUND zimbra-memcached...NOT FOUND zimbra-proxy...NOT FOUND zimbra-archiving...NOT FOUND zimbra-core...NOT FOUND PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE. ZIMBRA, INC. (\u0026#34;ZIMBRA\u0026#34;) WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT. License Terms for the Zimbra Collaboration Suite: http://www.zimbra.com/license/zimbra-public-eula-2-5.html Do you agree with the terms of the software license agreement? [N] y Checking for prerequisites... FOUND: NPTL FOUND: nmap-ncat-6.40-7 FOUND: sudo-1.8.6p7-17 FOUND: libidn-1.28-4 FOUND: gmp-6.0.0-12 FOUND: libaio-0.3.109-13 FOUND: libstdc++-4.8.5-4 FOUND: unzip-6.0-15 FOUND: perl-core-5.16.3-286 Checking for suggested prerequisites... FOUND: perl-5.16.3 FOUND: sysstat FOUND: sqlite Prerequisite check complete. Checking for installable packages Found zimbra-core Found zimbra-ldap Found zimbra-logger Found zimbra-mta Found zimbra-dnscache Found zimbra-snmp Found zimbra-store Found zimbra-apache Found zimbra-spell Found zimbra-memcached Found zimbra-proxy Select the packages to install Install zimbra-ldap [Y] Install zimbra-logger [Y] Install zimbra-mta [Y] Install zimbra-dnscache [Y] Install zimbra-snmp [Y] Install zimbra-store [Y] Install zimbra-apache [Y] Install zimbra-spell [Y] Install zimbra-memcached [Y] Install zimbra-proxy [Y] Checking required space for zimbra-core Checking space for zimbra-store Checking required packages for zimbra-store zimbra-store package check complete. Installing: zimbra-core zimbra-ldap zimbra-logger zimbra-mta zimbra-dnscache zimbra-snmp zimbra-store zimbra-apache zimbra-spell zimbra-memcached zimbra-proxy The system will be modified. Continue? [N] y Removing /opt/zimbra Removing zimbra crontab entry...done. Cleaning up zimbra init scripts...done. Cleaning up /etc/ld.so.conf...done. Cleaning up /etc/security/limits.conf...done. Finished removing Zimbra Collaboration Server. Installing packages zimbra-core......zimbra-core-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-ldap......zimbra-ldap-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-logger......zimbra-logger-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-mta......zimbra-mta-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-dnscache......zimbra-dnscache-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-snmp......zimbra-snmp-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-store......zimbra-store-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-apache......zimbra-apache-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-spell......zimbra-spell-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-memcached......zimbra-memcached-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done zimbra-proxy......zimbra-proxy-8.6.0_GA_1153.RHEL7_64-20141215151110.x86_64.rpm...done Operations logged to /tmp/zmsetup10242016-135027.log Installing LDAP configuration database...done. Setting defaults...sh: /sbin/ifconfig: 没有那个文件或目录 DNS ERROR resolving MX for mail.southbaytech.co It is suggested that the domain name have an MX record configured in DNS Change domain name? [Yes] Create domain: [mail.southbaytech.co] southbaytech.co MX: mail.southbaytech.co (192.168.1.209) Interface: 127.0.0.1 Interface: ::1 Interface: 192.168.1.204 DNS ERROR - none of the MX records for southbaytech.co resolve to this host It is suggested that the MX record resolve to this host Re-Enter domain name? [Yes] n done. Checking for port conflicts sh: netstat: 未找到命令 Main menu 1) Common Configuration: 2) zimbra-ldap: Enabled 3) zimbra-logger: Enabled 4) zimbra-mta: Enabled 5) zimbra-dnscache: Enabled 6) zimbra-snmp: Enabled 7) zimbra-store: Enabled +Create Admin User: yes +Admin user to create: admin@southbaytech.co ******* +Admin Password UNSET +Anti-virus quarantine user: virus-quarantine.vjca4xqt0@southbaytech.co +Enable automated spam training: yes +Spam training user: spam.jskgzxzqkd@southbaytech.co +Non-spam(Ham) training user: ham.8cra1gy7@southbaytech.co +SMTP host: mail.southbaytech.co +Web server HTTP port: 8080 +Web server HTTPS port: 8443 +Web server mode: https +IMAP server port: 7143 +IMAP server SSL port: 7993 +POP server port: 7110 +POP server SSL port: 7995 +Use spell check server: yes +Spell server URL: http://mail.southbaytech.co:7780/aspell.php +Enable version update checks: TRUE +Enable version update notifications: TRUE +Version update notification email: admin@southbaytech.co +Version update source email: admin@southbaytech.co +Install mailstore (service webapp): yes +Install UI (zimbra,zimbraAdmin webapps): yes 8) zimbra-spell: Enabled 9) zimbra-proxy: Enabled 10) Default Class of Service Configuration: s) Save config to file x) Expand menu q) Quit Address unconfigured (**) items (? - help) 7 Store configuration 1) Status: Enabled 2) Create Admin User: yes 3) Admin user to create: admin@southbaytech.co ** 4) Admin Password UNSET 5) Anti-virus quarantine user: virus-quarantine.vjca4xqt0@southbaytech.co 6) Enable automated spam training: yes 7) Spam training user: spam.jskgzxzqkd@southbaytech.co 8) Non-spam(Ham) training user: ham.8cra1gy7@southbaytech.co 9) SMTP host: mail.southbaytech.co 10) Web server HTTP port: 8080 11) Web server HTTPS port: 8443 12) Web server mode: https 13) IMAP server port: 7143 14) IMAP server SSL port: 7993 15) POP server port: 7110 16) POP server SSL port: 7995 17) Use spell check server: yes 18) Spell server URL: http://mail.southbaytech.co:7780/aspell.php 19) Enable version update checks: TRUE 20) Enable version update notifications: TRUE 21) Version update notification email: admin@southbaytech.co 22) Version update source email: admin@southbaytech.co 23) Install mailstore (service webapp): yes 24) Install UI (zimbra,zimbraAdmin webapps): yes Select, or \u0026#39;r\u0026#39; for previous menu [r] 4 Password for admin@southbaytech.co (min 6 characters): [N6Ws0fkc3d] 123456 Store configuration 1) Status: Enabled 2) Create Admin User: yes 3) Admin user to create: admin@southbaytech.co 4) Admin Password set 5) Anti-virus quarantine user: virus-quarantine.vjca4xqt0@southbaytech.co 6) Enable automated spam training: yes 7) Spam training user: spam.jskgzxzqkd@southbaytech.co 8) Non-spam(Ham) training user: ham.8cra1gy7@southbaytech.co 9) SMTP host: mail.southbaytech.co 10) Web server HTTP port: 8080 11) Web server HTTPS port: 8443 12) Web server mode: https 13) IMAP server port: 7143 14) IMAP server SSL port: 7993 15) POP server port: 7110 16) POP server SSL port: 7995 17) Use spell check server: yes 18) Spell server URL: http://mail.southbaytech.co:7780/aspell.php 19) Enable version update checks: TRUE 20) Enable version update notifications: TRUE 21) Version update notification email: admin@southbaytech.co 22) Version update source email: admin@southbaytech.co 23) Install mailstore (service webapp): yes 24) Install UI (zimbra,zimbraAdmin webapps): yes Select, or \u0026#39;r\u0026#39; for previous menu [r] Main menu 1) Common Configuration: 2) zimbra-ldap: Enabled 3) zimbra-logger: Enabled 4) zimbra-mta: Enabled 5) zimbra-dnscache: Enabled 6) zimbra-snmp: Enabled 7) zimbra-store: Enabled 8) zimbra-spell: Enabled 9) zimbra-proxy: Enabled 10) Default Class of Service Configuration: s) Save config to file x) Expand menu q) Quit *** CONFIGURATION COMPLETE - press \u0026#39;a\u0026#39; to apply Select from menu, or press \u0026#39;a\u0026#39; to apply config (? - help) a Save configuration data to a file? [Yes] Save config in file: [/opt/zimbra/config.12421] Saving config in /opt/zimbra/config.12421...done. The system will be modified - continue? [No] y Operations logged to /tmp/zmsetup10242016-135027.log Setting local config values...done. Initializing core config...Setting up CA...done. Deploying CA to /opt/zimbra/conf/ca ...done. Creating SSL zimbra-store certificate...done. Creating new zimbra-ldap SSL certificate...done. Creating new zimbra-mta SSL certificate...done. Creating new zimbra-proxy SSL certificate...done. Installing mailboxd SSL certificates...done. Installing MTA SSL certificates...done. Installing LDAP SSL certificate...done. Installing Proxy SSL certificate...done. Initializing ldap...done. Setting replication password...done. Setting Postfix password...done. Setting amavis password...done. Setting nginx password...done. Setting BES searcher password...done. Creating server entry for mail.southbaytech.co...done. Setting Zimbra IP Mode...done. Saving CA in ldap ...done. Saving SSL Certificate in ldap ...done. Setting spell check URL...done. Setting service ports on mail.southbaytech.co...done. Setting zimbraFeatureTasksEnabled=TRUE...done. Setting zimbraFeatureBriefcasesEnabled=TRUE...done. Setting Master DNS IP address(es)...done. Setting DNS cache tcp lookup preference...done. Setting DNS cache udp lookup preference...done. Setting DNS tcp upstream preference...done. Setting TimeZone Preference...done. Initializing mta config...done. Setting services on mail.southbaytech.co...done. Adding mail.southbaytech.co to zimbraMailHostPool in default COS...done. Creating domain southbaytech.co...done. Setting default domain name...done. Creating domain southbaytech.co...already exists. Creating admin account admin@southbaytech.co...done. Creating root alias...done. Creating postmaster alias...done. Creating user spam.jskgzxzqkd@southbaytech.co...done. Creating user ham.8cra1gy7@southbaytech.co...done. Creating user virus-quarantine.vjca4xqt0@southbaytech.co...done. Setting spam training and Anti-virus quarantine accounts...done. Initializing store sql database...done. Setting zimbraSmtpHostname for mail.southbaytech.co...done. Configuring SNMP...done. Setting up syslog.conf...done. Starting servers...done. Installing common zimlets... com_zimbra_adminversioncheck...done. com_zimbra_attachcontacts...done. com_zimbra_attachmail...done. com_zimbra_bulkprovision...done. com_zimbra_cert_manager...done. com_zimbra_clientuploader...done. com_zimbra_date...done. com_zimbra_email...done. com_zimbra_mailarchive...done. com_zimbra_phone...done. com_zimbra_proxy_config...done. com_zimbra_srchhighlighter...done. com_zimbra_tooltip...done. com_zimbra_url...done. com_zimbra_viewmail...done. com_zimbra_webex...done. com_zimbra_ymemoticons...done. Finished installing common zimlets. Restarting mailboxd...done. Creating galsync account for default domain...done. You have the option of notifying Zimbra of your installation. This helps us to track the uptake of the Zimbra Collaboration Server. The only information that will be transmitted is: The VERSION of zcs installed (8.6.0_GA_1153_RHEL7_64) The ADMIN EMAIL ADDRESS created (admin@southbaytech.co) Notify Zimbra of your installation? [Yes] n Notification skipped Setting up zimbra crontab...done. Moving /tmp/zmsetup10242016-135027.log to /opt/zimbra/log Configuration complete - press return to exit 8.查看zimbra服务 su zimbra zmcontrol status 以下表示正常\nHost mail.southbaytech.co amavis Running antispam Running antivirus Running dnscache Running ldap Running logger Running mailbox Running memcached Running mta Running opendkim Running proxy Running service webapp Running snmp Running spell Running stats Running zimbra webapp Running zimbraAdmin webapp Running zimlet webapp Running zmconfigd Running ","permalink":"/posts/centos7-xia-an-zhuang-zimbra-you-xiang/","summary":"\u003ch3 id=\"1更新系统\"\u003e1.更新系统\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum update -y\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2安装软件\"\u003e2.安装软件\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y vim net-tools ntp\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3设置好域名\"\u003e3.设置好域名\u003c/h3\u003e\n\u003cp\u003e删除原文件并添加以下行\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/hostname \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003email\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e删除原文件并添加以下行\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/hosts\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e127.0.0.1       localhost\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e172.21.100.7   mail.dingxiufeng.cn    mail\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4禁用系统自带mta服务\"\u003e4.禁用系统自带MTA服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl disable postfix.service\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl stop postfix.service\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5上传zimbra安装包到服务器\"\u003e5.上传zimbra安装包到服务器\u003c/h3\u003e\n\u003ch3 id=\"6解压\"\u003e6.解压\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etar zxvf zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"7进入解压目录并安装zimbra\"\u003e7.进入解压目录并安装zimbra\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd zcs-8.6.0_GA_1153.RHEL7_64.20141215151110\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e./install.sh\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e过程\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eOperations logged to /tmp/install.log.2328\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eChecking \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e existing installation...\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-ldap...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-logger...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-mta...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-dnscache...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-snmp...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-store...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-apache...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-spell...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-convertd...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-memcached...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-proxy...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-archiving...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    zimbra-core...NOT FOUND\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ePLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eZIMBRA, INC. \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;ZIMBRA\u0026#34;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eFIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eTHE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eTHIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eAGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eLicense Terms \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e the Zimbra Collaboration Suite:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  http://www.zimbra.com/license/zimbra-public-eula-2-5.html\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eDo you agree with the terms of the software license agreement? \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eN\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eChecking \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e prerequisites...\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     FOUND: NPTL\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     MISSING: nmap-ncat\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     FOUND: sudo-1.8.6p7-17\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     FOUND: libidn-1.28-4\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     FOUND: gmp-6.0.0-12\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     FOUND: libaio-0.3.109-13\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     FOUND: libstdc++-4.8.5-4\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     MISSING: unzip\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     MISSING: perl-core\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eChecking \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e suggested prerequisites...\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     FOUND: perl-5.16.3\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     Unable to find expected sysstat.  Found version 未安装软件包 sysstat  instead.\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     FOUND: sqlite\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e###WARNING###\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eThe suggested version of one or more packages is not installed.\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eThis could cause problems with the operation of Zimbra.\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eDo you wish to \u003cspan style=\"color:#66d9ef\"\u003econtinue\u003c/span\u003e? \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eN\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eExit? \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003eN\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eExiting.\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e根据提示安装相关依赖软件包\u003c/p\u003e","title":"Centos7下安装zimbra邮箱"},{"content":"一、安装前准备 1.关闭防火墙或者运行ftp服务 # 关闭防火墙 systemctl stop firewalld systemctl disable firewalld # 允许ftp服务 firewall-cmd --permanent --zone=public --add-service=ftp firewall-cmd --reload 2.关闭sellinux # 立即关闭 setenforce 0 # 永久关闭 sed -i \u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39; /etc/selinux/config # 查看是否关闭 getenforce 二、安装vsftpd 1.安装 yum install -y vsftpd 2.启动和自启 systemctl start vsftpd systemctl enable vsftpd 三、配置vsftpd 1.创建vsftpd使用的系统用户，主目录为/data/vsftpd，禁止ssh登录。创建之后所有虚拟用户使用这个系统用户访问文件。 useradd vsftpd -d /data/vsftpd -s /bin/false 2.创建虚拟用户主目录，比如虚拟用户叫ftp1，执行下面的命令。 mkdir -p /data/vsftpd/ftp1/ chown -R vsftpd:vsftpd /data/vsftpd/ftp1 3.创建这个虚拟用户 vi /etc/vsftpd/loginusers.conf # 增加内容 ftp1 123456 4.根据这个文件创建数据库文件 db_load -T -t hash -f /etc/vsftpd/loginusers.conf /etc/vsftpd/loginusers.db chmod 600 /etc/vsftpd/loginusers.db 5.启用这个数据库文件 vi /etc/pam.d/vsftpd # 注释掉所有内容后，增加下面的内容 auth sufficient /lib64/security/pam_userdb.so db=/etc/vsftpd/loginusers account sufficient /lib64/security/pam_userdb.so db=/etc/vsftpd/loginusers 6.创建虚拟用户配置目录和文件 # 创建用户配置目录 mkdir /etc/vsftpd/userconf # 创建虚拟用户配置文件 vim /etc/vsftpd/userconf/ftp1 # 增加下面的内容 local_root=/data/vsftpd/ftp1/ write_enable=YES 7.最后修改主配置文件 # 打开配置 vim /etc/vsftpd/vsftpd.conf # 更改内容 anonymous_enable=NO chroot_local_user=YES ascii_upload_enable=YES ascii_download_enable=YES # 文件尾部添加以下内容 guest_enable=YES guest_username=vsftpd user_config_dir=/etc/vsftpd/userconf allow_writeable_chroot=YES # 浏览FTP目录和下载 anon_world_readable_only=NO # 允许上传 anon_upload_enable=YES # 允许建立和删除目录 anon_mkdir_write_enable=YES # 允许改名和删除文件 anon_other_write_enable=YES 8.重启服务 service vsftpd restart 9.出现vsftpd 425 Security: Bad IP connecting.解决方法 vim /etc/vsftpd/vsftpd.conf # 添加： pasv_promiscuous=YES # 重启 service vsftpd restart ","permalink":"/posts/centos7-xia-an-zhuang-vsftp-bing-pei-zhi-xu-ni-yong-hu/","summary":"\u003ch2 id=\"一安装前准备\"\u003e一、安装前准备\u003c/h2\u003e\n\u003ch3 id=\"1关闭防火墙或者运行ftp服务\"\u003e1.关闭防火墙或者运行ftp服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 关闭防火墙\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl stop firewalld\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl disable firewalld\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 允许ftp服务\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --permanent --zone\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003epublic --add-service\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eftp\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --reload\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2关闭sellinux\"\u003e2.关闭sellinux\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 立即关闭\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esetenforce \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 永久关闭\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39;\u003c/span\u003e /etc/selinux/config\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 查看是否关闭\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egetenforce\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"二安装vsftpd\"\u003e二、安装vsftpd\u003c/h2\u003e\n\u003ch3 id=\"1安装\"\u003e1.安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y vsftpd\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2启动和自启\"\u003e2.启动和自启\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl start vsftpd\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable vsftpd\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"三配置vsftpd\"\u003e三、配置vsftpd\u003c/h2\u003e\n\u003ch3 id=\"1创建vsftpd使用的系统用户主目录为datavsftpd禁止ssh登录创建之后所有虚拟用户使用这个系统用户访问文件\"\u003e1.创建vsftpd使用的系统用户，主目录为/data/vsftpd，禁止ssh登录。创建之后所有虚拟用户使用这个系统用户访问文件。\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003euseradd vsftpd -d /data/vsftpd -s /bin/false\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2创建虚拟用户主目录比如虚拟用户叫ftp1执行下面的命令\"\u003e2.创建虚拟用户主目录，比如虚拟用户叫ftp1，执行下面的命令。\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir -p /data/vsftpd/ftp1/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown -R vsftpd:vsftpd /data/vsftpd/ftp1\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3创建这个虚拟用户\"\u003e3.创建这个虚拟用户\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evi /etc/vsftpd/loginusers.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 增加内容\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eftp1\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#ae81ff\"\u003e123456\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4根据这个文件创建数据库文件\"\u003e4.根据这个文件创建数据库文件\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edb_load -T -t hash -f /etc/vsftpd/loginusers.conf /etc/vsftpd/loginusers.db\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echmod \u003cspan style=\"color:#ae81ff\"\u003e600\u003c/span\u003e /etc/vsftpd/loginusers.db\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5启用这个数据库文件\"\u003e5.启用这个数据库文件\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evi /etc/pam.d/vsftpd\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 注释掉所有内容后，增加下面的内容\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eauth sufficient /lib64/security/pam_userdb.so db\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/etc/vsftpd/loginusers\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eaccount sufficient /lib64/security/pam_userdb.so db\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/etc/vsftpd/loginusers\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"6创建虚拟用户配置目录和文件\"\u003e6.创建虚拟用户配置目录和文件\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 创建用户配置目录\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir /etc/vsftpd/userconf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 创建虚拟用户配置文件\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/vsftpd/userconf/ftp1\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 增加下面的内容\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elocal_root\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/data/vsftpd/ftp1/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ewrite_enable\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eYES\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"7最后修改主配置文件\"\u003e7.最后修改主配置文件\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 打开配置\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/vsftpd/vsftpd.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 更改内容\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eanonymous_enable\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eNO\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echroot_local_user\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eYES\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eascii_upload_enable\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eYES\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eascii_download_enable\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eYES\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 文件尾部添加以下内容\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eguest_enable\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eYES\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eguest_username\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003evsftpd\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003euser_config_dir\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/etc/vsftpd/userconf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eallow_writeable_chroot\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eYES\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 浏览FTP目录和下载\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eanon_world_readable_only\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eNO\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 允许上传\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eanon_upload_enable\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eYES\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 允许建立和删除目录\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eanon_mkdir_write_enable\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eYES\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 允许改名和删除文件\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eanon_other_write_enable\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eYES\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"8重启服务\"\u003e8.重启服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice vsftpd restart\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"9出现vsftpd-425-security-bad-ip-connecting解决方法\"\u003e9.出现vsftpd 425 Security: Bad IP connecting.解决方法\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/vsftpd/vsftpd.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 添加：\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epasv_promiscuous\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eYES\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 重启\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eservice vsftpd restart\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下安装vsftp并配置虚拟用户"},{"content":"1. 下载12x版本 curl --silent --location https://rpm.nodesource.com/setup_12.x | bash - 2. yum 安装 ## Run `sudo yum install -y nodejs` to install Node.js 13.x and npm. yum install -y nodejs ## You may also need development tools to build native addons: yum install gcc-c++ make ## To install the Yarn package manager, run: curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo yum install yarn 3. cnpm安装 npm install -g cnpm --registry=https://registry.npm.taobao.org ","permalink":"/posts/centos7-xia-an-zhuang-node12-he-npm/","summary":"\u003ch3 id=\"1-下载12x版本\"\u003e1. 下载12x版本\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecurl --silent --location https://rpm.nodesource.com/setup_12.x | bash -\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2-yum-安装\"\u003e2. yum 安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e## Run `sudo yum install -y nodejs` to install Node.js 13.x and npm.\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y nodejs\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e## You may also need development tools to build native addons:\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install gcc-c++ make\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e## To install the Yarn package manager, run:\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecurl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install yarn\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3-cnpm安装\"\u003e3. cnpm安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003enpm install -g cnpm --registry\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003ehttps://registry.npm.taobao.org\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下安装node12和npm"},{"content":"代码如下：\n#!/bin/bash cd /home/raid_4t/100_hexo/blog/ tar -cpzf /home/raid_4t/100_hexo/bak/blog_$(date +%Y%m%d-%H%M).tar.gz * ","permalink":"/posts/linux-xia-shell-jiao-ben-tar-zi-dong-ya-suo-bei-fen-wen-jian-jia/","summary":"\u003cp\u003e代码如下：\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#!/bin/bash\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd /home/raid_4t/100_hexo/blog/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etar -cpzf /home/raid_4t/100_hexo/bak/blog_\u003cspan style=\"color:#66d9ef\"\u003e$(\u003c/span\u003edate +%Y%m%d-%H%M\u003cspan style=\"color:#66d9ef\"\u003e)\u003c/span\u003e.tar.gz * \n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Linux下shell脚本tar自动压缩备份文件夹"},{"content":"一、系统环境：Centos7 x64 uname -rvms 二、Office转PDF：Unoconv 1. 说明 unoconv是一个python脚本，再使用的时候需要用到libreo?ce-pyuno\n2. 环境 yum install unzip yum install -y libreoffice-pyuno yum remove -y libreoffice* openoffice* # 去除因安装libreo?ce-pyuno带来的低版本libreoffice 3. libreoffice和unoconv下载 # 通过以下地址下载官方libreOffice_6.6.0 https://www.libreoffice.org/donate/dl/rpm-x86_64/6.4.0/zh-CN/LibreOffice_6.4.0_Linux_x86-64_rpm.tar.gz # 通过以下地址下载官方unoconv_0.8.2 https://github.com/unoconv/unoconv/archive/0.8.2.zip 4. 安装 # libreoffice上传至服务器后解压 tar zxvf LibreOffice_6.4.0_Linux_x86-64_rpm.tar.gz # 把所有rpm包都安装上，包括依赖 yum install LibreOffice_6.4.0.3_Linux_x86-64_rpm/RPMS/*.rpm -y # unoconv上传至服务器后解压至安装 unzip unoconv-0.8.2.zip cd unoconv-0.8.2/ make install 5. 安装转换检验 unoconv --version # 版本查看 # LibreO?ce版本应该是6.4，unoconv版本应该是0.8.2 # 检验是否可以转换文档 unoconv -f pdf -o /root/output.pdf /root/input.docx # 1.pdf为转换后的文件，1.docx为需要转换的文件 unoconv -f pdf -e PageRange=2-2 -o /root/output.pdf /root/input.docx # 只转换第2页 6. 中文问题解决 此时可能转出来的文档为空，或者中文乱码，解决方法如下\nyum install fontconfig mkfontscale -y mkdir -p /usr/share/fonts/win # 然后将windows下的字体文件上传到此目录 # 执行命令使之生效 cd /usr/share/fonts/win mkfontscale mkfontdir sudo fc-cache -f 三、PDF打水印：Imagemagick 1. 说明 Imagemagick是一个图象处理软件。它可以编辑、显示包括JPEG、TIFF、PNM、PNG、GIF和Photo CS在内的绝大多数当今最流行的图象格式。同时可以为各类图片打水印。\n2. 环境 yum install -y libjpeg* libpng* libtiff* libungif* freetype zlib yum install -y ghostscript # 不装转换的时候会找不到文件路径 3. 下载 需要从官网下载2个rpm安装包，下载地址\nhttps://imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-7.0.9-25.x86_64.rpm https://imagemagick.org/download/linux/CentOS/x86_64/ImageMagick-libs-7.0.9-25.x86_64.rpm 4. 安装 # 将2个rpm包上传至服务，执行以下命令 yum install ImageMagick-libs-7.0.9-25.x86_64.rpm yum install ImageMagick-7.0.9-25.x86_64.rpm 5. 安装检验打水印 convert -density 300 -depth 8 -quality 85 1.pdf re.png # pdf转png convert 1.png -font /usr/share/fonts/win/simsun.ttc -density 300 -depth 8 -quality 85 -gravity center -fill \u0026#34;rgba(255, 0, 0, 0.6)\u0026#34; -pointsize 100 -draw \u0026#34;text 0,0 \u0026#39;南湾科技\u0026#39;\u0026#34; re.pdf # png打水印转pdf pdf直接加水印，单效果比较差\nconvert a.pdf -font /usr/share/fonts/win/simsun.ttc -gravity center -fill \u0026#34;rgba(255, 0, 0, 0.6)\u0026#34; -pointsize 100 -draw \u0026#34;text 5,5 \u0026#39;ContentHub\u0026#39;\u0026#34; re.pdf 批量图片合并为pdf\nconvert \u0026#34;*.{png,jpeg,jpg}\u0026#34; -quality 100 re.pdf 打水印示例\n# 居中 convert re-0.png -size 1000x1469 -font /usr/share/fonts/win/simsun.ttc -density 300 -depth 8 -quality 85 -gravity center -fill \u0026#34;rgba(41, 36, 33, 0.4)\u0026#34; -pointsize 30 -draw \u0026#34;text 0,-450 \u0026#39;aaaaaa\u0026#39;\u0026#34; -draw \u0026#34;text 0,-300 \u0026#39;bbbbbb\u0026#39;\u0026#34; -draw \u0026#34;text 0,-150 \u0026#39;cccccc\u0026#39;\u0026#34; -draw \u0026#34;text 0,150 \u0026#39;dddddd\u0026#39;\u0026#34; -draw \u0026#34;text 0,300 \u0026#39;eeeeee\u0026#39;\u0026#34; long.jpg # 靠左 convert re-0.png -size 1000x1469 -font /usr/share/fonts/win/simsun.ttc -density 300 -depth 8 -quality 85 -fill \u0026#34;rgba(41, 36, 33, 0.4)\u0026#34; -pointsize 30 -draw \u0026#34;text 400,1250 \u0026#39;aaaaaa\u0026#39;\u0026#34; -draw \u0026#34;text 400,1400 \u0026#39;bbbbbb\u0026#39;\u0026#34; -draw \u0026#34;text 400,1550 \u0026#39;cccccc\u0026#39;\u0026#34; -draw \u0026#34;text 400,1850 \u0026#39;dddddd\u0026#39;\u0026#34; -draw \u0026#34;text 400,2000 \u0026#39;eeeeee\u0026#39;\u0026#34; long.jpg # 居中倾斜30度 convert input.png -size 1000x1469 -font /usr/share/fonts/win/simsun.ttc -density 300 -depth 8 -quality 85 -gravity center -fill \u0026#34;rgba(41, 36, 33, 0.4)\u0026#34; -pointsize 30 -draw \u0026#34;rotate -30 text 0,-450 \u0026#39;aaaaaa\u0026#39;\u0026#34; -draw \u0026#34;rotate -30 text 0,-300 \u0026#39;bbbbbb\u0026#39;\u0026#34; -draw \u0026#34;rotate -30 text 0,-150 \u0026#39;cccccc\u0026#39;\u0026#34; -draw \u0026#34;rotate -30 text 0,150 \u0026#39;dddddd\u0026#39;\u0026#34; -draw \u0026#34;rotate -30 text 0,300 \u0026#39;eeeeee\u0026#39;\u0026#34; output.pdf ","permalink":"/posts/office-zhuan-pdf-da-shui-yin-unoconvimagemagick/","summary":"\u003ch2 id=\"一系统环境centos7-x64\"\u003e一、系统环境：Centos7 x64\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003euname -rvms\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"二office转pdfunoconv\"\u003e二、Office转PDF：Unoconv\u003c/h2\u003e\n\u003ch3 id=\"1-说明\"\u003e1. 说明\u003c/h3\u003e\n\u003cp\u003eunoconv是一个python脚本，再使用的时候需要用到libreo?ce-pyuno\u003c/p\u003e\n\u003ch3 id=\"2-环境\"\u003e2. 环境\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install unzip\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y libreoffice-pyuno\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum remove -y libreoffice* openoffice*  \u003cspan style=\"color:#75715e\"\u003e# 去除因安装libreo?ce-pyuno带来的低版本libreoffice\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3-libreoffice和unoconv下载\"\u003e3. libreoffice和unoconv下载\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 通过以下地址下载官方libreOffice_6.6.0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ehttps://www.libreoffice.org/donate/dl/rpm-x86_64/6.4.0/zh-CN/LibreOffice_6.4.0_Linux_x86-64_rpm.tar.gz\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 通过以下地址下载官方unoconv_0.8.2\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ehttps://github.com/unoconv/unoconv/archive/0.8.2.zip\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4-安装\"\u003e4. 安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# libreoffice上传至服务器后解压\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etar zxvf LibreOffice_6.4.0_Linux_x86-64_rpm.tar.gz\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 把所有rpm包都安装上，包括依赖\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install LibreOffice_6.4.0.3_Linux_x86-64_rpm/RPMS/*.rpm -y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# unoconv上传至服务器后解压至安装\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eunzip unoconv-0.8.2.zip\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd unoconv-0.8.2/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emake install\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5-安装转换检验\"\u003e5. 安装转换检验\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eunoconv --version \u003cspan style=\"color:#75715e\"\u003e# 版本查看\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# LibreO?ce版本应该是6.4，unoconv版本应该是0.8.2\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 检验是否可以转换文档\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eunoconv -f pdf -o /root/output.pdf /root/input.docx   \u003cspan style=\"color:#75715e\"\u003e# 1.pdf为转换后的文件，1.docx为需要转换的文件\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eunoconv -f pdf -e PageRange\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e2-2 -o /root/output.pdf /root/input.docx  \u003cspan style=\"color:#75715e\"\u003e# 只转换第2页\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"6-中文问题解决\"\u003e6. 中文问题解决\u003c/h3\u003e\n\u003cp\u003e此时可能转出来的文档为空，或者中文乱码，解决方法如下\u003c/p\u003e","title":"Office转pdf打水印—Unoconv、Imagemagick"},{"content":"使用docker默认镜像源下载镜像会很慢，因此很多情况下，我们在安装完docker以后都会修改为国内的镜像，这样在下载镜像的时候就不用等那么长时间了。\n方法一 $ cat /etc/sysconfig/docker # /etc/sysconfig/docker OPTIONS=\u0026#39;--selinux-enabled \\ --log-driver=journald \\ --signature-verification=false \\ --registry-mirror=https://kfwkfulq.mirror.aliyuncs.com\u0026#39; if [ -z \u0026#34;${DOCKER_CERT_PATH}\u0026#34; ]; then DOCKER_CERT_PATH=/etc/docker fi ##主要是配置这个参数 --registry-mirror ，指向阿里云镜像地址即可。 #重启docker服务 $ sudo systemctl restart docker 方法二 $ cd /etc/docker $ cat daemon.json { \u0026#34;registry-mirrors\u0026#34;: [ \u0026#34;https://kfwkfulq.mirror.aliyuncs.com\u0026#34;, \u0026#34;https://2lqq34jg.mirror.aliyuncs.com\u0026#34;, \u0026#34;https://pee6w651.mirror.aliyuncs.com\u0026#34;, \u0026#34;https://registry.docker-cn.com\u0026#34;, \u0026#34;http://hub-mirror.c.163.com\u0026#34; ], \u0026#34;dns\u0026#34;: [\u0026#34;8.8.8.8\u0026#34;,\u0026#34;8.8.4.4\u0026#34;] } 备注： 方法一和方法二不可同时使用，否则会冲突导致docker服务器启动不起来 ","permalink":"/posts/docker-pei-zhi-guo-nei-a-li-yun-jing-xiang-yuan/","summary":"\u003cp\u003e使用docker默认镜像源下载镜像会很慢，因此很多情况下，我们在安装完docker以后都会修改为国内的镜像，这样在下载镜像的时候就不用等那么长时间了。\u003c/p\u003e\n\u003ch3 id=\"方法一\"\u003e方法一\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e$ cat /etc/sysconfig/docker\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# /etc/sysconfig/docker\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eOPTIONS\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;--selinux-enabled \\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#e6db74\"\u003e--log-driver=journald \\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#e6db74\"\u003e--signature-verification=false \\\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#e6db74\"\u003e--registry-mirror=https://kfwkfulq.mirror.aliyuncs.com\u0026#39;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003eif\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003e -z \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e${\u003c/span\u003eDOCKER_CERT_PATH\u003cspan style=\"color:#e6db74\"\u003e}\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e; \u003cspan style=\"color:#66d9ef\"\u003ethen\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    DOCKER_CERT_PATH\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/etc/docker\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003efi\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e##主要是配置这个参数 --registry-mirror ，指向阿里云镜像地址即可。\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#重启docker服务\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e$ sudo systemctl restart docker\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"方法二\"\u003e方法二\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e$ cd /etc/docker\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e$ cat daemon.json \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;registry-mirrors\u0026#34;\u003c/span\u003e: \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;https://kfwkfulq.mirror.aliyuncs.com\u0026#34;\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;https://2lqq34jg.mirror.aliyuncs.com\u0026#34;\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;https://pee6w651.mirror.aliyuncs.com\u0026#34;\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;https://registry.docker-cn.com\u0026#34;\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;http://hub-mirror.c.163.com\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;dns\u0026#34;\u003c/span\u003e: \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;8.8.8.8\u0026#34;\u003c/span\u003e,\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;8.8.4.4\u0026#34;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"备注-方法一和方法二不可同时使用否则会冲突导致docker服务器启动不起来\"\u003e备注： 方法一和方法二不可同时使用，否则会冲突导致docker服务器启动不起来\u003c/h3\u003e","title":"docker配置国内阿里云镜像源"},{"content":"1、打开配置文件：vim /etc/pam.d/common-password #历史密码10次不相同 password[success=1default=ignore]pam_unix.soobscureuse_authtoktry_first_passsha512remember=10 #设置最短密码和长度 password requisite pam_cracklib.so retry=3 minlen=12 difok=3 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1 它表示密码必须至少包含一个大写字母（ucredit），一个小写字母（lcredit），一个数字（dcredit）和一个标点符号（ocredit），最小12位（minlen）\n2、打开配置文件：vim /etc/login.defs #设置最长密码期限 PASS_MAX_DAYS 90 ","permalink":"/posts/ubuntu-xi-tong-xiu-gai-yong-hu-deng-lu-mi-ma-ce-lve/","summary":"\u003ch2 id=\"1打开配置文件vim-etcpamdcommon-password\"\u003e1、打开配置文件：vim /etc/pam.d/common-password\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#历史密码10次不相同\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epassword\u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003esuccess\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e1default\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eignore\u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003epam_unix.soobscureuse_authtoktry_first_passsha512remember\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e10\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#设置最短密码和长度\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epassword  requisite pam_cracklib.so retry\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e3\u003c/span\u003e minlen\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e12\u003c/span\u003e difok\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e3\u003c/span\u003e ucredit\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e-1 lcredit\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e-1 dcredit\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e-1 ocredit\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e-1\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e它表示密码必须至少包含一个大写字母（ucredit），一个小写字母（lcredit），一个数字（dcredit）和一个标点符号（ocredit），最小12位（minlen）\u003c/p\u003e\n\u003ch2 id=\"2打开配置文件vim-etclogindefs\"\u003e2、打开配置文件：vim /etc/login.defs\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#设置最长密码期限\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ePASS_MAX_DAYS   \u003cspan style=\"color:#ae81ff\"\u003e90\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"ubuntu系统修改用户登录密码策略"},{"content":" 首先，需要安装sqlite3 dos下输入命令：sqlite3.exe E:\\目录\\数据库A 输入命令：.tables //显示当前数据库的表 输入命令：.output E:\\a.txt //要导出的txt文件所在目录和文件名 输入命令：select * from 表A //获取你要导出的数据 输入命令：.output stdout 然后到你指定的txt文件目录下查看，生成有你要生成的txt文件了,想导出成csv的把.txt改成.csv就可以了 ","permalink":"/posts/sqlite3-shu-ju-ku-cmd-ming-ling-dao-chu-biao-wei-txt-huo-csv/","summary":"\u003col\u003e\n\u003cli\u003e首先，需要安装sqlite3\u003c/li\u003e\n\u003cli\u003edos下输入命令：sqlite3.exe E:\\目录\\数据库A\u003c/li\u003e\n\u003cli\u003e输入命令：.tables //显示当前数据库的表\u003c/li\u003e\n\u003cli\u003e输入命令：.output E:\\a.txt  //要导出的txt文件所在目录和文件名\u003c/li\u003e\n\u003cli\u003e输入命令：select  *  from 表A   //获取你要导出的数据\u003c/li\u003e\n\u003cli\u003e输入命令：.output stdout\u003c/li\u003e\n\u003cli\u003e然后到你指定的txt文件目录下查看，生成有你要生成的txt文件了,想导出成csv的把.txt改成.csv就可以了\u003c/li\u003e\n\u003c/ol\u003e","title":"sqlite3数据库cmd命令导出表为txt或csv"},{"content":" 1、启动电脑，按esc或者shift，进入gurb界面，在第一行按“e” 2、在linux /boot/vmlinuz 把ro修改为 rw single init=/bin/bash 3、然后按ctrl+x或者按F10进入。修改用户密码 passwd 你的用户名，输入两次新密码。 4、按ctrl+alt+delete重启电脑，搞定。 ","permalink":"/posts/ubuntu-xi-tong-wang-ji-yong-hu-mi-ma-de-jie-jue-ban-fa/","summary":"\u003cul\u003e\n\u003cli\u003e1、启动电脑，按esc或者shift，进入gurb界面，在第一行按“e”\u003c/li\u003e\n\u003cli\u003e2、在linux /boot/vmlinuz 把ro修改为 rw single init=/bin/bash\u003c/li\u003e\n\u003cli\u003e3、然后按ctrl+x或者按F10进入。修改用户密码 passwd 你的用户名，输入两次新密码。\u003c/li\u003e\n\u003cli\u003e4、按ctrl+alt+delete重启电脑，搞定。\u003c/li\u003e\n\u003c/ul\u003e","title":"Ubuntu系统忘记用户密码的解决办法"},{"content":"添加源： sudo add-apt-repository ppa:relan/exfat sudo apt-get update 安装fuse-exfat sudo apt-get install fuse-exfat exfat-utils ","permalink":"/posts/ubuntu-xi-tong-zhi-chi-exfat-ge-shi/","summary":"\u003ch2 id=\"添加源\"\u003e添加源：\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo add-apt-repository ppa:relan/exfat\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt-get update\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"安装fuse-exfat\"\u003e安装fuse-exfat\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt-get install fuse-exfat  exfat-utils\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"ubuntu系统支持exfat格式"},{"content":"1.添加PPA源的命令为 add-apt-repository ppa:user/ppa-name apt-get update 2.删除PPA源的命令为 add-apt-repository -r ppa:user/ppa-name ","permalink":"/posts/ubuntu-tian-jia-he-shan-chu-yuan/","summary":"\u003ch3 id=\"1添加ppa源的命令为\"\u003e1.添加PPA源的命令为\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eadd-apt-repository ppa:user/ppa-name\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eapt-get update\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2删除ppa源的命令为\"\u003e2.删除PPA源的命令为\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eadd-apt-repository -r ppa:user/ppa-name\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Ubuntu添加和删除源"},{"content":"1.打开组策略 运行 gpedit.msc 2.找到指定策略 计算机配置\u0026ndash;windows设置\u0026ndash;安全设置\u0026ndash;本地策略\u0026ndash;用户权限分配 找到“允许本地登录” 删除users和guest 添加“指定域用户” ","permalink":"/posts/huo-dong-mu-lu-yu-ji-suan-ji-xian-ding-zhi-yun-xu-mou-ge-yu-zhang-hao-deng-lu/","summary":"\u003ch3 id=\"1打开组策略\"\u003e1.打开组策略\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e运行\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egpedit.msc\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2找到指定策略\"\u003e2.找到指定策略\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e计算机配置\u0026ndash;windows设置\u0026ndash;安全设置\u0026ndash;本地策略\u0026ndash;用户权限分配\u003c/li\u003e\n\u003cli\u003e找到“允许本地登录”\u003c/li\u003e\n\u003cli\u003e删除users和guest\u003c/li\u003e\n\u003cli\u003e添加“指定域用户”\u003c/li\u003e\n\u003c/ul\u003e","title":"活动目录域计算机限定只允许某个域账号登录"},{"content":"原因 .gitignore中已经标明忽略的文件目录下的文件，git push的时候还会出现在push的目录中，或者用git status查看状态，想要忽略的文件还是显示被追踪状态。 原因是因为在git忽略目录中，新建的文件在git中会有缓存，如果某些文件已经被纳入了版本管理中，就算是在.gitignore中已经声明了忽略路径也是不起作用的， 这时候我们就应该先把本地缓存删除，然后再进行git的提交，这样就不会出现忽略的文件了。\n解决方法 git清除本地缓存（改变成未track状态），然后再提交:\ngit rm -r --cached . git add . git commit -m \u0026#39;update .gitignore\u0026#39; git push -u origin master ","permalink":"/posts/git-hu-lve-gui-ze-gitignore-pei-zhi-bu-sheng-xiao-yuan-yin-he-jie-jue/","summary":"\u003ch3 id=\"原因\"\u003e原因\u003c/h3\u003e\n\u003cblockquote\u003e\n\u003cp\u003e.gitignore中已经标明忽略的文件目录下的文件，git push的时候还会出现在push的目录中，或者用git status查看状态，想要忽略的文件还是显示被追踪状态。\n原因是因为在git忽略目录中，新建的文件在git中会有缓存，如果某些文件已经被纳入了版本管理中，就算是在.gitignore中已经声明了忽略路径也是不起作用的，\n这时候我们就应该先把本地缓存删除，然后再进行git的提交，这样就不会出现忽略的文件了。\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003ch3 id=\"解决方法\"\u003e解决方法\u003c/h3\u003e\n\u003cp\u003egit清除本地缓存（改变成未track状态），然后再提交:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egit rm -r --cached .\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egit add .\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egit commit -m \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;update .gitignore\u0026#39;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egit push -u origin master\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Git忽略规则gitignore配置不生效原因和解决"},{"content":"1.查看所有远程仓库 git remote 2.删除原有远程仓库 git remote rm origin 3.添加新远程仓库 git remote add origin https://git.dingxiufeng.cn/Personal/vue3_study.git 4.推送代码到远程仓库 git push origin master ","permalink":"/posts/git-yuan-cheng-cang-ku-de-zhi-bian-geng-ben-de-ru-he-xiu-gai/","summary":"\u003ch3 id=\"1查看所有远程仓库\"\u003e1.查看所有远程仓库\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egit remote\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2删除原有远程仓库\"\u003e2.删除原有远程仓库\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egit remote rm origin\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3添加新远程仓库\"\u003e3.添加新远程仓库\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egit remote add origin https://git.dingxiufeng.cn/Personal/vue3_study.git\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4推送代码到远程仓库\"\u003e4.推送代码到远程仓库\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egit push origin master\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Git远程仓库地址变更本地如何修改"},{"content":"1. 单击“开始——运行”，然后输入regedit(打开注册表) 依次展开“HKEY_LOCAL_MACHIME\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\DeskTop\\NameSpace 在左边空白外点击“新建”，选择：“主键”，把它命名为“{645FF040-5081-101B-9F08-00AA002F54E}” 再把右边的“默认”的主键的键值设为“回收站” 然后退出注册表。就OK啦。 2. 要重启你的计算机。 只要你机器没有运行过磁盘整理。系统完好。任何时候的文件都可以找回来。\n","permalink":"/posts/windows-wu-shan-wen-jian-zen-me-zhao-hui--zen-me-hui-fu-dian-nao-zhong-wu-shan-de-wen-jian/","summary":"\u003ch3 id=\"1-单击开始运行然后输入regedit打开注册表\"\u003e1. 单击“开始——运行”，然后输入regedit(打开注册表)\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e依次展开“HKEY_LOCAL_MACHIME\u003cspan style=\"color:#ae81ff\"\u003e\\S\u003c/span\u003eoftware\u003cspan style=\"color:#ae81ff\"\u003e\\M\u003c/span\u003eicrosoft\u003cspan style=\"color:#ae81ff\"\u003e\\W\u003c/span\u003eindows\u003cspan style=\"color:#ae81ff\"\u003e\\C\u003c/span\u003eurrentVersion\u003cspan style=\"color:#ae81ff\"\u003e\\E\u003c/span\u003explorer\u003cspan style=\"color:#ae81ff\"\u003e\\D\u003c/span\u003eeskTop\u003cspan style=\"color:#ae81ff\"\u003e\\N\u003c/span\u003eameSpace\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e在左边空白外点击“新建”，选择：“主键”，把它命名为“\u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e645FF040-5081-101B-9F08-00AA002F54E\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e”\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e再把右边的“默认”的主键的键值设为“回收站”\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e然后退出注册表。就OK啦。 \n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2-要重启你的计算机\"\u003e2. 要重启你的计算机。\u003c/h3\u003e\n\u003cp\u003e只要你机器没有运行过磁盘整理。系统完好。任何时候的文件都可以找回来。\u003c/p\u003e","title":"windows误删文件怎么找回？怎么恢复电脑中误删的文件？"},{"content":"可以通过TC的方式来设定\n清除设备策略：tc qdisc del root dev eth0 2\u0026gt;/dev/null 设置设备策略：tc qdisc add dev eth0 root netem loss 5% 其它示例：\ntc qdisc add dev eth0 root netem loss 5% tc qdisc add dev eth0 root netem delay 200ms tc qdisc add dev eth0 root netem delay 200ms loss 5% ","permalink":"/posts/linux-she-zhi-wang-luo-yan-chi-he-diu-bao-cao-zuo-yong-yu-ce-shi/","summary":"\u003cp\u003e可以通过TC的方式来设定\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e清除设备策略：tc qdisc del root dev eth0 2\u0026gt;/dev/null\u003c/li\u003e\n\u003cli\u003e设置设备策略：tc qdisc add dev eth0 root netem loss 5%\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e其它示例：\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etc qdisc add dev eth0 root netem loss 5%\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etc qdisc add dev eth0 root netem delay 200ms\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etc qdisc add dev eth0 root netem delay 200ms loss 5%\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"linux设置网络延迟和丢包操作用于测试"},{"content":"1.修改密码验证策略，如果不修改简单密码无法创建 在my.cnf中添加以下内容： validate_password.policy=0 validate_password.length=6 validate_password.mixed_case_count=0 validate_password.special_char_count=0 validate_password.length=6 重启mysqld 2.创建用户 create user \u0026#39;tab_ding\u0026#39;@\u0026#39;%\u0026#39; identified by \u0026#39;123456\u0026#39;; flush privileges; 3.给用户添加管理员权限 grant all privileges on *.* to \u0026#39;tab_ding\u0026#39;@\u0026#39;%\u0026#39;; flush privileges; 4.Navicat和heisql登录时提示：caching_sha2_password 已创建用户修改 ALTER USER \u0026#39;tab_ding\u0026#39;@\u0026#39;%\u0026#39; IDENTIFIED WITH mysql_native_password BY \u0026#39;123456\u0026#39;; FLUSH PRIVILEGES; 默认创建用户修改，在my.cnf中添加 default_authentication_plugin = mysql_native_password ","permalink":"/posts/mysql80-zhong-chuang-jian-guan-li-yuan-bing-xiu-gai-mi-ma-yan-zheng-fang-shi/","summary":"\u003ch3 id=\"1修改密码验证策略如果不修改简单密码无法创建\"\u003e1.修改密码验证策略，如果不修改简单密码无法创建\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e在my.cnf中添加以下内容：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evalidate_password.policy\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evalidate_password.length\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e6\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evalidate_password.mixed_case_count\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evalidate_password.special_char_count\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evalidate_password.length\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e6\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e重启mysqld\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"2创建用户\"\u003e2.创建用户\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecreate user \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;tab_ding\u0026#39;\u003c/span\u003e@\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;%\u0026#39;\u003c/span\u003e identified by \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;123456\u0026#39;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eflush privileges;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3给用户添加管理员权限\"\u003e3.给用户添加管理员权限\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egrant all privileges on *.* to  \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;tab_ding\u0026#39;\u003c/span\u003e@\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;%\u0026#39;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eflush privileges;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4navicat和heisql登录时提示caching_sha2_password\"\u003e4.Navicat和heisql登录时提示：caching_sha2_password\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e已创建用户修改\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eALTER USER \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;tab_ding\u0026#39;\u003c/span\u003e@\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;%\u0026#39;\u003c/span\u003e IDENTIFIED WITH mysql_native_password BY \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;123456\u0026#39;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eFLUSH PRIVILEGES;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e默认创建用户修改，在my.cnf中添加\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edefault_authentication_plugin \u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e mysql_native_password\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"mysql8.0中创建管理员并修改密码验证方式"},{"content":"一、安装 1.centos环境配置 yum update -y yum install -y epel-release yum install -y vim net-tools nmon clamav htop rsync iptraf-ng tree lrzsz cmake make gcc gcc-c++ ntp iftop telnet tcpdump traceroute 2.设置时间同步 echo \u0026#34;0 8 * * * root ntpdate ntp.southbaytech.co\u0026#34; \u0026gt;\u0026gt; /etc/crontab 3.关闭selinux和开启防火墙端口 sed -i \u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39; /etc/selinux/config firewall-cmd --add-port=9422/tcp firewall-cmd --add-port=9422/tcp --permanent 4.禁用DNS反向解析 sed -i \u0026#39;s@GSSAPIAuthentication yes@GSSAPIAuthentication no@\u0026#39; /etc/ssh/sshd_config sed -i \u0026#39;s@#UseDNS yes@UseDNS no@\u0026#39; /etc/ssh/sshd_config 5.安装moosefs软件 curl \u0026#34;http://ppa.moosefs.com/RPM-GPG-KEY-MooseFS\u0026#34; \u0026gt; /etc/pki/rpm-gpg/RPM-GPG-KEY-MooseFS curl \u0026#34;http://ppa.moosefs.com/MooseFS-3-el7.repo\u0026#34; \u0026gt; /etc/yum.repos.d/MooseFS.repo yum install moosefs-chunkserver moosefs-client -y 二、配置硬盘挂载(以sdb为例) 1.查看服务器硬盘信息 fdisk -l 2.硬盘sdb分区格式化并挂载 parted /dev/sdb mklabel gpt mkpart primary 0% 100% q mkfs.xfs -f /dev/sdb1 3.设置开机自动挂载 mkdir /mnt/moosefs_0 mount /dev/sdb1 /mnt/moosefs_0 vim /etc/fstab /dev/sdb1 /mnt/moosefs_0 xfs defaults 0 0 三、配置moosefs 1.配置chunkserver中的mfshdd vim /etc/mfs/mfshdd.cfg /mnt/moosefs_0 -10GiB 2.配置chunkserver中的mfschunkserver sed -i \u0026#39;s\\# MASTER_HOST = mfsmaster\\MASTER_HOST = mfsmaster20.southbaytech.co\\\u0026#39; /etc/mfs/mfschunkserver.cfg 3.设置开机启动 # Master systemctl enable moosefs-master systemctl enable moosefs-cgiserv # Chunkserver systemctl enable moosefs-chunkserver # Metalogger systemctl enable moosefs-metalogger 4.启动chunkserver服务 mfschunkserver start # 出现无法创建lock，继续执行 chown -R mfs:mfs /mnt/* mfschunkserver start 5.设置系统读写性能 sed -i \u0026#39;$a\\vm.dirty_background_ratio = 5\u0026#39; /etc/sysctl.conf sed -i \u0026#39;$a\\vm.dirty_ratio = 20\u0026#39; /etc/sysctl.conf ","permalink":"/posts/moosefs-chunkserver-an-zhuang-pei-zhi/","summary":"\u003ch2 id=\"一安装\"\u003e一、安装\u003c/h2\u003e\n\u003ch3 id=\"1centos环境配置\"\u003e1.centos环境配置\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum update -y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y epel-release\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y vim net-tools nmon clamav htop rsync iptraf-ng tree lrzsz cmake make gcc gcc-c++ ntp iftop telnet tcpdump traceroute\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2设置时间同步\"\u003e2.设置时间同步\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eecho \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;0 8 * * * root ntpdate ntp.southbaytech.co\u0026#34;\u003c/span\u003e \u0026gt;\u0026gt; /etc/crontab\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3关闭selinux和开启防火墙端口\"\u003e3.关闭selinux和开启防火墙端口\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s@SELINUX=enforcing@SELINUX=disabled@\u0026#39;\u003c/span\u003e /etc/selinux/config\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e9422/tcp\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --add-port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e9422/tcp --permanent\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4禁用dns反向解析\"\u003e4.禁用DNS反向解析\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s@GSSAPIAuthentication yes@GSSAPIAuthentication no@\u0026#39;\u003c/span\u003e /etc/ssh/sshd_config\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s@#UseDNS yes@UseDNS no@\u0026#39;\u003c/span\u003e /etc/ssh/sshd_config\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5安装moosefs软件\"\u003e5.安装moosefs软件\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecurl \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;http://ppa.moosefs.com/RPM-GPG-KEY-MooseFS\u0026#34;\u003c/span\u003e \u0026gt; /etc/pki/rpm-gpg/RPM-GPG-KEY-MooseFS\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecurl \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;http://ppa.moosefs.com/MooseFS-3-el7.repo\u0026#34;\u003c/span\u003e \u0026gt; /etc/yum.repos.d/MooseFS.repo\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install moosefs-chunkserver  moosefs-client -y\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"二配置硬盘挂载以sdb为例\"\u003e二、配置硬盘挂载(以sdb为例)\u003c/h2\u003e\n\u003ch3 id=\"1查看服务器硬盘信息\"\u003e1.查看服务器硬盘信息\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efdisk -l\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2硬盘sdb分区格式化并挂载\"\u003e2.硬盘sdb分区格式化并挂载\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eparted /dev/sdb\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emklabel gpt\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkpart primary 0% 100%\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eq\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkfs.xfs -f /dev/sdb1\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3设置开机自动挂载\"\u003e3.设置开机自动挂载\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir /mnt/moosefs_0\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emount /dev/sdb1 /mnt/moosefs_0\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/fstab\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e/dev/sdb1 /mnt/moosefs_0       xfs     defaults        \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"三配置moosefs\"\u003e三、配置moosefs\u003c/h2\u003e\n\u003ch3 id=\"1配置chunkserver中的mfshdd\"\u003e1.配置chunkserver中的mfshdd\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/mfs/mfshdd.cfg\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e/mnt/moosefs_0 -10GiB\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2配置chunkserver中的mfschunkserver\"\u003e2.配置chunkserver中的mfschunkserver\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;s\\# MASTER_HOST = mfsmaster\\MASTER_HOST = mfsmaster20.southbaytech.co\\\u0026#39;\u003c/span\u003e /etc/mfs/mfschunkserver.cfg\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3设置开机启动\"\u003e3.设置开机启动\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# Master\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable moosefs-master\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable moosefs-cgiserv\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# Chunkserver\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable moosefs-chunkserver\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# Metalogger\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable moosefs-metalogger\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4启动chunkserver服务\"\u003e4.启动chunkserver服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emfschunkserver start\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 出现无法创建lock，继续执行\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown -R mfs:mfs /mnt/*\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emfschunkserver start\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5设置系统读写性能\"\u003e5.设置系统读写性能\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;$a\\vm.dirty_background_ratio = 5\u0026#39;\u003c/span\u003e /etc/sysctl.conf\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esed -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;$a\\vm.dirty_ratio = 20\u0026#39;\u003c/span\u003e /etc/sysctl.conf\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Moosefs-Chunkserver安装配置"},{"content":"安装配置 1、拷贝配置文件到/etc/rsyncd.conf cp /usr/share/doc/rsync/examples/rsyncd.conf /etc/rsyncd.conf 2、打开配置文件 vim /etc/rsyncd.conf 3、打开后需要去掉注释的语句 设置密码文件位置： secrets file = /etc/rsyncd.secrets rsync进程启动位置： pid file = /var/run/rsyncd.pid 日志文件位置： log file = /var/log/rsyncd (该文件需要手动创建) 修改rsync的同步位置： path = /home/test 4、编辑密码 vim /etc/rsyncd.secrets root:123456 5、设置启动方式 vim /etc/init.d/rsync RSYNC_ENABLE 原值为false 改为true Vim /etc/default/rsync RSYNC_ENABLE 原值为false 改为true 6、重启rsync服务 /etc/init.d/rsync restart 7、设置定时任务 vim /etc/crontab * * * * * root rsync -avz --delete root@192.168.1.11::ftp /home/test/ 避免crontab同时执行多个rsync脚本的方法 如果某脚本要跑30分钟，可以在crontab里把脚本间隔设为至少一小时来避免冲突。 而比较糟的情况可能该脚本在执行周期内没完成，接着第二个脚本又开始跑了。如何确保只有一个脚本实例运行？ \\ linux下面：flock \\ help显示如下：\nflock (util-linux 2.13-pre7) Usage: flock [-sxun][-w #] fd# flock [-sxon][-w #] file [-c] command... -s --shared Get a shared lock -x --exclusive Get an exclusive lock -u --unlock Remove a lock -n --nonblock Fail rather than wait -w --timeout Wait for a limited amount of time -o --close Close file descriptor before running command -c --command Run a single command string through the shell -h --help Display this text -V --version Display version 比如在rsync定时同步某文件夹的时候，可能担心上一次任务还没执行完，下一次就开始了。于是可以采用如下方式：\n1 * * * * flock -xn /var/run/rsync.lock -c \u0026#39;rsync -avz --delete root@192.168.1.11::ftp /home/samba/share\u0026#39; 对照usage，x创建一个独享锁，n是如果已存在就退出，然后一个lock文件，c是shell命令，具体内容就是rsync。 \\ 注意点：我们需要自己创建rsync.lock文件：touch /var/run/rsync.lock\n","permalink":"/posts/linux-xia-rsync-tong-bu-fu-wu-an-zhuang/","summary":"\u003ch2 id=\"安装配置\"\u003e安装配置\u003c/h2\u003e\n\u003ch3 id=\"1拷贝配置文件到etcrsyncdconf\"\u003e1、拷贝配置文件到/etc/rsyncd.conf\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecp /usr/share/doc/rsync/examples/rsyncd.conf /etc/rsyncd.conf\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2打开配置文件\"\u003e2、打开配置文件\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/rsyncd.conf \n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3打开后需要去掉注释的语句\"\u003e3、打开后需要去掉注释的语句\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e设置密码文件位置：\nsecrets file = /etc/rsyncd.secrets\u003c/li\u003e\n\u003cli\u003ersync进程启动位置：\npid file = /var/run/rsyncd.pid\u003c/li\u003e\n\u003cli\u003e日志文件位置：\nlog file = /var/log/rsyncd (该文件需要手动创建)\u003c/li\u003e\n\u003cli\u003e修改rsync的同步位置：\npath = /home/test\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"4编辑密码\"\u003e4、编辑密码\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/rsyncd.secrets      \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eroot:123456\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5设置启动方式\"\u003e5、设置启动方式\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/init.d/rsync        \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eRSYNC_ENABLE 原值为false 改为true\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eVim /etc/default/rsync       \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eRSYNC_ENABLE 原值为false 改为true\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"6重启rsync服务\"\u003e6、重启rsync服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e/etc/init.d/rsync restart        \n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"7设置定时任务\"\u003e7、设置定时任务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/crontab            \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e* * * * * root rsync -avz --delete  root@192.168.1.11::ftp /home/test/\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"避免crontab同时执行多个rsync脚本的方法\"\u003e避免crontab同时执行多个rsync脚本的方法\u003c/h2\u003e\n\u003cblockquote\u003e\n\u003cp\u003e如果某脚本要跑30分钟，可以在crontab里把脚本间隔设为至少一小时来避免冲突。\n而比较糟的情况可能该脚本在执行周期内没完成，接着第二个脚本又开始跑了。如何确保只有一个脚本实例运行？ \\\nlinux下面：flock \\\nhelp显示如下：\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eflock \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003eutil-linux 2.13-pre7\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eUsage: flock \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003e-sxun\u003cspan style=\"color:#f92672\"\u003e][\u003c/span\u003e-w \u003cspan style=\"color:#75715e\"\u003e#] fd#\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e       flock \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003e-sxon\u003cspan style=\"color:#f92672\"\u003e][\u003c/span\u003e-w \u003cspan style=\"color:#75715e\"\u003e#] file [-c] command...\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  -s  --shared     Get a shared lock\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  -x  --exclusive  Get an exclusive lock\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  -u  --unlock     Remove a lock\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  -n  --nonblock   Fail rather than wait\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  -w  --timeout    Wait \u003cspan style=\"color:#66d9ef\"\u003efor\u003c/span\u003e a limited amount of time\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  -o  --close      Close file descriptor before running command\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  -c  --command    Run a single command string through the shell\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  -h  --help       Display this text\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  -V  --version    Display version\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e比如在rsync定时同步某文件夹的时候，可能担心上一次任务还没执行完，下一次就开始了。于是可以采用如下方式：\u003c/p\u003e","title":"Linux下rsync同步服务安装"},{"content":"1.创建管理用户 db.createUser( { user: \u0026#34;accountUser\u0026#34;, pwd: \u0026#34;password\u0026#34;, roles: [ \u0026#34;readWrite\u0026#34;, \u0026#34;dbAdmin\u0026#34; ] } ) 2.删除用户 db.dropUser(\u0026#34;accuntUser\u0026#34;) 3.修改用户密码 db.changeUserPassword(\u0026#34;accuntUser\u0026#34;,\u0026#34;newPasswd\u0026#34;) 4.启动数据库： mongod --bind_ip localhost --port 27017 --dbpath /home/raid1/z_BAK/mongod_data/ --logpath=/var/log/mongod.log --fork ","permalink":"/posts/mongodb-chuang-jian-shan-chu-yong-hu-he-xiu-gai-mi-ma/","summary":"\u003ch2 id=\"1创建管理用户\"\u003e1.创建管理用户\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edb.createUser\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e   \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     user: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;accountUser\u0026#34;\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     pwd: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;password\u0026#34;\u003c/span\u003e,\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e     roles: \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;readWrite\u0026#34;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;dbAdmin\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e   \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"2删除用户\"\u003e2.删除用户\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edb.dropUser\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;accuntUser\u0026#34;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"3修改用户密码\"\u003e3.修改用户密码\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edb.changeUserPassword\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;accuntUser\u0026#34;\u003c/span\u003e,\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;newPasswd\u0026#34;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"4启动数据库\"\u003e4.启动数据库：\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emongod --bind_ip localhost --port \u003cspan style=\"color:#ae81ff\"\u003e27017\u003c/span\u003e --dbpath /home/raid1/z_BAK/mongod_data/ --logpath\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/var/log/mongod.log --fork\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"MongoDB创建删除用户和修改密码"},{"content":"今天研究Mongodb第二次连接的时候报如下错误 : MongoDB shell version: 2.4.9 connecting to: test Mon Mar 3 23:45:09.491 Error: couldn\u0026#39;t connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145 exception: connect failed 这是因为上次关闭Mongodb不当,数据文件还继续占用\n以下是网上的解决方法, Mongodb解决不能连接到服务器的错误 先看服务启动没有，如果没有启动服务先启动服务，如果服务已经启动了， 那有可能是上次不正常关闭mongo,导致存放数据的文件被占用了，被锁住了。 只需将D:\\software\\mongodb-2.4.5\\data中的mongod.lock文件删除掉。 重新启动服务即可。 ","permalink":"/posts/mongodb-jie-jue-bu-neng-lian-jie-dao-fu-wu-qi-de-cuo-wu/","summary":"\u003ch3 id=\"今天研究mongodb第二次连接的时候报如下错误-\"\u003e今天研究Mongodb第二次连接的时候报如下错误 :\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eMongoDB shell version: 2.4.9 \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003econnecting to: test \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eMon Mar \u003cspan style=\"color:#ae81ff\"\u003e3\u003c/span\u003e 23:45:09.491 Error: couldn\u003cspan style=\"color:#960050;background-color:#1e0010\"\u003e\u0026#39;\u003c/span\u003et connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145 \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eexception: connect failed \n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e这是因为上次关闭Mongodb不当,数据文件还继续占用\u003c/p\u003e\n\u003ch3 id=\"以下是网上的解决方法-mongodb解决不能连接到服务器的错误\"\u003e以下是网上的解决方法, Mongodb解决不能连接到服务器的错误\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e先看服务启动没有，如果没有启动服务先启动服务，如果服务已经启动了，\u003c/li\u003e\n\u003cli\u003e那有可能是上次不正常关闭mongo,导致存放数据的文件被占用了，被锁住了。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e只需将D:\u003cspan style=\"color:#ae81ff\"\u003e\\s\u003c/span\u003eoftware\u003cspan style=\"color:#ae81ff\"\u003e\\m\u003c/span\u003eongodb-2.4.5\u003cspan style=\"color:#ae81ff\"\u003e\\d\u003c/span\u003eata中的mongod.lock文件删除掉。\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e重新启动服务即可。\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"MongoDB解决不能连接到服务器的错误"},{"content":" MongoDB默认是不开启权限认证的，开启认证也很简单，在配置文件mongodb.conf里面加入auth = true 或者通过 \u0026ndash;auth参数启动\n一、具体操作步骤 1.首先开启mongod服务 mongod --port 27017 --dbpath /data/db1 2.连接数据库 mongo --port 27017 3.创建用户 use admin db.createUser({user: \u0026#34;test\u0026#34;, pwd: \u0026#34;123456\u0026#34;, roles: [{role: \u0026#34;userAdminAnyDatabase\u0026#34;, db: \u0026#34;admin\u0026#34;}] }) 4.关闭mongod服务 use admin db.shutdownServer() 5.这时重新启动mongod服务，添加 \u0026ndash;auth 开启权限认证。 mongod --port 27017 --dbpath /data/db1 --auth 如果是用配置文件启动的，则在配置中添加： security: authorization: enabled 6.用户登录数据库 方式一 :在连接服务器的同时进行用户认证 mongo --port 27017 -u \u0026#34;test\u0026#34; -p \u0026#34;123456\u0026#34; --authenticationDatabase \u0026#34;admin\u0026#34; 方式二 :先连接服务器,然后在数据库内认证。 mongo --port 27017 use admin db.auth(\u0026#34;test\u0026#34;,\u0026#34;123456\u0026#34;) 7.使用db.shutdownServer()报错的解决方法 赋予hostManager权限: db.grantRolesToUser( \u0026#34;admin\u0026#34; , [ { role: \u0026#34;hostManager\u0026#34;, db: \u0026#34;admin\u0026#34; } ]) 二、配置文件 使用配置文件 启动 mongod -f ./mongodb/mongo.conf # 数据库路径 dbpath=./mongodb/data # 日志输出文件路径 logpath=./mongodb/logs/mongo.log # 错误日志采用追加模式 logappend=true # 启用日志文件，MongoDB的数据操作将会写入到journal文件夹的文件里 journal=true # 安静输出，可以过滤掉一些无用的日志信息 quiet=true # 启用验证 auth=true # 守护进程 fork=true # 端口号 默认为27017 port=27017 三、角色具体说明： Read：允许用户读取指定数据库 readWrite：允许用户读写指定数据库 dbAdmin：允许用户在指定数据库中执行管理函数，如索引创建、删除，查看统计或访问system.profile userAdmin：允许用户向system.users集合写入，可以找指定数据库里创建、删除和管理用户 dbOwner：数据库拥有者，包含readWrite、dbAdmin、userAdmin clusterAdmin：只在admin数据库中可用，赋予用户所有分片和复制集相关函数的管理权限 readAnyDatabase：只在admin数据库中可用，赋予用户所有数据库的读权限 readWriteAnyDatabase：只在admin数据库中可用，赋予用户所有数据库的读写权限 userAdminAnyDatabase：只在admin数据库中可用，赋予用户所有数据库的userAdmin权限 dbAdminAnyDatabase：只在admin数据库中可用，赋予用户所有数据库的dbAdmin权限 root：只在admin数据库中可用。超级账号，超级权限 ","permalink":"/posts/mongodb-ru-he-kai-qi-quan-xian-ren-zheng/","summary":"\u003cblockquote\u003e\n\u003cp\u003eMongoDB默认是不开启权限认证的，开启认证也很简单，在配置文件mongodb.conf里面加入auth = true 或者通过 \u0026ndash;auth参数启动\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003ch2 id=\"一具体操作步骤\"\u003e一、具体操作步骤\u003c/h2\u003e\n\u003ch3 id=\"1首先开启mongod服务\"\u003e1.首先开启mongod服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emongod --port \u003cspan style=\"color:#ae81ff\"\u003e27017\u003c/span\u003e --dbpath /data/db1\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2连接数据库\"\u003e2.连接数据库\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emongo --port \u003cspan style=\"color:#ae81ff\"\u003e27017\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3创建用户\"\u003e3.创建用户\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003euse admin\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edb.createUser\u003cspan style=\"color:#f92672\"\u003e({\u003c/span\u003euser: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;test\u0026#34;\u003c/span\u003e, pwd: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;123456\u0026#34;\u003c/span\u003e, roles: \u003cspan style=\"color:#f92672\"\u003e[{\u003c/span\u003erole: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;userAdminAnyDatabase\u0026#34;\u003c/span\u003e, db: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;admin\u0026#34;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e}]\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e})\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4关闭mongod服务\"\u003e4.关闭mongod服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003euse admin\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edb.shutdownServer\u003cspan style=\"color:#f92672\"\u003e()\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5这时重新启动mongod服务添加-auth-开启权限认证\"\u003e5.这时重新启动mongod服务，添加 \u0026ndash;auth 开启权限认证。\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emongod --port \u003cspan style=\"color:#ae81ff\"\u003e27017\u003c/span\u003e --dbpath /data/db1 --auth\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e如果是用配置文件启动的，则在配置中添加：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esecurity:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e  authorization: enabled\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"6用户登录数据库\"\u003e6.用户登录数据库\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e方式一 :在连接服务器的同时进行用户认证\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emongo --port \u003cspan style=\"color:#ae81ff\"\u003e27017\u003c/span\u003e -u \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;test\u0026#34;\u003c/span\u003e -p \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;123456\u0026#34;\u003c/span\u003e --authenticationDatabase \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;admin\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e方式二 :先连接服务器,然后在数据库内认证。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emongo --port \u003cspan style=\"color:#ae81ff\"\u003e27017\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003euse admin\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edb.auth\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;test\u0026#34;\u003c/span\u003e,\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;123456\u0026#34;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"7使用dbshutdownserver报错的解决方法\"\u003e7.使用db.shutdownServer()报错的解决方法\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e赋予hostManager权限:\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edb.grantRolesToUser\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;admin\u0026#34;\u003c/span\u003e , \u003cspan style=\"color:#f92672\"\u003e[\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e role: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;hostManager\u0026#34;\u003c/span\u003e, db: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;admin\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e])\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"二配置文件\"\u003e二、配置文件\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e使用配置文件 启动 mongod -f ./mongodb/mongo.conf\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 数据库路径\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edbpath\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e./mongodb/data\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 日志输出文件路径\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elogpath\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e./mongodb/logs/mongo.log\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 错误日志采用追加模式\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elogappend\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003etrue\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 启用日志文件，MongoDB的数据操作将会写入到journal文件夹的文件里\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ejournal\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003etrue\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 安静输出，可以过滤掉一些无用的日志信息\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003equiet\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003etrue\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 启用验证\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eauth\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003etrue\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 守护进程\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efork\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003etrue\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 端口号 默认为27017\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eport\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e27017\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"三角色具体说明\"\u003e三、角色具体说明：\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eRead：允许用户读取指定数据库\u003c/li\u003e\n\u003cli\u003ereadWrite：允许用户读写指定数据库\u003c/li\u003e\n\u003cli\u003edbAdmin：允许用户在指定数据库中执行管理函数，如索引创建、删除，查看统计或访问system.profile\u003c/li\u003e\n\u003cli\u003euserAdmin：允许用户向system.users集合写入，可以找指定数据库里创建、删除和管理用户\u003c/li\u003e\n\u003cli\u003edbOwner：数据库拥有者，包含readWrite、dbAdmin、userAdmin\u003c/li\u003e\n\u003cli\u003eclusterAdmin：只在admin数据库中可用，赋予用户所有分片和复制集相关函数的管理权限\u003c/li\u003e\n\u003cli\u003ereadAnyDatabase：只在admin数据库中可用，赋予用户所有数据库的读权限\u003c/li\u003e\n\u003cli\u003ereadWriteAnyDatabase：只在admin数据库中可用，赋予用户所有数据库的读写权限\u003c/li\u003e\n\u003cli\u003euserAdminAnyDatabase：只在admin数据库中可用，赋予用户所有数据库的userAdmin权限\u003c/li\u003e\n\u003cli\u003edbAdminAnyDatabase：只在admin数据库中可用，赋予用户所有数据库的dbAdmin权限\u003c/li\u003e\n\u003cli\u003eroot：只在admin数据库中可用。超级账号，超级权限\u003c/li\u003e\n\u003c/ul\u003e","title":"MongoDB如何开启权限认证"},{"content":"1.问题 psutil-5.7.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform. 2.查找问题 # 进入python，输入以下代码，查看pip支持的类型 import pip._internal print(pip._internal.pep425tags.get_supported()) # 结果： [(\u0026#39;cp38\u0026#39;, \u0026#39;cp38m\u0026#39;, \u0026#39;win32\u0026#39;), (\u0026#39;cp38\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;win32\u0026#39;), (\u0026#39;py3\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;win32\u0026#39;), (\u0026#39;cp38\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;any\u0026#39;), (\u0026#39;cp3\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;any\u0026#39;), (\u0026#39;py38\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;any\u0026#39;), (\u0026#39;py3\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;any\u0026#39;), (\u0026#39;py37\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;any\u0026#39;), (\u0026#39;py36\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;any\u0026#39;), (\u0026#39;py35\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;any\u0026#39;), (\u0026#39;py34\u0026#39;, \u0026#39;non e\u0026#39;, \u0026#39;any\u0026#39;), (\u0026#39;py33\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;any\u0026#39;), (\u0026#39;py32\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;any\u0026#39;), (\u0026#39;py31\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;any\u0026#39;), (\u0026#39;py30\u0026#39;, \u0026#39;none\u0026#39;, \u0026#39;any\u0026#39;)] 3.解决 修改whl包名为支持的类型，如： psutil-5.7.0-cp38-none-any.whl 4.再次安装 (venv) D:\\project_python\\it\u0026gt;pip install psutil-5.7.0-cp38-none-any.whl Processing d:\\project_python\\it\\psutil-5.7.0-cp38-none-any.whl Installing collected packages: psutil Successfully installed psutil-5.7.0 ","permalink":"/posts/python-an-zhuang-whl-bao-shi-chu-xian-de-wen-ti-jie-jue-isnotasupportedwheelonthisplatform/","summary":"\u003ch3 id=\"1问题\"\u003e1.问题\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epsutil-5.7.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2查找问题\"\u003e2.查找问题\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 进入python，输入以下代码，查看pip支持的类型\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eimport pip._internal\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eprint\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003epip._internal.pep425tags.get_supported\u003cspan style=\"color:#f92672\"\u003e())\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 结果：\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e[(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;cp38\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;cp38m\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;win32\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;cp38\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;win32\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;py3\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;win32\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;cp38\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;any\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;cp3\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;any\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;py38\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;any\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;py3\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;any\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;py37\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;any\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;py36\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;any\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;py35\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;any\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;py34\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;non\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#e6db74\"\u003ee\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;any\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;py33\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;any\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;py32\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;any\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;py31\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;any\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e, \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;py30\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;none\u0026#39;\u003c/span\u003e, \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;any\u0026#39;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3解决\"\u003e3.解决\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e修改whl包名为支持的类型，如：\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epsutil-5.7.0-cp38-none-any.whl\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4再次安装\"\u003e4.再次安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003evenv\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e D:\u003cspan style=\"color:#ae81ff\"\u003e\\p\u003c/span\u003eroject_python\u003cspan style=\"color:#ae81ff\"\u003e\\i\u003c/span\u003et\u0026gt;pip install psutil-5.7.0-cp38-none-any.whl\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eProcessing d:\u003cspan style=\"color:#ae81ff\"\u003e\\p\u003c/span\u003eroject_python\u003cspan style=\"color:#ae81ff\"\u003e\\i\u003c/span\u003et\u003cspan style=\"color:#ae81ff\"\u003e\\p\u003c/span\u003esutil-5.7.0-cp38-none-any.whl\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eInstalling collected packages: psutil\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eSuccessfully installed psutil-5.7.0\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"python安装whl包时出现的问题解决is not a supported wheel on this platform"},{"content":"python项目中必须包含一个 requirements.txt 文件，用于记录所有依赖包及其精确的版本号。以便新环境部署。\n1.在虚拟环境中使用pip生成： pip freeze \u0026gt;requirements.txt 安装或升级包后，最好更新这个文件。\n2.当需要创建这个虚拟环境的完全副本，可以创建一个新的虚拟环境，并在其上运行以下命令： pip install -r requirements.txt ","permalink":"/posts/python--requirementstxt-de-chuang-jian-ji-shi-yong/","summary":"\u003cp\u003epython项目中必须包含一个 requirements.txt 文件，用于记录所有依赖包及其精确的版本号。以便新环境部署。\u003c/p\u003e\n\u003ch2 id=\"1在虚拟环境中使用pip生成\"\u003e1.在虚拟环境中使用pip生成：\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epip freeze \u0026gt;requirements.txt\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e安装或升级包后，最好更新这个文件。\u003c/p\u003e\n\u003ch2 id=\"2当需要创建这个虚拟环境的完全副本可以创建一个新的虚拟环境并在其上运行以下命令\"\u003e2.当需要创建这个虚拟环境的完全副本，可以创建一个新的虚拟环境，并在其上运行以下命令：\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epip install -r requirements.txt\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"python--requirements.txt的创建及使用"},{"content":"1.在/etc/mysql/my.cnf中添加一行： skip-grant-tables 2.重启mysql,进入mysql后： USE mysql UPDATE USER SET password=PASSWORD(\u0026#34;新密码\u0026#34;) WHERE USER=\u0026#39;root\u0026#39;; ","permalink":"/posts/mysql-wang-ji-guan-li-yuan-root-mi-ma-jie-jue/","summary":"\u003ch2 id=\"1在etcmysqlmycnf中添加一行\"\u003e1.在/etc/mysql/my.cnf中添加一行：\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eskip-grant-tables\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"2重启mysql进入mysql后\"\u003e2.重启mysql,进入mysql后：\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eUSE mysql\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eUPDATE USER SET password\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003ePASSWORD\u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;新密码\u0026#34;\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e WHERE USER\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#e6db74\"\u003e\u0026#39;root\u0026#39;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Mysql忘记管理员root密码解决"},{"content":"注册表HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows NT\\Terminal services 在右侧窗口找到MaxlnstanceCount 如果没有新建DWORD值选十进制 设置值为15，表示同时连接15台电脑。 ","permalink":"/posts/windowsserver-tong-shi-yuan-cheng-lian-jie-xian-zhi/","summary":"\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e注册表HKEY_LOCAL_MACHINE\u003cspan style=\"color:#ae81ff\"\u003e\\S\u003c/span\u003eOFTWARE\u003cspan style=\"color:#ae81ff\"\u003e\\P\u003c/span\u003eolicies\u003cspan style=\"color:#ae81ff\"\u003e\\M\u003c/span\u003eicrosoft\u003cspan style=\"color:#ae81ff\"\u003e\\W\u003c/span\u003eindows NT\u003cspan style=\"color:#ae81ff\"\u003e\\T\u003c/span\u003eerminal services\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e在右侧窗口找到MaxlnstanceCount 如果没有新建DWORD值选十进制 设置值为15，表示同时连接15台电脑。\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"windows server同时远程连接限制"},{"content":"1、创建一个指定大小的磁盘镜像文件： dd if=/dev/zero of=/root/disk.img bs=2M count=10 这样就创建了一个大小为20M的磁盘镜像。 2、挂载为设备 losetup /dev/loop0 /root/disk.img 3、格式化设备 mkfs.ext3 /dev/loop0 4、挂载为文件夹 mkdir /test mount -t ext3 /dev/loop0 /test 这样/mnt/disk1这个文件夹只能使用20M的空间。 5、卸载方法：先卸载文件夹 umount /test 6、卸载设备 losetup -d /dev/loop0 7、如果不再使用可以直接删除镜像文件 rm -f /root/disk.img ","permalink":"/posts/linux-xia-ru-he-xian-zhi-dan-ge-wen-jian-jia-da-xiao/","summary":"\u003ch3 id=\"1创建一个指定大小的磁盘镜像文件\"\u003e1、创建一个指定大小的磁盘镜像文件：\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edd \u003cspan style=\"color:#66d9ef\"\u003eif\u003c/span\u003e\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/dev/zero of\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/root/disk.img bs\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e2M count\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e10\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e这样就创建了一个大小为20M的磁盘镜像。\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2挂载为设备\"\u003e2、挂载为设备\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elosetup /dev/loop0 /root/disk.img\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3格式化设备\"\u003e3、格式化设备\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkfs.ext3 /dev/loop0\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4挂载为文件夹\"\u003e4、挂载为文件夹\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkdir /test\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emount -t ext3 /dev/loop0 /test\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e这样/mnt/disk1这个文件夹只能使用20M的空间。\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5卸载方法先卸载文件夹\"\u003e5、卸载方法：先卸载文件夹\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eumount /test\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"6卸载设备\"\u003e6、卸载设备\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elosetup -d /dev/loop0\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"7如果不再使用可以直接删除镜像文件\"\u003e7、如果不再使用可以直接删除镜像文件\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erm -f /root/disk.img\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Linux下如何限制单个文件夹大小"},{"content":"1.重启进入单用户模式 2.看到上面画面，按e，红框中的ro改为：rw init=/sysroot/bin/sh 3.按下 Control+X ，使用单用户模式启动 4.修改/etc/fstab chroot /sysroot vim /etc/fstab 5.exit,重启即可 ","permalink":"/posts/centos7-xia-fstab-pan-fu-gua-zai-ying-pan-dao-zhi-zhong-qi-xi-tong-shi-bai-jie-jue-ban-fa/","summary":"\u003ch3 id=\"1重启进入单用户模式\"\u003e1.重启进入单用户模式\u003c/h3\u003e\n\u003cp\u003e\u003cimg alt=\"1324516833\" loading=\"lazy\" src=\"/upload/2023/01/1324516833.png\"\u003e\u003c/p\u003e\n\u003ch3 id=\"2看到上面画面按e红框中的ro改为rw-initsysrootbinsh\"\u003e2.看到上面画面，按e，红框中的ro改为：rw init=/sysroot/bin/sh\u003c/h3\u003e\n\u003cp\u003e\u003cimg alt=\"3354995907\" loading=\"lazy\" src=\"/upload/2023/01/3354995907.png\"\u003e\u003c/p\u003e\n\u003ch3 id=\"3按下-controlx-使用单用户模式启动\"\u003e3.按下 Control+X ，使用单用户模式启动\u003c/h3\u003e\n\u003ch3 id=\"4修改etcfstab\"\u003e4.修改/etc/fstab\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echroot /sysroot\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/fstab\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e\u003cimg alt=\"3354995907\" loading=\"lazy\" src=\"/upload/2023/01/3354995907.png\"\u003e\u003c/p\u003e\n\u003ch3 id=\"5exit重启即可\"\u003e5.exit,重启即可\u003c/h3\u003e","title":"Centos7下fstab盘符挂载硬盘导致重启系统失败解决办法"},{"content":"1.安装WANDisco仓库 yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm 2.git安装 yum -y install git git version ","permalink":"/posts/centos7-xi-tong-yum-an-zhuang-gao-ban-ben-git-fang-fa/","summary":"\u003ch3 id=\"1安装wandisco仓库\"\u003e1.安装WANDisco仓库\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2git安装\"\u003e2.git安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum -y install git\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egit version\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7系统yum安装高版本git方法"},{"content":"1.Linux查看端口占用情况 lsof -i:端口号 netstat -tunlp|grep 端口号 2.Linux内存条查看命令 dmidecode | grep -A16 \u0026#34;Memory Device$\u0026#34; 3.Linux硬盘UUID查询命令 ls -l /dev/disk/by-uuid blkid /dev/sdb1 4.Yum安装pip工具 yum -y install epel-release yum -y install python-pip 4.Linux中cannot change locale (en_US.UTF8)解决方法 sudo localedef -i en_US -f UTF-8 en_US.UTF-8 ","permalink":"/posts/linux-chang-yong-ming-ling/","summary":"1.Linux查看端口占用情况lsof -i:端口号netstat -tunlp|grep 端口号2.Linux内存条查看命令dmidecode | grep -A16 \u0026quot;Memory Device$\u0026quot;3.Linux硬盘UUID查询命令ls -l /dev/disk/by-uui","title":"Linux常用命令"},{"content":"1.ubuntu查看软件包版本号的方法 apt-get install apt-show-versions # 查看vsftpd版本号 apt-show-versions -p vsftpd 2.搜索软件 apt-cache search package_name # 使用正则表达式 sudo apt-cache search sof* 这样就可以搜索到源上面所有以sof开头的软件包 3.查看软件包信息 apt-cache show package_name 4.卸载一个软件包 # 保留配置 apt-get remove package_name # 不保留配置 apt-get -purge remove package_name # 删除软件包备份 apt-get clean 5.添加和删除源 添加源 add-apt-repository ppa:user/ppa-name # 添加源需要更新一下 apt-get update 删除源 add-apt-repository -r ppa:user/ppa-name 6.只下载不安装软件 apt-get install --download-only 包名 cd /var/cache/apt/archives #存放目录 7.安装软件同时安装依赖 sudo apt-get install aptitude sudo aptitude install xxxxx=version #第一个选项选no，第二个选项选yes 8.ubuntu出现The following packages have been kept back 的解决方法 apt-get -u dist-upgrade 统一更新到发布的版本。这条命令会强制更新软件包到最新版本，并自动解决缺少的依赖包。\n","permalink":"/posts/ubuntu-xi-tong-apt-xiang-guan-ming-ling-chang-yong-shuo-ming/","summary":"1.ubuntu查看软件包版本号的方法apt-get install apt-show-versions# 查看vsftpd版本号apt-show-versions -p vsftpd2.搜索软件apt-cache  search  package_name# 使用正则表达式 sudo apt-ca","title":"Ubuntu系统apt相关命令常用说明"},{"content":"1.安装network-manager相关的openVPN包： sudo apt-get install network-manager-openvpn network-manager-openvpn-gnome 2. 点击右上角的网络设置中的“配置VPN”： 3.直接导入ovpn后缀的文件 4.在网络设置中开启vpn即可 ","permalink":"/posts/ubuntu-zhuo-mian-ban-an-zhuang-openvpn-ke-hu-duan/","summary":"\u003ch3 id=\"1安装network-manager相关的openvpn包\"\u003e1.安装network-manager相关的openVPN包：\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt-get install network-manager-openvpn network-manager-openvpn-gnome\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2-点击右上角的网络设置中的配置vpn\"\u003e2. 点击右上角的网络设置中的“配置VPN”：\u003c/h3\u003e\n\u003cp\u003e\u003cimg alt=\"1104289487\" loading=\"lazy\" src=\"/upload/2023/01/1104289487.png\"\u003e\u003c/p\u003e\n\u003ch3 id=\"3直接导入ovpn后缀的文件\"\u003e3.直接导入ovpn后缀的文件\u003c/h3\u003e\n\u003cp\u003e\u003cimg alt=\"1654980079\" loading=\"lazy\" src=\"/upload/2023/01/1654980079.png\"\u003e\u003c/p\u003e\n\u003ch3 id=\"4在网络设置中开启vpn即可\"\u003e4.在网络设置中开启vpn即可\u003c/h3\u003e","title":"Ubuntu桌面版安装openvpn客户端"},{"content":"一、目的 将两块空硬盘合并为“一块”，挂载到指定目录下，达到在一个目录使用2块硬盘所有空间的效果。 二、硬盘编号 硬盘1：/dev/vdb 硬盘2：/dev/vdc 三、创建pv pvcreate /dev/vdb //硬盘1 pvcreate /dev/vdc //硬盘2 四、创建Volume group # vgcreate [自定义LVM名称] [设备] # 先使用硬盘1创建vg:LVM vgcreate LVM /dev/vdb 查看Volume group vgdisplay 五、扩展Volume group # vgextend [自定义vg名称] [设备] # 使用硬盘2扩展vg vgextend LVM /dev/vdc 六、创建Logical volume分区 # lvcreate -L[自定义分区大小] -n[自定义分区名称] [vg名称] # 分区大小不能超过硬盘容量总和 lvcreate -L5.8T -nDATA LVM 查看Logical volume lvdisplay 七、格式化分区 # mkfs -t [文件系统] [分区位置] mkfs.xfs /dev/LVM/DATA 八、挂载分区 1.挂载 # mount [分区位置] [目录地址] mount /dev/LVM/DATA /data/ 2.开机自动挂载 /dev/LVM/DATA /data xfs defaults 1 2 九、在线扩展lvm分区，原数据不丢失扩容 1.新加硬盘为：/dev/vdd 2.创建pv pvcreate /dev/vdd 3.扩展到Volume group vgextend LVM /dev/vdd 4.扩展到Logical volume lvextend -L +2.98T /dev/LVM/DATA 5.同步系统磁盘信息 xfs_growfs /dev/LVM/DATA 十、删除lvm逻辑卷 1.取消挂载 umount /dev/LVM/DATA 2.取消逻辑卷 lvremove /dev/LVM/DB_DATA 3.取消卷组 vgremove LVM 4.取消物理卷 pvremove /dev/vd{b,c,d} ","permalink":"/posts/linux-xia-lvm-shi-yong-fang-fa--ying-pan-he-bing-kuo-rong/","summary":"\u003ch3 id=\"一目的\"\u003e一、目的\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e将两块空硬盘合并为“一块”，挂载到指定目录下，达到在一个目录使用2块硬盘所有空间的效果。\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"二硬盘编号\"\u003e二、硬盘编号\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e硬盘1：/dev/vdb\u003c/li\u003e\n\u003cli\u003e硬盘2：/dev/vdc\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"三创建pv\"\u003e三、创建pv\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epvcreate /dev/vdb   //硬盘1\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epvcreate /dev/vdc   //硬盘2\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"四创建volume-group\"\u003e四、创建Volume group\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# vgcreate [自定义LVM名称] [设备]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 先使用硬盘1创建vg:LVM\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evgcreate LVM /dev/vdb\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e查看Volume group\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evgdisplay\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e\u003cimg alt=\"2738050120\" loading=\"lazy\" src=\"/upload/2023/01/2738050120.png\"\u003e\u003c/p\u003e\n\u003ch3 id=\"五扩展volume-group\"\u003e五、扩展Volume group\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# vgextend [自定义vg名称] [设备]   \u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 使用硬盘2扩展vg\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evgextend LVM /dev/vdc\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"六创建logical-volume分区\"\u003e六、创建Logical volume分区\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# lvcreate -L[自定义分区大小] -n[自定义分区名称] [vg名称]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 分区大小不能超过硬盘容量总和\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elvcreate -L5.8T -nDATA LVM\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e查看Logical volume\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elvdisplay\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e\u003cimg alt=\"2402802650\" loading=\"lazy\" src=\"/upload/2023/01/2402802650.png\"\u003e\u003c/p\u003e\n\u003ch3 id=\"七格式化分区\"\u003e七、格式化分区\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# mkfs -t [文件系统] [分区位置]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emkfs.xfs /dev/LVM/DATA\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"八挂载分区\"\u003e八、挂载分区\u003c/h3\u003e\n\u003ch4 id=\"1挂载\"\u003e1.挂载\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# mount [分区位置] [目录地址]\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emount /dev/LVM/DATA /data/\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch4 id=\"2开机自动挂载\"\u003e2.开机自动挂载\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e/dev/LVM/DATA /data xfs defaults \u003cspan style=\"color:#ae81ff\"\u003e1\u003c/span\u003e \u003cspan style=\"color:#ae81ff\"\u003e2\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"九在线扩展lvm分区原数据不丢失扩容\"\u003e九、在线扩展lvm分区，原数据不丢失扩容\u003c/h3\u003e\n\u003ch4 id=\"1新加硬盘为devvdd\"\u003e1.新加硬盘为：/dev/vdd\u003c/h4\u003e\n\u003ch4 id=\"2创建pv\"\u003e2.创建pv\u003c/h4\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epvcreate /dev/vdd\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e3.扩展到Volume group\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evgextend LVM /dev/vdd\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e4.扩展到Logical volume\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elvextend -L +2.98T /dev/LVM/DATA\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e5.同步系统磁盘信息\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003exfs_growfs /dev/LVM/DATA\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"十删除lvm逻辑卷\"\u003e十、删除lvm逻辑卷\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e1.取消挂载\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eumount /dev/LVM/DATA\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e2.取消逻辑卷\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elvremove /dev/LVM/DB_DATA\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e3.取消卷组\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evgremove LVM\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e4.取消物理卷\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epvremove /dev/vd\u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003eb,c,d\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Linux下LVM使用方法（硬盘合并扩容）"},{"content":"1.安装java8 apt install openjdk-8-jdk-headless 2.版本切换 update-alternatives --config java 输入以上命令后会列出当前已安装的所有java版本，选择对应版本前的代号如1，2，3等，再回车即可切换至对应版本 ","permalink":"/posts/ubuntu1804-an-zhuang-java8-ji-java-ban-ben-qie-huan/","summary":"\u003ch3 id=\"1安装java8\"\u003e1.安装java8\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eapt install openjdk-8-jdk-headless\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2版本切换\"\u003e2.版本切换\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eupdate-alternatives --config java\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e输入以上命令后会列出当前已安装的所有java版本，选择对应版本前的代号如1，2，3等，再回车即可切换至对应版本\u003c/li\u003e\n\u003c/ul\u003e","title":"Ubuntu18.04安装java8及java版本切换"},{"content":"本次测试环境为CentOS7.9，教程中有其他系统的安装方法。 1.安装pip # RHEL/CentOS5-6-7使用yum安装Python-pip yum -y install python-pip # RHEL8/CentOS8使用dnf安装Python-pip dnf -y install python-pip # Ubuntu/Debian使用apt安装Python-pip apt -y install python-pip 2.更新pip pip install --upgrade pip 3.安装tcping pip install tcping -i https://mirrors.aliyun.com/pypi/simple 4.简单介绍 tcping -d -h -u -n 10 -i 0.1 -w 0.1 andyx.net 80 # 以上命令参数解释为： #使用http模式（-h） #在返回数据中显示目标源url地址（-u） #向主机名为andyx.net的80端口发送10次数据包（-n 10） #在返回数据行中显示发送数据包的日期（-d） #指定每次发送数据包的时间间隔为0.1秒（-i 0.1） #等待数据包相应的时间间隔为0.1秒（-w 0.1） 5.测试结果 ","permalink":"/posts/linux-xia-an-zhuang-tcping-ce-shi-duan-kou-lian-tong-xing-yu-yan-chi/","summary":"\u003ch3 id=\"本次测试环境为centos79教程中有其他系统的安装方法\"\u003e本次测试环境为CentOS7.9，教程中有其他系统的安装方法。\u003c/h3\u003e\n\u003ch3 id=\"1安装pip\"\u003e1.安装pip\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# RHEL/CentOS5-6-7使用yum安装Python-pip\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum -y install python-pip\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# RHEL8/CentOS8使用dnf安装Python-pip \u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ednf -y install python-pip\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# Ubuntu/Debian使用apt安装Python-pip\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eapt -y install python-pip\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2更新pip\"\u003e2.更新pip\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epip install --upgrade pip\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3安装tcping\"\u003e3.安装tcping\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epip install tcping -i https://mirrors.aliyun.com/pypi/simple\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4简单介绍\"\u003e4.简单介绍\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etcping -d -h -u -n \u003cspan style=\"color:#ae81ff\"\u003e10\u003c/span\u003e -i 0.1 -w 0.1 andyx.net \u003cspan style=\"color:#ae81ff\"\u003e80\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 以上命令参数解释为：\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#使用http模式（-h）\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#在返回数据中显示目标源url地址（-u）\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#向主机名为andyx.net的80端口发送10次数据包（-n 10）\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#在返回数据行中显示发送数据包的日期（-d）\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#指定每次发送数据包的时间间隔为0.1秒（-i 0.1）\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#等待数据包相应的时间间隔为0.1秒（-w 0.1）\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5测试结果\"\u003e5.测试结果\u003c/h3\u003e\n\u003cp\u003e\u003cimg alt=\"3414738272\" loading=\"lazy\" src=\"/upload/2023/01/3414738272.png\"\u003e\u003c/p\u003e","title":"Linux下安装tcping测试端口连通性与延迟"},{"content":"官方链接 1.首先将 Jitsi 存储库密钥安装到您的系统上 curl https://download.jitsi.org/jitsi-key.gpg.key | sudo sh -c \u0026#39;gpg --dearmor \u0026gt; /usr/share/keyrings/jitsi-keyring.gpg\u0026#39; 2.使用存储库创建一个 sources.list.d 文件 echo \u0026#39;deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/\u0026#39; | sudo tee /etc/apt/sources.list.d/jitsi-stable.list \u0026gt; /dev/null 3.更新包服务 sudo apt-get -y update 4.手动安装组件(根据需求版本安装) sudo apt install -y jitsi-videobridge2=2.1-416-g2f43d1b4-1 sudo apt install jicofo=1.0-692-hf-1 -y sudo apt install jitsi-meet-web=1.0.4628-1 -y sudo apt install jitsi-meet-web-config=1.0.4628-1 -y sudo apt install -y jitsi-meet-prosody=1.0.4628-1 sudo apt install jitsi-meet-turnserver=1.0.4628-1 -y sudo apt install jitsi-meet=2.0.5390-3 -y ","permalink":"/posts/ubuntu-an-zhuang-jitsi-meet-te-ding-ban-ben/","summary":"\u003ch3 id=\"官方链接\"\u003e\u003ca href=\"https://jitsi.org/downloads/ubuntu-debian-installations-instructions/\"\u003e官方链接\u003c/a\u003e\u003c/h3\u003e\n\u003ch3 id=\"1首先将-jitsi-存储库密钥安装到您的系统上\"\u003e1.首先将 Jitsi 存储库密钥安装到您的系统上\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecurl https://download.jitsi.org/jitsi-key.gpg.key | sudo sh -c \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;gpg --dearmor \u0026gt; /usr/share/keyrings/jitsi-keyring.gpg\u0026#39;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2使用存储库创建一个-sourceslistd-文件\"\u003e2.使用存储库创建一个 sources.list.d 文件\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eecho \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/\u0026#39;\u003c/span\u003e | sudo tee /etc/apt/sources.list.d/jitsi-stable.list \u0026gt; /dev/null\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3更新包服务\"\u003e3.更新包服务\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt-get -y update\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4手动安装组件根据需求版本安装\"\u003e4.手动安装组件(根据需求版本安装)\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt install -y jitsi-videobridge2\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e2.1-416-g2f43d1b4-1\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt install jicofo\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e1.0-692-hf-1 -y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt install jitsi-meet-web\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e1.0.4628-1 -y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt install jitsi-meet-web-config\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e1.0.4628-1 -y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt install -y jitsi-meet-prosody\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e1.0.4628-1\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt install jitsi-meet-turnserver\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e1.0.4628-1 -y\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt install jitsi-meet\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e2.0.5390-3 -y\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"ubuntu安装jitsi-meet特定版本"},{"content":"一、视频合并 1. 方法一 速度快 先将 mp4 转化为同样编码形式的 ts 流，因为 ts流是可以 concate 的，先把 mp4 封装成 ts ，然后 concate ts 流， 最后再把 ts 流转化为 mp4。\nffmpeg -i 1.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb 1.ts ffmpeg -i 2.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb 2.ts ffmpeg -i \u0026#34;concat:1.ts|2.ts\u0026#34; -acodec copy -vcodec copy -absf aac_adtstoasc output.mp4 二、视频水印 1. 图片水印 ./ffmpeg -y -i 1.mp4 -i logo.png -filter_complex \u0026#34;[1]lut=a=val*0.3[a];[0][a]overlay=0:0\u0026#34; -c:v libx264 -an output.mp4 2. 文字水印 ./ffmpeg -i 1.mp4 -vf \u0026#34;drawtext=fontfile=simhei.ttf: text=技术是第一生产力:x=10:y=10:fontsize=24:fontcolor=white:shadowy=2\u0026#34; output.mp4 ","permalink":"/posts/ffmpeg-shi-yong-jiao-cheng/","summary":"\u003ch2 id=\"一视频合并\"\u003e一、视频合并\u003c/h2\u003e\n\u003ch3 id=\"1-方法一-速度快\"\u003e1. 方法一 速度快\u003c/h3\u003e\n\u003cp\u003e先将 mp4 转化为同样编码形式的 ts 流，因为 ts流是可以 concate 的，先把 mp4 封装成 ts ，然后 concate ts 流， 最后再把 ts 流转化为 mp4。\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003effmpeg -i 1.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb 1.ts\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003effmpeg -i 2.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb 2.ts\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003effmpeg -i \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;concat:1.ts|2.ts\u0026#34;\u003c/span\u003e -acodec copy -vcodec copy -absf aac_adtstoasc output.mp4\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"二视频水印\"\u003e二、视频水印\u003c/h2\u003e\n\u003ch3 id=\"1-图片水印\"\u003e1. 图片水印\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e./ffmpeg -y -i 1.mp4 -i logo.png -filter_complex \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;[1]lut=a=val*0.3[a];[0][a]overlay=0:0\u0026#34;\u003c/span\u003e -c:v libx264 -an output.mp4\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2-文字水印\"\u003e2. 文字水印\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e./ffmpeg -i 1.mp4 -vf \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;drawtext=fontfile=simhei.ttf: text=技术是第一生产力:x=10:y=10:fontsize=24:fontcolor=white:shadowy=2\u0026#34;\u003c/span\u003e output.mp4\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"FFmpeg使用教程"},{"content":"1. 介绍 将使用 CentOS 7 上的 BIND 9 配置主用（主）和辅助（备）DNS服务器。本文只介绍如何搭建主/从 DNS 服务器系统\n2. 环境配置 2.1 主用DNS服务器 主机名：dns1.joinmedia.net IP地址：172.21.110.254 2.2 备用DNS服务器 主机名：dns2.joinmedia.net IP地址：172.21.110.253 3. BIND服务安装 yum install -y bind bind-utils 4. 主用 DNS 服务器的配置 BIND 的配置文件为”/etc/named.conf”，将其中如下内容进行修改： listen-on port 53 { any;}; allow-query { 0.0.0.0/0;}; 为了让配置文件保持整洁，我们新建一个本地解析文件”named.conf.local”，当然我们也可以修改”/etc/named.rfc1912.zones”文件来增加解析区域，因为这个文件是默认生效的，不过还是建议新建一个文件，这样看起来要清爽一些。将如下内容添加到”named.conf.local”文件中： touch /etc/named.conf.local zone \u0026#34;joinmedia.net\u0026#34; { type master; masterfile-format text; file \u0026#34;/var/named/joinmedia.net\u0026#34;; allow-transfer {172.21.110.253; }; also-notify {172.21.110.253; }; }; zone \u0026#34;southbaytech.co\u0026#34; { type master; masterfile-format text; file \u0026#34;/var/named/southbaytech.co\u0026#34;; allow-transfer {172.21.110.253; }; also-notify {172.21.110.253; }; }; zone \u0026#34;110.21.172.in-addr.arpa\u0026#34; { type master; masterfile-format text; file \u0026#34;/var/named/110.21.172.in-addr.arpa\u0026#34;; allow-transfer {172.21.110.253; }; also-notify {172.21.110.253; }; }; zone \u0026#34;100.21.172.in-addr.arpa\u0026#34; { type master; masterfile-format text; file \u0026#34;/var/named/100.21.172.in-addr.arpa\u0026#34;; allow-transfer {172.21.110.253; }; also-notify {172.21.110.253; }; }; 以上我们定义了4个DNS区域，2个域名正向解析，2个网段的反向解析。然后把文件写入到主配置。 echo \u0026#39;include \u0026#34;/etc/named.conf.local\u0026#34;;\u0026#39; \u0026gt;\u0026gt; /etc/named.conf 分别添加4个区域的文件： touch /var/named/joinmedia.net touch /var/named/southbaytech.co touch /var/named/110.21.172.in-addr.arpa touch /var/named/100.21.172.in-addr.arpa 以/var/named/joinmedia.net为例： $TTL 1h @ IN SOA joinmedia.net. root.joinmedia.net. ( 2021041303 ; Serial YYYYMMDDnn 24h ; Refresh 2h ; Retry 28d ; Expire 10m ) ; Minimum TTL ;Name Servers @ IN NS dns1 @ IN NS dns2 dns1 IN A 172.21.110.254 dns2 IN A 172.21.110.253 conference IN A 192.168.0.142 www IN A 192.168.0.219 ;outside jiawo IN A 115.239.233.26 以100.21.172.in-addr.arpa为例： $TTL 1h @ IN SOA 100.21.172.in-addr.arpa root.joinmedia.net. ( 2021041219 ; Serial YYYYMMDDnn 24h ; Refresh 1h ; Retry 28d ; Expire 10m ) ; Minimum TTL @ IN NS dns1 @ IN NS dns2 dns1 IN A 172.21.110.254 dns2 IN A 172.21.110.253 ;PTR Records 8 IN PTR mail.southbaytech.co 10 IN PTR ftp.southbaytech.co 修改区域文件的拥有者 chown named:named /var/named/joinmedia.net chown named:named /var/named/southbaytech.co chown named:named /var/named/110.21.172.in-addr.arpa chown named:named /var/named/100.21.172.in-addr.arpa 5. 备用 DNS 服务器的配置 BIND 的配置文件为”/etc/named.conf”，将其中如下内容进行修改： listen-on port 53 { any;}; allow-query { 0.0.0.0/0;}; 同样新建一个本地解析文件”named.conf.local”，添加以下内容 zone \u0026#34;joinmedia.net\u0026#34; { type slave; masters {172.21.110.254;}; masterfile-format text; file \u0026#34;/var/named/joinmedia.net\u0026#34;; }; zone \u0026#34;southbaytech.co\u0026#34; { type slave; masters {172.21.110.254;}; masterfile-format text; file \u0026#34;/var/named/southbaytech.co\u0026#34;; }; zone \u0026#34;110.21.172.in-addr.arpa\u0026#34; { type slave; masters {172.21.110.254;}; masterfile-format text; file \u0026#34;/var/named/110.21.172.in-addr.arpa\u0026#34;; }; zone \u0026#34;100.21.172.in-addr.arpa\u0026#34; { type slave; masters {172.21.110.254;}; masterfile-format text; file \u0026#34;/var/named/100.21.172.in-addr.arpa\u0026#34;; }; 6. 启动主备DNS服务器 systemctl enable --now named.service ","permalink":"/posts/centos7-xia-dns-fu-wu-qi-da-jian--bao-han-zhu-bei-tong-bu/","summary":"\u003ch3 id=\"1-介绍\"\u003e1. 介绍\u003c/h3\u003e\n\u003cblockquote\u003e\n\u003cp\u003e将使用 CentOS 7 上的 BIND 9 配置主用（主）和辅助（备）DNS服务器。本文只介绍如何搭建主/从 DNS 服务器系统\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003ch3 id=\"2-环境配置\"\u003e2. 环境配置\u003c/h3\u003e\n\u003ch4 id=\"21-主用dns服务器\"\u003e2.1 主用DNS服务器\u003c/h4\u003e\n\u003cul\u003e\n\u003cli\u003e主机名：dns1.joinmedia.net\u003c/li\u003e\n\u003cli\u003eIP地址：172.21.110.254\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch4 id=\"22-备用dns服务器\"\u003e2.2 备用DNS服务器\u003c/h4\u003e\n\u003cul\u003e\n\u003cli\u003e主机名：dns2.joinmedia.net\u003c/li\u003e\n\u003cli\u003eIP地址：172.21.110.253\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"3-bind服务安装\"\u003e3. BIND服务安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install -y bind bind-utils\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4-主用-dns-服务器的配置\"\u003e4. 主用 DNS 服务器的配置\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eBIND 的配置文件为”/etc/named.conf”，将其中如下内容进行修改：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elisten-on port \u003cspan style=\"color:#ae81ff\"\u003e53\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e any;\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eallow-query     \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e 0.0.0.0/0;\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e为了让配置文件保持整洁，我们新建一个本地解析文件”named.conf.local”，当然我们也可以修改”/etc/named.rfc1912.zones”文件来增加解析区域，因为这个文件是默认生效的，不过还是建议新建一个文件，这样看起来要清爽一些。将如下内容添加到”named.conf.local”文件中：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etouch /etc/named.conf.local\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ezone \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;joinmedia.net\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    type master;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    masterfile-format  text;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    file \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;/var/named/joinmedia.net\u0026#34;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    allow-transfer \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e172.21.110.253; \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    also-notify \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e172.21.110.253; \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ezone \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;southbaytech.co\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    type master;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    masterfile-format  text;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    file \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;/var/named/southbaytech.co\u0026#34;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    allow-transfer \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e172.21.110.253; \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    also-notify \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e172.21.110.253; \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ezone \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;110.21.172.in-addr.arpa\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    type master;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    masterfile-format  text;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    file \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;/var/named/110.21.172.in-addr.arpa\u0026#34;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    allow-transfer \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e172.21.110.253; \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    also-notify \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e172.21.110.253; \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ezone \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;100.21.172.in-addr.arpa\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    type master;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    masterfile-format  text;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    file \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;/var/named/100.21.172.in-addr.arpa\u0026#34;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    allow-transfer \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e172.21.110.253; \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    also-notify \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e172.21.110.253; \u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e以上我们定义了4个DNS区域，2个域名正向解析，2个网段的反向解析。然后把文件写入到主配置。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eecho \u003cspan style=\"color:#e6db74\"\u003e\u0026#39;include \u0026#34;/etc/named.conf.local\u0026#34;;\u0026#39;\u003c/span\u003e \u0026gt;\u0026gt; /etc/named.conf\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e分别添加4个区域的文件：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etouch /var/named/joinmedia.net\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etouch /var/named/southbaytech.co\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etouch /var/named/110.21.172.in-addr.arpa\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etouch /var/named/100.21.172.in-addr.arpa\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e以/var/named/joinmedia.net为例：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e$TTL 1h\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e@       IN      SOA     joinmedia.net.    root.joinmedia.net. \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#ae81ff\"\u003e2021041303\u003c/span\u003e      ; Serial YYYYMMDDnn\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        24h             ; Refresh\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        2h              ; Retry\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        28d             ; Expire\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        10m \u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e            ; Minimum TTL\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e;Name Servers\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e@           IN  NS dns1\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e@           IN  NS dns2\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edns1        IN  A  172.21.110.254\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edns2        IN  A  172.21.110.253\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003econference  IN  A  192.168.0.142  \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ewww         IN  A  192.168.0.219\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e;outside\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ejiawo       IN  A  115.239.233.26\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e以100.21.172.in-addr.arpa为例：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e$TTL 1h\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e@       IN      SOA     100.21.172.in-addr.arpa    root.joinmedia.net. \u003cspan style=\"color:#f92672\"\u003e(\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        \u003cspan style=\"color:#ae81ff\"\u003e2021041219\u003c/span\u003e      ; Serial YYYYMMDDnn\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        24h             ; Refresh\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        1h              ; Retry\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        28d             ; Expire\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        10m \u003cspan style=\"color:#f92672\"\u003e)\u003c/span\u003e            ; Minimum TTL\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e@       IN      NS              dns1\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e@       IN      NS              dns2\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edns1    IN      A               172.21.110.254\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edns2    IN      A               172.21.110.253\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e;PTR Records\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#ae81ff\"\u003e8\u003c/span\u003e   IN  PTR  mail.southbaytech.co\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#ae81ff\"\u003e10\u003c/span\u003e  IN  PTR  ftp.southbaytech.co\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e修改区域文件的拥有者\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown named:named /var/named/joinmedia.net\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown named:named /var/named/southbaytech.co\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown named:named /var/named/110.21.172.in-addr.arpa\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown named:named /var/named/100.21.172.in-addr.arpa\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"5-备用-dns-服务器的配置\"\u003e5. 备用 DNS 服务器的配置\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eBIND 的配置文件为”/etc/named.conf”，将其中如下内容进行修改：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elisten-on port \u003cspan style=\"color:#ae81ff\"\u003e53\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e any;\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eallow-query     \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e 0.0.0.0/0;\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cul\u003e\n\u003cli\u003e同样新建一个本地解析文件”named.conf.local”，添加以下内容\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ezone \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;joinmedia.net\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    type slave;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    masters \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e172.21.110.254;\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    masterfile-format  text;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    file \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;/var/named/joinmedia.net\u0026#34;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ezone \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;southbaytech.co\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    type slave;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    masters \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e172.21.110.254;\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    masterfile-format  text;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    file \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;/var/named/southbaytech.co\u0026#34;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ezone \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;110.21.172.in-addr.arpa\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    type slave;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    masters \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e172.21.110.254;\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    masterfile-format  text;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    file \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;/var/named/110.21.172.in-addr.arpa\u0026#34;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ezone \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;100.21.172.in-addr.arpa\u0026#34;\u003c/span\u003e \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    type slave;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    masters \u003cspan style=\"color:#f92672\"\u003e{\u003c/span\u003e172.21.110.254;\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    masterfile-format  text;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    file \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;/var/named/100.21.172.in-addr.arpa\u0026#34;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003e}\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"6-启动主备dns服务器\"\u003e6. 启动主备DNS服务器\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable --now named.service\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下DNS服务器搭建（包含主备同步）"},{"content":"1. 源码安装 groupadd --system zabbix useradd --system -g zabbix -d /usr/lib/zabbix -s /sbin/nologin -c \u0026#34;Zabbix Monitoring System\u0026#34; zabbix cd /opt/zabbix tar -zvxf zabbix_agent-5.0.1-linux-3.0-amd64-static.tar.gz cp /opt/zabbix/zabbix_agentd.conf /opt/zabbix/conf/ ln -s /opt/zabbix/sbin/zabbix_agentd /usr/sbin/ ln -s /opt/zabbix//bin/zabbix_* /usr/bin/ /opt/zabbix/sbin/zabbix_agentd -c /opt/zabbix/conf/zabbix_agentd.conf 2. RPM安装 rpm包下载地址：http://repo.zabbix.com/zabbix/5.0/rhel/ rpm -ivhF zabbix-agent-5.0.1-1.el7.x86_64.rpm cp zabbix_agentd.conf /etc/zabbix/ systemctl start zabbix-agent systemctl enable zabbix-agent 3. Deb安装 deb包下载地址：http://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix/ dpkg -i zabbix-agent_5.0.1-1+bionic_amd64.deb cp zabbix_agentd.conf /etc/zabbix/ systemctl start zabbix-agent systemctl enable zabbix-agent firewall-cmd --zone=public --add-port=10050/tcp --permanent firewall-cmd --zone=public --add-port=10050/tcp ","permalink":"/posts/zabbixagent-ge-lei-an-zhuang-fang-fa/","summary":"\u003ch3 id=\"1-源码安装\"\u003e1. 源码安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003egroupadd --system zabbix\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003euseradd --system -g zabbix -d /usr/lib/zabbix -s /sbin/nologin -c \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;Zabbix Monitoring System\u0026#34;\u003c/span\u003e zabbix\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd /opt/zabbix\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etar -zvxf zabbix_agent-5.0.1-linux-3.0-amd64-static.tar.gz\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecp /opt/zabbix/zabbix_agentd.conf /opt/zabbix/conf/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eln -s /opt/zabbix/sbin/zabbix_agentd /usr/sbin/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eln -s /opt/zabbix//bin/zabbix_* /usr/bin/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e/opt/zabbix/sbin/zabbix_agentd -c /opt/zabbix/conf/zabbix_agentd.conf\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2-rpm安装\"\u003e2. RPM安装\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003erpm包下载地址：http://repo.zabbix.com/zabbix/5.0/rhel/\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erpm -ivhF zabbix-agent-5.0.1-1.el7.x86_64.rpm\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecp zabbix_agentd.conf /etc/zabbix/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl start zabbix-agent\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable zabbix-agent\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3-deb安装\"\u003e3. Deb安装\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003edeb包下载地址：http://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix/\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003edpkg -i zabbix-agent_5.0.1-1+bionic_amd64.deb\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecp zabbix_agentd.conf /etc/zabbix/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl start zabbix-agent\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl enable zabbix-agent\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --zone\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003epublic --add-port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e10050/tcp --permanent\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003efirewall-cmd --zone\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003epublic --add-port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e10050/tcp\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"zabbix_agent各类安装方法"},{"content":"介绍 TURN server 可以解决点对点通信里的 NAT 穿透，并提供中继（relay） 的服务。coturn 是一个开源的 TURN 和 STUN 服务器，是基于 rfc5766-turn-server 进化过来的，目前比较成熟。之所以安装 coturn 是借助它提供的 TURN 服务，解决 WebRTC P2P 通信中 STUN 服务器解决不了的复杂内网的问题。比如我尝试过移动4G 和 联通 WIFI 有时候无法通过 STUN 服务穿越内网连接，通过 TURN 服务的中继就可以解决这个问题。下面我们就来介绍一下 coturn 的安装，配置以及测试的过程。\n参考网址 https://joey.blue/2018/12/10/webrtc-coturn/ https://www.jianshu.com/p/7e9d0af05396\n1.更新安装源 sudo apt-get -y update 2.安装coturn sudo apt-get -y install coturn 3.编辑配置文件 vim /etc/turnserver.conf # 网卡名 relay-device=eth0 #内网IP listening-ip=172.16.0.5 listening-port=3478 #内网IP relay-ip=172.16.0.5 tls-listening-port=5349 # 外网IP external-ip=134.xxx.xxx.xxx relay-threads=500 #打开密码验证 lt-cred-mech cert=/etc/turn_server_cert.pem pkey=/etc/turn_server_pkey.pem min-port=40000 max-port=65535 #设置用户名和密码，创建IceServer时使用 user=admin:123456 # 外网IP绑定的域名 realm=xxxx.cn # 服务器名称，用于OAuth认证，默认和realm相同，部分浏览器本段不设可能会引发cors错误。 server-name=xxxx.cn # 认证密码，和前面设置的密码保持一致 cli-password=123456 4.重启服务 systemctl status coturn 5.查看服务状态和端口 systemctl status coturn 6.测试 测试网站点击这里\nComponent type 中有出现srfix 就说明 STUN server 是正常运行的，有relay 表示 TURN 服务器是正常运行的。\n","permalink":"/posts/ubuntu2004-an-zhuang-coturn/","summary":"\u003ch1 id=\"介绍\"\u003e介绍\u003c/h1\u003e\n\u003cblockquote\u003e\n\u003cp\u003eTURN server 可以解决点对点通信里的 NAT 穿透，并提供中继（relay） 的服务。coturn 是一个开源的 TURN 和 STUN 服务器，是基于 rfc5766-turn-server 进化过来的，目前比较成熟。之所以安装 coturn 是借助它提供的 TURN 服务，解决 WebRTC P2P 通信中 STUN 服务器解决不了的复杂内网的问题。比如我尝试过移动4G 和 联通 WIFI 有时候无法通过 STUN 服务穿越内网连接，通过 TURN 服务的中继就可以解决这个问题。下面我们就来介绍一下 coturn 的安装，配置以及测试的过程。\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003ch1 id=\"参考网址\"\u003e参考网址\u003c/h1\u003e\n\u003cp\u003e\u003ca href=\"https://joey.blue/2018/12/10/webrtc-coturn/\"\u003ehttps://joey.blue/2018/12/10/webrtc-coturn/\u003c/a\u003e\n\u003ca href=\"https://www.jianshu.com/p/7e9d0af05396\"\u003ehttps://www.jianshu.com/p/7e9d0af05396\u003c/a\u003e\u003c/p\u003e\n\u003ch2 id=\"1更新安装源\"\u003e1.更新安装源\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt-get -y update\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"2安装coturn\"\u003e2.安装coturn\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo apt-get -y install coturn\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"3编辑配置文件\"\u003e3.编辑配置文件\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003evim /etc/turnserver.conf\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 网卡名\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erelay-device\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eeth0\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#内网IP\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elistening-ip\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e172.16.0.5 \n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elistening-port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e3478\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#内网IP\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erelay-ip\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e172.16.0.5\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003etls-listening-port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e5349\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 外网IP\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eexternal-ip\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e134.xxx.xxx.xxx\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erelay-threads\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e500\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#打开密码验证\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003elt-cred-mech\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecert\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/etc/turn_server_cert.pem\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003epkey\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e/etc/turn_server_pkey.pem\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emin-port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e40000\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emax-port\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e65535\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#设置用户名和密码，创建IceServer时使用\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003euser\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003eadmin:123456\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 外网IP绑定的域名\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erealm\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003exxxx.cn\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 服务器名称，用于OAuth认证，默认和realm相同，部分浏览器本段不设可能会引发cors错误。\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eserver-name\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003exxxx.cn\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 认证密码，和前面设置的密码保持一致\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecli-password\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003e\u003cspan style=\"color:#ae81ff\"\u003e123456\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"4重启服务\"\u003e4.重启服务\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl status coturn\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"5查看服务状态和端口\"\u003e5.查看服务状态和端口\u003c/h2\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl status coturn\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003e\u003cimg alt=\"3043400466\" loading=\"lazy\" src=\"/upload/2023/01/3043400466.png\"\u003e\u003c/p\u003e","title":"ubuntu20.04安装coturn"},{"content":"1.场景 公司内网有多台服务器的http服务要映射到公司外网静态IP，如果用路由的端口映射来做，就只能一台内网服务器的80端口映射到外网80端口，其他服务器的80端口只能映射到外网的非80端口。非80端口的映射在访问的时候要域名加上端口，比较麻烦。\n2.方法：nginx反向代理转发 在浏览器中输入git.dingxiufeng.cn能访问到内网机器192.168.31.100的3000端口，输入cloud.dingxiufeng.cn能访问到内网机器192.168.31.101的80端口。 server { listen 80; server_name git.dingxiufeng.cn; location / { proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://192.168.31.100:3000; } access_log logs/git.dingxiufeng.cn_access.log; } server { listen 80; server_name cloud.dingxiufeng.cn; location / { proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://192.168.31.101:80; } access_log logs/cloud.dingxiufeng.cn.log; } ","permalink":"/posts/nginx-chang-yong-chang-jing-dai-li-zhuan-fa/","summary":"\u003ch3 id=\"1场景\"\u003e1.场景\u003c/h3\u003e\n\u003cblockquote\u003e\n\u003cp\u003e公司内网有多台服务器的http服务要映射到公司外网静态IP，如果用路由的端口映射来做，就只能一台内网服务器的80端口映射到外网80端口，其他服务器的80端口只能映射到外网的非80端口。非80端口的映射在访问的时候要域名加上端口，比较麻烦。\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003ch3 id=\"2方法nginx反向代理转发\"\u003e2.方法：nginx反向代理转发\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e在浏览器中输入git.dingxiufeng.cn能访问到内网机器192.168.31.100的3000端口，输入cloud.dingxiufeng.cn能访问到内网机器192.168.31.101的80端口。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eserver\n{\n    listen 80;\n    server_name git.dingxiufeng.cn;\n    location / {\n        proxy_redirect off;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_pass http://192.168.31.100:3000;\n    }\n    access_log logs/git.dingxiufeng.cn_access.log;\n}\n \nserver\n{\n    listen 80;\n    server_name cloud.dingxiufeng.cn;\n    location / {\n        proxy_redirect off;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_pass http://192.168.31.101:80;\n    }\n    access_log logs/cloud.dingxiufeng.cn.log;\n}\n\u003c/code\u003e\u003c/pre\u003e","title":"Nginx常用场景代理转发"},{"content":"1. 在nginx.conf添加如下配置 stream { #将12345端口转发到192.168.1.23的3306端口 server { listen 12345; proxy_connect_timeout 5s; proxy_timeout 20s; proxy_pass 192.168.1.23:3306; } #将udp 53端口转发到192.168.1.23 53端口 server { listen 53 udp reuseport; proxy_timeout 20s; proxy_pass 192.168.1.23:53; } #ipv4转发到ipv6 server { listen 9135; proxy_connect_timeout 10s; proxy_timeout 30s; proxy_pass [2607:fcd0:107:3cc::1]:9135; } } 2.备注 listen：后面填写源端口（也就是当前服务器端口），默认协议为TCP，可以指定为UDP proxy_connect_timeout：连接超时时间 proxy_timeout：超时时间 proxy_pass：填写转发目标的IP及端口号 ","permalink":"/posts/shi-yong-nginx-jin-xing-tcpudp-duan-kou-zhuan-fa/","summary":"\u003col\u003e\n\u003cli\u003e在nginx.conf添加如下配置stream {    #将12345端口转发到192.168.1.23的3306端口    server {        listen 12345;        proxy_connect_timeout 5s;        proxy_timeout\u003c/li\u003e\n\u003c/ol\u003e\n","title":"使用Nginx进行TCPUDP端口转发"},{"content":"1. 禁用Windows Update服务 同时按下键盘 Win + R，打开运行对话框，然后输入命令 services.msc ，点击下方的“确定”打开服务。 找到 Windows Update 这一项，并双击打开。 把启动类型选为“禁用”，最后点击应用。 接下再切换到“恢复”选项，将默认的“重新启动服务”改为“无操作”，然后点击“应用”“确定”。 2.在组策略里关闭Win10自动更新相关服务 同时按下Win + R 组合快捷键打开运行命令操作框，然后输入“gpedit.msc”，点击确定。 在组策略编辑器中，依次展开 计算机配置 -\u0026gt; 管理模板 -\u0026gt; Windows组件 -\u0026gt; Windows更新 然后在右侧“配置自动更新”设置中，将其设置为“已禁用”并点击下方的“应用”然后“确定”。 之后还需要再找到“删除使用所有Windows更新功能的访问权限”，选择已启用，完成设置后，点击“应用”“确定”。 3.禁用任务计划里边的Win10自动更新 同时按下 Win + R 组合快捷键打开““运行”窗口，然后输入“taskschd.msc”，并点击下方的“确定”打开任务计划程序。 在任务计划程序的设置界面，依次展开 任务计划程序库 -\u0026gt; Microsoft -\u0026gt; Windows -\u0026gt; WindowsUpdate，把里面的项目都设置为 [ 禁用 ] 就可以了。(我这里边只有一个任务，你的电脑里可能会有2个或者更多，全部禁用就行了) 4.在注册表中关闭Win10自动更新 同时按下 Win + R 组合快捷键，打开运行对话框，然后输入命名 regedit，然后点击下方的「 确定 」打开注册表。 在注册表设置中，找到并定位到 [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\UsoSvc]。然后在右侧找到“Start”键。 点击修改，把start值改成16进制，值改为“4”，然后点击「 确定 」保存数据 继续在右侧找到“FailureActions”键，右键点击修改该键的二进制数据，将“0010”、“0018”行的左起第5个数值由原来的“01”改为“00”，完成后，点击下方的“确定”即可。 ","permalink":"/posts/windows10-che-di-guan-bi-zi-dong-geng-xin/","summary":"\u003ch3 id=\"1-禁用windows-update服务\"\u003e1. 禁用Windows Update服务\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e同时按下键盘 Win + R，打开运行对话框，然后输入命令 services.msc ，点击下方的“确定”打开服务。\u003c/li\u003e\n\u003cli\u003e找到 Windows Update 这一项，并双击打开。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cimg alt=\"1124265109\" loading=\"lazy\" src=\"/upload/2023/01/1124265109.png\"\u003e\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e把启动类型选为“禁用”，最后点击应用。\u003c/li\u003e\n\u003cli\u003e接下再切换到“恢复”选项，将默认的“重新启动服务”改为“无操作”，然后点击“应用”“确定”。\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"2在组策略里关闭win10自动更新相关服务\"\u003e2.在组策略里关闭Win10自动更新相关服务\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e同时按下Win + R 组合快捷键打开运行命令操作框，然后输入“gpedit.msc”，点击确定。\u003c/li\u003e\n\u003cli\u003e在组策略编辑器中，依次展开 计算机配置 -\u0026gt; 管理模板 -\u0026gt; Windows组件 -\u0026gt; Windows更新\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cimg alt=\"2552899052\" loading=\"lazy\" src=\"/upload/2023/01/2552899052.jpeg\"\u003e\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e然后在右侧“配置自动更新”设置中，将其设置为“已禁用”并点击下方的“应用”然后“确定”。\u003c/li\u003e\n\u003cli\u003e之后还需要再找到“删除使用所有Windows更新功能的访问权限”，选择已启用，完成设置后，点击“应用”“确定”。\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"3禁用任务计划里边的win10自动更新\"\u003e3.禁用任务计划里边的Win10自动更新\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e同时按下 Win + R 组合快捷键打开““运行”窗口，然后输入“taskschd.msc”，并点击下方的“确定”打开任务计划程序。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cimg alt=\"3458848396\" loading=\"lazy\" src=\"/upload/2023/01/3458848396.jpeg\"\u003e\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e在任务计划程序的设置界面，依次展开 任务计划程序库 -\u0026gt; Microsoft -\u0026gt; Windows -\u0026gt; WindowsUpdate，把里面的项目都设置为 [ 禁用 ] 就可以了。(我这里边只有一个任务，你的电脑里可能会有2个或者更多，全部禁用就行了)\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"4在注册表中关闭win10自动更新\"\u003e4.在注册表中关闭Win10自动更新\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e同时按下 Win + R 组合快捷键，打开运行对话框，然后输入命名 regedit，然后点击下方的「 确定 」打开注册表。\u003c/li\u003e\n\u003cli\u003e在注册表设置中，找到并定位到 [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\UsoSvc]。然后在右侧找到“Start”键。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cimg alt=\"3092481071\" loading=\"lazy\" src=\"/upload/2023/01/3092481071.jpeg\"\u003e\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e点击修改，把start值改成16进制，值改为“4”，然后点击「 确定 」保存数据\u003c/li\u003e\n\u003cli\u003e继续在右侧找到“FailureActions”键，右键点击修改该键的二进制数据，将“0010”、“0018”行的左起第5个数值由原来的“01”改为“00”，完成后，点击下方的“确定”即可。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cimg alt=\"4157419015\" loading=\"lazy\" src=\"/upload/2023/01/4157419015.jpeg\"\u003e\u003c/p\u003e","title":"Windows10彻底关闭自动更新"},{"content":"1.查找版本密钥 操作系统版本 KMS 客户端产品密钥 Windows Server 2019 Datacenter WMDGN-G9PQG-XVVXX-R3X43-63DFG Windows Server 2019 Standard N69G4-B89J2-4G8F4-WWYCC-J464C Windows Server 2019 Essentials WVDHN-86M7X-466P6-VHXV7-YY726 2. 以Windows Server 2019 Standard为例 slmgr /upk slmgr /ipk N69G4-B89J2-4G8F4-WWYCC-J464C slmgr /skms kms.03k.org #kms.03k.org 为KMS服务器,也可以用openwrt中的kms服务器 slmgr /ato 3.弹出成功激活即可 ","permalink":"/posts/windowsserver2019-de-kms-ji-huo-fang-fa/","summary":"\u003ch3 id=\"1查找版本密钥\"\u003e1.查找版本密钥\u003c/h3\u003e\n\u003ctable\u003e\n  \u003cthead\u003e\n      \u003ctr\u003e\n          \u003cth style=\"text-align: left\"\u003e操作系统版本\u003c/th\u003e\n          \u003cth style=\"text-align: left\"\u003eKMS 客户端产品密钥\u003c/th\u003e\n      \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n      \u003ctr\u003e\n          \u003ctd style=\"text-align: left\"\u003eWindows Server 2019 Datacenter\u003c/td\u003e\n          \u003ctd style=\"text-align: left\"\u003eWMDGN-G9PQG-XVVXX-R3X43-63DFG\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n          \u003ctd style=\"text-align: left\"\u003eWindows Server 2019 Standard\u003c/td\u003e\n          \u003ctd style=\"text-align: left\"\u003eN69G4-B89J2-4G8F4-WWYCC-J464C\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n          \u003ctd style=\"text-align: left\"\u003eWindows Server 2019 Essentials\u003c/td\u003e\n          \u003ctd style=\"text-align: left\"\u003eWVDHN-86M7X-466P6-VHXV7-YY726\u003c/td\u003e\n      \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003ch3 id=\"2-以windows-server-2019-standard为例\"\u003e2. 以Windows Server 2019 Standard为例\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-powershell\" data-lang=\"powershell\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eslmgr /upk\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eslmgr /ipk N69G4-B89J2-4G8F4-WWYCC-J464C\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eslmgr /skms kms.03k.org          \u003cspan style=\"color:#75715e\"\u003e#kms.03k.org 为KMS服务器,也可以用openwrt中的kms服务器\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eslmgr /ato\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3弹出成功激活即可\"\u003e3.弹出成功激活即可\u003c/h3\u003e","title":"Windows_Server_2019的kms激活方法"},{"content":"1. Window激活方法(CMD管理员) slmgr.vbs -ipk NPPR9-FWDCX-D2C8J-H872K-2YT43 slmgr.vbs -skms KMS_Server_IP slmgr.vbs -ato 2. Office激活方法(CMD管理员) cd C:\\Program Files\\Microsoft Office\\Office15 cscript ospp.vbs /inpkey:YC7DK-G2NP3-2QQC3-J6H88-GVGXT cscript ospp.vbs /sethst:KMS_Server_IP cscript ospp.vbs /act 3.微软官方kms激活码链接 https://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys 4.附序列号 Windows 10 | Operating system edition | KMS Client Setup Key ——————————— | —————————– Windows 10 Core | TX9XD-98N7V-6WMQ6-BX7FG-H8Q99 Windows 10 Core N | 3KHY7-WNT83-DGQKR-F7HPR-844BM Windows 10 Core Country Specific | PVMJN-6DFY6-9CCP6-7BKTT-D3WVR Windows 10 Core Single Language | 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH Windows 10 Professional | W269N-WFGWX-YVC9B-4J6C9-T83GX Windows 10 Professional N | MH37W-N47XK-V7XM9-C7227-GCQG9 Windows 10 Enterprise | NPPR9-FWDCX-D2C8J-H872K-2YT43 Windows 10 Enterprise N | DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4 Windows 10 Education | NW6C2-QMPVW-D7KKK-3GKT6-VCFB2 Windows 10 Education N | 2WH4N-8QGBV-H22JP-CT43Q-MDWWJ Windows 10 Enterprise 2015 LTSB | WNMTR-4C88C-JK8YV-HQ7T2-76DF9 Windows 10 Enterprise 2015 LTSB N | 2F77B-TNFGY-69QQF-B8YKP-D69TJ Windows 10 Enterprise 2016 LTSB | DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ Windows 10 Enterprise 2016 LTSB N | QFFDN-GRT3P-VKWWX-X7T3R-8B639 | Windows 7 | Operating system edition | KMS Client Setup Key ————————- | —————————– Windows 7 Professional | FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4 Windows 7 Professional N | MRPKT-YTG23-K7D7T-X2JMM-QY7MG Windows 7 Professional E | W82YF-2Q76Y-63HXB-FGJG9-GF7QX Windows 7 Enterprise | 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH Windows 7 Enterprise N | YDRBP-3D83W-TY26F-D46B2-XCKRJ Windows 7 Enterprise E | C29WB-22CC8-VJ326-GHFJW-H9DH4 | Windows Server 2019 | Operating system edition | KMS Client Setup Key —————————————– | —————————– Windows Server 2019 Datacenter |WMDGN-G9PQG-XVVXX-R3X43-63DFG Windows Server 2019 Standard | N69G4-B89J2-4G8F4-WWYCC-J464C Windows Server 2019 Essentials|| WVDHN-86M7X-466P6-VHXV7-YY726| Windows Server 2016 | Operating system edition | KMS Client Setup Key —————————————– | —————————– Windows Server 2016 Datacenter | CB7KF-BWN84-R7R2Y-793K2-8XDDG Windows Server 2016 Standard | WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY Windows Server 2016 Essentials | JCKRF-N37P4-C2D82-9YXRT-4M63B | Windows Server 2012 | Operating system edition | KMS Client Setup Key —————————————– | —————————– Windows Server 2012 | BN3D2-R7TKB-3YPBD-8DRP2-27GG4 Windows Server 2012 N | 8N2M2-HWPGY-7PGT9-HGDD8-GVGGY Windows Server 2012 Single Language | 2WN2H-YGCQR-KFX6K-CD6TF-84YXQ Windows Server 2012 Country Specific | 4K36P-JN4VD-GDC6V-KDT89-DYFKP Windows Server 2012 Server Standard | XC9B7-NBPP2-83J2H-RHMBY-92BT4 Windows Server 2012 MultiPoint Standard | HM7DN-YVMH3-46JC3-XYTG7-CYQJJ Windows Server 2012 MultiPoint Premium | XNH6W-2V9GX-RGJ4K-Y8X6F-QGJ2G Windows Server 2012 Datacenter | 48HP8-DN98B-MYWDG-T2DCC-8W83P Windows Server 2012 R2 Server Standard | D2N9P-3P6X9-2R39C-7RTCD-MDVJX Windows Server 2012 R2 Datacenter | W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9 Windows Server 2012 R2 Essentials | KNC87-3J2TX-XB4WP-VCPJV-M4FWM | Windows Server 2008 | Operating system edition | KMS Client Setup Key ————————————————- | —————————– Windows Server 2008 Web | WYR28-R7TFJ-3X2YQ-YCY4H-M249D Windows Server 2008 Standard | TM24T-X9RMF-VWXK6-X8JC9-BFGM2 Windows Server 2008 Standard without Hyper-V | W7VD6-7JFBR-RX26B-YKQ3Y-6FFFJ Windows Server 2008 Enterprise | YQGMW-MPWTJ-34KDK-48M3W-X4Q6V Windows Server 2008 Enterprise without Hyper-V | 39BXF-X8Q23-P2WWT-38T2F-G3FPG Windows Server 2008 HPC | RCTX3-KWVHP-BR6TB-RB6DM-6X7HP Windows Server 2008 Datacenter | 7M67G-PC374-GR742-YH8V4-TCBY3 Windows Server 2008 Datacenter without Hyper-V | 22XQ2-VRXRG-P8D42-K34TD-G3QQC Windows Server 2008 for Itanium-Based Systems | 4DWFP-JF3DJ-B7DTH-78FJB-PDRHK Windows Server 2008 R2 Web | 6TPJF-RBVHG-WBW2R-86QPH-6RTM4 Windows Server 2008 R2 HPC edition | TT8MH-CG224-D3D7Q-498W2-9QCTX Windows Server 2008 R2 Standard | YC6KT-GKW9T-YTKYR-T4X34-R7VHC Windows Server 2008 R2 Enterprise | 489J6-VHDMP-X63PK-3K798-CPX3Y Windows Server 2008 R2 Datacenter | 74YFP-3QFB3-KQT8W-PMXWJ-7M648 Windows Server 2008 R2 for Itanium-based Systems | GT63C-RJFQ3-4GMB6-BRFB9-CB83V | Office 2019 | Product | GVLK —————————– | —————————– Office Professional Plus 2019 | NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP Office Standard 2019 | 6NWWJ-YQWMR-QKGCB-6TMB3-9D9HK Project Professional 2019 | B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B Project Standard 2019 | C4F7P-NCP8C-6CQPT-MQHV9-JXD2M Visio Professional 2019 | 9BGNQ-K37YR-RQHF2-38RQ3-7VCBB Visio Standard 2019 | 7TQNQ-K3YQQ-3PFH7-CCPPM-X4VQ2 Access 2019 | 9N9PT-27V4Y-VJ2PD-YXFMF-YTFQT Excel 2019 | TMJWT-YYNMB-3BKTF-644FC-RVXBD Outlook 2019 | 7HD7K-N4PVK-BHBCQ-YWQRW-XW4VK PowerPoint 2019 | RRNCX-C64HY-W2MM7-MCH9G-TJHMQ Publisher 2019 | G2KWX-3NW6P-PY93R-JXK2T-C9Y9V Skype for Business 2019 | NCJ33-JHBBY-HTK98-MYCV8-HMKHJ Word 2019 | PBX3G-NWMT6-Q7XBW-PYJGG-WXD33 | Office 2016 | Product | GVLK —————————– | —————————– Office Professional Plus 2016 | XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99 Office Standard 2016 | JNRGM-WHDWX-FJJG3-K47QV-DRTFM Project Professional 2016 | YG9NW-3K39V-2T3HJ-93F3Q-G83KT Project Standard 2016 | GNFHQ-F6YQM-KQDGJ-327XX-KQBVC Visio Professional 2016 | PD3PC-RHNGV-FXJ29-8JK7D-RJRJK Visio Standard 2016 | 7WHWN-4T7MP-G96JF-G33KR-W8GF4 Access 2016 | GNH9Y-D2J4T-FJHGG-QRVH7-QPFDW Excel 2016 | 9C2PK-NWTVB-JMPW8-BFT28-7FTBF OneNote 2016 | DR92N-9HTF2-97XKM-XW2WJ-XW3J6 Outlook 2016 | R69KK-NTPKF-7M3Q4-QYBHW-6MT9B PowerPoint 2016 | J7MQP-HNJ4Y-WJ7YM-PFYGF-BY6C6 Publisher 2016 | F47MM-N3XJP-TQXJ9-BP99D-8K837 Skype for Business 2016 | 869NQ-FJ69K-466HW-QYCP2-DDBV6 Word 2016 | WXY84-JN2Q9-RBCCQ-3Q3J3-3PFJ6 | Office 2013 | Product | GVLK —————————– | —————————– Office 2013 Professional Plus | YC7DK-G2NP3-2QQC3-J6H88-GVGXT Office 2013 Standard | KBKQT-2NMXY-JJWGP-M62JB-92CD4 Project 2013 Professional | FN8TT-7WMH6-2D4X9-M337T-2342K Project 2013 Standard | 6NTH3-CW976-3G3Y2-JK3TX-8QHTT Visio 2013 Professional | C2FG9-N6J68-H8BTJ-BW3QX-RM3B3 Visio 2013 Standard | J484Y-4NKBF-W2HMG-DBMJC-PGWR7 Access 2013 | NG2JY-H4JBT-HQXYP-78QH9-4JM2D Excel 2013 | VGPNG-Y7HQW-9RHP7-TKPV3-BG7GB InfoPath 2013 | DKT8B-N7VXH-D963P-Q4PHY-F8894 Lync 2013 | 2MG3G-3BNTT-3MFW9-KDQW3-TCK7R OneNote 2013 | TGN6P-8MMBC-37P2F-XHXXK-P34VW Outlook 2013 | QPN8Q-BJBTJ-334K3-93TGY-2PMBT PowerPoint 2013 | 4NT99-8RJFH-Q2VDH-KYG2C-4RD4F Publisher 2013 | PN2WF-29XG2-T9HJ7-JQPJR-FCXK4 Word 2013 | 6Q7VD-NX8JD-WJ2VH-88V73-4GBJ7 | Office 2010 | Product | GVLK —————————– | —————————– Office Professional Plus 2010 | VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB Office Standard 2010 | V7QKV-4XVVR-XYV4D-F7DFM-8R6BM Access 2010 | V7Y44-9T38C-R2VJK-666HK-T7DDX Excel 2010 | H62QG-HXVKF-PP4HP-66KMR-CW9BM SharePoint Workspace 2010 | QYYW6-QP4CB-MBV6G-HYMCJ-4T3J4 InfoPath 2010 | K96W8-67RPQ-62T9Y-J8FQJ-BT37T OneNote 2010 | Q4Y4M-RHWJM-PY37F-MTKWH-D3XHX Outlook 2010 | 7YDC2-CWM8M-RRTJC-8MDVC-X3DWQ PowerPoint 2010 | RC8FX-88JRY-3PF7C-X8P67-P4VTT Project Professional 2010 | YGX6F-PGV49-PGW3J-9BTGG-VHKC6 Project Standard 2010 | 4HP3K-88W3F-W2K3D-6677X-F9PGB Publisher 2010 | BFK7F-9MYHM-V68C7-DRQ66-83YTP Word 2010 | HVHB3-C6FV7-KQX9W-YQG79-CRY7T Visio Standard 2010 | 767HD-QGMWX-8QTDB-9G3R2-KHFGJ Visio Professional 2010 | 7MCW8-VRQVK-G677T-PDJCM-Q8TCP Visio Premium 2010 | D9DWC-HPYVV-JGF4P-BTWQB-WX8BJ | ","permalink":"/posts/windows-he-office-de-kms-fu-wu-qi-ji-huo-fang-fa/","summary":"\u003col\u003e\n\u003cli\u003eWindow激活方法(CMD管理员)slmgr.vbs -ipk NPPR9-FWDCX-D2C8J-H872K-2YT43slmgr.vbs -skms KMS_Server_IPslmgr.vbs -ato2. Office激活方法(CMD管理员)cd C:\\Program Files\\M\u003c/li\u003e\n\u003c/ol\u003e\n","title":"Windows和Office的KMS服务器激活方法"},{"content":"1.点击搜索，输入远程桌面设置 2.点击打开 ","permalink":"/posts/windowsserver2019-kai-qi-yuan-cheng-zhuo-mian-fang-wen/","summary":"\u003ch3 id=\"1点击搜索输入远程桌面设置\"\u003e1.点击搜索，输入远程桌面设置\u003c/h3\u003e\n\u003cp\u003e\u003cimg alt=\"82872824\" loading=\"lazy\" src=\"/upload/2023/01/82872824.png\"\u003e\u003c/p\u003e\n\u003ch3 id=\"2点击打开\"\u003e2.点击打开\u003c/h3\u003e\n\u003cp\u003e\u003cimg alt=\"731953800\" loading=\"lazy\" src=\"/upload/2023/01/731953800.png\"\u003e\u003c/p\u003e","title":"Windows_Server_2019开启远程桌面访问"},{"content":"1.首先确保已安装xcode和homebrew 2.安装 brew install node 3.检查 node -v npm -v 4.更换为淘宝镜像 sudo npm install -g cnpm --registry=https://registry.npm.taobao.org --verbose ","permalink":"/posts/macos-an-zhuang-nodejs/","summary":"\u003ch3 id=\"1首先确保已安装xcode和homebrew\"\u003e1.首先确保已安装xcode和homebrew\u003c/h3\u003e\n\u003ch3 id=\"2安装\"\u003e2.安装\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ebrew install node\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3检查\"\u003e3.检查\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003enode -v\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003enpm -v\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4更换为淘宝镜像\"\u003e4.更换为淘宝镜像\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esudo npm install -g cnpm --registry\u003cspan style=\"color:#f92672\"\u003e=\u003c/span\u003ehttps://registry.npm.taobao.org --verbose\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Macos安装node.js"},{"content":" ","permalink":"/posts/jelllyfin-tong-guo-https-fang-wen-ssl-she-zhi/","summary":"\u003cp\u003e\u003cimg alt=\"2821112233\" loading=\"lazy\" src=\"/upload/2023/01/2821112233.png\"\u003e\n\u003cimg alt=\"423658726\" loading=\"lazy\" src=\"/upload/2023/01/423658726.png\"\u003e\u003c/p\u003e","title":"jelllyfin通过https访问SSL设置"},{"content":"\n","permalink":"/posts/windowsserver-zhong-jellyfin-ying-jie-she-zhi/","summary":"\u003cp\u003e\u003cimg alt=\"3571628515\" loading=\"lazy\" src=\"/upload/2023/01/3571628515.png\"\u003e\u003c/p\u003e","title":"windows_server中jellyfin硬解设置"},{"content":"1.用户相关 双机同步用户创建 grant replication slave on *.* to sync@\u0026#39;172.21.210.214\u0026#39; identified by \u0026#39;123456\u0026#39;; 管理用户创建 GRANT ALL privileges ON *.* TO \u0026#39;airdreams\u0026#39;@\u0026#39;%\u0026#39; IDENTIFIED BY \u0026#39;123456\u0026#39; WITH GRANT OPTION; 刷新权限 flush privileges; 2.同步相关 设置从机向master主机同步 change master to master_host=\u0026#39;172.21.100.162\u0026#39;,master_user=\u0026#39;airdreams\u0026#39;,master_password=\u0026#39;123456\u0026#39;,master_port=3306,master_log_file=\u0026#39;binlog.000001\u0026#39;,master_log_pos=1; 通过时间查看bin日志信息 mysqlbinlog --start-datetime=\u0026#34;2010-11-20 00:00:00\u0026#34; --stop-datetime=\u0026#34;2010-11-21 00:00:00\u0026#34; mysql-bin.000141 mysql主从同步忽略1次错误 stop slave; set global sql_slave_skip_counter =1; start slave; 3.备份 Mysqldump常用命令： mysqldump -u用户名 -p密码 --databases 数据库1 数据库2 \u0026gt; xxx.sql 常见选项： -u: 用户名 -p: 密码 -P: 端口号，不写默认3306 --all-databases, -A：备份所有数据库 --databases, -B: 用于备份多个数据库，如果没有该选项，mysqldump把第一个名字参数作为数据库名，后面的作为表名。使用该选项，mysqldum把每个名字都当作为数据库名。 -d: 只导出数据库的表结构 -t: 只导出数据库的数据 --quick, -q：快速导出 --xml, -X：导出为xml文件 下面是具体的使用samples: 1. 备份全部数据库的数据和结构（-A） mysqldump -uroot -p123456 -A \u0026gt; 0101.sql 2. 备份全部数据库的结构（-d） mysqldump -uroot -p123456 -P3306 -A -d \u0026gt; 0102.sql 3. 备份全部数据库的数据（-t） mysqldump -uroot -p123456 -P3306 -A -t \u0026gt; 0103.sql 4. 备份单个数据库的数据和结构（sakila 为数据库名） mysqldump -uroot -p123456 -P3306 sakila \u0026gt; 0104.sql 5. 备份单个数据库结构（sakila 为数据库名，-d） mysqldump -uroot -p123456 -P3306 sakila -d \u0026gt; 0105.sql 6. 备份单个数据库数据（sakila 为数据库名，-t） mysqldump -uroot -p123456 -P3306 sakila -t \u0026gt; 0106.sql 7. 备份多个表的结构和数据 (table1,table2为表名) mysqldump -uroot -p123456 -P3306 sakila table1 table2 \u0026gt; 0107.sql 8. 一次备份多个数据库 mysqldump -uroot -p123456 --databases db1 db2 \u0026gt; 0108.sql 4.还原 系统命令行： mysqladmin -uroot -p123456 create db_name mysql -uroot -p123456 db_name \u0026lt; d:\\bak\\0101.sql 注：在导入备份数据库前，db_name如果没有，是需要创建的； 而且与backup20110527.sql中数据库名是一样的才可以导入。\nsource 方法： mysql \u0026gt; use db mysql \u0026gt; source d:\\bak\\0101.sql 5.设置时区 default-time_zone=\u0026#39;+8:00\u0026#39; ","permalink":"/posts/mysql-chang-yong-ming-ling/","summary":"1.用户相关双机同步用户创建grant replication slave on \u003cem\u003e.\u003c/em\u003e to sync@'172.21.210.214' identified by '123456';管理用户创建GRANT ALL privileges ON \u003cem\u003e.\u003c/em\u003e TO \u0026amp;#39","title":"Mysql常用命令"},{"content":"1. 模拟元数据损坏 mfsmaster stop mv /var/lib/mfs/metadata.mfs /home/ mv /var/lib/mfs/changelog.0.mfs /home/ mfsmaster start # 提示元数据损坏恢复 2. 元数据恢复 从metalogger上将最新一份metadata_ml.mfs.back及changelog_ml.0.mfs复制到master的数据目录下，并注意文件属主属组为mfs。 chown mfs.mfs * 3. 启动master 此时需要以-a方式启动 mfsmaster -a 4. 如果master主机服务器系统可以登录，执行一下命令即可 mfsmaster stop cd /var/lib/mfs/ mv metadata.mfs.back metadata.mfs mfsmaster start ","permalink":"/posts/moosefs-fen-bu-shi-master-zhu-ji-sun-huai-hai-yuan/","summary":"\u003ch3 id=\"1-模拟元数据损坏\"\u003e1. 模拟元数据损坏\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emfsmaster stop\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emv /var/lib/mfs/metadata.mfs  /home/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emv /var/lib/mfs/changelog.0.mfs  /home/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emfsmaster start\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# 提示元数据损坏恢复\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2-元数据恢复\"\u003e2. 元数据恢复\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e从metalogger上将最新一份metadata_ml.mfs.back及changelog_ml.0.mfs复制到master的数据目录下，并注意文件属主属组为mfs。\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003echown mfs.mfs *\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"3-启动master\"\u003e3. 启动master\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e此时需要以-a方式启动\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emfsmaster -a\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"4-如果master主机服务器系统可以登录执行一下命令即可\"\u003e4. 如果master主机服务器系统可以登录，执行一下命令即可\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emfsmaster stop\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003ecd /var/lib/mfs/\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emv metadata.mfs.back metadata.mfs\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003emfsmaster start\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Moosefs分布式master主机损坏还原"},{"content":"1. mfsgetquota(查询文件占用容量) mfsgetquota -h test/ # 二进制统计容量大小，推荐！ mfsgetquota -H test/ # 十进制统计容量大小 mfsgetquota -g test/ # 用GiB来统计容量大小 2. mfssetquota(设定文件夹占用限制) mfssetquota -s 20Ti test/ # 二进制设定文件夹容量限制,推荐！ mfssetquota -s 20T test/ # 十进制设定文件夹容量限制 3.各个服务器自启动开启命令 systemctl enable moosefs-master systemctl enable moosefs-cgiserv systemctl enable moosefs-chunkserver systemctl enable moosefs-metalogger 4.给文件夹设定垃圾清理时间 mfssettrashtime 0 -r test/ # 设定删除后清理的时间为立即删除，0表示0秒。 mfsgettrashtime test #查看test文件夹垃圾时间按秒算 mfssettrashtime -r 86400 test #设置test文件夹垃圾时间为86400秒(1天) 5.标签和分类 设置chunserver标签 /etc/mfs/mfschunkserver.cfg LABELS = A or LABELS = B # 其它举例 A,B : A B中各有1份数据 A,* : A 中1份，其它1份 创建class分类 # 创建2个副本的分类应用于A标签 mfsscadmin create 2A sclass1 client创建目录并应用到分类 # 创建一个目录dataX分配到sclass1分类中 mfssetsclass sclass1 dataX 目录更改分类 dataX文件夹从sclass1 更改为sclass2 mfsxchgsclass -r sclass1 sclass2 dataX 6.设置备份数 mfsgetgoal test #查看文件夹test备份数 mfssetgoal -r 2 test #设置文件夹test备份数为2 ","permalink":"/posts/moosefs-chang-yong-ming-ling/","summary":"\u003col\u003e\n\u003cli\u003emfsgetquota(查询文件占用容量)mfsgetquota -h test/  # 二进制统计容量大小，推荐！mfsgetquota -H test/  # 十进制统计容量大小mfsgetquota -g test/  # 用GiB来统计容量大小2. mfssetquota(设定文件夹占\u003c/li\u003e\n\u003c/ol\u003e\n","title":"Moosefs常用命令"},{"content":" Google BBR (Bottleneck Bandwidth and RTT) 是一种新的TCP拥塞控制算法,它可以高效增加吞吐和降低网络延迟，并且Linux Kernel4.9+已经集成该算法。开启BBR也非常简单，因为它只需要在发送端开启，网络其他节点和接收端不需要任何改变。\n1.升级内核 安装ELRepo仓库 rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm 安装最新版kernel yum --enablerepo=elrepo-kernel install kernel-ml -y 查看是否安装成功 rpm -qa | grep kernel 2.设置默认启动内核 grub2-set-default 0 reboot 3.设置BBR 编辑配置文件 vi /etc/sysctl.conf #添加 net.core.default_qdisc = fq net.ipv4.tcp_congestion_control = bbr 使之生效 sysctl -p 4.验证 sysctl net.ipv4.tcp_available_congestion_control # 返回 net.ipv4.tcp_available_congestion_control = reno cubic bbr lsmod | grep bbr #返回 tcp_bbr 20480 11 则表示安装成功。\n","permalink":"/posts/centos78-kai-qi-googlebbr/","summary":"\u003cblockquote\u003e\n\u003cp\u003eGoogle BBR (Bottleneck Bandwidth and RTT) 是一种新的TCP拥塞控制算法,它可以高效增加吞吐和降低网络延迟，并且Linux Kernel4.9+已经集成该算法。开启BBR也非常简单，因为它只需要在发送端开启，网络其他节点和接收端不需要任何改变。\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003ch3 id=\"1升级内核\"\u003e1.升级内核\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e安装ELRepo仓库\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003erpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org\nrpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e安装最新版kernel\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eyum --enablerepo=elrepo-kernel install kernel-ml -y\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e查看是否安装成功\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e rpm -qa | grep kernel\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"2设置默认启动内核\"\u003e2.设置默认启动内核\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003egrub2-set-default 0\nreboot\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"3设置bbr\"\u003e3.设置BBR\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e编辑配置文件\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003evi /etc/sysctl.conf\n#添加\nnet.core.default_qdisc = fq\nnet.ipv4.tcp_congestion_control = bbr\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e使之生效\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esysctl -p\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"4验证\"\u003e4.验证\u003c/h3\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003esysctl net.ipv4.tcp_available_congestion_control\n# 返回\nnet.ipv4.tcp_available_congestion_control = reno cubic bbr\n\u003c/code\u003e\u003c/pre\u003e\u003cpre tabindex=\"0\"\u003e\u003ccode\u003elsmod | grep bbr\n#返回\ntcp_bbr                20480  11 \n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003e则表示安装成功。\u003c/p\u003e","title":"CentOS 7/8开启Google BBR"},{"content":"1.给用户设置规则的文件 user-rule.txt 该文件在shadowsocks.exe同级文件夹中 2.语法规则如下 === 通配符支持 =\u0026gt; * *.example.com/ 代表 http://example.com http://233.example.com https://233.example.com https://666.example.com/233.mp4 全部走代理。 同时\u0026#34;*\u0026#34;可省略，.example.com/ 与 *.example.com/ 效果是一样的 === 正则表达式支持 以 \\ 开始和结束，\\[\\w]+:\\/\\/example.com\\ === 例外规则 =\u0026gt; @@ @@*.example.com/ 表示\u0026#34;@@\u0026#34;后面的网址规则(*.example.com)不走代理 如：@@www.baidu.com 表示 www.baidu.com 不走代理 === 匹配地址开始和结尾规则 =\u0026gt; | |http://example.com、example.com| 分别表示 以http://example.com开始 和 以example.com结束 的地址 如：|http://233.com ，代表 http://233.com 开头的网址才会走代理，即 https://233.com http://1.233.com 都不会走代理 如：233.com|，代表 233.com 结尾的网站才会走代理，即 http://233.com https://233.com http://1.233.com 都会走带了，而 http://233.com/index.html 不会走代理。 === 全匹配规则 =\u0026gt; || ||example.com 则代表 http://example.com、https://example.com、ftp://example.com 等协议的地址全部走代理 如：||233.com ，即 http://233.com、https://233.com、ftp://233.com 等地址全都走代理 === 注释规则 =\u0026gt; ! !我是注释233 !我也是注释666 ","permalink":"/posts/shadowsocks-shou-dong-tian-jia-he-bian-ji-pac-zhong-de-wang-zhi-gui-ze/","summary":"给用户设置规则的文件user-rule.txt该文件在shadowsocks.exe同级文件夹中语法规则如下=== 通配符支持 =\u0026gt; **.example.com/ 代表 \u003ca href=\"http://example.com\"\u003ehttp://example.com\u003c/a\u003e \u003ca href=\"http://233.example.com\"\u003ehttp://233.example.com\u003c/a\u003e \u003ca href=\"https://233.example\"\u003ehttps://233.example\u003c/a\u003e","title":"Shadowsocks手动 添加和编辑 PAC中的网址规则"},{"content":"1.下载 wget https://download.redis.io/redis-stable.tar.gz 2.编译环境 yum install -y cmake make gcc gcc-c++ 3.编译安装 tar -xzvf redis-stable.tar.gz cd redis-stable make make install 4.验证 redis-server 5.redis test 错误修复 You need tcl 8.5 or newer in order to run the Redis test wget http://mirror.centos.org/centos/7/os/x86_64/Packages/tcl-8.5.13-8.el7.x86_64.rpm rpm -ivh tcl-8.5.13-8.el7.x86_64.rpm ","permalink":"/posts/centos-xia-yuan-ma-an-zhuang-redis/","summary":"1.下载wget \u003ca href=\"https://download.redis.io/redis-stable.tar.gz2\"\u003ehttps://download.redis.io/redis-stable.tar.gz2\u003c/a\u003e.编译环境yum install -y cmake make gcc gcc-c++3.编译安装tar -xzvf redis-stable.tar.gzcd redis-stablemak","title":"Centos下源码安装redis"},{"content":"一、介绍 iperf3是用来测量一个网络最大带宽的工具。它支持调节各种参数比如发送持续时间，发送/接收缓存，通信协议。每次测试，它都会报告网络带宽，丢包率和其他参数。更多信息请登陆官网：https://iperf.fr/\n二、安装（centos7为例） 下载：https://iperf.fr/iperf-download.php 执行命令：（服务端和客户端都一样） rpm -i iperf3-3.1.3-1.fc24.x86_64.rpm 三、使用 1. server端启动： iperf3 -s -i 2 -p 60000 # -s ：作为server端启动 # -i 2：每间隔2秒统计一次 # -p 60000：开启60000端口监听 2. client端启动： iperf3 -c 115.239.233.26 -u -p 60000 -i 2 -R -b 800M # -c 115.239.233.26：作为客户端连接ip为115.239.233.26的server # -u ：udp的方式 # -p 60000：通过60000端口连接服务器 # -i 2：每间隔2秒统计一次 # -R：发包方式：服务端发送，客户端接收。 # -b 800M：以800M的带宽发送数据包 四、注意点 1. 如果出现 error - unable to connect to server: No route to host，那么就是说明防火墙没有设置端口通过 2. 最简单的方法关闭防火墙 代码示例：\nsystemctl stop firewalld systemctl disable firewalld ","permalink":"/posts/centos7-xia-iperf3-de-an-zhuang-shi-yong-jiao-cheng/","summary":"\u003ch2 id=\"一介绍\"\u003e一、介绍\u003c/h2\u003e\n\u003cblockquote\u003e\n\u003cp\u003eiperf3是用来测量一个网络最大带宽的工具。它支持调节各种参数比如发送持续时间，发送/接收缓存，通信协议。每次测试，它都会报告网络带宽，丢包率和其他参数。更多信息请登陆官网：https://iperf.fr/\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003ch2 id=\"二安装centos7为例\"\u003e二、安装（centos7为例）\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003e下载：https://iperf.fr/iperf-download.php\u003c/li\u003e\n\u003cli\u003e执行命令：（服务端和客户端都一样）\u003c/li\u003e\n\u003c/ol\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003erpm -i iperf3-3.1.3-1.fc24.x86_64.rpm\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"三使用\"\u003e三、使用\u003c/h2\u003e\n\u003ch3 id=\"1-server端启动\"\u003e1. server端启动：\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eiperf3 -s -i \u003cspan style=\"color:#ae81ff\"\u003e2\u003c/span\u003e -p \u003cspan style=\"color:#ae81ff\"\u003e60000\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# -s ：作为server端启动\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# -i 2：每间隔2秒统计一次\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# -p 60000：开启60000端口监听\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2-client端启动\"\u003e2. client端启动：\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eiperf3 -c 115.239.233.26 -u -p \u003cspan style=\"color:#ae81ff\"\u003e60000\u003c/span\u003e -i \u003cspan style=\"color:#ae81ff\"\u003e2\u003c/span\u003e -R -b 800M\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# -c 115.239.233.26：作为客户端连接ip为115.239.233.26的server\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# -u ：udp的方式\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# -p 60000：通过60000端口连接服务器\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# -i 2：每间隔2秒统计一次\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# -R：发包方式：服务端发送，客户端接收。\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e# -b 800M：以800M的带宽发送数据包\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id=\"四注意点\"\u003e四、注意点\u003c/h2\u003e\n\u003ch3 id=\"1-如果出现-error---unable-to-connect-to-server-no-route-to-host那么就是说明防火墙没有设置端口通过\"\u003e1. 如果出现 error - unable to connect to server: No route to host，那么就是说明防火墙没有设置端口通过\u003c/h3\u003e\n\u003ch3 id=\"2-最简单的方法关闭防火墙\"\u003e2. 最简单的方法关闭防火墙\u003c/h3\u003e\n\u003cp\u003e代码示例：\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl stop firewalld\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003esystemctl disable firewalld\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下iperf3的安装使用教程"},{"content":"1.安装EPEL yum install epel-release -y 2.安装Python3.6 yum install python3 -y ","permalink":"/posts/centos7-xia-yum-an-zhuang-python36-huan-jing/","summary":"\u003ch3 id=\"1安装epel\"\u003e1.安装EPEL\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install epel-release -y\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id=\"2安装python36\"\u003e2.安装Python3.6\u003c/h3\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eyum install python3 -y\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Centos7下yum安装Python3.6环境"},{"content":"1.添加源 # add the yum repo: wget https://openresty.org/package/centos/openresty.repo mv openresty.repo /etc/yum.repos.d/ # update the yum index: yum check-update 2.安装 yum install -y openresty ","permalink":"/posts/centos-xia-yum-an-zhuang-openresty/","summary":"1.添加源# add the yum repo:wget \u003ca href=\"https://openresty.org/package/centos/openresty.repomv\"\u003ehttps://openresty.org/package/centos/openresty.repomv\u003c/a\u003e openresty.repo /etc/yum.repos.d/# update the yum index:yum check-up","title":"Centos下yum安装openresty"},{"content":"1.安装虚拟环境 pip install virtualenv 2.基本使用 cd my_project virtualenv venv # venv为虚拟环境目录名 如果有多个python版本，可以指定解释器 virtualenv -p /usr/bin/python3.6 venv 3.进入虚拟环境，安装软件包 source venv/bin/activate pip install -r requirements.txt ","permalink":"/posts/linux-chuang-jian-python-xu-ni-huan-jing/","summary":"1.安装虚拟环境pip install virtualenv2.基本使用cd my_projectvirtualenv venv   # venv为虚拟环境目录名如果有多个python版本，可以指定解释器virtualenv -p /usr/bin/python3.6 venv3.进入虚拟环境，安装","title":"Linux创建Python虚拟环境"},{"content":"环境 A: 172.21.110.100 B：172.21.110.101 mysql5.6 创建同步用户 A： grant replication slave on *.* to \u0026#39;sync\u0026#39;@\u0026#39;172.21.110.101\u0026#39; identified by \u0026#39;123456\u0026#39;; flush privileges; B: grant replication slave on *.* to \u0026#39;sync\u0026#39;@\u0026#39;172.21.110.101\u0026#39; identified by \u0026#39;123456\u0026#39;; flush privileges; 服务配置 A: # MASTER DB # #binlog-do-db = m2m binlog-ignore-db = mysql,information_schema,performance_schema auto-increment-increment = 2 auto-increment-offset = 1 # SLAVE DB # #replicate-do-db = m2m replicate-ignore-db = mysql,information_schema,performance_schema log-slave-updates = ON B: # MASTER DB # #binlog-do-db = m2m binlog-ignore-db = mysql,information_schema,performance_schema auto-increment-increment = 2 auto-increment-offset = 2 # SLAVE DB # #replicate-do-db = m2m replicate-ignore-db = mysql,information_schema,performance_schema log-slave-updates = ON 查看2个服务器的日志状态 A: mysql\u0026gt; flush tables with read lock; #防止进入新的数据 Query OK, 0 rows affected (0.00 sec) mysql\u0026gt; show master status\\G; *************************** 1. row *************************** File: binlog.000003 Position: 120 Binlog_Do_DB: Binlog_Ignore_DB: mysql,information_schema,performance_schema Executed_Gtid_Set: B: mysql\u0026gt; flush tables with read lock; #防止进入新的数据 Query OK, 0 rows affected (0.00 sec) mysql\u0026gt; show master status\\G; *************************** 1. row *************************** File: binlog.000003 Position: 120 Binlog_Do_DB: Binlog_Ignore_DB: mysql,information_schema,performance_schema Executed_Gtid_Set: 开启同步 A: CHANGE MASTER TO MASTER_HOST=\u0026#39;172.21.110.101\u0026#39;,MASTER_PORT=3306,MASTER_USER=\u0026#39;sync\u0026#39;,MASTER_PASSWORD=\u0026#39;123456\u0026#39;,MASTER_LOG_FILE=\u0026#39;binlog.000003\u0026#39;,MASTER_LOG_POS=120; B: CHANGE MASTER TO MASTER_HOST=\u0026#39;172.21.110.100\u0026#39;,MASTER_PORT=3306,MASTER_USER=\u0026#39;sync\u0026#39;,MASTER_PASSWORD=\u0026#39;123456\u0026#39;,MASTER_LOG_FILE=\u0026#39;binlog.000003\u0026#39;,MASTER_LOG_POS=120; 2台服务器都启动slave进程 mysql\u0026gt; start slave; Query OK, 0 rows affected (0.00 sec) 查看同步状态 如存在以下状态，则表示设置成功 mysql\u0026gt; show slave status\\G; *************************** 1. row *************************** ... ... Slave_IO_Running: Yes Slave_SQL_Running: Yes ... ... ","permalink":"/posts/mysql-pei-zhi-zhu-zhu-tong-bu/","summary":"\u003ch3 id=\"环境\"\u003e环境\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eA: 172.21.110.100\u003c/li\u003e\n\u003cli\u003eB：172.21.110.101\u003c/li\u003e\n\u003cli\u003emysql5.6\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"创建同步用户\"\u003e创建同步用户\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eA：\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003egrant replication slave on *.* to \u0026#39;sync\u0026#39;@\u0026#39;172.21.110.101\u0026#39; identified by \u0026#39;123456\u0026#39;;\nflush privileges;\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003eB:\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003egrant replication slave on *.* to \u0026#39;sync\u0026#39;@\u0026#39;172.21.110.101\u0026#39; identified by \u0026#39;123456\u0026#39;;\nflush privileges;\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"服务配置\"\u003e服务配置\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eA:\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e# MASTER DB #\n#binlog-do-db                   = m2m\nbinlog-ignore-db               = mysql,information_schema,performance_schema\nauto-increment-increment       = 2\nauto-increment-offset          = 1\n# SLAVE DB #\n#replicate-do-db                = m2m\nreplicate-ignore-db            = mysql,information_schema,performance_schema\nlog-slave-updates = ON\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003eB:\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003e# MASTER DB #\n#binlog-do-db                   = m2m\nbinlog-ignore-db               = mysql,information_schema,performance_schema\nauto-increment-increment       = 2\nauto-increment-offset          = 2\n# SLAVE DB #\n#replicate-do-db                = m2m\nreplicate-ignore-db            = mysql,information_schema,performance_schema\nlog-slave-updates = ON\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"查看2个服务器的日志状态\"\u003e查看2个服务器的日志状态\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eA:\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003emysql\u0026gt; flush tables with read lock; #防止进入新的数据 \nQuery OK, 0 rows affected (0.00 sec) \nmysql\u0026gt; show master status\\G;\n*************************** 1. row ***************************\n             File: binlog.000003\n         Position: 120\n     Binlog_Do_DB: \n Binlog_Ignore_DB: mysql,information_schema,performance_schema\nExecuted_Gtid_Set: \n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003eB:\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003emysql\u0026gt; flush tables with read lock; #防止进入新的数据 \nQuery OK, 0 rows affected (0.00 sec) \nmysql\u0026gt; show master status\\G;\n*************************** 1. row ***************************\n             File: binlog.000003\n         Position: 120\n     Binlog_Do_DB: \n Binlog_Ignore_DB: mysql,information_schema,performance_schema\nExecuted_Gtid_Set: \n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"开启同步\"\u003e开启同步\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eA:\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eCHANGE MASTER TO MASTER_HOST=\u0026#39;172.21.110.101\u0026#39;,MASTER_PORT=3306,MASTER_USER=\u0026#39;sync\u0026#39;,MASTER_PASSWORD=\u0026#39;123456\u0026#39;,MASTER_LOG_FILE=\u0026#39;binlog.000003\u0026#39;,MASTER_LOG_POS=120;\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003eB:\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003eCHANGE MASTER TO MASTER_HOST=\u0026#39;172.21.110.100\u0026#39;,MASTER_PORT=3306,MASTER_USER=\u0026#39;sync\u0026#39;,MASTER_PASSWORD=\u0026#39;123456\u0026#39;,MASTER_LOG_FILE=\u0026#39;binlog.000003\u0026#39;,MASTER_LOG_POS=120;\n\u003c/code\u003e\u003c/pre\u003e\u003cul\u003e\n\u003cli\u003e2台服务器都启动slave进程\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003emysql\u0026gt; start slave; \nQuery OK, 0 rows affected (0.00 sec)\n\u003c/code\u003e\u003c/pre\u003e\u003ch3 id=\"查看同步状态\"\u003e查看同步状态\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e如存在以下状态，则表示设置成功\u003c/li\u003e\n\u003c/ul\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode\u003emysql\u0026gt; show slave status\\G; \n*************************** 1. row *************************** \n... \n... \nSlave_IO_Running: Yes \nSlave_SQL_Running: Yes \n... \n... \n\u003c/code\u003e\u003c/pre\u003e","title":"MySQL配置主主同步"}]