Sunday, October 19, 2008

Setting up the web server

This is a follow up to my last entry and specifically relates to lighttpd , MySql and PHP5.

Prior to my getting my Eee PC I have mostly worked with Slackware for setting up web servers. When you stay with one distribution for some time you get to know where everything is installed. When you try to move away from this you sometimes get a little lost. Oh well, that is part of life.

So I have been told the most successful way to install on the Eee PC is with apt-get. This is a method I have not had much to do with without someone beside me who was experienced. I don't consider that I have become very good at this method at this time, but after much reading of websites and a lot of experimenting I have managed to get my desired result.

When I tried to install apache on the Eee PC, apt-get informed me that it was not available for my system but that lighttpd was its replacement. I nervously accepted this and went ahead with the install. Not wanting this package to run everytime I started the computer, I put a script in /usr/local/bin to start it instead of editing the rc scripts in /etc.

When I first tried to view a .html page I only got a blank screen. Searching the web with the error message I found in the log file I discovered that I could edit the config file and add a command to use writev().

I installed the MySql on my sata drive and used symlink to mount it in the /usr/local directory. I used my previous experience with MySql to initialize it and set my root password.

I used apt-get to install the PHP5 components and edited the lighttpd config file to call php5-cgi for my access to MySql.

I copied a bunch of files from my existing web server into my user home directory and set my public_html for access by the web server. Then I ran my web browser and called on my home page. All seemed good for the first screen. Then I called my php login script to access MySql. Ooops. Screen goes blank and the system hangs.

Several hours pass with much accessing of the internet looking for someone who has solved this problem. What I find is that there may be some problem with my MySql port. It seems that php5 looks at /etc/services to get the port by default. After playing with some of the scripts in the MySql collection I found one that showed the port I was using. This did not match the one given in /etc/services. I edited the php.ini file and told it which port I was actually using and Bingo, everything works perfectly.

Now I have this tiny computer I can take on the train and it has all my MySql data. What a thrill.

Wednesday, October 15, 2008

My EeePC

I thought I would put down a few thoughts about my laptop.

I have avoided moving into the laptop market for two main reasons. The first reason is because if the thing dies I can't fix it myself. I have no difficulty pulling a desktop or tower to pieces and replacing the dead cards or even the power supply, but I am no good with a soldering iron.

The second reason is that I do not like working with Microsoft. I have always said that if I was going to have a laptop it would have to be Linux compatible.

So now I have a laptop. There are several things that encouraged me to buy this unit. First and foremost, the price. Half the cost of any other laptop I had looked at. Then there was the fact that it came with Linux installed. :-) And there was not much to go wrong with the thing. No inbuilt DVD to start with. And I got a full years warranty.

Now I have added some bits to it. I don't always take all of this with me when I travel, but being able to plug these bits into the USB system gives me a huge amount of flexibility.
  • An external DVD. A double benefit. I can use this with any computer I have access to. If it dies, I am not buying a new laptop.
  • A 250GB mini SATA hard drive. This also can be used on any other computer.
  • An external mouse. There is an inbuilt mouse/finger board that works fine if you are traveling, but it is not as easy to use as a standard mouse.
  • An external keyboard to use at home. The on board keyboard is great when you are out and about, but I can type at normal speed with a full size keyboard.
  • An external full size monitor. The on board screen with its scroll bar is adequate if you are not at home, but if you plug in the external you get the benefit of whatever pixel size screen you use.
I was quite happy with the setup of the unit as it came. It has this easy to use set of icons. You just move to the category you want to work with and select the program. Any new computer user would be able to work this system without any lessons in Linux at all.

But then I was surfing the net and discovered a very interesting website dedicated to this little thing. The Link I found on Google is here. Eee PC Tips: A crash course in Linux - Download Squad
This site helps you to move from the newbe type screen to a standard Linux desktop. I followed the instructions and now I have two choices. I can stay in the simple desktop or move to the standard one after booting.

Once I had this installed I decided to look further. I tried the Debian site mentioned but was not able to connect. Not to be put off, I searched for other Debian sites and found one that was available. Now I have MySql, lighttpd and PHP5 on the SATA hard drive. Everything you would ever need :-) Well this week anyway.

So my overall opinion? I realy do not think you would be sorry if you got one of these little Eee PC units. I am very happy anyway.

Monday, October 13, 2008

First Entry

This is the first entry of my blog. Who knows where it will go to from here.
I have no idea what I will put on this blog. It will not be anything that you would not want your mother or your children to read so you can safely subscribe to it.