How to create a MySQL Workbench connection to Amazon EC2 server

I’ve been working with Amazon Web Services (AWS) Elastic Cloud Computing (EC2) quite a bit recently.

I’ve also started working with Ubuntu at the same time. The result is the ability to quickly spin up new instances of Ubuntu server to use for various reasons without all the hassle of new hardware, or even alot of configuration headache. Using Amazon Machine Images (AMIs), an administrator can spin up an instance that is already configured, patched, and ready to run.

Using this technique and technology that is new to me has created a bit of a learning curve, and one thing that caught me off guard was the need to use keypairs instead of username/password to access the servers, which is more secure, and is the default method for accessing AWS EC2 servers.

MySQL Workbench to AWS EC2 via SSH tunneling and keypair

I was able to easily figure out how to access an AWS EC2 using a keypair with SSH command line, and Filezilla, but MySQL Workbench seemed a little more complex.

Above you can see the diagram, which shows my new connection dialogue screen.
Read the rest of this entry »

Adding exceptions for Apache mod_sec 2.5

I have some developers working on a site on a cPanel/WHM CentOS 5 server which has Apache running with the mod_security or mod_sec module running. This is a module that prevents several types of attacks against the server. It is sometimes referred to as an open source intrusion detection and prevention engine for web applications, or web application firewall.

To make a long story short, you can place rules in a configuration file, and if those rules are triggered during an HTTP request, the client is refused, usually with an HTTP 406 error.

Anyway, the developer’s IP address was getting added to the blocked list the CSF firewall, which basically blocked any type of access to the server from their IP addresss (HTTP, SSH, FTP, etc.) Read the rest of this entry »

Using Linux Ubuntu 10.04 Lynx server

A few weeks ago, I wrote a blog entry asking the community about your thoughts on Fedora/CentOS versus Debian/Ubuntu.

In the end, I decided that there was so much discussion going on about Ubuntu that I wanted to give it a try. So I’ve been using Linux Ubuntu 10.04 Lynx server. I’ve setup an instance at Amazon Web Services (AWS) Elastic Cloud Computing (EC2).

Overall, things seem pretty straight forward and there seems to be quite alot more documentation out there about how to use/configure Ubuntu. There is definitely a larger community. I’m coming from cPanel (on CentOS 5) to Ubuntu, so I’m really coming from the cPanel discussion forums/”How To” blogs to the Ubuntu discussion forums/Blogs.

Working with EC2 has been quite a steep learning curve, but there are loads more possibilities, such as the ability to detach a storage volume, shut down a virtual machine, and start up a larger, more robust virtual machine and re-attach the volume in just a few minutes with little planning or preparation.

It is a little tedious working with the sudo command however. I’ll have to admit that it is hard getting used to using it all the time.

Are there any others out there using EC2 extensively?

How to recursively set the file permissions for all .php files on a *nix box

I had a need today to change the security of all .php files in a sub-directory, which contained dozens of sub-directories.

I figured out how to do it recursively with the find command. In the example below, I set all *.php files to chmod 755.
All other files with a file extension other than .php and directories were unaffected.

$ cd /mydirectory
$ find . -type f -name '*.php' -exec chmod 755 {} \;

From Fedora/CentOS to Ubuntu server?

I’ve been running a CentOS 4 box (which was eventually upgraded to 5.0) for quite a few years now. I wouldn’t say that I’m a total command line *nix guru, but I’ve enjoyed managing the server and learning a few things over the years other than Windows NT/2000/2003/2008.

I’m about to move some web servers from a dedicated CentOS LAMP box at a traditional hosting environment to Amazon Web Services.

There is quite alot to consider and there seems to be more architecture planning involved in running a system there at Amazon’s service and a little bit different way of doing things than the traditional web hosting environment, but it also opens up a great potential to testing out dev servers or rolling dev servers into productions servers, etc. etc. not to mention the scalability and redundancy offered.

While doing research, I keep seeing more and more and more about Ubuntu, which sparked me to do a little research and see what all the hubabub was all about.

I’m now considering running Linux Ubuntu 10.04 Lynx server as my server instead of CentOS.

Does anyone out there in the Lotus blogosphere have any experience with moving from Fedora/CentOS to Debian/Ubuntu flavors? If so, I’d love to have a casual chat. More importantly, is anyone using Amazon Web Services? It seems like quite a considerably more complex operation than throwing a few physical boxes in a rack and being done with them.

Consulting

I'm currently available
for Lotus Notes / Domino consulting engagements.

LinkedIn

Connect with me:

LinkedIn

Advertisement
Advertisement
Categories