加入收藏 | 设为首页 | 会员中心 | 我要投稿 东莞站长网 (https://www.0769zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Windows > 正文

如何评估一个Linux发行版的总体成本

发布时间:2019-04-12 20:24:56 所属栏目:Windows 来源:Amanda Mcpherson, Brian Proffi
导读:开源之道引言:为什么要翻译十一年前的一份白皮书? (本白皮书发表于 2008 年。)答案很简单,就是要学会算经济账,一个开源项目,尤其是大型的、经过多年开发的,企业利用该项目就要在开始的时候算好一笔经济账,它不是零成本,它像一个快速向前滚动(发

从 FTP 服务器下载 src.rpm 后,就可以安装它们了。即使没有任何 rpm 作为二进制 RPM 包安装(因此可能实际只是做为测试机器上安装的应用程序),也建立了一个程序来允许构建和准备源代码的 RPM,而无需 root 访问权限,修改发现的过程在一个存档的 Red Hat howto 页面上。

源代码已下载到测试用户的主目录。

然后使用 gedit 创建一个脚本并将其保存为同一主目录中的 .rpmmacros。创建了目标目录集,然后使用以下命令安装 src.rpm 文件:

  1. rpm -ivh *.src.rpm

经过一段时间后,安装了所有 5547 个软件包,规范文件(.spec)位于 rpm/SPECS 目录中,源文件和图形填充了 rpm/SOURCES 目录。

在此阶段,必须构建和准备 src.rpm 文件,这将所有应用程序的源代码一一对应地放到 rpm/BUILD 目录中自己的目录。为此,使用了以下命令:

  1. rpmbuild -bp –nodeps *.spec

运行此命令后,所有软件包都已在 BUILD 目录中正确安装。

然后可以开始实际计数。因为发行版不是单个软件项目,所以不应该这样计算。SLOCCount 提供了一个参数来补偿: -multiproject。

对于 Fedora 9,使用的命令是:

  1. sloccount –multiproject –personcost 75662.08 /usr/src/rpm/BUILD/ &> sloc.txt

如需进一步检查,以下是 Fedora 9 源代码中的前 10 个软件包的统计数值,(供参考):

< 如显示不全,请左右滑动 >

参考资料

  1. IDC “The Role of Linux Commercial Servers and Workloads”, 2008 ↩

  2. Greg Kroah-Hartman, Jonathan Corbet, and Amanda McPherson, “Linux Kernel Development: How Fast it is Going, Who is Doing It, What They are Doing, and Who is Sponsoring It”, April 2016, https://www.linuxfoundation.org/events/2016/08/linux-kernel-development-2016/ ↩

  3. David A. Wheeler, “More Than a Gigabuck: Estimating GNU/Linux’s Size” 2001 (revised 2002) ↩

  4. http://en.wikipedia.org/wiki/Source_lines_of_code ↩

  5. http://en.wikipedia.org/wiki/Estimation_in_software_engineering ↩

  6. http://en.wikipedia.org/wiki/Barry_Boehm ↩

  7. http://en.wikipedia.org/wiki/Regression_analysis ↩

  8. http://en.wikipedia.org/wiki/COCOMO ↩

  9. http://www.dwheeler.com/sloccount/sloccount.html ↩

  10. Bureau of Labor Statistics, CES Database http://www.bls.gov/ces/#data ↩

  11. Bureau of Labor Statistics, http://www.bls.gov/news.release/ecec.t05.htm (March 2008) ↩

  12. David A. Wheeler, “Linux Kernel 2.6: It’s Worth More!” 2004 (revised 2007) http://www.dwheeler.com/essays/linux-kernel-cost.html ↩

  13. For more information on Debian source-code counts, see Counting Potatoes: The size of Debian 2.2 (http://people.debian.org/~jgb/debian-counting) and Measuring Libre Software Using Debian 3.1 (Sarge) as A Case Study: Preliminary Results (http://www.upgrade-cepis.org/issues/2005/3/up6-3Amor.pdf) ↩

  14. Greg Kroah-Hartman, Jonathan Corbet, and Amanda McPherson, “Linux Kernel Development: How Fast it is Going, Who is Doing It, What They are Doing, and Who is Sponsoring It”, April 2008, http://www.linuxfoundation.org/publications/linuxkerneldevelopment.php ↩

【编辑推荐】

  1. 查看远程Linux系统中某个端口是否开启的3种方法
  2. Linux Mint 19.2代号为“Tina”,仍基于Ubuntu 18.04 LTS
  3. 千万千万不要运行的Linux命令
  4. VMware 侵权 Linux 源码案原告放弃上诉:没意义
  5. 在Linux中使用bd命令快速返回到特定的父目录
【责任编辑:庞桂玉 TEL:(010)68476606】
点赞 0

(编辑:东莞站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!