PHP on AWS Elastic Beanstalk | Cameron Stokes’s Blog

A great article and simple way to take advantage os Amazon’s Elastic Beanstalk service even if you don’t work in Java. I’m working on integrating this approach with Eclipse’s AWS Toolkit to access all the server management tasks close to my code. I’l post and update if it turns ugly.


via PHP on AWS Elastic Beanstalk | Cameron Stokes’s Blog.

While Amazon claims they’re working on other platforms, initially Beanstalk only supports Java applications deployed in the Apache Tomcat 6 container. However…using Quercus, a “100% Java implementation of PHP 5″ from Caucho, we can run PHP using AWS Elastic Beanstalk. All it takes is setting up a simple Maven project.

Install Python Fabric Library on Mac 10.6 (Snow Leopard)

I’ve been doing a lot of Python work lately to manage a butt-load of Linux servers and I’ve been using the Fabric Library to help me connect remotely and securely. I had some problems getting the library and dependencies to install on my Mac laptop so here is what I did. Add a reply if there is an easier way.

> sudo easy_install pip    # PIP is recommended for installation
> sudo -s   # Creates a new sudo shell
> export ARCHFLAGS="-arch i386 -arch x86_64"   # Need to set some GCC flags
> pip install fabric   # Get the install on

Props go to these guys and stackoverflow for helping out.

Side note: If you run into this error in the console or log when running your script there is a simple fix. Wrap your env.password with str() (ie str(env.password)) and voila. A better solution may be to create a log handler and ignore and I’ll post that solution if I have tome to figure it out.

> No handlers could be found for logger "paramiko.transport"

Out of DiskSpace? Use Ducks | aplawrence.com

I’m always looking for better ways to find the disk hogs… there are a ton of one liners and tools but this is the first time I’ve heard of “ducks”. Thanks A.P!


Where has the space gone?

Although time consuming, the following procedure can be used to track down where your space has been used.

cd /

du -s *

(Some folks like to use “du -cks *”, which is easy to remember as “ducks”.)

This command will print the number of blocks used by each directory and file in the root. Most likely, the largest number printed is where you should be looking. You can then cd to that directory, and examine it. If it has sub-directories, you might use:

find . -type d -exec du -s {} \;

You can search for “large” files by cd’ing to a suspect directory ( or even starting at /, if you must), and typing

find . -size +5000 -print

will print the names of all files over 5,000 blocks (2,560,000) bytes. This may find many, many files, so you might want to refine it with larger numbers. You might also want to sort it:

find / -size +2000 -exec ls -s {} \; | sort -nr | more

To limit find to the filesystem you are on, add “-mount”:

find . -mount -size +5000 -print

via Out of DiskSpace?.

NGINX + PHP-FPM + APC = Awesome

Here is an excellent article on the merits, install and use of NGINX and PHP


NGINX + PHP-FPM + APC = Awesome

via NGINX + PHP-FPM + APC = Awesome.

HOW TO: Run Your Business Online with $10 and a Google Account

Online infrastructure for your small business doesn’t have to be complicated or expensive. By leveraging many of the free and inexpensive products offered by Google, you can create a website, a domain-branded e-mail system, and a document collaboration platform, all unified under one master login and password.

Once all of the virtual wires are connected, these services are extremely user-friendly, allowing anyone with a bit of web savvy to become the “system administrator” for their office.

Follow the steps below, and you’ll be on your way to a customizable and scalable business infrastructure that lives where your employees do: in the cloud.

via HOW TO: Run Your Business Online with $10 and a Google Account.

MySQL: ibdata files do not shrink on database deletion [innodb] | Technology: Learn and Share

A great discussion on a potential problem for database servers with limited drive space (life EC2 small instances). The best solution is in the comments section so be sure to read through.


One very interesting thing I noticed with MySQL was that if you delete a database, ibdata file doesn’t shrink by that much space to minimize disk usage. I deleted the database and checked usage of /usr/local/mysql/var folder and noticed that ibdata file is still the same size. So the problem I face now is, how do I claim back this space?

Read more.

via MySQL: ibdata files do not shrink on database deletion [innodb] | Technology: Learn and Share.

Get Vista and Samba to work – Code Monkey Business AU

I used these instructions to get my Windows 7 clients to connect to my Mac 10.4 server.

——————–

Early adopters of Microsoft’s new Vista operating system may notice that it will not connect to Samba share folders out of the box. This will be a bit of a pain for many enterprise customers. The technical reason is because Microsoft Vista’s default security policy is to only use NTLMv2 authentication. According to a Google search Samba doesn’t support this yet.

Update: Some readers have pointed out that NTLMv2 authentication is supported in Samba 3.0. However, this certainly wasn’t an option to get this running in my instance.

To get Vista to work with Samba follow the simple instructions

Get Vista and Samba to work – Blogs – Code Monkey Business – Builder AU.

iPhone Wifi not working? Reset your network settings | A Mountain Top, LLC

iPhone Wifi not working? Reset your network settings | A Mountain Top, LLC.

From the Home Screen, I clicked on “Settings”. From there, I scrolled down to “General” and clicked on it. From there, I scrolled to the bottom, clicked “Reset”, then “Reset Network Settings”. After accepting the warning that I was doing something dangerous and clicking the giant red button, the iPhone started buzzing and shaking and generally throwing a fit. After it was done getting reset, I simply went back into Settings -> Wifi, saw my network, connected and it worked!

Linux command to gathers up information about a Linux system

If you are developing an application for Linux desktop and would like to automatically find out more information about system, use the following commands in shell scripts to gather information about system. Recently I was involved in project where I need to collect information about running GUI, browser and other information such as disk space, running kernel etc.

Linux command to gathers up information about a Linux system.

How to flush DNS Cache on Mac OS 10.5

Finally a way to flush the DNS cache on Mac OS 10.5 “dscacheutil -flushcache“. PC users have always had a way to do this with “ipconfig /flushdns” but Mac users usually had to restart. In Mac OS 10.4 there was “lookupd -flushcache” but that never quite worked 100% of the time. Here’s a bit of the MAN page and a link to the complete page via developer.apple.com.

dscacheutil — gather information, statistics and initiate queries to the Directory Service cache.

SYNOPSIS
dscacheutil -h dscacheutil -q category [-a key value]
dscacheutil -cachedump [-buckets] [-entries [category]]
dscacheutil -configuration dscacheutil -flushcache
dscacheutil -statistics

DESCRIPTION
dscacheutil does various operations against the Directory Service cache including gathering statistics, initiating lookups, inspection, cache flush, etc. This tool replaces most of the functionality of the lookupd tool previously available in the OS.

Mac OS X Manual Page For dscacheutil(1).

Follow

Get every new post delivered to your Inbox.