Kernel.org Down – Installing Git On CentOS

This week I had a SSD tank and I was forced to install a fresh OS. While setting up my workstation, I decided to test VM VirtualBox > VMWare. While I was setting up my VM, I couldn’t grab wget http://kernel.org/pub/software/scm/git/<latest>.tar.gz

I wasn’t sure what was going on so I pinged kernel.org, no packets returned. I was completely unaware that kernel.org DNS’s got hacked. Linus released Linux 3.1 on Github and I needed to get git up fast.

Installing Git On CentOS 5.5

Quickly, I checked the  Webtatic repo for git. Add the repo with this line:

[code lang=”bash”]rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm[/code]

Next you can install git with one line:

[code lang=”bash”]yum install –enablerepo=webtatic git-all[/code]

Installing Gitolite For Private Repo

Below is the quick install guide for gitolite – for all you that want a private repo. I’m currently installing this on a VM just to test it out. Eventually I will move my repo into a datacenter. For now, I just want a private repo so I can seamlessly push / pull between my desktop and laptop while having redundant backups of my projects.

—————————————

If you’re comfortable with Unix and ssh, the following steps should work. (However, gitolite has lots and lots of useful features; don’t miss out on them by skipping the excellent documentation!)

  • create a user called git. Login to this user.
  • copy your ssh pubkey from your workstation. Rename it to YourName.pub.
  • now run these commands:

[code lang=”bash”]
git clone git://github.com/sitaramc/gitolite
cd gitolite
src/gl-system-install
gl-setup ~/YourName.pub[/code]

You’re done. Now run git clone git@server:gitolite-admin on your workstation and add users and repos.

—————————————

Head over to https://github.com/sitaramc/gitolite if your looking for further documentation on gitolit. I’m assuming this will be the best for a private git repo. I will update this post with more information once I have my workstation / laptop setup. Come to think of it, I bet I could write a great post about developing between work,  home, and mobile.

Read More

How To Setup LAMP on uBuntu 11.04 – Also, WordPress

In this article, we will work on setting up a LAMP environment for uBuntu 11.04. As an added bonus, I will setup WordPress 3.2 in the environment for you nerds. As you may notice in previous posts, I have a nice little lappy which allows me to dev on the run.

Installing LAMP onto uBuntu 11.04

First thing is first, we need to install tasksel then run it via terminal.

[code lang=”bash”]
sudo apt-get install tasksel
sudo tasksel[/code]

Select LAMP Server and proceed to install it!

While you are installing LAMP, you will be prompted to set a password for MySQL root.

First of all, /var/www/ directory is set for root user only. We want to allow our IDE’s, such as Netbeans or Vi/Vim/Nano have permissions to write to this directory. So let’s sudo su and chown /var/www/

[code lang=”bash”]
sudo su
chown yourusername:yourusername /var/www/
exit
[/code]

At this point, let’s test to see if LAMP is running.

[code lang=”bash”]sudo vi /var/www/index.php[/code]

Within index.php just enter phpinfo(); to check if the PHP core fires an output!

[code lang=”php”]<?php phpinfo(); ?>[/code]

Save index.php and exit.

When you visit http://localhost/index.php you should get an output. If you do not, you can try restarting apache2 with the following command:

[code lang=”bash”]sudo /etc/init.d/apache2 restart[/code]

Installing phpMyAdmin To Manage Your MySQL Databases on uBuntu 11.04

[code lang=”bash”]sudo apt-get install phpmyadmin[/code]

WordPress: World Famous 5 Minute Installation

Head over to WordPress.org and grab the latest version of WordPress. Extract the zip file to /var/www/wordpress

Visit http://localhost/phpmyadmin and create a database.

Under the Privileges tab, goto Add New User. Make sure under Global Privileges click Check All and hit Go.

Visit http://localhost/wordpress and setup your WordPress install! Bam! Your done!

Read More