Archive

Archive for the ‘Linux’ Category

Railo installer issues on Arch Linux

September 11, 2011 Leave a comment

The Railo installer does a great job across multiple operating systems but it is not completely infallible (although it does come awfully close). The installer will complete, but there are two extra steps you will need to take to get things up and running smoothly on Arch Linux.

First, fire up your favorite editor and open up /opt/railo/tomcat/conf/server.xml and scroll down until you find the HTTP connector block. You will see something along the lines of “@@tomcatport@@” listed where the port should be. Replace this value with whichever port you want Tomcat listening on.

Next we need to move the railo_ctl file from /opt/railo/ to /etc/rc.d/, this is the folder that Arch Linux uses for its daemon services instead of /etc/init.d/ like Debian and RHEL systems use. Once the file is in there, chmod 0755 /etc/rc.d/railo_ctl to set the permissions on the file.

Finally, if you want Railo to startup automatically on boot there is one final modification to make. With your favorite editor open up /etc/rc.conf and add railo_ctl to the DAEMONS line and it will now start when you boot your machine.  You should now be ready to start Railo up, just sudo /etc/rc.d/railo_ctl start and you should be in business.

Categories: Arch Linux, General, Linux, Railo Tags: ,

Using PostFix to send emails using Amazon SES

August 26, 2011 1 comment

Of all the Amazon Web Services I use,  the Simple Email Service would have to be the service I use the most. ColdFusion allows me to easily create a component that sends emails pragmatically but, however, it would be much nicer to use the CFMAIL tag and be done with it. As it turns out, Amazon SES allows you to send a raw email so you can run PostFix  to relay the message through Amazon SES using a perl script.

I found a good tutorial on getting this configured here. I did have an issue getting perl to find the SES.pm file, but this post details how to work around that issue. The great thing about handling it this way is other applications on the server can send messages through the gateway, not just ColdFusion applications.

Installing yasm on Amazon Linux

I am currently working on a project that requires me to build ffmpeg locally on an Amazon Linux instance.  I did a repo search and could find nasm, but ffmpeg didn’t like it at compile time.  Here is how to get yasm installed.  I am documenting this because I will probably need it again.  It is assumed you have already installed git-core.

git clone git://github.com/yasm/yasm.git
cd yasm
./autogen.sh
./configure --prefix=/usr 
make
sudo make install

Git is a handy little tool.

Categories: AmazonWS, Linux Tags: ,

Installing s3fs on RHEL/Centos

August 4, 2011 4 comments

Lately I have been doing a lot of work with AWS t1.micro instances running Amazon Linux which seem to be based on RHEL/Centos.  Both Railo and ACF do a good job of interacting with Amazon S3 storage which definitely makes our jobs as developers easier, but what if you wanted to mount your S3 storage locally to have access to your files at the system level so you could actually work with them?  Luckily there is an open-sourced s3fs project that will allow you to do just that.

At the time of this writing, the current file release is s3fs-1.59.tar.gz.  The unfortunate thing is, s3fs requires Fuse 2.8.4 and the newest version available in the package repos is Fuse 2.8.3.  The first step is to get the newest version of Fuse and get it on the server.

wget "http://downloads.sourceforge.net/project/fuse/fuse-2.X/2.8.4/fuse-2.8.4.tar.gz?r=&ts=1299709935&use_mirror=cdnetworks-us-1"

Once the download is completed, extract it:

tar -xzvf fuse-2.8.4.tar.gz
cd fuse-2.8.4

If you are still on a stock install of Amazon Linux, at this point we will need some tools to get everything configured and compiled.

sudo yum groupinstall "Development Tools"

This will install the tools we need for a moment.  However, we will need to install some more packages to get s3fs to compile.  We might as well get them now:

sudo yum install curl-devel libxml2-devel openssl-devel mailcap

Now we should still be in the the fuse-2.8.4 directory, so now it is time to configure and compile Fuse.

./configure --prefix=/usr
make
sudo make install
sudo ldconfig
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
pkg-config --modversion fuse

If everything went as planned, pkg-config should return 2.8.4.

Next we need to download and install s3fs.  First we need to get and extract the archive:

cd
wget http://s3fs.googlecode.com/files/s3fs-1.59.tar.gz
tar -xzvf s3fs-1.59.tar.gz
cd s3fs-1.59
./configure --prefix=/usr
make
sudo make install

The installation should now be in working order.  The next step will be to decide how you would like to create your password file for s3fs.  You can either create a site wide password file /etc/passwd-s3fs or you can create one just for your user account ~/.passwd-s3fs.  The files are required to be secure, so if you go with the system wide password file be sure to chmod 640 /etc/passwd-s3fs or if you want to use your user account, chmod 600 ~/.passwd-s3fs.  The format for the files is the standard [AccessKey]:[SecretKey].

Finally, lets map the drive to a local directory.  In my home directory I created a folder name s3storage that will be my mount point.  We create the mount with

s3fs [bucketname] ~/s3storage -o default_acl=public-read

I have only set this up on one machine so I still do not have the install down completely, but I was able to get this up and running successfully.  All the steps above are more or less from memory so I apologize for any hazy steps.  I will correct as needed.

Categories: AmazonWS, Linux Tags: ,

Speeding up Aptana Studio 3

June 16, 2011 4 comments

My IDE of choice when developing is Aptana Studio.  I was setting up a new install last night on a Windows development machine and it seemed like it was a little “sluggish” (yes, that is a technical term).

After some quick Googling I found Mike Henke’s post on Turbo Charging Eclipse.  Since Aptana is built on top of Eclipse this is just what I was looking for.  Mike’s guide is pretty dang comprehensive and I will not reiterate it but if you are looking for some performance gains I would consider it recommended reading.

Admittedly, I did not go through all the steps he outlined.  I made some “best guesses” based on my system configuration and went with it.  Here is my current AptanaStudio3.ini file for Windows, although the same optimizations should work equally well on Linux.

--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-name
Aptana Studio 3
-vmargs
-Xms512m
-Xmx512m
-Declipse.p2.unsignedPolicy=allow
-Djava.awt.headless=true
-XX:PermSize=128m
-XX:MaxPermSize=128m
-Xverify:none
-XX:+UseParallelGC
-XX:+AggressiveOpts
-XX:+UseFastAccessorMethods

The end result, Aptana definitely feels like it has a little more pep in its step.  I do not have any benchmarks or hard quantitative data to back that up, only my personal experience.

FireSSH plugin for Firefox

March 21, 2011 1 comment

While scanning through my news feeds this morning I found a cool plugin for Firefox called FireSSH that, as the name alludes too, allows you to SSH to a host from your web browser.  Once the plugin is installed you can paste an SSH address in the url bar and go.

Now I just need to find something like this for Chrome.

Categories: Javascript, Linux Tags: , ,

MythTV vs Windows MediaCenter

I have been using Windows Media Center as my HTPC of choice for years now.  Recently Media Center has started crashing several times a day so I thought it might be time to mix things up a bit.  I have looked at a few other solutions, some running Windows and others running on Linux.  I could easily reload my HTPC machine with Windows, but ideally I would like to move on to something open-sourced and preferably on Linux; all my other machines run on various Linux distros. The main reason why I have not switched before is because I have about 2 TB of recorded video in Microsoft format that I did not want to lose, but now that I am having problems with the machine the collateral damage is not really an issue.

Currently I am looking at installing Mythbuntu to handle the HTPC role.  Basically I am just looking to see if anyone has made this switch and has any helpful hints on making the transition.  The biggest thing for me is the Media Center remote which looks like it will work well with MythTV.  I plan on transitioning over the weekend and I would love to hear about your experiences.

Categories: General, HTPC, Linux Tags: , ,

Having problems with artifacts running Docky in 3D mode under Linux?

January 17, 2011 2 comments

I will have to admit that Docky is one of my guilty pleasures running under Linux.  I noticed I was having artifacts on either side of my dock any time I enabled 3D mode.  After a lot of Googling the issue, I saw that I was not alone.  Most of the articles suggested a bug in the driver and suggested updating to the new driver (in my case, this was the proprietary ATI driver).  Updating it did not seem to make a difference.  As a fluke, I quit Docky and restarted it and the artifacts were gone and all was right with the world (until I made another configuration change).  Quitting and restarting solved the issue again.

So if you are having issues with your Docky install, quit Docky and start it again.  It might not work in all cases, but it worked a treat in my case.

Categories: Linux, Ubuntu Tags: ,

Setup Edimax USB wireless adaptor in Ubuntu

December 28, 2010 11 comments

Linux and Ubuntu generally impresses me with the number of devices you can plug in and it just works.  Installing the Edimax EW-7811UN was not one of those times.  To be fair, I also had the same issue with an older model Linksys WUSB54GSC, but the form factor of the new Edimax was just too good to pass up (it bills itself as the worlds smallest wireless adaptor).    No matter how hard I tried to keep the Linksys adaptor out of harms way, my kids have generally tried to find way to try to break it off in the USB slot.  They take this mission very seriously although the Linksys adaptor has survived against all odds.

The nice part about the Edimax network adaptor is it does come with a set of drivers that compiles under linux but you have to download it from their web site.  Actually it is based on the Realtek RTL8192C chipset so do not be surprised when you extract the driver package.  Now on to the fun stuff.

Go into the directory where you extracted the drivers and build the modules:

make clean
make

That should  go ahead and build your modules.  Next we just need to use insmod to install the module to make sure everything is working:

sudo insmod 8192cu.ko

If all went well, you should soon be able to see your wireless network and connect normally.  If you are a glutton for punishment you can do this every time you start up your system to get net access going.  Personally, I prefer it just to work every time I turn on the system and it just requires a few more steps:

sudo cp 8192cu.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless
sudo insmod 8192cu.ko
sudo depmod -a

This will copy the newly compiled module into the kernel drivers directory and the depmod -a should add it to the module dependencies.   I am thinking this will probably have to be done on every kernel upgrade until the hardware is automatically detected so I am keeping my driver’s source around in case I need to recompile and reinstall the module.

Now to see what the kids try to break next….

Categories: Linux, Ubuntu Tags: , ,

Moved to linux (again)

December 10, 2010 5 comments

I know I have made several of these posts in the past where I say I ditched my Windows roots and moved everything to linux.  This time, I believe, will be different.

Read more…

Categories: General, Linux, Ubuntu Tags: ,
Follow

Get every new post delivered to your Inbox.

Join 364 other followers