Saturday, March 22, 2008

Linux Server Projects


Linux Topics
Linux is growing. It is now used in many everyday gadgets such as cell phones, PDAs, MP3 players, TVs, printers, portable GPS systems and cameras. It's no longer just for systems administrators. Join the wave! This site covers topics needed for Linux software certification exams, such as the RHCE, and many computer training courses. There is also a companion Cisco PDF for home / branch office configurations.
CHAPTER 1 - Why Host Your Own Site? IntroductionOur NetworkFigure 1-1 : Wireless home network topologyAlternatives To In-House Web HostingVirtual HostingDedicated HostingFactors To Consider Before Hosting YourselfTable 1-1 The Pros and Cons of Web Hosting In-HouseIs In-House Hosting Preferred?How to Migrate from an External ProviderIn-House Server ConsiderationsConclusion
CHAPTER 2 - Introduction to NetworkingIntroductionThe OSI Networking ModelTable 2-1: The Seven OSI LayersAn Introduction to TCP/IPTCP Is a Connection-Oriented ProtocolHow TCP Establishes A ConnectionUDP, TCP's "Connectionless" CousinTCP and UDP PortsThe TCP/IP "Time To Live" FeatureThe ICMP Protocol and Its Relationship to TCP/IPHow IP Addresses Are Used To Access Network DevicesPrivate IP AddressesThe localhost IP AddressNetwork Address Translation (NAT) Makes Private IPs PublicPort Forwarding with NAT Facilitates Home-Based Web sitesDHCPHow DNS Links Your IP Address To Your Web DomainIP Version 6 (IPv6)How Subnet Masks Group IP Addresses into NetworksCalculating The Number of Addresses Assigned to a SubnetTable 2-2: The "Dotted Decimal" And "Slash" Subnet Mask NotationsCalculating the Range of Addresses on Your NetworkManual CalculationCalculation Using a ScriptSubnet Masks for the Typical Business DSL LineThe Physical and Link LayersNetworking Equipment TerminologyNetwork Interface CardsThe Meaning of the NIC Link LightDuplex ExplainedThe MAC AddressHow ARP Maps the MAC Address to Your IP AddressCommon ARP Problems When Changing A NICThe Two Broad Types Of Networking EquipmentData Terminal EquipmentData Communications EquipmentUsing Straight-Through/Crossover Cables to Connect DTEs And DCEsTable 2-3: Cabling Rules of ThumbConnectivity Using HubsUsing Switches as a Faster Alternative to HubsLocal Area NetworksHow Routers Interconnect LANsHow Simple Routing WorksDefault Gateways, The Routers Of Last ResortFirewalls Help Provide a Secure Routing EnvironmentAdditional Introductory TopicsThe File Transfer ProtocolLinux HelpConclusion
CHAPTER 3 - Linux Networking

IntroductionHow to Configure Your NIC's IP AddressDetermining Your IP AddressChanging Your IP AddressFigure 3-1 - File formats for network-scriptsHow DHCP Affects the DNS Server You UseMultiple IP Addresses on a Single NICIP Address Assignment for a Direct DSL ConnectionSome Important Files Created By adsl-setupSimple TroubleshootingIP Address Assignment for a Cable Modem ConnectionHow to Activate/Shut Down Your NICHow to View Your Current Routing TableHow to Change Your Default GatewayHow to Configure Two GatewaysAdding Temporary Static RoutesAdding Permanent Static RoutesHow to Delete a RouteChanging NIC Speed and DuplexUsing mii-toolSetting Your NIC's Speed Parameters with mii-toolUsing ethtoolSetting Your NIC's Speed Parameters with ethtoolA Note About Duplex SettingsHow to Convert Your Linux Server into a Simple RouterConfiguring IP ForwardingConfiguring Proxy ARPConfiguring Your /etc/hosts FileThe loopback Interface's localhost EntryDebian / Ubuntu Network ConfigurationThe /etc/network/interfaces FileThe auto StanzaThe mapping StanzaThe iface StanzaCreating Interface AliasesAdding Permanent Static RoutesA complete /etc/network/interfaces fileConclusion
CHAPTER 4 - Simple Network Troubleshooting IntroductionSources of Network SlownessSources of a Lack of ConnectivityDoing Basic Cable and Link TestsTesting Your NICViewing Your Activated InterfacesViewing All InterfacesTesting Link Status from the Command LineLink Status Output from mii-toolLink Status Output from ethtoolViewing NIC ErrorsIfconfig Error Outputethtool Error Outputnetstat Error OutputPossible Causes of Ethernet ErrorsHow to See MAC AddressesUsing ping to Test Network ConnectivityUsing telnet to Test Network ConnectivityLinux telnet TroubleshootingSuccessful ConnectionConnection Refused Messagestelnet Timeout or Hangingtelnet Troubleshooting Using WindowsScreen Goes Blank - Successful Connection"Connect Failed" Messagestelnet Timeout or HangingTesting Web sites with the curl and wget UtilitiesUsing curlUsing wgetThe netstat CommandThe Linux iptables FirewallDetermining Whether iptables Is RunningHow to Stop iptablesHow to Configure iptables RulesUsing traceroute to Test ConnectivitySample traceroute OutputPossible traceroute MessagesTable 4-1: traceroute Return Code Symbolstraceroute Time Exceeded False Alarmstraceroute Internet Slowness False Alarmtraceroute Dies At The Router Just Before The ServerAlways Get a Bidirectional tracerouteping and traceroute Troubleshooting Exampletraceroute Web sitesPossible Reasons For Failed TraceroutesUsing MTR To Detect Network CongestionViewing Packet Flows with tcpdumpTable 4-2 : Possible TCPdump SwitchesTable 4-3 : Useful tcpdump ExpressionsAnalyzing tcpdump filesCommon Problems with tcpdumpViewing Packet Flows with tsharkTable 4-4 : Possible tshark SwitchesTable 4-5 : Useful tshark ExpressionsBasic DNS TroubleshootingUsing nslookup to Test DNSUsing nslookup to Check Your Web site NameUsing nslookup To Check Your IP AddressUsing nslookup to Query a Specific DNS ServerUsing the host Command to Test DNSUsing nmapTable 4-6 Commonly Used NMAP OptionsUsing netcat to Test Network BandwidthDetermining the Source of an AttackWho Has Used My System?The last CommandThe who CommandConclusion
CHAPTER 5 - Troubleshooting Linux With Syslog
IntroductionsyslogTable 5-1 Syslog FacilitiesThe /etc/syslog.conf FileActivating Changes to the syslog Configuration FileHow to View New Log Entries as They HappenLogging syslog Messages to a Remote Linux ServerConfiguring the Linux Syslog ServerConfiguring the Linux ClientSyslog Configuration and Cisco Network DevicesLogrotateThe /etc/logrotate.conf FileSample Contents of /etc/logrotate.confThe /etc/logrotate.d DirectoryActivating logrotateCompressing Your Log Filessyslog-ngThe /etc/syslog-ng/syslog-ng.conf file Figure 5-1 A Sample syslog-ng.conf FileInstalling syslog-ngConfiguring syslog-ng ClientsSimple syslog SecurityConclusion
CHAPTER 6 - Installing Linux SoftwareIntroductionWhere to Get Commonly Used PackagesPackages on Your Installation CDsManually Downloaded PackagesTable 6-1 Popular Package Download SitesAutomated Package DownloadHow to Download SoftwareGetting Software Using Web-Based FTPGetting RPMs Using Command-Line Anonymous FTPTable 6-2 FTP CommandsGetting Software Using wgetInstalling Software From RPM FilesHow To Install RPMs ManuallyUsing Downloaded FilesUsing CD-ROMsHow to Install Source RPMsRPM Installation ErrorsFailed DependenciesSignature KeysHow to List Installed RPMsListing Files Associated with RPMsListing Files for Already Installed RPMsListing Files in RPM FilesListing the RPM to Which a File BelongsUninstalling RPMsWhich RPMs Will Start Up At Boot Time?Automatic Updates with yumConfiguring yumHow to Automate yumCreating Your Own yum ServerHow to Automate yumKeeping Your System current with YumExample of a yum Package InstallationRemember The Following Yum FactsInstalling Software From DEB FilesHow To Install DEBs ManuallyUsing Downloaded FilesUsing CD-ROMsDEB Installation ErrorsFailed DependenciesHow to List Installed DEBsTable 6-3 Column Formatting for the dpkg commandListing Files Associated with DEBsListing Files for Previously Installed DEBsListing Files in DEB FilesListing the DEB Package to Which a File BelongsUninstalling DEBsWhich DEBs Will Start Up At Boot Time?Automatic DEB Updates with apt-getConfiguring APTKeeping Your System current with APTExample of an apt-get Package InstallationRemember The Following APT FactsInstalling Software Using tar FilesInstalling Perl ModulesManual Installation of Perl ModulesAutomatic Installation of Perl ModulesConclusion
CHAPTER 7 - The Linux Boot Process IntroductionThe Linux Boot SequenceFigure 7-1 Sample grub.conf fileTable 7-1 Linux RunlevelsDetermining the Default Boot runlevelGetting a GUI ConsoleGet a Basic Text Terminal Without Exiting the GUIUsing a GUI Terminal WindowUsing Virtual ConsolesSystem Shutdown and RebootingHalt/Shut Down The SystemReboot The SystemEntering Single-user ModeSwitching to Single-user ModeEntering Single-user Mode At The Grub Splash ScreenReverting To Your Default runlevel From Single User ModeRoot Password RecoveryStarting and Stopping DaemonsStarting a DaemonStopping a DaemonRestarting a DaemonThe service commandUsing chkconfig to Start Daemons at Each runlevelchkconfig ExamplesUse Chkconfig to Get a Listing of sendmail's Current Startup OptionsSwitch Off sendmail Starting Up in Levels 3 and 5Double-check that sendmail Will Not Start UpTurn On sendmail AgainUsing chkconfig to Improve SecurityFinal Tips on chkconfigUsing sysv-rc-conf to Start Daemons at Each runlevelInstalling sysv-rc-confListing the runlevels for DaemonsSetting the runlevels for DaemonsConclusion