Bài giảng Phần mềm mã nguồn mở - Bài 1: Tổng quan về phần mềm mã nguồn mở - Đoàn Thiện Ngân
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Phần mềm mã nguồn mở - Bài 1: Tổng quan về phần mềm mã nguồn mở - Đoàn Thiện Ngân", để tải tài liệu gốc về máy bạn click vào nút DOWNLOAD ở trên
Tài liệu đính kèm:
bai_giang_phan_mem_ma_nguon_mo_bai_1_tong_quan_ve_phan_mem_m.pdf
Nội dung text: Bài giảng Phần mềm mã nguồn mở - Bài 1: Tổng quan về phần mềm mã nguồn mở - Đoàn Thiện Ngân
- Bài1: Tổngquanvềphần mềmmãnguồnmở GV: ĐOÀN THIỆN NGÂN dngan2003@gmail.com – ngan@ueh.edu.vn ĐoànThiệnNgân Bài1 -1/29
- Nộidung • Các địnhnghĩavềphầnmềmmãnguồnmở (Open Source Software -OSS) • Phầnmềmtựdo (free software) • Cácloạiphầnmềm. • Bốnnguyênlýcủaphầnmềmmãnguồnmở. • Hệđiềuhànhmãnguồnmở. • Phầnmềmvănphòngmãnguồnmởthông dụng. • Hệ quảntrị cơ sở dữ liệumãnguồnmở. • Côngcụlậptrìnhmãnguồnmở. • Phần mềm máy ảo Oracle VirtualBox ĐoànThiệnNgân Bài1 -2/29
- Tài liệu tham khảo • A practical guide to Fedora and Red Hat Enterprise Linux, Mark G. Sobell. —6th Edition, 2011, Prentice Hall. • Shell Scripting, Steve Parker, 2011 John Wiley & Sons, Inc. • Unix® Shell Programming, 3rd Edition; StephenG.Kochan, PatrickWood; Sams Publishing; 2003. • Perspectives on Free and Open Source Software; Joseph Feller, Brian Fitzgerald, Scott A. Hissam, and Karim R. Lakhani; MIT Press, Cambridge, Massachusetts, London, England; 2005. • Open Source for the Enterprise; GautamGuliani & DanWoods; O'Reilly; 2005 • Handbook of Open Source Tools, Sandeep Koranne Springer, 2010 ĐoànThiệnNgân Bài1 -3/29
- Địnhnghĩaphầnmềmmãnguồnmở • Phầnmềmmãnguồnmở: Open Source Software –OSS. • ĐịnhnghĩatừWikipedia vi.wikipedia.org/wiki/ Phần_mềm_nguồn_mở • Ban chỉĐạoPhầnmềmnguồnmởQuốc gia (???) • OSI -Open Source Initiative • OSS vớiIBM www.ibm.com/developerworks/opensource/newto ĐoànThiệnNgân Bài1 -4/29
- OSI -OSS • Open source doesn't just mean access to the source code. • The distribution terms of open-source software must comply with the following criteria (10): 1.Free Redistribution 2.Source Code 3.Derived Works 4.Integrity of The Author's Source Code ĐoànThiệnNgân Bài1 -5/29
- OSI –OSS (cont.) 5. No Discrimination Against Persons or Groups 6. No Discrimination Against Fields of Endeavor 7. Distribution of License 8. License Must Not Be Specific to a Product 9. License Must Not Restrict Other Software 10.License Must Be Technology-Neutral ĐoànThiệnNgân Bài1 -6/29
- IBM -OSS • Open source is collaboration. More specifically, it's public collaboration on a software project. • IBM has committed to open source in a big way with contributions to more than 120 projects, including more than $1 billion in Linux® development. • According to OSI: "Open source promotes software reliability and quality by supporting independent peer review and rapid evolution of source code. To be OSI certified, the software must be distributed under a license that guarantees the right to read, redistribute, modify, and use the software freely." ĐoànThiệnNgân Bài1 -7/29
- Phầnmềmtựdo -Free software • FSF (Free Software Foundation)– GNU (GNU's Not Unix!) www.fsf.org; www.gnu.org • “Free software” is a matter of liberty, not price. To understand the concept, you should think of “free” as in “free speech,” not as in “free beer.” • FOSS -IBM Free and Open Source Software FOSS stands for Free and Open Source Software. This term is used for software that satisfies either the definition in free or the definition in open source, when there is no need to make a distinction. ĐoànThiệnNgân Bài1 -8/29
- Phầnmềmtựdo -2 Free software is a matter of the users' freedom to run, copy, distribute, study, change and improve the software. More precisely, it means that the program's users have the four essential freedoms: 1)The freedom to run the program, for any purpose (freedom 0). 2)The freedom to study how the program works, and change it to make it do what you wish (freedom 1). Access to the source code is a precondition for this. 3)The freedom to redistribute copies so you can help your neighbor (freedom 2). 4)The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this. ĐoànThiệnNgân Bài1 -9/29
- Phầnmềmtựdo -3 Free software is a matter of the users' freedom to run, copy, distribute, study, change and improve the software. More precisely, it means that the program's users have the four essential freedoms: 1)The freedom to run the program, for any purpose (freedom 0). 2)The freedom to study how the program works, and change it to make it do what you wish (freedom 1). Access to the source code is a precondition for this. 3)The freedom to redistribute copies so you can help your neighbor (freedom 2). 4)The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this. ĐoànThiệnNgân Bài1 -10/29
- Cácloạiphầnmềm-1 1.Phầnmềmthươngmại(Commercial Software) Làphầnmềmthuộcbảnquyềncủatácgiả hoặc nhàsảnxuất, chỉđượccungcấpở dạngmãnhị phân, ngườidùngphảimuavàkhôngcóquyền phânphốilại. 2.Phầnmềmthử nghiệmgiớihạn(Limited Trial Software) Là nhữngphiênbảngiớihạncủacác phầnmềmthươngmạiđượccungcấpmiễnphí nhằmmụcđíchthử nghiệm, giớithiệusảnphẩm vàkíchthíchngườidùngquyết địnhmua. Loại sảnphấmnàykhôngchỉ giớihạnvềtínhnăngmà còngiớihạnvềthờigiandùngthử (thườnglà60 ngày). ĐoànThiệnNgân Bài1 -11/29
- Cácloạiphầnmềm-2 3.Phần mềm “chia sẻ” (Shareware) Loại phần mềm này có đủ các tính năng và được phân phối tự do, nhưng có một giấy phép khuyến cáo các cá nhân hoặc tổ chức mua, tùy tình hình cụ thể. Nhiều tiện ích Internet như “WinZip” dùng các thuận lợi của Shareware như một hệ thống phân phối. 4.Phần mềmsửdụngphi thươngmại(Non- commercial Use) Loại phầnmềmnày đượcsử dụngtựdo vàcóthể phânphốilạibởicáctổchức phi lợinhuận. Nhưngcáctổchứckinhtế, thídụ cácdoanhnghiệp, muốndùngphảimua. Trình duyệt trước đây Netscape Navigator làmộtví dụ củaloạiphầnmềmnày. ĐoànThiệnNgân Bài1 -12/29
- Cácloạiphầnmềm-3 5.Phần mềmkhôngphảitrả phầntrămchonhà sảnxuất(Royalties Free Binaries Software) Phầnmềmđượccungcấpdướidạngnhị phân – thực thi –chạy được (binary-executable) và đượcdùngtựdo. Ví dụ: bảnthực thi của các phầnmềmInternet Explorer vàNetMeeting. 6.Thư viện phần mềm không phải trả phần trăm (Royalties Free Software Libraries) Là những phần mềm mà mã nhị phân cũng như mã nguồn được dùng và phân phối tự do, nhưng người dùng không được phép sửa đổi. Thí dụ: các thư viện lớp, ĐoànThiệnNgân Bài1 -13/29
- Cácloạiphầnmềm-4 7.PhầnmềmmãnguồnmởkiểuBSD -(Open Source BSD-style) Một nhómnhỏ khépkín(closed team) đã pháttriểncácPMNM theogiấyphépBerkeley (BSD – Berkeley Software Distribution) chophépsửdụngvà phânphốilạicácphầnmềmnàydướidạngmãnhị phânvàmãnguồn. Tuyngườidùngcóquyềnsửađổi mã, nhưngvềnguyêntắcnhómpháttriểnkhôngcho phépngườidùngtựdo lấymãnguồntừkhomãra sửa(check-out) và đưamã đãsửavàolạikhomãmà không đượchọkiểmtratrước(“check-in”). 8.PMNM kiểuApache (Open Source Apache-style) ChấpnhậnnguồnmởkiểuBSD nhưngchophép nhữngngườingoàinhómpháttriểnxâmnhậpvàolõi củamãnền(core codebase), tứclà đượcphépthực hiệncác“check-in”. ĐoànThiệnNgân Bài1 -14/29
- Cácloạiphầnmềm-5 9.PMNM kiểuCopyLefthay kiểuLinux (Open Source CopyLeft, Linux-style) PMNM kiểuCopyLeft(tròchơichữ củaFree Software Foundation –FSF –vàGNU –Gnu’s Not Unix, đểđốinghịchhoàntoànvới CopyRight!) hay còngọilàgiấyphépGPL (General Public Licence) làmộtbướctiếnquan trọngtheohướngtựdo hóacủacácgiấyphép phầnmềm. GiấyphépGPL yêucầukhông nhữngmãnguồngốcphải đượcphânphốitheo cácqui địnhcủaGPL màmọisảnphẩmdẫnxuất cũngphảituânthủ GPL. ĐoànThiệnNgân Bài1 -15/29
- Cácloạiphầnmềm-6 •GPL chongườidùngtốiđaquyềnhạnvà tự do đốivớicácPMNM theoGPL, cụ thể ngườidùngcóquyềnkhôngnhữngsao chép, sửa đổi, muabáncácPMNM dưới CopyLeftmàcòn đượcquyềntựdo như vậy đốivớicácphầnmềmdẫnxuất. • Tóm lạinếuPMNM gốc đãtheoCopyLeft thìmọiPMNM dẫnxuấtcủanócũng đươngnhiêntheoCopyLeft. ĐoànThiệnNgân Bài1 -16/29
- BốnnguyênlýcủaOSS • The first principle of open source: Open source software is most frequently built by programmers for other programmers. • The second principle of open source: Open source projects are communities of developers and users organized around software that meets a common need. ĐoànThiệnNgân Bài1 -17/29
- BốnnguyênlýcủaOSS -2 •The third principleof open source: Open source software is not planned, but evolves according to the changing values and goals of the community. • The (4th) final principleof open source: The health, maturity, and stability of an open source project is a direct reflection of the health, maturity, and stability of the community that surrounds it. ĐoànThiệnNgân Bài1 -18/29
- Hệđiềuhànhmãnguồnmở •BSD Unix, Solaris (!!!) –SUN • Linux: Linus Torvald – Debian – Slackware – Red Hat: Red Hat Enterprise Linux–Fedora – Cent OS, – SUSE (Novell Netware –IBM) – Mandrake, Caldera (SCO) – TurboLinux, Lindows, – Knoppix, Ubuntu, Austrumi, (live cdrom, live dvd) – CMC Linux, Vietkey Linux (!!!) ĐoànThiệnNgân Bài1 -19/29
- Red Hat Linux • Red Hat Linux (1, ,9). • Red Hat Enterprise Linux (1, 2, 3, 4, 5, 6). • Fedora Core 1, 2, , 6. Fedora 7, ,19. • Live Cdrom, live DVD • Phầnmềmthôngdụng: – Web Browser (Firefox, Konqueror, ) – Email (Evolution, Sendmail, Qmail, ) – LibreOffice, Open Office (Star Office), Koffice, – GIMP (Kodak Photoshop, ), ĐoànThiệnNgân Bài1 -20/29
- Phầnmềmvănphòng mã nguồn mở • Open Office StarOffice • KOffice • GnomeOffice • Libre Office ( ) • ĐoànThiệnNgân Bài1 -21/29
- Hệ quảntrị cơ sở dữ liệu mãnguồnmở •Firebird • MySQL ( ) • PostGreSQL ( ) • DB2 Express C –IBM (no-charge – free software) • Sybase (!!!), • ĐoànThiệnNgân Bài1 -22/29
- Côngcụlậptrìnhmã nguồn mở • Ngôn ngữ lập trình: – C, C++, Java, – PHP, Perl, Tcl/Tk, Python, Ruby, • Trình soạn thảo thông dụng: – gedit, emacs, vi • Môi trường lập trình tích hợp IDE: – Netbeans, – Eclipse, – JDeveloper, – Sun Studio, – Qt, QTDesigner, Zend Studio, Visual PHP, KDeveloper, Glade, ĐoànThiệnNgân Bài1 -23/29
- Phần mềm thông dụng mã nguồn mở • Phần mềm mã nguồn mở rất thông dụng: – Apache Web server, – Mambo, – Sugar CRM, – Dspace, – Moodle, – Zimbra (Mail Server, Desktop ), – PhpNuke, – GIMP, – Umbrello UML Modeller, – Oracle VirtualBox, – Firefox,Evolution, ĐoànThiệnNgân Bài1 -24/29
- Oracle VirtualBox • • Phiên bản trên MS Windows • Phiên bản trên Linux • Cập nhật rất nhanh • Rất thông dụng • Ổn định • Tiện nghi • Sử dụng dễ dàng ĐoànThiệnNgân Bài1 -25/29
- Oracle VirtualBox ĐoànThiệnNgân Bài1 -26/29
- Tóm tắt nội dung tập trung • HệđiềuhànhFedora 16, (17, 18, 19, 20 ) • Phầnmềmmáy ảoVirtualBox • Phầnmềmvănphòng: LibreOffice • Trìnhsoạnthảothôngdụng: gedit, emacs, vi • Shell scripting: bash • Programming: C++, Java, PHP, Eclipse, Netbeans • Networking: dhcp, ssh, rsync, www ĐoànThiệnNgân Bài1 -27/29
- Cài đặtFedora -CentOS • TrướchếtdùngVirtualboxlàmquen, tránhlỗichodữliệu đangcótrênmáy tính, khichọnRAM choVirtualboxkhông nênvượtquá1/3 dung lượngRAM thực tế củamáytính • Chọnbảncài đặtphùhợp(cầnbiếtrõhệ điềuhành32 bit hay 64 bit) • Cóthể sử dụngbảnLive Dvd để làmquen ban đầu, sau đódùngDVD đầy đủ cài đặt để cónhiềucôngcụvàtiệnnghihơn. ĐoànThiệnNgân Bài1 -28/29
- ??? • Phầnmềmmãnguồnmởlàgì? • Liệtkêgiấyphépmãnguồnmởđượcbiết? • Trìnhbàyviệccài đặtvàsửdụngmộtphần mềmmãnguồnmởthậtsựđãbiết. • Vìsaokhinóivềphầnmềmmãnguồnmở, ngườita thườngnghĩ ngayvềLinux? • Trìnhbàyvềnhữngphầnmềmmáy ảo (virtual machine) đãbiết? • Sử dụngVirtualBoxcài đặthệđiềuhành. ĐoànThiệnNgân Bài1 -29/29