ubuntu server 14.04.2 installation. types of network (virtualbox)

94
Ubuntu Server 14.04.2 Installation

Upload: joel-howard

Post on 25-Dec-2015

228 views

Category:

Documents


0 download

TRANSCRIPT

Ubuntu Server 14.04.2Installation

Types of Network (VirtualBox)

NAT

http://download.ithome.com.tw/article/index/id/996

橋接 (Bridged)

http://download.ithome.com.tw/article/index/id/996

內部網路 (Internal Network)

http://download.ithome.com.tw/article/index/id/996

主機 (host) 抓不到內部虛擬機 (guests) 的通訊

NAT 網路 (NAT Services)

http://download.ithome.com.tw/article/index/id/996

類似在 Internal network 裡建構一個具 NAT的環境

Each virtual machine guest configured for the same NAT Networking network can see the other guests configured to be on that network. 

僅限主機 (Host only)

• Used to create a network containing the host and a set of virtual machines, without the need for the host's physical network interface.

• Instead, a virtual network interface (similar to a loopback interface) is created on the host, providing connectivity among virtual machines and the host.

ext4 檔案系統

(like fat32 or ntfs in Windows Syetm)

ext4 檔案系統• Linux kernel 自 2.6.28 開始正式支持新的文

件系統 Ext4• Ext4 是 Ext3 的改進版,修改了 Ext3 中部

分重要的數據結構• Ext4 可以提供更佳的性能和可靠性,還有

更為豐富的功能

ext4 fs 優點

More on: http://macivilian.blogspot.tw/2011/08/linuxext4ext3.html

HD Partition (While installing Desktop)

HD Partition (Default with Desktop)

HD Partition

In reality, you should be considering more …

Questions:1. Is your Windows OS containing only C:\ folder?2. Why not?

Some background in next few slides …

Ubuntu / Unix File System Hierarchy

/

usr boot bin sbin home etc var opt …

lib include bin sbin …

init.d network apache2 …

mail spool … /etc/init.d

系統上幾乎所有的服務啟動 scripts 都放置在這裡

File System Hierarchy Standard

shareable unshareable

static /usr /etc /opt /boot variable /var/mail /var/run /var/spool/news /var/lock

More Details Below

Linux 預設目錄 • / : Linux 檔案系統的最上層根目錄• /bin : Binary 的縮寫,存放使用者的可執行程式,也包含

其他的 Shell 。• /boot :作業系統啟動時所需的檔案,這些檔案若是損壞

常會導致系統無法正常開機,因此最好不要任意的更動。• /dev :周邊設備檔案目錄• /etc :有關系統設定與管理的檔案• /etc/X11 : X Window System 的設定目錄• /home :一般使用者的主目錄或是 FTP 站台目錄• /lib :僅包含執行 /bin 和 /sbin 目錄中的二進位檔時所需

的共用函式庫( library )• /mnt :各項裝置的檔案系統掛載( Mount )點

Linux 預設目錄• /opt :這個目錄通常提供一個空間,以讓較大型且固定的

應用程式套件儲存檔案之用,這可避免將檔案分散至整個檔案系統。

• /proc :目前系統核心與程式執行的資訊• /root : root 管理員主目錄• /sbin :是 System Binary 的縮寫,此目錄存放的是系統啟

動時所需執行的程式。• /tmp : Temporary 的縮寫,它是用來存放暫存檔的目錄。• /usr :存放使用者使用的系統指令以及應用程式等資訊• /usr/bin :存放使用者可執行的程式• /usr/include :儲存提供 C 語言載入的 Header 檔案• /usr/include/X11 :儲存提供 X Window 程式載入的 Header

檔案

Linux 預設目錄• /usr/lib :函式庫• /usr/lib/X11 :函式庫• /usr/local :提供自行安裝的應用程式位置• /usr/sbin :存放非經常性使用的程式• /usr/src :儲存程式的原始檔• /usr/X11R6/bin :存放 X Window System 的執行程式• /var : Variable 的縮寫,具變動性質的相關程式目錄。

Linux 檔案名稱 • 最長可允許 256 個字元• 字元可包含 A-Z 0-9 . _ - 等• 沒有「副檔名」的觀念• 檔案名稱區分大小寫( Case Sensitive )

MBR partitioning scheme allows you to have up to 4 partitions on a drive, one of those partitions can be an "extended partition", which acts as a container for any number of "logical partitions". The partitions which are not inside the extended partition are called "primary partitions".

There's no difference in how they function or anything. So, if you don't have specific reasons, just go with the default choice.

Journaling Filesystem

• A filesystem is a way of storing information on a computer that usually consists of a hierarchy of directories (also referred to as the directory tree) that is used to organize files. – Each hard disk drive (HDD) or

other storage device as well as each partition can have a different type of filesystem if desired.

Journaling Filesystem

• A journaling filesystem is a filesystem that maintains a special file called a journal that is used to repair any inconsistencies that occur as the result of an improper shutdown of a computer. – Such shutdowns are usually due to an interruption

of the power supply or to a software problem that cannot be resolved without a rebooting.

Journaling Filesystem

• Journaling filesystems write metadata (i.e., data about files and directories) into the journal that is flushed to the HDD before each command returns.

• In the event of a system crash, a given set of updates may have either been fully committed to the filesystem (i.e., written to the HDD), in which case there is no problem, or the updates will have been marked as not yet fully committed, in which case the system will read the journal, which can be rolled up to the most recent point of data consistency.

Journaling Filesystem

• This is far faster than a scan of the entire HDD when rebooting, and it guarantees that the structure of the filesystem is always internally consistent. Thus, although some data may be lost, a journaling filesystem typically allows a computer to be rebooted much more quickly after a system crash.

Swap?

• Virtual Memory, remember?• What’s virtual memory for?

1. Keep on partitioning … like one partition for /var in case of file or printing or mail server …2. Size of partition is also one essential issue to consider.

So you have your server running

• What’s next?• What can you do with it?

– Virtually anything …• File, printing, www, mail, dhcp, nat, media, cloud server

(well you name it …)• Embedded systems

– Ever heard of that?

• Build applications upon it.– 選課、請假、…、 Joomla?

• etc

So you got me interested, but how?

• First you need to learn to work with your server– Through configuring your server, like change IP

address, set file / directory privileges, and so forth• By modifying the “configuration files”• Where? How to modify? etc.

– Configuring your Apache, MySQL, Samba, and Printer server

Example:How to change your server’s

IP address?

• First, the IP address must be recorded somewhere so that it remains the same each time your server starts.– What is it?

• Network-related configuration file

– Where is it?• etc?

– Found, and what?

Android OS Kernels

But, let’s get back to some basics (again), shall we?

• Vi– Editor– First written by in 1976– Released as part of the first BSD Unix in March,

1978– Very likely to exist for 10, 20, or more years