Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Thursday, September 23, 2010

Cross-Platform Developer's Tools Comparison

One of the first things with moving to or even evaluating a new platform is figuring out what is "there" on the target OS. This answers the question "What can I still do" or better yet "How do I...".  Here's my comparison list of tools across Linux, OS X, and Windows. Yes, I know that OSX is Linux under the covers, however it is enough of a "standoff-ish" platform (IMHO) with regards to user experience, development platform/tools (used to build the software I'm talking about), etc. that I categorize it separately.

Tool Linux OSX Windows
Blog Writer Qumana Live Writer
Database Tool DbVisualizer DbVisualizer DbVisualizer
SQL Server Management Studio Express
Development IDE Eclipse
MonoDevelop
Eclipse
MonoDevelop
Eclipse
SharpDevelop
Visual Studio
File Compression 7-Zip 7zX 7-Zip
File/Folder Comparison Beyond Compare Delta Walker Beyond Compare
Instant Messaging Pidgin Adium Pidgin Pidgin
Source Control Subclipse Subclipse
Versions
AnkhSVN
TortoiseSVN
System Tray Status/Tools iStat Menus SysInternals
Text Editor Beyond Compare Text Wrangler Notepad++
Video Player VLC Player VLC Player VLC Player
XML Editor <oXygen> <oXygen> <oXygen>

Note that this list is what I've found for software that is comparable and gets the job done for me.
Tags: , , ,



Powered by Qumana

Monday, September 6, 2010

A nasty OpenSSO configurator “bug”

After lots of trial ‘n error, I found that when configuring a new, first instance you must use the FQDN when launching the configurator. In addition, your machine’s hostname must be in a FQDN with AT LEAST TWO DOTS in the name. The only reference I found on the web was buried in this thread that’s two years old: http://markmail.org/message/35rfpbayvrjzjuvg. Also in the thread is mention that the default linux machine name of ‘localhost.localdomain’ isn’t supported and doesn’t work. What drives you crazy is the only error you see either through the JSP-based GUI or through the command line tool is “invalid hostname”.

Friday, February 19, 2010

Comparison of LAMP settings across Linux distros

I’ve been using SUSE quite a bit lately and before this current job it was CentOS (a.k.a. RedHat) all the time. With my recent adoption of Drupal for our church’s website I also found myself playing around with WAMP as well. There are plenty of HOWTOs on each distro as well as forums and discussion threads that answer specific questions on where things are located, defaults, commands for restarts, etc. but I haven’t come across a simple comparison chart so here’s my attempt:

  CentOS 5.3 SUSE 11.2 WAMP 2.0c
Apache ver. 2.2.3 2.2.1.13 2.2.8
http.conf /etc/httpd/conf/httpd.conf /etc/apache2/httpd.conf
/etc/sysconfig/apache2
C:\wamp\bin\apache\apache2.2.8\conf
Apache commands apachectl  start|stop|restart|status
/etc/init.d/apache2 start|stop|restart|status
rcapache2  start|stop|restart|status
/etc/init.d/apache2start|stop|restart|status
{use tray applet}
Apache docRoot   /srv/www/htdocs C:\wamp\www
MySQL ver. 5.0.77 5.1.36 5.0.51b
PHP 5 ver. 5.2.9 5.3.0 5.2.6
php.ini /etc/php.ini /etc/php5/apache2/php.ini C:\wamp\bin\apache\apache2.2.8\bin

Thursday, November 26, 2009

Preparing CentOS 5.3 (LAMP) for Drupal 6 – Part 2

Technorati Tags: ,,,

In the first article, I covered the basic steps for preparing a CentOS 5.3 installation for Drupal 6 by installing and configuring MySQL. This article covers the last quartet of the LAMP stack – PHP as well as initial installation of Drupal 6.

From a terminal console use the ‘yum’ utility to install the necessary PHP components:

yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc

Next it’s helpful and common practice to create a PHP informational page to verify its installation using the Gnome text editor:

gedit /var/www/html/phpinfo.php

Paste or type the following then save and exit:

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);

?>

Display the PHP information using the browser:

phpinfo_header

Scroll further down to verify that the Apache URL rewriting module is loaded:

phpinfo_modrewrite

This will be useful later for what is known in Drupal as “clean URLs”.

Implicit in the above instructions is the fact that the default location for the Apache web server document root folder is /var/www/html which means placing web files and folders under there makes them automatically served up by Apache and accessible via a web browser with no other special configuration. However, a common alternate approach is to create a separate Unix user account per installed application so that permissions and configuration settings are easily isolated to that account. This approach also facilitates remote development because it’s simpler and easier when enabling FTP access since Unix accounts typically have full access to their “home” directories. Doing it this way means a couple of extra steps when initially setting up the Drupal website but saves a ton of headaches in the future trying to enable access to the machine-wide directories under /var.

Earlier we created a MySQL database account called ‘drupal614’ (reflecting the current released version of Drupal). If you haven’t done so already, we’ll next create a Unix account with the same name:

useradd drupal614

passwd drupal614

After logging in as this new user, browse to the Drupal website and download the latest 6.x released version. Use the Nautilus file manager to open the .tar.gz file and extract it under the user’s home directory. Planning ahead for managing several versions, I chose to create a separate folder to hold websites (e.g. /home/drupal614/www/) so the full path becomes /home/drupal614/www/drupal-6.14.

At this point, we need to configure Apache to expose the Drupal directory by editing the httpd.conf file and adding entries:

gedit /etc/httpd/conf/httpd.conf

First we create an alias to the actual physical location on disk then we allow settings there to override the default settings for Apache by placing the following into the file at the end:

drupal_install_3-cleanurls1

Next we edit the .htaccess file in the root of the Drupal install directory – uncomment the RewriteBase instruction and set the path to the alias we specified above in the httpd.conf file:

drupal_install_3-cleanurls2

Now we should be able to follow the steps to grant write permissions outlined in the install guide then open a browser and navigate to the install page:

http://localhost/drupal614/install.php

You should see the initial page to choose a language:

drupal_install_1-language

The next page is where you’ll put in the database configuration information we had previously setup:

drupal_install_2-database

After setup is complete it is generally recommended to go into admin/settings/clean-urls and enable them if not already enabled:

drupal_install_3-cleanurls3

At this point we have an installed and working version of Drupal! Subsequent posts will cover installation and configuration of various modules to achieve the level of functionality required for a high quality community site.

Preparing CentOS 5.3 (LAMP) for Drupal 6

Having just embarked on a side project to build a community website using Drupal 6 I decided to capture the steps both for documentation purposes and to help others who may seek to do the same. To begin with, CentOS is short for Community ENTerprise Operating System and is “an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor.” In other words this open source project takes the GPL-released RedHat sources and compiles them along with free, open source replacements for RedHat’s proprietary portions. Within the business community, it is widely popular because it is “just like” (just as good as?) the commercial version it is based upon.

On numerous occasions I have installed versions of CentOS on Microsoft’s Virtual PC and Hyper-V products as well as VMWare’s Workstation. In my opinion, it is far easier with VMWare’s built-in support however their workstation product costs around $180 whereas the Microsoft products are “free” with corresponding Windows licenses. Note however that VMWare Workstation is only necessary to initially build a new virtual machine instance. Once you have the guest OS installed, you can use their free VMWare Player to run the virtual machines. VMWare has a great program of “appliances” which are pre-built, pre-configured virtual machines ready for download and operation. In fact, there’s a CentOS 5.3 appliance ready to go – you just need to download then install VMWare Player and download the appliance and you’re up and running.

The Apache web server is already installed in the appliance and when you choose “server” if performing your own install. That leaves MySQL and PHP along with some configuration. Begin with MySQL by opening a terminal window (right-click on the desktop) and switching to the built-in root user (a.k.a. superuser):

su -

yum install mysql mysql-server

Once MySQL is installed enable it for autostart using:

chkconfig –levels 235 mysqld on

then start it manually this first time using:

/etc/init.d/mysqld start

Set the MySQL database login for root:

mysqladmin –u root password ‘PASSWORD-GOES-HERE’

Next log into the MySQL command processor and set the database name to use for subsequent commands:

mysql –u root –p

mysql> USE mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

At this point there’s some housekeeping that’s usually done to secure the database beginning with removing the anonymous accounts that let any connection to the database to happen.

mysql> DELETE FROM user WHERE User = '';

mysql> FLUSH PRIVILEGES;

Now look at the remaining contents of the user table:

mysql> select Host,User,Password from user;
+-----------------------+------+------------------+
| Host                  | User | Password         |
+-----------------------+------+------------------+
| localhost             | root | 44d0372963d3fb50 |
| localhost.localdomain | root |                  |
| 127.0.0.1             | root |                  |
+-----------------------+------+------------------+
3 rows in set (0.00 sec)

Note that the Password column contains a hashed (encrypted) value. To exit the MySQL command processor and return to the Linux shell use ‘quit;’  or ‘\q’:

mysql> quit;
Bye

Create a separate database login for a Drupal user (e.g. drupal614):

mysqladmin –u root –p create drupal614

This database account will be used to connect to MySQL and will “own” the tables and other artifacts created to support Drupal. Rather than using the separate mysqladmin from the Linux shell you can accomplish the same thing from within the MySQL command processor before quitting:

mysql> CREATE USER 'drupal614'@'localhost' IDENTIFIED BY 'drupal614';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO 'drupal614'@'localhost' WITH GRANT OPTION;
Query OK, 0 rows affected (0.01 sec)

mysql> CREATE USER 'drupal614'@'%' IDENTIFIED BY 'drupal614';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO 'john'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit;
Bye

The above commands will create two database accounts – one for connecting from within the Linux machine and the second set for connecting to the Linux machine from another. This second account is useful if you wish to connect say from your Windows machine using a free utility such as DbVisualizer or SQuirreL SQL. The GRANT command is a lazy bit of a cheat in that it grants all permissions to the drupal614 account. Looking at the Drupal installation guide you’ll find a longer syntax which only grants the specific permissions that Drupal needs to connect and use the MySQL database.

This has been a quick whirlwind tour of the essential steps. I have only tried this twice – first as a trial and error practice and again using a fresh machine to validate that I had the specific steps worked out.

Next up will be the steps for installing PHP and Drupal.

Monday, August 13, 2007

Forget CentOS under Virtual PC - Ubuntu is "IN"

Late last year I blogged about trying to use CentOS under Virtual PC. After several attempts, I basically gave up. There's something to be said for marketing and "mind share" - which Ubuntu has plenty of. Earlier this year I took a stab at using Ubuntu with Virtual PC (and Virtual Server) and got a lot further. In fact, I managed to get a full working version for a developer environment. I also got a version going for an Oracle server, a WebSphere/DB2 server and even a streaming media server.

Things went so well that I repurposed an old dual-processor Dell workstation to run as an Ubuntu development machine on "bare metal". I normally work in Windows but now can "dabble" in Linux without difficulty...

WorkDesk

Because I'm working on enterprise-class applications using J2EE, I opted for using Ubuntu 6.06 (a.k.a. Dapper Drake) since it is the official server version with L.T.S. (long term support).

I can install and use the following on either environment:

  • Java 1.4 and 1.5
  • Eclipse IDE
  • JBoss application server
  • DB-Visualizer
  • Ant/Tomcat
  • Perforce
  • Firefox

The cool thing to me as a geek is that I can be on two totally different architectures and platforms and use the same tool sets to work on the same code.

Monday, December 11, 2006

Installing CentOS 4.4 under Virtual PC 2004

CentOS is a free version of RedHat Enterprise Linux which closely mirrors the commercial version. There are many places in the 'verse which detail changing the default color depth from 24-bit to 16-bit for the S3 Trio adapter that VPC emulates. After doing this I tried 'startx' only to find it wouldn't work so I started digging.

The X windowing environment started up then flashed and shutdown again with a console error of unable to find .xterm'. Checking around, I found examples from one cranky coot (a.k.a. Jason) under the heading 'Get GUI'. Turns out CentOS uses a package manager called 'yum' and he lists the commands for installing X11. I got as far as the the fonts before getting errors so I figured I fire it up again and see what happened. I did get a desktop but the size was way too big and unusable.

Jason also showed commands for installing XFCE which is a lighter and faster X-windowing system. So I tried that, typed in 'startxfce4' and voila! I then tried browsing the web only to get an error about Firefox not being installed. No problem - I opened a console window and tried 'yum install firefox' and it worked.

Hope this helps an old Windows developer like me ;)

Original post