
Episode 3 - mistakingly inebriated
So there it is, a long rambling episode. I hope the directions on Drupal were not too discombobulated. I'll get the tutorial up on it later this week. You can also check out the install tutorial over at lullabot.
http://www.lullabot.com/videocast/install-local-web-server-ubuntu
Lets say that I had a few beers by the time I did the song at the end. At least I've proven I don't mind making an ass of myself :)

That "other" operating system
I have another PC that I back up to, with Windows XP on it, everything just the way I want it, including apache and a dynamic dns.org account, port forwarding, etc.... So, I am not really anxious to trash it and start over. So, I was wondering where this podcast is going. What I mean is that everything (so far anyway) could be done on a Windows box.... Apache is already there, MySQL is available for windows, PHP is available for windows, and drupal (saw some online stuff anyway, didn't try it)...
So..... Guess I should wait for Episode 4, but I don't see anything that would prevent me from "playing along" on a Windows box... ?????
You are welcome to play
You are welcome to play along with apache on windows. However this is a linux podcast and I will be doing everything specific to linux. I will also be moving to other packages, such as opennms, zimbra, zenoss, that will be specific to Linux. You will also be missing out on the other packages that I mention that are linux specific, such as agave in episode 3.
The majority of open source software, including apache, is natively written for Linux, and you will get better performance, tighter security, and easier administration from Linux. I have administered Apache on a windows box in the past, and will never do so again, knowing now how much easier things run on Linux. I wont even get into the resources that are used by a windows box that are unnecessary in a server environment.
If you want to follow along using windows, that is your choice.
Thanks for stopping by the forums.
Chad
Got stuck with phpmyadmin.
Hi Chad,
I followed along with episode 2 and did the LAMP thing. It went so well that I got that funny feeling in my pants. Yay! There was my "hello world" index.html in localhost. Cool.
Next I followed along and did the episode 3 phpmyadmin. That seemed to go well, but I got a 404 error at http://localhost/phpmyadmin. As Homer says: "Doh!".
Then I found and read the tutorial. Step #1 is delete everything in /var/www. Did that and rebooted. No joy. Went for apt-get remove and then apt-get autoremove and then apt-get install. This time it didn't ask what flavor of Apache, and there was still a 404 error.
Next: Used the synaptic package manager to *completely* remove the thing. Another install from the command line. This time it *did* ask for the Apache version, and......404.
Throw me a line, buddy. I've used phpmyadmin on rented servers and am pumped to have it on my box.
(Brace for subject change.) Now a suggestion:
Last week I went to the site looking for the tutorial and looked in the show notes. There were some links there. I thought "Big deal. Some tutorial." I didn't notice the tutorial link. This week I did. You might want to include a link to the tutorial in the show notes links for those or us with limited attentio.......Monkeys are funny!
Now where was I? Oh yeah. Thanks for the show, and keep it up. I'm listening.
Best,
Tom
It may be that your mysql
It may be that your mysql install did not go right. When you installed MySQL, did it prompt you for a mysqladmin password?
You can check to see if mysql is installed at the command line by doing
sudo mysql -u root -p
This is saying, log into mysql as user root and prompt for a password
You should be promted for a password, and if all goes well, you will be at the >mysql prompt. Type exit to get back out. If this worked, you have a good install of MySQL. If this does not work, you will need to do a
sudo apt-get install mysql-server mysql-client
You may also want to first try to remove them, and then install them, or in other words
sudo apt-get remove mysql-server mysql-client
sudo apt-get install mysql-server mysql-client
Just to see if that makes a difference. The only other thing I can think of is that your PHP install is not working. To test this out, you can go ahead and put the following in a text file under /var/www
<? php
phpinfo();
?>
Save it as info.php and then go to http://localhost/info.php
You should see a print out of your PHP5 information for the server. If you do not, then either I just screwed up the above function because I did it off of memory, or your php install didn't take.
sudo apt-get install php5 php5-common php5-curl php5-dev php5-gd
That should do the trick. It is possible that the first time you went to install all these packages something got hung up, and you thought everything was working simply because apache was working. Apache will server your index.html without php or mysql (as I'm sure you already know).
Let me know how it goes.
Good call on the tutorial links. I've been meaning to do it and forgot about it! Thank you!
Chad
Tom, I slept on this and the
Tom, I slept on this and the more I think about it, the more it sounds like php is not rendering your phpmysql install, so I would go ahead and make sure those php5 packages are installed, and then re-install phpmyadmin.
Let me know how it goes.
I must be doing something stupid.
Hi Chad,
I tried the following and recorded everything as it happened. Here goes:
Step 1. Logged onto mysql OK. Logged out with quit.
Step 2. Made the info.php file, then went to localhost/info.php.
Parse error: syntax error, unexpected T_STRING in /var/www/info.php on line 2
Is that a php error or a script error in info.php?
Step 3. sudo apt-get install php5 php5-common php5-curl php5-dev php5-gd. It had everything but curl already. That installed OK.
Step 4. Deleted everything in /var/www
Step 5.
sudo apt-get remove phpmyadmin
sudo apt-get autoremove Reported and removed 2 packages. libmcrypt4 php5-mcrypt
sudo apt-get install phpmyadmin. No warnings, suggestions, or errors.
http://localhost/phpmyadmin
404
Maybe I should retrace my steps and remove all the LAMP files and start over. Ya think?
BTW during the original process a couple of things happened. Sorry but I don't remember exactly where:
It told me to insert the Ubuntu 7.1 live CD. I did and it was happy. Weird, huh?
It suggested that I install mailx, so I did.
Best,
Tom
phpmyadmin not in /vwr/www
Are you using Gutsy? I found this solution at http://ubuntuforums.org/showthread.php?t=591952. Make a symboloc link in the /var/www directory like so:
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin
There is some debate that you should make an alias in the apache2.conf file, but I haven't got that to work.
Or maybe you could just move the phpmyadmin directory to /var/www?
.
whereis
To find where phpmyadmin lives on your distro do a "whereis phpmyadmin" at the command line.
whereis
Hi Tristan,
I tried it and got:
phpmyadmin: /etc/phpmyadmin /usr/share/phpmyadmin
What does that tell me?
Thanks,
Tom
whereis
Tom,
When I run it, that is what I get too. That tells you where phpmyadmin has been installled. The one you should be concerned with is the /usr/share/phpmyadmin. Gutsy puts it in the wrong place. It should be in /var/www/phpmyadmin. That is why the soft link works; it points /var/www/phpmyadmin to /usr/share/phpmyadmin.
I post that suggestion so anyone could double check where it is on their distro. Hope that clears things up for you.
Actually, the phpmyadmin
Actually, the phpmyadmin should not be under /var/www.
If you were to install it manually, you would put it there, but the debian package does this correctly. It redirects via apache. There should be no need to symlink or to move the files. Check my posts below before doing this.
when phpmyadmin loads it
when phpmyadmin loads it should be asking you what type of apache install you have, and you have to specify apache2. If it is not asking this, then this may be our problem.
So I think this will fix it.
sudo nano /etc/apache2/apache2.conf
then add this line at the very bottom or very top of the file (so you can find it if this doesn't work)
Include /etc/phpmyadmin/apache.conf
now restart apache2
sudo /etc/init.d/apache2 restart
Let me know how it goes.
Thanks
Hey Chad,
Thanks. That seems to have fixed the problem. I must have missed it when it asked for my Apache install.
One more thing
the reason your installs are asking for CD is that you have not commented it out in your repository list. You can go in and deselect it through system-->admin-->synamptic package manager in the settings. I usually do it by editing /etc/apt/sources.list
Just comment out the second line where it says install cd by puting a # in front of the line.
Don't worry Tom, we'll get you straigh! I actually love when things don't work because you learn so much trying to fix them! haha!
Trivial Note
From looking at the Agave icon, which looks like the agave plant, it'd probably be pronounced the same way: uh - gah -vay. In case you were wondering ;)
Also, I'd imagine gOS being pronounced gee - oh - ess because of the capitalization, but I don't really know.
Nice episode; better long than short ;)
I assure you I will butcher
I assure you I will butcher the pronunciation of as much as I possibly can :P Thanks for the correction though, i didn't even put two and two together, because it equals 5.
I'm not much better really.
I'm not much better really. For the longest time I called Debian 'dee - bee- en' (apparently it's 'deh - bee - en'). I also called Wacom tablets 'way - com' (apparently it's 'wack - om'). It's hard to know with all this computer stuff because often the only time you're exposed to it is through reading it on a screen, not hearing it from a person.
Bingo!
Bartender! Pour one for my friend tristan.
I did the symbolic link thingy, with no clue as to what that means. I'm on the air! Thanks!
Oh, and it stayed fixed after a reboot, so that's cool too.
Best,
Tom
mia culpa
Tom
The bottom line is the instal was fouled up somehowl. Chad's fix is better.
Ok so what do I know lol.
Ok so what do I know lol.
I think Tristan gets bonus points this week. i don't know what bonus points do, but he gets them!
Now Drupal
Hey. Drupal is running too. Ok with some problems like cron not being set up. Still I'm pumped. Thanks!
A few tiny bugs are well worth it. I'm sure they will get squished next week.
Best,
Tom
It will be a few weeks
It will be a few weeks before I tell everyone how to set up cron.. of course you can run it manually now. But to set it up to run every 45 minutes, which is what I do, do the following:
sudo crontab -e
Then past this in:
45 * * * * /usr/bin/wget -O - -q http://localhost/cron.php
And save. That will run the cron.php script every 45 minutes which will do all sorts of good stuff on your site. If this were a production environment, you could replace localhost with the your fully qualified domain name, like
45 * * * * /usr/bin/wget -O - -q http://chadwollenberg.com/cron.php
Glad you are getting into it Tom!
Eureka!
Okay, I found this podcast after the sixth episode was out so I started at the beginning. If I comment on something here that has been covered, oh well, nothing like redundancy to make things run smooth. :)
I encountered the same problem of not seeming to be able to get phpmyadmin to work.
I went through the previous posts multiple times to make sure my typing was correct and I still failed to get satisfaction.
I finally decided to re-install ubuntu on VirtualBox because I was having some issues with removing and re-installing. (sigh)
Don't fret for me though! That was the key to finding what I believe may be the reason for Tom's initial problem.
During the install process, when phpmyadmin asks what type of database, it appeared that there was a default selected, that being apache-2. However, this was not the case for me. What appeared to my eyes to be a highlighted selection, was only a highlight on a potential selection. On a whim, during my last attempt at installing it I pressed the spacebar when presented with the option of choosing my database type and voila! a tiny asterisk appeared underneath the red blotch (I mean highlight).
Would that do it? Would that solve my mountainlike mole-hill of a problem?
In short: YES!
It works as promised.
Believe me, I was as surprised as one might expect since everything else had gone smoothly up to that point - (exactly as it had the four or five other times that I had attempted to install it :) ) and that in itself raised flags. However, when I got to the point of choosing the database type, I had an epiphany: Tiny little Linux angels descended upon me and reminded me of the hours of head scratching that I had experienced on an experimental install of UbuntuStudio. During that install, at the bottom of the screen I was presented with the clear instructions to press the spacebar to make the selection, and it took the third attempt before realizing that I had completely overlooked that helpful instruction. Needless to say, the little Linux angels weren't singing praises to me for figuring it out on my phpmyadmin instal, but were instead whacking me over the head with their tiny little Linux halos in the hope of jogging my memory. :)
Well, let's just say, that did the trick. Hope this helps someone else.
And Chad,
Thanks again for the podcast and the quick response to my emails. I appreciate your sharing of your knowledge and insights.
Sonny
Great to see you are having
Great to see you are having "fun" hehe. You would be amazed at how many times I reinstall things. You learn so much! Glad to have you aboard Sonny.
Chad