Ubuntu Unleashed 2012 Edition
Sams Publishing
978-0-672-33578-5 (ISBN)
- Titel erscheint in neuer Auflage
- Artikel merken
Former Ubuntu Forum administrator Matthew Helmke covers all you need to know about Ubuntu 11.10/12.04 installation, configuration, productivity, multimedia, development, system administration, server operations, networking, virtualization, security, DevOps, and more—including intermediate-to-advanced techniques you won’t find in any other book.
Helmke presents up-to-the-minute introductions to Ubuntu’s key productivity and Web development tools, programming languages, hardware support, and more. You’ll find brand-new coverage of the new Unity desktop, new NoSQL database support and Android mobile development tools, and many other Ubuntu 11.10/12.04 innovations. Whether you’re new to Ubuntu or already a power user, you’ll turn to this book constantly: for new techniques, new solutions, and new ways to do even more with Ubuntu!
Matthew Helmke served from 2006 to 2011 on the Ubuntu Forum Council, providing leadership and oversight of the Ubuntu Forums, and spent two years on the Ubuntu regional membership approval board for Europe, the Middle East, and Africa. He has written about Ubuntu for several magazines and websites, is a lead author of The Official Ubuntu Book. He works for The iPlant Collaborative, which is funded by the National Science Foundation and is building cyberinfrastructure for the biological sciences to support the growing use of massive amounts of data and computationally intensive forms of research.
Quickly install Ubuntu, configure it, and get your hardware running right
Configure and customize the new Unity desktop (or alternatives such as GNOME)
Get started with multimedia and productivity applications, including LibreOffice
Manage Linux services, users, and software packages
Administer and use Ubuntu from the command line
Automate tasks and use shell scripting
Provide secure remote access
Manage kernels and modules
Administer file, print, email, proxy, LDAP, and database services (both SQL and NoSQL)
Use both Apache and alternative HTTP servers
Support and use virtualization
Use Ubuntu in cloud environments
Learn the basics about popular programming languages including Python, PHP, and Perl, and how to use Ubuntu to develop in them
Learn how to get started developing Android mobile devices
Ubuntu 11.10 on DVD
DVD includes the full Ubuntu 11.10 distribution for Intel x86 computers as well as the complete LibreOffice office suite and hundreds of additional programs and utilities.
Free Upgrade!
Purchase this book anytime in 2012 and receive a free Ubuntu 12.04 Upgrade Kit by mail (U.S. or Canada only) after Ubuntu 12.04 is released. See inside back cover for details.
Matthew Helmke is an active member of the Ubuntu community. He served from 2006 to 2011 on the Ubuntu Forum Council, providing leadership and oversight of the Ubuntu Forums (www.ubuntuforums.org), and spent two years on the Ubuntu regional membership approval board for Europe, the Middle East, and Africa. He has written about Ubuntu for several magazines and websites, is a lead author of The Official Ubuntu Book, and coauthored The VMware Cookbook. He works for The iPlant Collaborative (www.iplantcollaborative.org), which is funded by the National Science Foundation and is building the world’s first cyberinfrastructure for the biological sciences. Matthew first used Unix in 1987 while studying LISP on a Vax at the university. He has run a business using only free and open source software, has consulted, and has recently completed a master’s degree in Information Resources and Library Science from the University of Arizona. You can find out more about Matthew at matthewhelmke.com or drop him a line with errata or suggestions at matthew@matthewhelmke.com. Andrew Hudson is a freelance journalist who specializes in writing about Linux. He has significant experience in Red Hat and Debian-based Linux distributions and deployments and can often be found sitting at his keyboard tweaking various settings and config files just for the hell of it. He lives in Wiltshire, which is a county of England, along with his wife, Bernice, and their son, John. Andrew does not like Emacs. He can be reached at andy.hudson@gmail.com. Paul Hudson is a recognized expert in open-source technologies. He is also a professional developer and full-time journalist for Future Publishing. His articles have appeared in MacFormat, PC Answers, PC Format, PC Plus, and Linux Format. Paul is passionate about free software in all its forms and uses a mix of Linux and BSD to power his desktops and servers. Paul likes Emacs. Paul can be contacted through http://hudzilla.org.
About the Authors xxvii
Dedication/Acknowledgements xxviii
Introduction 1
Part I Installation and Configuration
1 Installing Ubuntu 7
Before You Begin the Installation. 7
Researching Your Hardware Specifications 8
Installation Options 8
Planning Partition Strategies 10
The Boot Loader. 10
Installing from CD or DVD or USB Drive. 11
Step-by-Step Installation. 11
Installing 12
First Update. 16
Wubi: The Easy Installer for Windows. 16
Shutting Down 17
References. 18
2 Post-Installation Configuration 19
Troubleshooting Post-Installation Configuration Problems 19
The sudo Command 21
Finding Programs and Files 21
Software Update 22
Configuring Software Repositories. 25
System Settings. 28
Installing Additional Drivers 28
Detecting and Configuring a Printer 30
Configuring Power Management in Ubuntu 30
Setting the Date and Time 31
Configuring Wireless Networks. 33
References. 34
Part II Desktop Ubuntu
3 Working with Unity 35
Foundations and the X Server 35
Basic X Concepts. 36
Using X 37
Elements of the xorg.conf File 38
Starting X 43
Using a Display Manager 43
Changing Window Managers 44
Using Unity, a Primer 44
The Desktop 45
Customizing and Configuring Unity. 50
Power Shortcuts. 50
References. 51
4 On the Internet 53
Getting Started with Firefox. 54
Checking Out Google Chrome and Chromium 55
Choosing an Email Client 56
Evolution. 57
Mozilla Thunderbird. 59
Other Mail Clients. 59
RSS Readers. 60
Firefox. 60
Liferea 60
Instant Messaging and Video Conferencing with Empathy. 61
Internet Relay Chat 61
Usenet Newsgroups 64
Ubuntu One Cloud Storage. 66
References. 66
5 Productivity Applications 67
Introducing LibreOffice. 69
Other Office Suites for Ubuntu 71
Working with GNOME Office. 71
Working with KOffice 72
Other Useful Productivity Software 73
Working with PDF. 73
Working with XML and DocBook 74
Working with LaTeX 75
Productivity Applications Written for Microsoft Windows. 76
References. 76
6 Multimedia Applications 77
Sound and Music 77
Sound Cards. 78
Adjusting Volume. 79
Sound Formats. 79
Listening to Music. 81
Buying Music in the Ubuntu One Music Store. 83
Graphics Manipulation 85
The GNU Image Manipulation Program 85
Using Scanners in Ubuntu 87
Working with Graphics Formats 87
Capturing Screen Images 89
Using Digital Cameras with Ubuntu. 90
Handheld Digital Cameras 90
Using Shotwell Photo Manager. 90
Burning CDs and DVDs in Ubuntu 90
Creating CDs and DVDs with Brasero 91
Creating CDs from the Command Line. 92
Creating DVDs from the Command Line 94
Viewing Video 96
TV and Video Hardware 96
Video Formats 97
Viewing Video in Linux. 98
Personal Video Recorders 99
Video Editing 99
References 100
7 Other Ubuntu Desktops 101
Desktop Environment 101
KDE and Kubuntu 102
Xfce and Xubuntu. 104
LXDE and Lubuntu. 105
GNOME. 106
References 107
8 Games 109
Ubuntu Gaming. 109
Emulators. 109
Installing Proprietary Video Drivers 110
Installing Games in Ubuntu 112
Warsow. 112
Scorched 3D 112
Frozen Bubble 113
SuperTux. 114
Battle for Wesnoth. 114
Frets on Fire. 116
Games for Kids. 116
Commercial Games. 116
Playing Windows Games 117
References 117
Part III System Administration
9 Managing Software 119
Ubuntu Software Center 119
Using Synaptic for Software Management. 120
Staying Up-to-Date 122
Working on the Command Line 123
Day-to-Day Usage 124
Finding Software 127
Compiling Software from Source. 128
Compiling from a Tarball. 128
Compiling from Source from the Ubuntu Repositories 129
Server/Configuration Management. 130
Puppet. 131
Chef. 131
Juju 131
Landscape 131
dotdee 131
References 132
10 Command-Line Quickstart 133
What Is the Command Line? 134
Accessing the Command Line 135
Text-Based Console Login 136
Logging Out 137
Logging In and Out from a Remote Computer. 137
User Accounts. 138
Understanding the Linux File System Hierarchy 140
Essential Commands in /bin and /sbin 141
Configuration Files in /etc 141
User Directories: /home 142
Using the Contents of the /proc Directory to Interact
with the Kernel 142
Working with Shared Data in the /usr Directory 144
Temporary File Storage in the /tmp Directory 144
Accessing Variable Data Files in the /var Directory. 144
Navigating the Linux File System 145
Listing the Contents of a Directory with ls. 145
Changing Directories with cd 147
Finding Your Current Directory with pwd 147
Working with Permissions 148
Assigning Permissions 148
Directory Permissions. 150
Altering File Permissions with chmod 150
File Permissions with chgrp 152
Changing File Permissions with chown. 152
Understanding Set User ID and Set Group ID Permissions 152
Working with Files 153
Creating a File with touch. 153
Creating a Directory with mkdir. 154
Deleting a Directory with rmdir 154
Deleting a File or Directory with rm 155
Moving or Renaming a File with mv 156
Copying a File with cp. 157
Displaying the Contents of a File with cat. 157
Displaying the Contents of a File with less 157
Using Wildcards and Regular Expressions 158
Working as Root. 158
Creating Users. 159
Deleting Users. 160
Shutting Down the System. 161
Rebooting the System. 162
Reading Documentation. 162
Using apropros 162
Using Man Pages 163
References 164
11 Command-Line Master Class 165
Why Use the Command Line?. 166
Using Basic Commands 167
Printing the Contents of a File with cat 168
Changing Directories with cd 169
Changing File Access Permissions with chmod 171
Copying Files with cp. 171
Printing Disk Usage with du 172
Finding Files by Searching with find. 173
Searches for a String in Input with grep 175
Paging Through Output with less. 176
Creating Links Between Files with ln 178
Finding Files from an Index with locate 180
Listing Files in the Current Directory with ls 180
Reading Manual Pages with man 182
Making Directories with mkdir. 183
Moving Files with mv. 183
Listing Processes with ps. 184
Deleting Files and Directories with rm 184
Printing the Last Lines of a File with tail. 185
Printing Resource Usage with top 186
Printing the Location of a Command with which 187
Redirecting Output and Input 187
Combining Commands 189
Using Environment Variables 191
Using Common Text Editors 194
Working with nano 195
Working with vi. 196
Working with emacs. 197
Working with Compressed Files 199
Using Multiple Terminals with byobu. 200
References 201
12 Managing Users 203
User Accounts. 203
The Super User/Root User 204
User IDs and Group IDs 206
File Permissions. 206
Managing Groups. 207
Group Listing. 207
Group Management Tools 208
Managing Users 210
User Management Tools. 210
Adding New Users 212
Monitoring User Activity on the System 216
Managing Passwords 217
System Password Policy 217
The Password File 217
Shadow Passwords 218
Managing Password Security for Users. 221
Changing Passwords in a Batch. 221
Granting System Administrator Privileges to Regular Users 221
Temporarily Changing User Identity with the su Command 222
Granting Root Privileges on Occasion: The sudo Command. 224
Disk Quotas. 226
Implementing Quotas 227
Manually Configuring Quotas. 228
Related Ubuntu Commands 228
References 229
13 Automating Tasks and Shell Scripting 231
Scheduling Tasks 231
Using at and batch to Schedule Tasks for Later. 231
Using cron to Run Jobs Repeatedly 234
Basic Shell Control 236
The Shell Command Line 237
Shell Pattern-Matching Support 239
Redirecting Input and Output. 240
Piping Data 241
Background Processing 241
Writing and Executing a Shell Script. 242
Running the New Shell Program 243
Storing Shell Scripts for Systemwide Access 244
Interpreting Shell Scripts Through Specific Shells 245
Using Variables in Shell Scripts 246
Assigning a Value to a Variable 246
Accessing Variable Values 247
Positional Parameters 247
A Simple Example of a Positional Parameter. 248
Using Positional Parameters to Access and Retrieve
Variables from the Command Line 248
Using a Simple Script to Automate Tasks. 249
Built-In Variables 251
Special Characters. 252
Using Double Quotes to Resolve Variables in Strings
with Embedded Spaces 253
Using Single Quotes to Maintain Unexpanded Variables. 253
Using the Backslash as an Escape Character 254
Using the Backtick to Replace a String with Output 255
Comparison of Expressions in pdksh and bash. 255
Comparing Expressions with tcsh 260
The for Statement 264
The while Statement 266
The until Statement 268
The repeat Statement (tcsh) 268
The select Statement (pdksh). 269
The shift Statement 269
The if Statement. 270
The case Statement 271
The break and exit Statements. 273
Using Functions in Shell Scripts 273
References 274
14 The Boot Process 275
Running Services at Boot 275
Beginning the Boot Loading Process 276
Loading the Linux Kernel. 277
System Services and Runlevels 278
Runlevel Definitions 278
Booting into the Default Runlevel 279
Understanding init Scripts and the Final Stage of Initialization 279
Controlling Services at Boot with Administrative Tools 280
Changing Runlevels 281
Troubleshooting Runlevel Problems 282
Starting and Stopping Services Manually 283
Using Upstart 283
References 284
15 System-Monitoring Tools 285
Console-Based Monitoring 285
Using the kill Command to Control Processes 287
Using Priority Scheduling and Control 288
Displaying Free and Used Memory with free 290
Disk Space 291
Disk Quotas. 291
Graphical Process and System Management Tools 292
System Monitor. 292
Conky 294
Other 298
KDE Process- and System-Monitoring Tools. 299
Enterprise Server Monitoring. 299
Landscape 299
Other 299
References 300
16 Backing Up 301
Choosing a Backup Strategy 301
Why Data Loss Occurs. 302
Assessing Your Backup Needs and Resources 303
Evaluating Backup Strategies. 305
Making the Choice 307
Choosing Backup Hardware and Media 308
Removable Storage Media 308
CD-RW and DVD+RW/-RW Drives. 308
Network Storage 309
Tape Drive Backup 309
Cloud Storage 310
Using Backup Software 310
tar: The Most Basic Backup Tool 310
The GNOME File Roller 312
The KDE ark Archiving Tool. 313
Déjà Dup 313
Back In Time 315
Unison 317
Using the Amanda Backup Application 318
Alternative Backup Software 319
Copying Files. 319
Copying Files Using tar. 319
Compressing, Encrypting, and Sending tar Streams 320
Copying Files Using cp 321
Copying Files Using mc 321
Using rsync. 322
Version Control for Configuration Files. 323
System Rescue. 326
The Ubuntu Rescue Disc 326
Restoring the GRUB2 Boot Loader 326
Saving Files from a Nonbooting Hard Drive 327
References 328
17 Networking 329
Laying the Foundation: The localhost Interface 330
Checking for the Availability of the Loopback Interface 330
Configuring the Loopback Interface Manually 330
Networking with TCP/IP. 333
TCP/IP Addressing 334
Using IP Masquerading in Ubuntu. 336
Ports. 336
Network Organization. 337
Subnetting. 337
Subnet Masks. 338
Broadcast, Unicast, and Multicast Addressing 338
Hardware Devices for Networking 339
Network Interface Cards 339
Network Cable 341
Hubs and Switches. 342
Routers and Bridges 343
Initializing New Network Hardware 344
Using Network Configuration Tools. 346
Command-Line Network Interface Configuration. 346
/bin/netstat. 350
Network Configuration Files. 351
Using Graphical Configuration Tools 353
Dynamic Host Configuration Protocol 355
How DHCP Works 355
Activating DHCP at Installation and Boot Time 356
DHCP Software Installation and Configuration. 357
Using DHCP to Configure Network Hosts 359
Other Uses for DHCP 361
Wireless Networking 361
Support for Wireless Networking in Ubuntu. 361
Advantages of Wireless Networking 363
Choosing from Among Available Wireless Protocols 363
Beyond the Network and onto the Internet 364
Common Configuration Information 364
Configuring Digital Subscriber Line Access 366
Understanding PPP over Ethernet. 366
Configuring a PPPoE Connection Manually 367
Configuring Dial-Up Internet Access. 368
Troubleshooting Connection Problems. 369
References 370
18 Remote Access with SSH and Telnet 373
Setting Up a Telnet Server 373
Telnet Versus SSH 375
Setting Up an SSH Server 375
SSH Tools 375
Using scp to Copy Individual Files Between Machines 376
Using sftp to Copy Many Files Between Machines. 377
Using ssh-keygen to Enable Key-Based Logins 377
Virtual Network Computing. 379
References 382
19 Securing Your Machines 383
Understanding Computer Attacks 383
Assessing Your Vulnerability 385
Protecting Your Machine 386
Securing a Wireless Network. 387
Passwords and Physical Security 387
Configuring and Using Tripwire 388
Devices 389
Viruses 389
Configuring Uncomplicated Firewall 390
AppArmor. 392
Forming a Disaster Recovery Plan. 395
References 396
20 Performance Tuning 399
Hard Disk. 399
Using the BIOS and Kernel to Tune the Disk Drives 400
The hdparm Command. 401
File System Tuning. 402
The tune2fs Command. 402
The e2fsck Command. 403
The badblocks Command. 403
Disabling File Access Time. 403
Kernel 404
Apache 405
MySQL 406
Measuring Key Buffer Usage 406
Using the Query Cache. 408
Miscellaneous Tweaks. 409
Query Optimization. 410
References 410
21 Kernel and Module Management 411
The Linux Kernel 412
The Linux Source Tree 413
Types of Kernels 415
Managing Modules 416
When to Recompile 418
Kernel Versions 419
Obtaining the Kernel Sources 420
Patching the Kernel 421
Compiling the Kernel. 422
Using xconfig to Configure the Kernel. 425
Creating an Initial RAM Disk Image. 429
When Something Goes Wrong 429
Errors During Compile 429
Runtime Errors, Boot Loader Problems, and Kernel Oops. 430
References 431
Part IV Ubuntu as a Server
22 File and Print 433
Using the Network File System 434
Installing and Starting or Stopping NFS 434
NFS Server Configuration. 434
NFS Client Configuration. 436
Putting Samba to Work 437
Manually Configuring Samba with /etc/samba/smb.conf. 438
Testing Samba with the testparm Command. 442
Starting, Stopping, and Restarting the smbd Daemon. 442
Mounting Samba Shares 443
Configuring Samba Using SWAT. 444
Network and Remote Printing with Ubuntu. 448
Creating Network Printers 448
Using the Common UNIX Printing System GUI. 450
Avoiding Printer Support Problems 453
References 454
23 Apache Web Server Management 455
About the Apache Web Server. 455
Installing the Apache Server 457
Installing from the Ubuntu Repositories 457
Building the Source Yourself 458
Starting and Stopping Apache 460
Starting the Apache Server Manually. 461
Using /etc/init.d/apache2 462
Runtime Server Configuration Settings. 463
Runtime Configuration Directives 464
Editing apache2.conf 464
Apache Multiprocessing Modules 467
Using .htaccess Configuration Files. 467
File System Authentication and Access Control 469
Restricting Access with allow and deny 470
Authentication. 471
Final Words on Access Control. 473
Apache Modules. 474
mod_access. 475
mod_alias 475
mod_asis 475
mod_auth 476
mod_auth_anon 476
mod_auth_dbm. 476
mod_auth_digest 476
mod_autoindex 477
mod_cgi 477
mod_dir and mod_env. 477
mod_expires 477
mod_headers 477
mod_include 478
mod_info and mod_log_config 478
mod_mime and mod_mime_magic 478
mod_negotiation 478
mod_proxy 478
mod_rewrite 478
mod_setenvif. 479
mod_speling 479
mod_status. 479
mod_ssl 479
mod_unique_id 479
mod_userdir 479
mod_usertrack 479
mod_vhost_alias 479
Virtual Hosting 480
Address-Based Virtual Hosts. 480
Name-Based Virtual Hosts 481
Logging 482
References 484
24 Other HTTP Servers 485
Nginx. 485
lighttpd 487
Yaws 488
Cherokee 488
Jetty 489
thttpd 489
Apache Tomcat 490
References 490
25 Remote File Serving with FTP 491
Choosing an FTP Server. 491
Choosing an Authenticated or Anonymous Server 492
Ubuntu FTP Server Packages 492
Other FTP Servers 492
Installing FTP Software 493
The FTP User 494
Configuring the Very Secure FTP Server. 496
Controlling Anonymous Access 497
Other vsftpd Server Configuration Files 498
Using the ftphosts File to Allow or Deny FTP Server Connection 499
References 500
26 Handling Email 501
How Email Is Sent and Received 501
The Mail Transport Agent 502
Choosing an MTA. 504
The Mail Delivery Agent 504
The Mail User Agent 505
Basic Postfix Configuration and Operation 506
Configuring Masquerading. 508
Using Smart Hosts 509
Setting Message Delivery Intervals 509
Mail Relaying. 510
Forwarding Email with Aliases 510
Using Fetchmail to Retrieve Mail. 511
Installing Fetchmail 511
Configuring Fetchmail. 511
Choosing a Mail Delivery Agent 515
Procmail 515
Spamassassin 515
Squirrelmail. 516
Virus Scanners 516
Autoresponders 516
Alternatives to Microsoft Exchange Server 516
Microsoft Exchange Server/Outlook Client. 517
CommuniGate Pro. 517
Oracle Beehive 517
Bynari. 518
Open-Xchange 518
phpgroupware. 518
PHProjekt. 518
Horde 518
References 519
27 Proxying and Reverse Proxying 521
What Is a Proxy Server? 521
Installing Squid. 522
Configuring Clients 522
Access Control Lists 523
Specifying Client IP Addresses 527
Sample Configurations 528
References 530
28 Administering Relational Database Services 531
A Brief Review of Database Basics 532
How Relational Databases Work 533
Understanding SQL Basics. 536
Creating Tables. 536
Inserting Data into Tables 537
Retrieving Data from a Database 538
Choosing a Database: MySQL Versus PostgreSQL 540
Speed 540
Data Locking 541
ACID Compliance in Transaction Processing to Protect Data Integrity 542
SQL Subqueries 542
Procedural Languages and Triggers. 542
Configuring MySQL. 543
Setting a Password for the MySQL Root User 544
Creating a Database in MySQL. 544
Configuring PostgreSQL 546
Initializing the Data Directory in PostgreSQL 547
Creating a Database in PostgreSQL 547
Creating Database Users in PostgreSQL. 548
Deleting Database Users in PostgreSQL. 548
Granting and Revoking Privileges in PostgreSQL 549
Database Clients 550
SSH Access to a Database 550
Local GUI Client Access to a Database. 551
Web Access to a Database. 552
The MySQL Command-Line Client. 553
The PostgreSQL Command-Line Client 555
Graphical Clients. 555
References 556
29 NoSQL Databases 557
Key/Value Stores. 559
Berkeley DB 560
Cassandra. 560
Memcached and MemcacheDB 561
Redis 561
Document Stores. 562
CouchDB 562
MongoDB. 563
BaseX 564
Wide Column Stores 564
BigTable 565
HBase 565
References 565
30 Lightweight Directory Access Protocol (LDAP) 567
Configuring the Server 568
Creating Your Schema 568
Populating Your Directory. 570
Configuring Clients 572
Evolution 572
Thunderbird 572
Administration 572
References 574
31 Linux Terminal Server Project (LTSP) 575
Requirements 576
Installation. 579
Using LTSP 580
References 581
32 Virtualization on Ubuntu 583
KVM 585
VirtualBox. 589
VMware. 591
Xen. 591
References 591
33 Ubuntu in the Cloud 593
Why a Cloud?. 594
Ubuntu Cloud and Eucalyptus. 595
Deploy/Install Basics: Public or Private?. 596
Public 597
Private 598
A euca2ools Primer. 601
Ubuntu Cloud and OpenStack. 603
Compute Infrastructure (Nova) 603
Storage Infrastructure (Swift) 604
Imaging Service (Glance) 604
Installation. 604
Creating an Image 614
Instance Management 617
Storage Management. 617
Network Management 618
An OpenStack Commands Primer. 618
Learning More 618
Landscape 619
Juju. 619
Orchestra 620
References 620
Part V Programming Linux
34 Opportunistic Development 623
Version Control Systems. 624
Managing Software Projects with Subversion 624
Managing Software Projects with Bazaar 625
Managing Software Projects with Mercurial 626
Managing Software Projects with Git 627
Introduction to Opportunistic Development. 628
Launchpad 629
Quickly. 631
Ground Control 635
Bikeshed and Other Tools 638
References 641
35 Helping with Ubuntu Testing and QA 643
Community Teams 643
Ubuntu Testing Team 644
QA Team. 645
Bug Squad. 645
Test Drive. 645
References 648
36 Using Perl 649
Using Perl with Linux 649
Perl Versions 650
A Simple Perl Program. 650
Perl Variables and Data Structures 652
Perl Variable Types. 653
Special Variables 653
Operators. 654
Comparison Operators 654
Compound Operators. 655
Arithmetic Operators. 655
Other Operators 656
Special String Constants 657
Conditional Statements: if/else and unless 657
if 657
unless 658
Looping. 658
for. 659
foreach 659
while. 660
until. 660
last and next 660
do .. while and do .. until 661
Regular Expressions 661
Access to the Shell 662
Modules and CPAN. 663
Code Examples 664
Sending Mail 664
Purging Logs. 666
Posting to Usenet 667
One-Liners 668
Command-Line Processing 668
References 669
37 Using PHP 671
Introduction to PHP 672
Entering and Exiting PHP Mode 672
Variables 673
Arrays. 674
Constants. 676
References 676
Comments 677
Escape Sequences. 677
Variable Substitution 679
Operators 679
Conditional Statements 681
Special Operators. 683
Switching 683
Loops 685
Including Other Files. 687
Basic Functions 688
Strings 688
Arrays. 692
Files 693
Miscellaneous 696
Handling HTML Forms. 699
Databases. 700
References 702
38 Using Python 705
Python on Linux. 706
The Basics of Python. 707
Numbers 707
More on Strings. 709
Lists 712
Dictionaries 714
Conditionals and Looping. 715
Functions. 717
Object Orientation 718
Class and Object Variables 719
Constructors and Destructors. 720
Class Inheritance 721
The Standard Library and the Python Package Index 722
References 723
39 C/C++ Programming Tools for Ubuntu 725
Programming in C with Linux. 726
Using the C Programming Project Management Tools
Provided with Ubuntu. 727
Building Programs with make 727
Using Makefiles. 727
Using the autoconf Utility to Configure Code 729
Debugging Tools. 730
Using the GNU C Compiler 731
Graphical Development Tools. 732
Using the KDevelop Client. 732
The Glade Client for Developing in GNOME. 733
References 734
40 Using Mono 737
Why Use Mono? 738
MonoDevelop. 739
The Structure of a C# Program 741
Printing Out the Parameters 743
Creating Your Own Variables 743
Adding Some Error Checking. 744
Building on Mono’s Libraries. 745
Creating a GUI with Gtk# 745
References 746
41 Using Other Popular Programming Languages 749
Ada. 750
Clojure 750
COBOL. 751
Erlang 752
Forth. 752
Fortran 753
Groovy 753
Haskell 754
Java 754
JavaScript. 755
Lisp. 755
Lua 756
Ruby 756
Scala 756
Vala 757
References 757
42 Beginning Mobile Development for Android 759
Introduction to Android 760
Hardware 760
Linux Kernel. 760
Libraries. 760
Android Runtime. 760
Application Framework. 761
Applications 761
Installing the Android SDK 761
Install Java 761
Install Eclipse. 761
Install the SDK 762
Install the ADT Eclipse Plug-In. 762
Install Other Components. 762
Install Virtual Devices 763
Create Your First Application. 764
References 765
Part VI Appendices
A Ubuntu Under the Hood 767
What Is Linux? 767
Why Use Linux? 769
What Is Ubuntu?. 770
Ubuntu for Business. 771
Ubuntu in Your Home. 773
64-Bit Ubuntu. 773
Getting the Most from Ubuntu and Linux Documentation. 773
Ubuntu Developers and Documentation 775
References 775
B Ubuntu and Linux Internet Resources 777
Websites and Search Engines 778
Web Search Tips 778
Google Is Your Friend 779
Ubuntu Package Listings 779
Certification 779
Commercial Support 780
Documentation. 780
Linux Guides 781
Ubuntu. 781
Mini-CD Linux Distributions 781
Various Intel-Based Linux Distributions 782
PowerPC-Based Linux Distributions 782
Linux on Laptops and PDAs 783
The X Window System 783
Usenet Newsgroups 783
Mailing Lists. 784
Ubuntu Project Mailing Lists 785
Internet Relay Chat 785
Index 787
Erscheint lt. Verlag | 19.1.2012 |
---|---|
Verlagsort | Indianapolis |
Sprache | englisch |
Maße | 180 x 228 mm |
Gewicht | 1306 g |
Themenwelt | Informatik ► Betriebssysteme / Server ► Unix / Linux |
ISBN-10 | 0-672-33578-6 / 0672335786 |
ISBN-13 | 978-0-672-33578-5 / 9780672335785 |
Zustand | Neuware |
Haben Sie eine Frage zum Produkt? |