Wednesday, December 16, 2009

How do you compile software on Linux?

Most programs you can download in source form can be compiled using the following simple steps:

1. Extract the source package (ex. 'tar xzvf programname-version.tar.gz'), this will create directory programname-version. Chdir into it.
2. Run './configure'. This checks the build environment to make sure your compiler works and has the proper libraries installed.
3. Run 'make'. This compiles the program.
4. Run 'make install'. This places the binaries in the appropriate location(s).

Monday, December 14, 2009

Linux Logs

Discover the basics of viewing/searching through common Linux log files on command line as well as through a GUI and discover one of the coolest visualizations for apache log files.

A common way to watch log files is to use the -f flag and tail. Most log files are protected so you will need elevated privileges to view them.

Common Log Files

  • auth.log – Authentication info
  • boot.log – Boot info
  • crond – Scheduled cron tasks
  • daemon.log – Daemon specific alerts like, dhcpd, gnome-session, ntfs-3g
  • dmesg – Kernel specific messages
  • errors.log – As you may have guess this logs errors
  • everything.log – A misc. catch all log
  • httpd – Apache access and error logs
  • mail.log – Mail server logs
  • messages.log – General system alerts
  • mysqld.log – MySQL database log
  • secure – Security log
  • syslog.log – A log for the log system
  • vsftpd.log – A log for the FTP server, vsftpd
  • Xorg.0.log – X log

You will probably quickly notice that there are a lot of duplicate looking files in /var/log with numbers at the end of them. Some of them might even have .gz at the end. These are called rotated logs. Usually the log rotator ‘logrotate‘ is responsible for rotating old logs at a specified interval in ‘/etc/logrotate.conf‘. For more information about logroate do, ‘man logrotate

Viewing Logs in GUI

To view log files in Gnome go to: Applications > System Tools > Log File Viewer


Tuesday, December 8, 2009

Database Technology

I found many definitions on database but I prefer this - A database is a collection of information that is organized so that it can easily be accessed, managed, and updated. In one view, databases can be classified according to types of content: bibliographic, full-text, numeric, and images.

  1. Apache Derby
  2. DB2 (IBM proprietary)
  3. Firebird
  4. Microsoft SQL Server
  5. MySQL
  6. Oracle
  7. PostgreSQL
  8. SQLite

Server-side vs Client-side Scripting

Server-side - a web server technology in which a user's request is fulfilled by running a script directly on the web server to generate dynamic web pages. It is usually used to provide interactive web sites that interface to databases or other data stores.

  1. ASP/ASP.NET (*.asp/*.aspx) - (Microsoft proprietary)
  2. ColdFusion Markup Language (*.cfm) - (Adobe proprietary, formerly Macromedia)
  3. ANSI C Server Scripts TrustLeap G-WAN ANSI C Scripts (*.c) - (TrustLeap G-WAN, freeware)
  4. Java via JavaServer Pages (*.jsp)
  5. Javascript using Server Side Javascript (*.ssjs)
  6. PHP (*.php) - (open source)
  7. Perl (*.pl) - (open source)
  8. SMX (*.smx)
  9. Python (*.py) - (open source)
  10. Ruby (*.rb) - (open source)
  11. Lasso (*.lasso)
  12. WebDNA (*.dna,*.tpl)

Client-side - a scripts are run by the viewing web browser.

  1. AJAX Provides new methods of using JavaScript, server side languages (eg ASP.Net or PHP) and other languages to improve the user experience.
  2. Flash Adobe Flash Player is a ubiquitous client-side platform ready for RIAs. Flex 2 is also deployed to the Flash Player (version 9+).
  3. JavaScript Formally called ECMAScript, JavaScript is a ubiquitous client side programming tool.
  4. JavaFX is a software platform for creating and delivering rich Web applications that can also run across a wide variety of devices.
  5. Microsoft Silverlight Microsoft's browser plugin that enables animation, vector graphics and high-definition video playback, programmed using XAML and .NET programming languages.

The primary advantage to server-side scripting is the ability to highly customize the response based on the user's requirements, access rights, or queries into data stores.

Source from Wikipedia