630 likes | 781 Vues
Linux Programming Environment Setup. Outline. Introduce Linux Install Linux on Vmware 在 Windows 下常用的 Software Practice. INTRODUCE LINUX. History. Linus Torvalds make a Minix (Mini Unix) kernel Just only 10000 row of C codes Richard Stallman bring up GNU plan Open source Free
E N D
Outline • Introduce Linux • Install Linux on Vmware • 在 Windows 下常用的 Software • Practice
History • Linus Torvalds make a Minix (Mini Unix) kernel • Just only 10000 row of C codes • Richard Stallman bring up GNU plan • Open source • Free • Unix-like • GNU/Linux Linux • Kernel + many modules
Use • Server • MySql + PHP + Apache • Embedded system • STB (Set Top Box) • Super Computer • 75% (Top 500 on the world) • Game • Sony PlayStation 3 • Microsoft XBOX
Linux Kernel • Linux Kernel version format • Linux-a.b.c • a kernel version • b odd : test even : stable • c number of bug fix • Common, Linux-2.4.x and Linux-2.6.x
Linux distribution • Redhat 9 Linux-2.4.x • Fedora 1 Linux-2.4.x • Fedora 2~ Linux-2.6.x • Debian more app. (15940) • Trustix more safe and stable • Knoppix LiveCD
Other • There’s nothing impossible on Linux, because Source code can change • Find Linux distribution or modules • 義守大學檔案伺服器http://ftp.isu.edu.tw/ • Good Web Site • 鳥哥的 Linux 私房菜 http://linux.vbird.org/
Vmware • Use software (VMware ESX Server) to“virtualize”the hardware resources • Including the CPU, RAM, hard disk and network controller • To create a virtual machine that can run its own operating system and applications just like a “real” computer
Install Linux – 選擇 Typical(典型 Virtual Host)
Install Linux – 撰擇 Virtual Host 上欲安裝之系統
Install Linux – 分配 Virtual Host 硬碟空間中
Install Linux – 完成一個 Virtual Host, 準備正式安裝 Linux
Install Linux –選擇 image 檔來源,可由網路捉取或由課程網站 download
Install Linux – 執行 Linux image 檔 (如同以光碟片開機)
Install Linux – Linux 開機後的畫面
Mainly, press the “Next” forever • We’ll point out options that need to setup below
Install Linux – 選擇所要的 Linux 環境
Install Linux –選擇所要的 Linux 模組 • 只選擇以下套件 • DevelopmentTools • Editors
設定 Linux – 利用 setup 指令, 關閉不需要之服務
Pietty – 類似 Telnet 軟體 • Use SSH ( Secure Shell ) protocol • Allows data to be exchanged over a secure channel between two computers • Why use it? • Convenient for In/Out Vmware console • Good copy way • http://ntu.csie.org/~piaip/pietty/
Winscp – ftp 軟體 • Support • SFTP (SSH File Transfer Protocol) • SCP (Secure Copy Protocol) • FTP (File Transfer Protocol) • Good way to transmission data between Windows and Linux • http://winscp.net/eng/docs/lang:cht
Linux Command Format • Command [–options] [param1] [param2] … • Short option use “-” • Long option use “--” • Ex. • dmesg • gcc –v • gcc ––help • cp file1 file2
File management • ls list • ls –al • chmod change authority • -rw-r--r-- 1 root root 20 Sep 25 12:12 123.log other group r w x 222120 Ex. Chmod 755 file d : directory l : soft-link - : file c : char device b : block device owner -rwxr-xr-x
rmdir remove directory • mkdir make directory • cp copy • cp from to • mv move or rename • Move from to • cd change directory • cd <absoluteor relative path> • cd – • cd ..
find -name find file • find <where> –name <filename> • grep find string • dmesg | grep CPU • cat print to stdout • file print file info. • touch change file’s timestamp make a file
rm remove • rm –rf <file or directory> • man command manual • tar uncompress or compress • tar zxvf file.tar.gz • tar zcvf backup.tar.gz /root • tar jxvf file.tar.bz2 • ln soft-link • ln –s <file> <link_name>