Showing posts with label Open Source and LAMP. Show all posts
Showing posts with label Open Source and LAMP. Show all posts

Friday, January 16, 2009

LAMP Skills for the MySQL DBA

MySQL runs on lots of Operating Systems
The MySQL database server runs with more different operating systems than any other database. The reason being is not only does it run on all the popular operating systems but you can download the source, make a few tweaks and run it on any operating system (if you're a bit twiddler). Yet the place where you're likely to see MySQL the most is with LAMP environments. Of course the L in Linux means Red Hat, SUSE, Centos, Fedora, Ubuntu, etc.

Operating Systems I use with MySQL
The operating systems I use the most with MySQL include Red Hat, Windows, Fedora 10, Mac OS, Solaris and OpenSolaris.
  • Red Hat and Solaris - use the most when working with customers.
  • Mac OS, Fedora and OpenSolaris - for trying different things and playing around with MySQL. Although I do see some customers using OpenSolaris and CentOS for their production environments.
  • Windows - use mainly for teaching beginning MySQL courses.
VMs I use with Mac OS
I like using Parallels and VM Fusion with my Mac OS environment. Both of these VMs allow me to install any operating system I want and play with MySQL, Oracle, Oracle Fusion Middleare and LAMP stack components.

Software skills to have around MySQL
For most MySQL DBAs in general, they need to have skill in popular software surrounding MySQL. These software skills include:
  • Linux administration - basic admin skills, cron, shell scripting and UNIX power tools (awk, sed, REs, PERL,...)
  • Application Servers - Get good with an application server. Apache is a great one to start out with. Then you can migrate to JBoss, Glassfish or the Oracle Application Server dependent on your goals. MySQL excels in web environments so it really helps for a MySQL DBA to understand the middle-tier in a lot of companies.
  • Popular software - Around MySQL you usually see a lot of oftware like memcache, Nagios, mon, cacti, SQLyou, Navicat, Toad, phpMyAdmin, etc. MySQL is like the open source Sun and a lot of open source revolves around MySQL.
  • Development - I'm still seeing lots of PHP, Java and Ruby around MySQL. Of course .NET is always a player.
  • Benchmarking software - mysqlslap, sql-bench, jmeter, MyBench, sysbench, Apache Bench and supersmack are all good skills to have.
LAMP Skills for the MySQL DBA
It's important for any MySQL DBA to increase their value to an organization and marketability by having strong LAMP or LAMP equivalent skills. As well as be able to work with the software that is used in lots of companies that surround MySQL.

Sunday, March 23, 2008

Setting up Apache and PHP on Mac OS Leopard

Apache is a fairly straight forward setup if you use some utility or distribution to help you. A manual installation will take more time. You can Google installation instructions or use a utility like XAMPP to simplify the installation. XAMPP is a distribution that will walk you through an Apache, MySQL, PHP, phpMyAdmin installation. Once you get comfortable with XAMPP these software components can be installed on a Linux or Windows platform in a few minutes.

I'm running Mac OS (Leopard) which comes with a built-in Apache web server (2.2.6) and PHP (5.2.4) preinstalled. On Mac OS (Leopard), perform the following steps to get the Apache Web Server (AWS) and PHP up and running in minutes.
  1. Go to System Preferences. Under Internet and Network select the Sharing icon.
  2. Select the checkbox under Web Sharing. It will return your computer's website URL (IP address or host name) (i.e. http://xxx.xxx.xxx.xxx/). This will also start AWS.
  3. Open up a browser and type your computer's website URL displayed in the Web Sharing page in System Preferences. After typing this URL in a browser. You should get a browser page that shows you your Apache web server is up and running. This is too cool. Mac OS's built in Apache web server takes just a few clicks to have Apache up and running.
  4. Once you've confirmed the Apache web server is up and running, type the httpd -V command to get information on your Apache installation.
Running httpd -V.
$ httpd -V

The httpd -V command returns important information
  • The Apache Web Server version you are running.
  • The location of the Apache configuration file (httpd.conf).
  • The location of the access and error log file.
  • Apache configuration options.
Example snippet of output from the httpd -V command:
Server version: Apache/2.2.6 (Unix)
-D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf"
-D DEFAULT_ERRORLOG="logs/error_log"

With Mac OS (Leopard) you can find the access_log and error_log files in the following location:
/private/var/log/apache2/

Turn on PHP 5 on Leopard by uncommenting the following line in your httpd.conf file using a text editor.
# LoadModule php5_module libexec/apache2/libphp5.so

AWS needs to be stopped and restarted for the changes to take effect. Starting and stopping the AWS can be done through the System Preferences | Sharing window. Clicking the Web Sharing checkbox can be used to stop and start Apache. Restart the Apache Web Server so the configuration changes take effect.

Create a PHP configuration file. Then change the error reporting option to display all errors. Instructions:
$ cd /private/etc
$ sudo cp php.ini.default php.ini
$ sudo vi php.ini
Change the error reporting line using vi or a text editor to display all error messages.
error_reporting = E_ALL & -E_NOTICE
error_reporting = E_ALL

Test your PHP configuration
  1. In a browser type your computer's website displayed in the Sharing page. This should launch Safari and display an Apache web page.
  2. Create a page called test.php (lots of examples on Google). Save it in the directory Macintosh HD:Library:WebServer:Documents.
  3. Go to your browser and type your computer URL with a test php (lots on Google) program. If you get the PHP info your configuration is working.
http://xxx.xxx.xxx.xxx/test.php


Apache and PHP should now be up and running on your Mac. Have fun!

Monday, January 21, 2008

MySQL - A change agent for open source




















The 1st Edition of "The MySQL Story" was handed out during the MySQL meeting in Orlando when the Sun acquisition of MySQL was announced. MySQL is a very cool company with employees that have a very unique, committed and passionate perspective to open source.

MySQL employees are taught to be "disruptive", to shake the world with new ideas and innovativeness. With a strong believe and commitment to open source, MySQL AB has created a company where everyone believes that there is a greater good that can be accomplished by working together, collaborating together, sharing and freely exchanging ideas. I believe a lot of the great company "team" attitude and commitment to work together is fostered by the belief in open source.

If Sun truly wants the MySQL acquisition to succeed, I strongly recommend Sun to let the core values of MySQL to survive and to try not to change MySQL but to support MySQL so the MySQL database server can grow better and stronger and help open reach new levels of success. Open success succeeding is a win for every individual and startup company on the Internet.

I find it interesting all the doomsayers predicting all the things that could go wrong with this MySQL acquisition and can MySQL go head to head with Oracle. You always hear this from the industry analysts never from MySQL employees. Oracle is like an aircraft carrier task force and MySQL is like a small speed boat. All MySQL employees know this and love MySQL being a speed boat. All the doom sayers and preachers of gloom need to relax a little bit or maybe that helps get readers. Open source believers believe in "open source". They are not religious zealots for Ruby on Rails, PHP, MySQL, Linux or any other component of open source. They are committed to open source. MySQL understands as well as any, open source group. I can't predict the future, you will always see MySQL at the front of the battle lines for open source. I suggest everybody sit and wait to see how the MySQL database server grows under this acquisition. You don't kill the goose that lies the golden eggs. Be a little patient, you may be pleasantly surprised with how well this acquisition goes.

MySQL employees have the opportunity to be a "Tipping Point" for open source. MySQL employees are currently at the tip of the blade not the bleeding edge. Their vision can be a tremendous change agent for the IT industry. If the MySQL people focus on being great leaders and help define future directions of open source and continue to build new versions of the database open source can count on, then all will be good in the world of open source. Everyone on the Internet: Internet companies such as Google, Yahoo, YouTube, MySpace, bloggers, startup companies, individuals building their first website, hosting companies should all be rooting for the Sun acquisition of MySQL to be successful.

Thursday, January 17, 2008

Open Source continuing to change the world

MySQL by the pure volume of downloads is considered the most popular database for the Internet. MySQL and open source are changing the world as well. The first .com explosion had startup companies throwing a lot of money at traditional hardware and proprietary software. While today, most start ups are running open source solutions like MySQL, Linux, Apache, Perl/PHP, etc. This allows startup companies to have more operational flexibility in their beginning stages. This significantly reduces the startup capital to build the IT infrastructure. By this definition MySQL and open source are helping fuel the world wide economy by allowing companies to have enterprise Internet platforms out of the gate.

In the last year a number of small and medium sized companies have started using MySQL on projects. With everyone seeing the tremendous success of MySQL in companies like Google and YouTube, you can expect more large companies looking for projects where MySQL is a good fit. With Sun fueling MySQL (solar powered), this should significantly increase the growth of MySQL in the database market. 2008 can expect to see a significant acceleration of open source in the industry.

Sun has to feel good that they have JavaDB which plays well for smaller databases and now MySQL.

Friday, November 2, 2007

The Incredible Growth of Open Source

Getting Hooked on Open Source

Open source is kind of like M&Ms. It's hard to have just one. Once people understand open source, they start looking at more ways open source can be used in their organizations. The cost savings can be dramatic. In the old days people would say "You won't get fired by choosing IBM". Those days are over. You may not get fired by buying a large vendor solution, but a lot of people may get laid off or outsourced due to large vendor costs and licensing.

Open source by definition is a "sharing" environment. Every class I teach students are sharing different open source products they use for Wikis, ticketing systems, communication, monitoring software, operating systems, database servers, application servers, development environments, etc. What's more they are also sharing scripts, ideas and planning on collaborating more after the class ends. This is a very cool environment for a technologist.

The Microsoft Word Effect

I look at it as the Microsoft effect. You go out and buy Microsoft Word for $329.99. Most people use Word for setting bold, a few fonts, spell checking, italics etc. People pay over $300 for one vendor (Microsoft) product and 95% of all users don't even use 5% of that product. I went and bought iWork that has Pages, Keynote and Numbers, the Apple equivalents of Word, PowerPoint and Excel for $99 for a five system family pack. This wasn't an open source solution, the point being that why keep paying large amounts from vendor software if you are not using a lot of their features. Arguably by going to iWork I not only saved a lot of money but also got a lot more functionality that the vendor (Microsoft) product. It took being able to think out of the box and thinking I had to buy a large vendor product.

I also bought Notebook software for my Mac to help keep myself organized and to take notes. One of my students then showed me Tiddlywiki and I can use it for free on all platforms. I keep a copy of it on my flashdrive and I take it everywhere with me. There are a lot of points if you look at open source, you have a lot more options and will likely save a lot of money.

Open Source Can Dramatically Reduce IT Budgets

Companies are seeing that open source solutions such as Linux, MySQL, JBoss, Apache, Eclipse, RT, etc can save them tremendous amounts on their IT budgets. If you need all the feature functionality from a major vendor then it makes sense to pay their prices. In most companies their are numerous project areas where open source can provide large cost savings and still meet core functional requirements. Using open source may not only keep you from getting fired, it may also keep most of your employees from getting outsourced or laid off.

The Fear of Open Source

Don't misunderstand what I am saying. The features provided from the large vendors can be very important to an organization. There is a reason you pay large amounts of money for large vendor features. If you need an aircraft carrier and you have the money for it, go get it and you'll sleep soundly. For extremely large mission critical systems I would highly recommend looking at the best solutions money can buy if you need it. What I'm saying is if you don't need an aircraft carrier then look for the right sized solution that will meet your needs.

A lot of managers are scared to move off the security of large vendors and to look at open source. In the future you are going to see managers looking for more flexibility, nimbleness and the need to manage costs more effectively as growth occurs.

Globalization has allowed large corporations world wide to compete with U.S. companies. Open source is growing significantly in popularity in places like Europe and China. With low cost solutions like open source, in the future you will see smaller companies begin to compete more effectively in the U.S. as well. U.S. companies need to look not only at the strength and flexibility of the IT organizations but also at the costs of their IT organizations to compete locally as well as world wide.

Good Articles on Open Source Growth

Different industry groups are predicting up to 27% growth annually in open source software by 2010. Small businesses have always been a core component of the U.S. economy. Small businesses and individuals can often compete against much larger companies at a fraction of the large company costs by using the Internet and open source. Why shouldn't large organizations also leverage these costs benefits? Especially since your competiton is probably using open source.

Here are a few interesting articles on open source growth.
I always welcome hearing about different open source solutions.

Sunday, September 23, 2007

The Growing Popularity of LAMP















LAMP is a proven software stack for developing and implementing multi-tiered web applications.
  • Linux - operating system
  • Apache - web server
  • MySQL - database server
  • PHP - programming language for dynamic web pages

The nice part of this stack is that it an extremely low cost solution for implementing web based solutions. This stack is also interchangeable.
  • The operating system can be interchanged with Windows.
  • The web server can be replaced with an application server such as JBoss.
  • MySQL is also available in an Enterprise solution.
  • PHP is growing in popularity for developing dynamic web pages. Other popular languages include Ruby on Rails, PERL and Java for building web applications.

LAMP or a modified version of LAMP can be an extremely strong solution for startups, Small and Medium sized Businesses (SMB) and even large organizations looking to implement web solutions with a low cost proven solution of software components.

LAMP derivatives can use Windows, different versions of Unix/Linux and JBoss instead of Apache to name a few options. Since is blog thread is focused on MySQL, MySQL will be the one constant in LAMP options.

A number of different programming environments and languages can be used to implement web-based applications for MySQL in a LAMP infrastructure. Some of the more popular ones include:
  • PHP
  • Perl
  • Java (JSPs, Servlets, EJBs)
  • AJAX
  • Ruby on Rails
  • Groovy
  • Python
  • Access

Eclipse is not mentioned in the LAMP acronym but it is a powerful IDE for developing Java applications. JDeveloper from Oracle is free and is another powerful solution for building Java applications.

Products like Toad and Navicat can also be included in this environment for interfacing with the MySQL database. Toad is available in free versions available for download.

There are a lot of interchangeable components I have just listed some of the more popular solutions.