George Pearce - iamPearce

Icon

Homepage of 18 year old internet nerd, George Pearce.

Installing phpMyAdmin with Nginx

phpMyAdmin, by default is configured to work with Apache and Lighttpd (not positive of the last one) – and not nginx. This website’s server runs on nginx, I tracked down a way of making it work – assuming you have some way of loading PHP, like FastCGI (post coming soon) installed.

Firstly, install phpMyAdmin (I used centOS / Ubuntu so I ran # yum install phpMyAdmin or apt-get install phpmyadmin respectively).

Once that’s done, open up the virtual host config file for nginx – in CentOS it’s /etc/nginx/conf.d/virtual.conf and add the following:


server {
listen (IP ADDRESS):80;
server_name phpmyadmin.domainname.com;

location / {
root /usr/share/phpmyadmin;
index index.php;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name;
include fastcgi_config;
}
}

Notes-

/usr/share/phpmyadmin should be replaced by the directory that phpMyAdmin is installed in, run
# whereis phpmyadmin
to locate.

The latter section is specific to the FastCGI process I’m using and may be different for different PHP handlers – but in general that’s how it works.

Save that file, and reload nginx, head over to phpmyadmin.domainname.com and boom – phpMyAdmin running on nginx. :-)

Living in the Cloud

Rackspace Cloud

Today (and yesterday), I did something I’ve been wanting to for a long time.

I sat down, created a virtual server with Rackspace, based on Ubuntu 10.04, and had a play. I irreparably damaged my first attempt while playing with things I don’t yet understand, but on the second go, I got LAMP up and running, and then created some virtualhosts.

Result? PlusPhysics is currently running from a cloud instance server. It’s pretty damn fast, fun to maintain and adminster, and so far only super caching isn’t working (I’ve yet to figure that one out – normal wp-cache is fine, but super cache just does nothing).

Currently, I host about half my sites with MediaTemple, on a (gs), and half with ThisWebHost, on regular shared hosting. MediaTemple are wonderful, but the (gs) platform has serious performance flaws, and even though the (cs) is coming, it’s not here yet (and hasn’t been for years since it was announced). As for ThisWebHost – I love them. I have no complaints at all, and for simpe budget hosting, they will be my recommendation for a long time to come.

But I want to use something more advanced. Something that doesn’t come with a pretty control panel.

I did consider the (ve) that MediaTemple now provide – but the equivelant Cloud Server instance from Rackspace is approximately a third of the cost – and their support does trump MediaTemple, without a doubt.

I’d like to thank Donald Kelly for poking me in the right direction with this – he has actually moved his website onto the Rackspace Cloud already.

[update] It looks like Donald has written a post with an identical title to mine, and a very similar post structure. Oops.

Flashing My Craptop

I’m flashing my craptop in order to put the Ubuntu server edition on there, I want to see what the other tools are, and have a play around. It seems that it comes preconfig with LAMP, which is always good ;D

Ubuntu 8.04 is Here

Yay, they released the new Ubuntu! :D

I’m downloading it now, time to see what it’s like :)

Hardy Heron Hits Alpha 4 :)

It’s happened, Ubuntu Hardy Heron has been released in Alpha 4, which means that is inching ever closer to being ready for it’s full release in April :)

The new Alpha brings with it a host of new features (apparently) which should be interesting to both home and business users.

For those who don’t know (shame on you) Ubuntu is (in my opinon) the best Linux out there, and can be found here .

More information on the new release can be found here, I’m going to download it, give it a shot, and post about it :)

Ubuntu 8.04 Gets Sexier?

I’ve been looking around, and I recently found some screenshots of potential themes for Ubuntu 8.04 (Hardy Heron); and, while I didn’t see much difference between 7.04 and 7.10; this is drasticly different, and I really like it :)
I think it’s taken on a new shinyness, which is really cool :) Ubuntu trumps the Vista design, once again :D
fulldesksvg-v3-2-thumb.jpg
fulldesksvg-v3-3-thumb.jpgmockupsvg-shift-v3-2-thumb.jpgmockupsvg-v2-2-w1-thumb.jpgmockupsvg-win2-1-thumb.jpg
I got these pics from another blog on the subject, but they are originally from the Ubuntu Wiki
I like the green one most ;)

-G

Installing Apache, PHP and MySQL on Ubuntu

 

This tutorial is designed to help you install the LAMP (Linux,Apache,MySQL,PHP) combo on your Ubuntu machine.

What You Need

Ubuntu (Obviously)
Root Access Password
About 7gigs HDD space (ish)

Step 1
You firstly need to install Apache 2 onto your machine. Fire up the terminal, and enter:
sudo apt-get install apache2
It should then install automatically.
To start Apache, use the following command:
sudo /etc/init.d/apache2 start
And to stop it;
sudo /etc/init.d/apache2 stop

You should then be able to goto http://localhost , and see some default text, something like “It works!”

Step 2
Next up is PHP, enter the following code in terminal:
sudo apt-get install php5 libapache2-mod-php5
Then restart Apache;
sudo /etc/init.d/apache2 restart ;
and PHP is done. You can change PHP5 to any version you like , but PHP5 is recommended.

Step 3
Next, we install MySQL. It’s also very simple, run the following in terminal:
sudo apt-get install mysql-server
And then you need to set the root password for MySQL (important)
mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(’password!’);
And that’s MySQL In. Restart Apache again;
sudo /etc/init.d/apache2 restart ;
And it should all work nicely!

An excellent tool for PHP is PhpMyAdmin, which can be installed with the following:
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

And that’s it! All done. If you have any problems with PhpMyAdmin, try rebooting apache.

Have fun with LAMP!

–George

Hello

I'm George Pearce - and this is my personal blog. I'm 18, and I also write about blogging, Linux, and soon, physics. I like to take photos sometimes, and I tweet a lot @pearce.