Phildawg.com

Archive for June, 2009

Setting Up A LAMP Server

by Phildawg on Jun.16, 2009, under Computers

LAMP is a term used to describe certain web servers.  It stands for Linux, Apache, MySQL, PHP. This is mainly going to be a point of reference for myself.  I recently set this up on my macbook so I could install wordpress and learn a bit how themes are made.  I didn’t want to play around directly with my actual Phildawg site and screw something up.  This way I have a blank template, or even a copy of my current site, to play around with.  This also came up recently when I found out my friend James is starting to do some side work designing sites for people.  Currently he uses live sites on the internet while he is building.  This just isn’t practical.   So here is what I did/am doing.

Lets start with the L.  Grab a copy of your favorite linux distro.  Right now I am working with Ubuntu 9.04 but there are many different flavors available.  You can download an iso to burn to a cd or you can order a CD via snail mail.  Installing Linux has gotten insanely easy these past few years and I may do a post later on about how to do just that.  For now, it should be easy enough to just boot to the CD and follow the on screen prompts. (I’m assuming you are doing this on a seperate machine and do not need to go into dual booting or need to save anything currently on the machine.  This will be a dedicated machine in your house)

So you have linux installed and updated.  Great.  Its actually pretty easy from here.  Moving along to the A, its time to install apache.  Open up a terminal window (In Ubuntu click applications in the top right, select applications, and click on terminal) and type in the following command:

sudo apt-get install apache2

After pressing return it goes out and installs it.  You may need to type ‘Y’ to start the install.  Once you return to an empty command line you are done.  Easy as that.  One simple line.

Now lets get MySQL and PHP.  PHP is used by wordpress which is what I am using for this site.  In your terminal window type in the following commands and follow the prompts:

sudo apt-get install mysql-server

sudo apt-get install libapache2-mod-auth-mysql

sudo apt-get install php5-mysql

Congrats.  You have everything installed.  The only config file I needed to edit was an apache config file so that PHP would work properly.  Open up the config file by typing in the following command:

sudo gedit /etc/apache2/apache2.conf

and at the bottom add in the following line without the quotes. “AddType application/x-httpd-php .html”.  Save the file and close it.  Then restart the apache server with the following command:

sudo /etc/init.d/apache2 restart

If you get an error saying that apache could not determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName then you need to create a file to fix this.  In the terminal again, type in the following:

sudo gedit /etc/apache2/conf.d/fqnd

You should get a blank window that pops up.  Type in “ServerName localhost”  (without the quotes) and save the file.  Close the window and restart apache again.  Personally it didn’t really affect my wordpress install but its nice to not have errors.

That’s pretty much it.  You have a webserver to play around with now.  The only weird thing I came across is that my installation of Firefox didn’t know what to do when it encountered a php file.  It kept prompting me to save the file instead of starting my wordpress setup.  To fix this just clear the browser cache.  In Firefox click on edit and choose preferences.  On the privacy tab  click on clear now in the private data section.

Couple other things to note, for wordpress you will need to create a database to use.  From the commandline, get into mysql by typing:

mysql -u root

It should change your prompt to “msql>”.  If you already setup a password for root during the setup you will need to use the command

mysql -u root -p

and then put in your password at the prompt.  If you haven’t changed the root password from the default yet I recommend you do that first by typing in

SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’yourpassword’);

Only change the text yourpassword and leave the single quotes.  Remember this password so you can create the various databases for your sites.  Now to create a database type in the following:

CREATE DATABASE databasename

Your database is now created and you can type “\q” (minus the “”) to get back to the terminal prompt.  If you are done you can type exit or just close the window.

Hopefully later this week I’ll find some time to go through installing wordpress on your new LAMP server and setting up some forwarding so you can access your test sites from outside of your home.  This is going to be ideal for my friend James because he can then do all of his developement on a server in his own home but still give him a way to show the clients the progress he has made without dragging them into his house.  There will be a special thanks to @erimar77 from Eric-Martin.com for helping me out with the port forwarding and the site I use to make this happen.  But I’ll leave it at this for now.  You’ll just have to check back for the next steps.


1 Comment :, , , , , , , more...

Staying Healthy

by Phildawg on Jun.16, 2009, under Fitness

One of my favorite quotes comes from the series Dune by Frank Herbert.  It says: “There is probably no more terrible instant of enlightenment than the one in which you discover your father is a man—with human flesh.”   This is totally true and not just about fathers.  I’m totally beginning to think that I’m not really immortal any more.  I’m pretty out of shape right now and I definitely don’t have great eating habits.  Not to mention, I’m getting old!  It scares me to think that this could be the best shape I’ll be in in my entire life.  Its all down hill from here.

I started thinking about this more after reading an article in Time.  Yes I sometimes read and yes I have a subscription to Time.  For those of you that know me, Time magazine has strong differing views on politics but I think its good to get information from both sides.  It was basically about things you should be doing to stay healthy and keep medical costs down.  The article in the print edition was a nice read but the article on their site is broken up into like 37 pages!  I really hate when sites do this.  There is no length constraint inside the browser so stop breaking things into pages!  The story of A User’s Guide To Good Health At Every Age starts here. but the relevant portion for my age group is here.

The section on diet could not be more opposite than what I really eat half the time.  I stick to a lot of processed food and my buddy Jorin has once commented that I won’t eat it unless it comes in a wrapper.  Definitely not good.  I think I’ve come a long way since that comment was first made and the fact that I am not over 300lbs anymore is testament to that fact.  I’m trying to broaden my tastes to include things I normally never eat such as asparagus, spinach, and other single ingredient foods as it mentions in the article.  Most of them are not half as bad as I remember.  But its hard to limit portions and snack on healthy food when everything on the market has been scientifically designed and marketed to taste better than what i should be eating.  If a big stack of celery tasted as good as chips and could be found in a vending machine, maybe we wouldn’t have this obesity problem in our country.

Exercise is another story.  I’m trying to actually exercise a little now.  I did a 5k on Saturday in St. Louis at the race for the cure.  It was definitely fun and I’d love to do another some time.  Doing just a 5k isn’t really enough though.  HHS, recommends getting 2 1⁄2 to five hours of moderate cardio, or 75 minutes to 2 1⁄2 hours of intense cardio, each week, plus weight training twice a week.  How many of us even get 30 minutes of moderate cardio a week?  I know for a long time I wasn’t.  Everyone says they don’t have time in their busy schedules but you can ask that same person what happened on their favorite TV show every week.  Its all about just making the decision to do it.  If you can find time for TV, you can find time for this.

I began thinking about all of this because I actually scheduled a checkup with my doctor today.  I haven’t been to the doctor in quite some time and I normally only go after I’ve done something stupid like give myself 3rd degree burns or impale my hand with a screwdriver.  When I called to setup the appointment the lady asked me how old I was and then immediately asked me if I’ve ever gotten my cholesterol checked.  This is it man.  I am getting old.  I guess part of me wants to do all that I can to stay ahead on this stuff and actually get myself into the best shape I’ve ever been.  I just hope its enough to overpower my general laziness about life.

I guess all I’m saying is that we are getting old.  If you have health insurance its time to start using it.  I guarantee your co-pay will be way less than the bill when something goes terribly wrong.  Besides, its not like medical professionals just come to you about this stuff.

If only things worked like this...

If only things worked like this...

1 Comment more...

Project Tree Removal

by Phildawg on Jun.10, 2009, under Personal, Uncategorized

Last Saturday I finally got the tree in my back yard removed.  It was pretty freakin huge.  And hollow.  Huge and Hollow.

Huge!

Huge!

Hollow!

Hollow!

I’ve been trying to get this done for several weeks but it has been raining every Saturday since the first limb fell off and tore the power from my house.  It was quite an ordeal and all the wiring from my breaker box on out needed to be redone.  It was quite a learning experience.  I made several calls to different people associated with the power company to learn the current codes.

That Friday was full of suck

That Friday was full of suck

Aside from having to put up new piping, meter box, and wiring, I also had to put in a new grounding rod and redo some wiring in the breaker box.  It was kind of a pain but I know a lot more now about electricity.

I didn’t want to come home to this again so I called up some friends to cut this tree down.  It took several weeks for this to happen since it rained but June 6th the weather finally cooperated.

I was just here last month.... stupid kids.

I was just here last month.... stupid kids.

I don’t know if you all noticed in the second picture that the power line was laying on the ground again.  That’s because the line was knocked down a second time.  Once again I had to call the power company to come out and reattach power to my house.  At least this time I didn’t have to do any repairs myself.  But now at least its finally done and I won’t have to worry about it again for hopefully quite some time.  You can check out all the pictures I took of this process by hopping over to my Picasa web album called Project Tree. Only 3 baby squirrels died in the removal of this tree so I am calling it a success.  Be warned that there is a picture of said baby squirrels in the mix.

I have plenty of other fun projects for my house that I am currently putting off.   I need to build new stairs to the basement, paint the kitchen and upstairs, maybe do some landscaping. I’m sure they will all give me a few more life lessons learned the hard way to share with you.  That’s all for now.  I’ll leave you with this picture of me pretending to be my old tree.

The green shirt was a nice touch.

The green shirt was a nice touch.

Comments Off : more...

The Know Show – Thinking About Doing Internet Radio

by Phildawg on Jun.09, 2009, under Personal

As some of you may already know, I’m thinking about starting an Internet radio show with a couple good friends of mine.  Technically the show had already started and I was going to be a guest for one episode.  It was featured on RiverFrontRadio and seemed like a pretty sweet deal.  Unfortunately that very night the show was handed a contract that raised the monthly cost of the show and charged a hefty premium to start the show.  Bummer.

James, Justin and I have decided to look into doing all of this ourselves.  Now we aren’t very far in the planning stages.  James is working on reworking The Know Show website so we can continue to post updates and hopefully generate some buzz.  I should mention that the reworked site is not up yet and this is still the old RFR version of the site.  Hopefully we will find some time to get that reworked.  We sat down together the other night so we could decide what exactly we want to do with the show.

Now as my friend Steven mentioned to me today over twitter, that last show was very unorganized and should probably be labeled The I Don’t Know Show.  This is what we are hoping to avoid.  We planned out some regular segments and want to actually plan out shows before doing them.  For right now we want to have some general rants from each of us about varying topics, a segment featuring news both national but hopefully more local to the St. Louis area, and an entire segment dedicated to me and my lack of sports knowledge called  “Phil Knows Sports”.

Since we kinda have some direction with where we want to go with this we are looking into our streaming options as well as equipment needed to figure out the monthly cost of operations.  Once we know what that will be and are almost ready to go, we will hopefully look for some sponsorship to break even on the costs as we develop a listener base with extra money going to advertise the show.

Be sure to check in with me here at Phildawg for updates as this plan developes.  I’ll be sure to post something to let you know when the new site is active and we have started posting some material as well as a tentative go-live date.  I think this will be the first time I’ve invested money in something I find super interesting that is more than about making money.  This show will be for fun and we hope you will find it entertaining as well.

1 Comment :, , more...

My Plan To Start Running Again

by Phildawg on Jun.05, 2009, under Fitness

This accurately descripes my efforts

This accurately describes my efforts

If you are like me and most of America you have been thinking about losing some LBs (pronounced “el bees”).  If you are really like me, thinking it as far as it got.  I’ve been thinking about it so hard that the me in my head is already ripped and I’m tired in the evening from all the running I’ve been doing in my head to get there.

Towards the end of last year I started running.  I was doing pretty well actually considering I was just a beginner.  Then it got cold and I decided I would wait out the winter without joining a gym because I want to save money.  Well spring came and went and I never stated again.  Now I’ve put back on about 30 of the 70 lbs I lost.  Tonight I finally took the next step and put my running shoes on.  The results?  I’m reminded about how much running sucks at first.

I had this problem last year too and I remember it being about a solid month of running at least 4 times a week before I started to like it.  I’m learning all over again that running is an aquired taste.  I’m not a doctor and you probably shouldn’t take my advice without consulting a physician but here are a few things I plan to do to start running again and keep at it.  I find sometimes reading about it sometimes helps keep me in  the mindset of doing it.

First and foremost is to pick a schedule and stick with it.  I want to make sure I run at least 4 nights a week so I am going to run Sunday, Monday, Wednesday, and Friday.  I chose these days because I happened to start today and would like a day of rest before my second day.   Monday because I want my third day to be immediately after the second because I need to force myself to stick with it and I tend to stop caring after doing something twice.  Tuesday to rest since I’m just getting back into it.  Wednesday because I don’t want to stop for more than one day.  Thursdays I have softball for the next couple months so that may be out until after and then Friday.  Eventually I would like to get up to 3 days on, followed by one no more than two off but not before the habit is formed.

Second, I’m choosing to start off with a time frame of 30 minutes.  Does this mean I run/jog for 30 minutes?  Lord no!  I’m a pack a day smoker right now and I think my body would revolt if I tried that.  I jog at a fairly good pace until I feel the need to walk and then add another block.  About a year ago I paid for a trainer for a few months and probably the best thing about having a trainer is that they are there to push you to do more than you normally would.  so every time I want to stop I add a block.  Then I walk until I feel I can jog again and repeat for a full 30 minutes.  If my 30 minutes ends and I am currently jogging, I go until I need to stop and then I walk for 8 minutes to cool down.

Each week I will pay attention to how far I run until I stop.  At the start of the new week, I’ll increase my stopping point by 2 blocks.  Again this is just a part of pushing myself to do more.  Last year I was able to fit about 3 miles in that 30 minute period which I felt pretty good about.  I’d like to get back to that.

Of course there may be days that I don’t reach my goal.  Its important to listen to your body and stop if there is actual discomfort.  It won’t help to injure yourself because then you won’t be able to build that healthy habit.  I chose 30 minutes mainly because I thought I remembered reading that you should exercise for at least 30 minutes a day 5 days a week to stay healthy.  Eventually I will have to invest more than 30 minutes per run but 30 minutes is a good place to start.

Also something I do, that I do not recommend, is have a cigarette at the end of my run.  I know that’s terrible but I haven’t quit yet.  At least I’m doing something more than thinking about it!

4 Comments :, , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...