跳至主要内容

树莓派搭建自己的数据中心NAS

入手了二代树莓派,速度确实比一代好了很多,尤其是在CPU上性能大幅提升,一代树莓派的硬盘IO性能很不好,主要原因是CPU比较弱了,而第二代树莓派CPU性能终于提上来了,但USB还保持在2.0,所以IO还是不是很好,不过考虑到二代树莓派的网口还是100M的,就算换了USB3.0,通过网络传数据还是10MB/s,意义也不是很大了,就先这样用这吧。一代产品由于性能较弱,所以有点像一个玩具服务器,二代产品开始能当作小服务器来用了,这点还是挺不错的。

树莓派安全篇

很少看到有介绍树莓派安全问题的文章,但这个对于我来说确是不得不做的事情,我所在的学校很大方的提供给我们免费的固定外网IP,在这个ipv4地址匮乏的时代,能如此大方的人手一个外网固定ip,真是不容易啊。但随之而来的是很恐怖的安全问题。外网IP真的很危险诶。。曾经看到,如果你的root密码是6位数字,并且打开了ssh server,端口是默认的22
号,在公网ip几分钟内就会变成别人的肉鸡。我们跟我同ip段的有很多还是学校各部门或者各实验室服务器,时不时的就会出现主页被修改,还发生过国家安全部门直接过来查服务器(服务器上挂了危害国家安全的程序)。。。作为树莓派,肯定会长期开机,而且一定会开ssh服务,这么危险的网络,就算密码再安全,直接暴露出来也是非常危险的。所以这里做了一些安全工作,如果你的树莓派挂在自己的路由器内,大可不必这么麻烦,注意不要设太简单的密码应该就可以了。

tmpfs

由于树莓派读写的是tf卡,速度慢不说,反复读写还会对tf卡造成损伤,因此我们使用tmpfs文件系统来挂载一些需要反复读写,但又没太多重要作用的位置。通过使用fstab文件来实现开机自动挂载。我们把/tmp, /var/tmp, /var/run文件夹挂载到tmpfs上,fstab里面添加如下内容:
1
2
3
tmpfs /tmp tmpfs defaults,noatime,nosuid,size=100m 0 0
tmpfs /var/tmp tmpfs defaults,noatime,nosuid,size=30m 0 0
tmpfs /var/run tmpfs defaults,noatime,nosuid,mode=0755,size=2m 0 0
重启后看一下df信息,确认以及挂载成功。

denyhosts

我最开始的策略是使用ssh防扫描软件,denyhosts就是这样一个针对ssh服务器的基于日志的入侵预防安全工具,使用Python编写。其实linux本身就可以记录一些ssh的日志信息,包括登陆者的ip,登陆成功或者失败的信息,denyhosts就是利用linux生成的日志信息,屏蔽一些貌似在试密码的登陆者的IP。缺点就是对ipv6的地址不能很好的起效。
安装很简单,使用apt-get就可以直接安装
1
sudo apt-get install denyhosts -y
安装完成后可以对他进行配置,配置文件是/etc/denyhosts.conf其实我们用他的默认配置也是可以的,里面的配置主要是ssh登陆失败多少次后将这个ip屏蔽,denyhosts有他的黑名单和白名单,分别在/etc/hosts.deny和/etc/hosts.allow,可以将自己的一些设备加到/etc/hosts.allow里面,书写的格式在文件里面有解释,这里就不多说了。
使用denyhosts一段时间,就可以看到hosts.deny里面的记录迅速在增长,我的记录中,有时候一天就会多添加几十条记录。。这就又带来了一个新的问题,树莓派本身CPU资源就很紧张,整天被人这么扫,感觉还是很不爽的。其实还有另一种更简单更有效的方法来避免被人扫,修改ssh端口。ssh端口的记录在/etc/ssh/sshd_config文件中,直接修改就可以了。虽然很简单,但确实很有效,修改端口后,denyhosts的记录就停止增长了,说明那些漫无目的扫描器不会检查其他的端口。但这种方式对付那种就是想搞你这个ip的黑客是无效的,他们会扫描你所有的端口。。但至少这种方法配合denyhosts亲测还是很管用的local。
接下来就是正式的NAS服务器搭建了。

挂载硬盘

为了能使树莓派挂载硬盘,我买了那种sata3转usb的转接盒,同时为了解决树莓派usb供电不足的问题,我又购置了有源usb集线器。。诶,总之硬件确实需要这些东西的辅助才行。都连接好了后,看一下/dev下是不是有sdX设备了,我这里是sda。这里推荐将硬盘重新格式化为ext4格式的文件系统。
格式化硬盘为ext4
1
2
3
4
5
6
# 查看硬盘内核名称,/dev/sda一般是你的硬盘
sudo fdisk -l
# 按照提示对硬盘进行分区
sudo fdisk /dev/sda
# 将硬盘分区格式化为ext4格式,格式化前必须先卸载硬盘,使用umount命令
sudo mkfs.ext4 /dev/sda1
挂载硬盘
ext4格式的硬盘的权限指定很方便,可以直接修改挂载的文件夹就可以了,举个例子
1
2
3
mkdir /home/pi/media
sudo mount /dev/sda1 /home/pi/media
sudo chown pi:pi /home/pi/media
这样下次挂载的时候也是同样的权限设置
开机自启动
开机自启动也是修改/etc/fstab文件,编辑/etc/fstab文件,加入如下内容
1
/dev/sda1 /home/pi/media ext4 defaults 0 0
这里也可以使用硬盘的uuid来进行挂载,万一他不再是sda了也可以同样识别到,查看方法如下
1
2
sudo blkid
/dev/sda1: UUID="d5a3d30a-d2e7-4b12-bb31-b4439c5db200" TYPE="ext4"
这样添加fstab的时候可以这样添加
1
UUID=d5a3d30a-d2e7-4b12-bb31-b4439c5db200 /home/pi/nas-data ext4 defaults 0 2
补充一下fstab文件
这里为了能够每次开机自动挂载,使用了/etc/fstab这个文件,文件的内容示例和说明如下:
1
2
3
4
5
/dev/sda1 /media/disk (format:auto, ntfs-3g, vfat, ext4,...) defaults,noexec,umask=0000 0 0
# sda1是取决于你的实际情况,a表示第一个硬盘,1表示第一个分区。
# /media/disk是挂载的位置
# format 是挂载文件的格式,格式有很多,可以看一下手册。
# 前面四个0就是对所有人,可读可写可执行,后面两个0,第一个代表dump,0是不备份,第二个代表fsck检查的顺序,0表示不检查
fstab这个文件确实功能非常强大,不仅能挂载本地分区,还可以挂载远程的文件系统。详情看我的博客,这里就不再细说了。
其他的文件系统格式
并不推荐其他的文件系统,因为linux需要模拟实现对他们的读取,性能会受到影响,而且可能某些使用上也会受到影响,但为了完整性,这里还是一并说一下如何使用。
  • NTFS格式::默认挂载NTFS格式的硬盘只有只读权限,需要借助其他工具实现。
    1
    2
    3
    4
    5
    6
    7
    8
    9
    # 安装所需软件包
    sudo apt-get install fuse-utils ntfs-3g
    # 加载内核模块
    modprobe fuse
    # 编辑fstab让硬盘开机自动挂载
    sudo nano /etc/fstab
    # 在最后一行添加如下内容 挂载到/media/disk文件夹
    /dev/sda1 /media/disk ntfs-3g defaults,noexec,umask=0000 0 2
    # 保存重启,即可生效
  • FAT32格式:FAT32格式可以直接挂载。
    1
    2
    3
    4
    sudo nano /etc/fstab
    # 在最后一行添加如下内容
    /dev/sda1 /mnt/myusbdrive auto defaults,noexec,umask=0000 0 0
    # 保存重启,即可生效
  • exFAT格式:exFAT格式需要安装exfat-fuse做驱动,安装后就可以挂载了。
    1
    2
    3
    4
    5
    sudo apt-get install exfat-fuse
    # 编辑fstab让硬盘自动挂载
    sudo nano /etc/fstab
    # 在最后一样添加如下内容
    /dev/sda1 /mnt/usbdisk vfat rw,defaults 0 0

sftp-server

这是最简单的服务器了,其实就是我们的ssh带的功能,在Linux上我们使用的scp命令以及我们在windows下使用的winscp软件都是利用了这个服务器。他是如此简单,以至于你把ssh功能打开后就可以直接使用了。那为什么这里还要提这个简单的功能呢?因为这其实是我用的最多的文件服务器了。这里就来说一下如何使用吧。
在Linux上除了scp命令可以使用sftp服务器外,还有个更强大的命令叫sshfs,这个命令能够将远程的文件夹直接挂载到你本地的文件夹下,非常自然的成为你系统的一部分。你在本地使用完全感觉不出来这是在操作远程文件系统,因为他已经完整的挂载过来了,至于如何完成远程文件系统实际的读写,这都是sshfs做的工作,你根本察觉不出来。
下面就说一下如何使用
在ubuntu上和fedora上的操作其实都是一样的,就是安装命令不同,ubuntu用户自行把dnf命令替换会apt-get命令
1
2
3
4
5
6
# 首先安装sshfs命令
sudo dnf install sshfs
# 新建一个文件夹作为挂载点,~是指的你的home文件夹
mkdir ~/remote
# 基本的挂载,PORT修改成你ssh的端口,rpi修改成你的树莓派的ip地址,/home/pi 是你想挂载过来的远程的文件夹,后面的~/remote是本地的挂载点。
sshfs -P PORT pi@rpi:/home/pi ~/remote
打开看一下刚刚建好的remote文件夹看看树莓派的home是不是挂载过来了,你对这个文件夹的操作都会实时的传回树莓派,传输速度同你的网速。
实际上我们并不直接挂载home回本地,因为没有意义,树莓派本身就是用的一个sd卡,速度慢空间小。我们这里挂载的是你挂载树莓派上的硬盘。如果前面你成功挂载了你的硬盘到你的树莓派,那么把树莓派上的这个挂载点挂回你的本地,这样就可以任意操作了。我的所有的数据和文档全都放在这个硬盘上,本地的硬盘从来不存重要的东西,这样随便安装系统也不怕数据没了,而且像我这种既要用笔记本又要用台式机的人,经常要在多个电脑间上换来换去的。经常出现一个文档我在这个笔记本上写完了,切回台式机还要用u盘再传一份,改几个字,出差了,又要再传一份给笔记本。。费劲不说,万一忘了会出大叉子。通过这种方式,所有的数据只留一份给树莓派,完美的解决了多设备同步的问题,因为数据只有一份。笔记本用个小的ssd也不用担心硬盘不够用了。。说多了,其实用法很多,看你要怎么用了。回到正题。
这么好的东西,用windows的怎么办?其实windows也有sshfs命令,直接去下一个就可以了,下载地址:https://code.google.com/p/win-sshfs/downloads/list 有两个依赖,分别是.NET Framework4 和Dokan Library 自己下载安装吧,安装完了图形界面配置,按照要求填完,就可以挂载了,挂载完成后,会出现在我的电脑里面,多出对应的盘符。接下来就可以任意使用了。

samba服务器

samba服务器是针对windows用户的服务器,但很多linux的文件浏览器也支持,这里也对他进行搭建的过程进行记录。
安装命令如下:
1
sudo apt-get install samba samba-common-bin
安装完成后编辑/etc/samba/smb.conf文件
1
sudo vim /etc/samba/smb.conf
在文件的最后添加如下内容:
1
2
3
4
5
6
7
[NAME] # 这里修改成你想要显示的名字
comment = some comment # 注释,你也可以不加
path = /path/of/folder # 这是你要共享的文件夹
browseable = yes # 允许浏览
writable = yes # 是否可写
create mask = 0664 # 新建文件的权限
directory mask = 0775 # 文件夹的权限
如果你有多个要分享的文件夹,就多写几个这个豆腐块。
添加一下用户,注意这个用户必须是要在你的系统中真实存在的,例如我们pi用户。
1
smbpasswd -a pi
完成后重启samba服务
1
sudo service samba restart
windows用户这时就可以打开我的电脑,映射网络驱动器-> 文件夹输入”\\ip to your rpi\NAME”。中间部分是你的ip,NAME就是前面你在中括号里面填的内容。成功连接后就可以访问了,linux用户自行查找连接方法。

ftp服务器

ftp这种老牌的文件服务器自然也是少不了的,这里使用vsftpd服务器就可以满足我们的基本需要。vsftpd是一个比较轻量级的ftp服务器,一般需求完全可以满足,在linux下很常用。
在树莓派下安装vsftpd可以使用apt-get来进行安装
1
sudo apt-get install vsftpd -y
配置文件是/etc/vsftpd.conf 这个文件的内容很多,一般使用的话可以按照下面的配置做一下
1
2
3
4
5
6
7
8
9
# 一些配置需要去掉配置文件前的 ’#‘ 才能生效
write_enable=YES # 可以上传文件
local_umask=022
anonymous_enable=NO # 不能匿名访问
local_enable=YES # 本地用户可以访问
# local_root选项可能没有在配置文件中显示,
# 他的作用是设置ftp登陆进去看到的目录,根据自己的情况进行设置
local_root=/path/of/ftp/root
退出后重启vsftpd服务,测试一下ftp连接是否成功
1
sudo service vsftpd restart

种子下载功能

一个合格的数据中心也要具备从网上下载数据的能力,由于目前还在学校,享受着免费的不限网速的ipv6,下载能力强悍而且有众多种子站,我使用的是transmission-daemon来替我完成种子下载功能。如果需要迅雷下载功能,需要使用aria2来帮你实现,但这个软件的配置略麻烦,而且我也没用过,就不写了。
安装transmission-daemon
1
sudo apt-get install transmission-daemon
安装完成后第一件事情就是停止transmission-daemon服务,否则你后面做的修改保存不下来的。
1
sudo service transmission-daemon stop
配置transmission-daemon
1
sudo vim /etc/transmission-daemon/settings.json
一般使用,只需要修改一下下面的内容就好了,需要查看完整的参数说明,请参考官网
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 下面这个参数指定下载地址
"download-dir": "/home/pi/media/bt/downloads",
# 下面这个参数指定同时下载的任务数量
"download-queue-size": 2,
# 下面这个参数表示未完成的任务放在另一个地方,我们就不用了。
"incomplete-dir-enabled": false,
# 下面的参数开启远程web管理界面
"rpc-enabled": true,
# 下面这个参数表示web管理界面是否需要密码,我们选是
"rpc-authentication-required": true,
# 下面的参数就是web管理界面的管理信息,大家看着改成自己的内容就好了
"rpc-username": "登录名",
"rpc-password": "明文密码(保存后自动变成密文)",
"rpc-port": 9091,
需要改的就这么多,其他的使用默认的就好了。为了能避免出现读写权限问题,我们直接把你要下载的下载目录改成777权限,如下:
1
sudo chmod 777 -R bt
原文地址是 http://blog.throneclay.com/2015/10/28/rpinas/ 对作者表示感谢
重启服务
1
2
sudo service transmission-daemon reload
sudo service transmission-daemon start
没有错误的话,打开浏览器,在地址栏输入 树莓派的ip:9091 看一下是不是成功启动了?以后直接上传自己的种子文件,他就会自动下载了。

wakeonlan 远程唤醒我的电脑

说一个不是NAS的功能的小工具,wakeonlan是一个perl写的小工具,作用很简单,发送魔术包,唤醒同一网段的主机。这个功能对我来说很方便也很实用。目前绝大部分主机的bios里面都可以设置远程唤醒,其实就是监听有没有给自己发过来的魔术包,魔术包就是magic packet,是包含特定内容的一个socket包,使用的是udp协议。有了这个工具,哪怕在外地想连上自己的主机,通过这个工具就可以直接开机了。需要注意的是使用这个工具最好是将树莓派和主机放到同一个路由器下面。使用方法很简单,先确认自己的主机有远程唤醒功能,并在bios里启动,然后安装
1
sudo apt-get install wakeonlan
安装完成后,在树莓派上继续输入下面的命令,查看一下自己电脑的mac地址是多少
1
arp -a
该命令会把所有同网段的ip都列出来,其mac地址也会列出来,可以看看树莓派能不能到你的电脑,找到自己电脑的ip,记录一下你的mac地址,以后你就直接输入下面的命令启动你的电脑好了。
1
wakeonlan [你的mac地址]
我的NAS的功能就是这么多,未来工作就有三点,一是可以试试组一个软raid,第二个是上webdav服务,最后就是试着搭一个自己的git服务器。

Popular posts from 产品随想的博客

Steve Jobs at 44, By Michael Krantz, 1999

Differences and Similarities Between Apple and Pixar Apple turns out many products--a dozen a year; if you count all the minor ones, probably a hundred. Pixar is striving to turn out one a year. But the converse of that is that Pixar's products will still be used fifty years from now, whereas I don't think you'll be using any product Apple brings to market this year fifty years from now. Pixar is making art for the ages. Kids will be watching Toy Story in the future. And Apple is much more of a constant race to continually improve things and stay ahead of the competition.  His Role At Pixar At Pixar my job is to help build the studio and recruit people and help create a situation where they can do the best work of their lives. And to some degree it's the same at Apple. But at Pixar, I don't direct the movies, whereas at Apple probably, if I had to pick a role out of a film production, I'd be the director. So it...

《Becoming Steve Jobs》Chapter 12 Two Decisions

Jim Collins, the bestselling author of the management classics Built to Last: Successful Habits of Visionary Companies and Good to Great: Why Some Companies Make the Leap … and Others Don’t, has a wonderful phrase to describe an essential characteristic of great leaders: deep restlessness. Collins applies the phrase to Steve, one of the two great leaders who inspire him the most (the other is Winston Churchill, the great English politician who was prime minister during most of World War II, from 1940 to 1945, and again from 1951 to 1955). Collins believes this restlessness is far more important and powerful than simple ambition or raw intelligence. It is the foundation of resilience, and self-motivation. It is fueled by curiosity, the ache to build something meaningful, and a sense of purpose to make the most of one’s entire life. 自己何其有幸,在不到30的年纪,就能感受到乔布斯的心境 “The things he was trying to do,” says Collins, “were always hard. Sometimes those things beat him up. But the response to fighti...

《Becoming Steve Jobs》Chapter 15 The Whole Widget

What the world did see was an effective and visionary leader at the height of his powers. These were complicated years for Apple, but Steve handled almost every challenge in exactly the manner he wanted. He had fallen into leadership at such a young age, but he was comfortable in that role now, and justifiably sure of his capacity to guide Apple’s tens of thousands of employees to the goals he set for them. During these years, he would ensure the company’s continued success in personal computers by engineering a deft switch to a new kind of microprocessor; ruthlessly and successfully managing some major transitions in his executive team; and optimizing and building upon the efficiency and ambition of the company’s product development “treadmill,” as Tim Cook describes it. This is also when he delivered what is likely to be remembered as the most notable product of his life, the iPhone, and then improved even that by pivoting once again into a strategy he personally had not wanted to pu...

产品随想 | 陪读《Make Something Wonderful:Steve Jobs in his own words》1976-1996

  There’s lots of ways to be, as a person. And some people express their deep appreciation in different ways. But one of the ways that I believe people express their appreciation to the rest of humanity is to make something wonderful and put it out there. And you never meet the people. You never shake their hands. You never hear their story or tell yours. But somehow, in the act of making something with a great deal of care and love, something’s transmitted there. And it’s a way of expressing to the rest of our species our deep appreciation. So we need to be true to who we are and remember what’s really important to us. ──Steve, 2007 Introduction by Laurene Powell Jobs Much of what’s in these pages reflects guiding themes of Steve’s life: his sense of the worlds that would emerge from marrying the arts and technology; his unbelievable rigor, which he imposed first and most strenuously on himself; his tenacity in pursuit of assembling and leading great teams; and perhaps, above all,...

360T7 刷机步骤及固件

https://cmi.hanwckf.top/p/360t7-firmware/   360T7的固件支持由immortalwrt-mt798x项目提供支持,请参考: https://cmi.hanwckf.top/p/immortalwrt-mt798x https://github.com/hanwckf/immortalwrt-mt798x 刷机步骤 参考 此处 的办法开启原厂固件的UART和telnet功能 在以下链接下载360T7测试固件(纯净版,无任何插件) https://wwd.lanzout.com/b0bt9idwd 密码:ezex (此固件已过时,请选择其它更新的固件) 接下来将刷入修改版uboot。修改版uboot的优点有: 固件分区可达108MB,原厂uboot只能使用36M 自带一个简单的webui恢复页面 到以下仓库的Release页面下载uboot,目前暂时仅支持360T7,后续将支持更多mt798x路由器。 推荐使用 mt7981_360t7-fip-fixed-parts.bin , fixed-parts 代表uboot分区表在编译期间固定,不会随着uboot环境变量变化。 https://github.com/hanwckf/bl-mt798x/releases/latest 将 mt7981_360t7-fip-fixed-parts.bin 通过HFS等方式上传到路由器,使用以下命令刷入uboot mtd write mt7981_360t7-fip-fixed-parts.bin fip 确认刷入完毕后,拔掉路由器电源。然后将电脑的IP地址设置为固定的 192.168.1.2 ,接着按住路由器的RESET按钮后通电开机,等待8s后用浏览器进入 192.168.1.1 在uboot恢复页面选择要刷入的固件。immortalwrt-mt798x目前编译两个版本的360T7固件。 建议修改版uboot直接使用 immortalwrt-mediatek-mt7981-mt7981-360-t7-108M-squashfs-factory.bin ,两种固件区别如下: mt7981-360-t7-108M 为108M固件分区,原厂uboot不可启动,需要修改版u...

ISSUU使用指南--木喵

作者: 木喵   出处: Wonderworks 问:issuu是什么? 答:Issuu是国外的一个在线文档共享网站,它是你的PDF文档发布专家。它类似于我们熟悉的youtube,但它共享的是文档、杂志之类的文本。 简而言之、同志们想看国外的各种杂志? 想找国外的汇报文本么? 想借鉴国外学生的作品集么? 那么你就要用到它啦~ 今天主要和大家讲两个方面 一、如何在pc端使用和下载issuu上的pdf文档 首先我们打开issuu的网址 https://issuu.com/ 我们可以很清楚的看到网页上呢都是国外的杂志以及一些作者自己制作的pdf文档 首先我们点击右上角的 sign up  然后填写相关信息注册一个账户: 注册完成之后我们就可以搜索我们想要找的资料: 比如说,我想找一些分析图的资料,我们就搜索: architecture diagram 然后我们就可以看到相关的文档了: 点击你所选择的文档, 好了问题来了: sorry,this publication is not available 这个时候!就需要在用pc端的我们做一件必不可少的事: 翻墙 然后我们就能将页面刷新粗来了 好、接下来是非常有建设性意义的一步 怎样把我们网页上的文件 下载下来 呢? 截图? no~no~no~ 接下来,让木喵告诉你怎么下载: 首先你需要复制上面的网址 然后将 https://wenfan.hk/issuu/index_link.php 在另一个网址中打开 将你之前复制的pdf的网址粘贴在下面的对话框中 点击 I‘m not a robot 再点击 get it 然后会出现一堆网址代码 我们 全选 打开你的迅雷点击 新建 将你之前的复制粘贴到下载链接里 然后呢~我们就全都下载成功啦~ 然后我们回到之前的网页向下看 我们可以看到有上传文档的作者(记得要关注哟) 然后还有 info   share   stack   ❤ 如果...

Foobar2000 组件安装教程

 原作者 博客地址   汉化作者 Asion博客   关于foobar 2000的一些资源 前言 foobar2000 由于其软件架构特点以及开放的姿态,使得第三方很容易开发组件(component)来拓展它的功能。由于在官网下载的默认安装文件只带了少量几个默认的组件,满足不了使用的需求,例如:默认不带 ape,tta,tak 等音频文件格式的解码器,很多无损压缩格式音乐没法播放。所以自己下载安装组件是必备的基本技能。 foobar2000 的中文汉化版(Asion 汉化)为了方便使用,集成了无损压缩文件解码器以及一些其它有用的插件,安装时选上即可,不喜欢折腾的建议使用汉化版。 这里组件指的是 foobar2000 标准组件(*.dll 文件),而非 vst 插件等其它插件,姑且把组件分为两类: 官方组件: 英文版安装包自带,安装时可选择; 第三方组件:非官方自带的组件 除了 foo_input_std.dll 和 foo_ui_std.dll 这两个组件是必须的外,其它的所有组件都 非必需 的,可以随需要增删。第三方组件可以去 官网 、 官方论坛 或者 官方 wiki 去找,也可以去贴吧等地逛逛。 下载 还是要强调一下,这里说的是 foobar2000 component ,不是中文网上通常说的 vst 插件。 下载好的组件包一般是 xxx.zip 或 xxx.fb2k-component 格式的文件,也有用 7z 打包的。前两种都是 zip 压缩(只要把 fb2k-component 改成 zip 文件就变成了 zip: 包)。标准状况下压缩包里的内容结构应该是 xxx.zip yyy.dll README.txt (可能没有) LICENCE.txt (可能没有) (其它杂七杂八) 除少数外一般只有一个 xxx.dll 文件.一定要注意压缩包结构不能是: xxx.zip yy folder (文件夹) zzz.dll … 否则要解压缩,提取那个 dll 文件。 安装 方法一(推荐) 打开 foobar2000 的菜单 文件 > 首选项(file >preferences) 的 组件(components...

巴菲特致股东信-1976年

 笔记: 为什么选择轻资产行业:当竞争疯狂时,不会强迫加入降价大战 最终选择了费雪的思想,选择能理解的优秀企业,以合理的价格买入并长期拥有 翻译: 雪球:https://xueqiu.com/6217262310/131440258 备份:https://archive.ph/XLK0S 原文: To the Stockholders of Berkshire Hathaway Inc, After two dismal years, operating results in 1976 improved significantly. Last year we said the degree of progress in insurance underwriting would determine whether our gain in earnings would be "moderate" or "major." As it turned out, earnings exceeded even the high end of our expectations. In large part, this was due to the outstanding efforts of Phil Liesche's managerial group at National Indemnity Company. In dollar terms, operating earnings came to $16,073,000, or $16.47 per share. While this is a record figure, we consider return on shareholders' equity to be a much more significant yardstick of economic performance. Here our result was 17.3%, moderately above our long-term average and even further above the average o...

《Becoming Steve Jobs》Chapter 11 Do Your Level Best

As a mass-market consumer electronics device, the iPod would eventually be sold, of course, all the usual places: Best Buy, Circuit City, big-box department stores, and even the computer retailers like CompUSA. Steve disdained all these outlets. His obsession with his products continued well after they’d been manufactured. The tacky, low-margin hustle of these chains ran completely against the minimalist aesthetic of his products and the clean exuberance of his marketing. There was only one place where he really enjoyed seeing his products sold to the public: his own Apple stores, which had debuted four months ahead of the iPod. 觉得那些喧嚣、嘈杂的零售渠道,配不上自己极美的产品 Going back as far as the debut of the Mac, Steve had always groused about the way Apple computers were sold in its resellers’ stores. The way his computers were displayed and sold represented the very worst of what could go wrong when things weren’t done his way. The salespeople, always interested in quick turnover, seemed to make litt...

《Becoming Steve Jobs》Chapter 16 Blind Spots, Grudges, and Sharp Elbows

Steve could be pretty thin-skinned when someone prominent criticized the aesthetics of his products. He took great umbrage that Neil would, as Steve put it, “pop off in public like that without coming to talk to us about his technical concerns first.” From that point on he had rebuffed all of Neil’s attempts to smoke the peace pipe. 有趣 He had blind spots, grating behavioral habits, and a tendency to give in to emotional impulse that persisted his entire life. These characteristics are often used to make the case that Steve was an “asshole” or a “jerk,” or perhaps simply “binary”—that odd adjective often used to convey the sense that he was half asshole/half genius from birth to death. These aren’t useful, interesting, or enlightening descriptions. What’s more illuminating is to take a look at the specific ways in which Steve failed to do an effective job of tempering some of his weaknesses and antisocial traits, and to consider how, when, and why some of them continued to flare up even...