Oct 25, 2013

Solving MacPorts problems on OS X Mavericks

Date: Oct 25, 2013 10:00 am PST

Problem:
After upgrade my OS X to Mavericks as well as my XCode to XCode 5, there are several command line tool kits that do not work so well, including MacPorts. That is a pretty terrible situations and I really don't want to rely myself on "App Store" or any kinds of installation packges. MacPorts itself seems also noticed of the problem and posted a solution on its website. Looks like there were at least 35 tickets about this issue before I noticed of it. However, while building the source code, there were more problems came out and I believe I should post how I solve the problems along the way.

Errors in sequence:

  1. configure macports source code error: need glib
  2. configure glib error: need gettext
  3. installed gettext, but glib doesn't recognize


Here is the correct order of how you should do it:

1. Install xcode command line tool kit, seems like in XCode5, it got rid of my installed command line tool kit
sudo xcode-select --install
2. Install gettext from source code:
wget http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.3.1.tar.gz
tar xf gettext-0.18.3.1.tar.gz
cd gettext-0.18.3.1
./configure
make
sudo make install
3. Install glib from source code:
wget http://ftp.gnome.org/pub/gnome/sources/glib/2.39/glib-2.39.0.tar.xz
tar xf glib-2.39.0.tar.xz
cd glib-2.39.0
./configure
make
sudo make install
4. Install MacPorts (I followed the official instructions):
wget https://distfiles.macports.org/MacPorts/MacPorts-2.2.0.tar.bz2
tar xf MacPorts-2.2.0.tar.bz2
cd MacPorts-2.2.0/
./configure
make
sudo make install 

After you installed the MacPorts, you should run the following commands to update your installed softwares:
sudo port selfupdate
sudo port upgrade outdated
Follow these steps, you should be able to use your MacPorts again in Mac OS X Mavericks!

Oct 7, 2013

[CentOS] SSH authorization file fail and solution.

I encountered a situation where after I've set up the rsa key on my server (.ssh/authorized_keys), the server still keep asking for password.

So I did a little search on Google and here is a perfect answer:
http://askubuntu.com/questions/110814/server-keeps-asking-for-password-after-ive-copied-my-ssh-public-key-to-authoriz

Solution:

  1. look at /var/log/secure (CentOS) for detail log and reasons.
  2. change .ssh/authorized_keys's permission to 600 (owner read/write only)

Aug 19, 2013

Iowa State Fair, one day trip.

Iowa State Fair has a long history, and it's been hold in a sports field near Des Moines, IA. Main purpose of this visit:
  1. see farm animals, a lot of animals
  2. eat the most unhealthy food
Here is some pictures I took during the trip. See the captions.


[1] duckling.

[2] Young cow.

[3] Chick just got out of its shelter.

[4] "what are you looking at?"

[5] Someone is coming out.

[6] "Oh I see it!"
[7] Turkey leg, "unimpressed"

[8] Modern Superman

[9] Some game.

[10] Oh, I love water melon.

[11] And skewers.

[12] He's having a good time holding that sheep.

[13] Cozy coat, right?

[14] A taller sheep that can hold it head on the holder. Not like [12]

[15] "What are you looking at?!"

[16] Largest bull.

[17] And its balls.

[18] And small one.

[19] The wierdest corn I have ever seen.

[20] Awesome hair cut.


[21] End of the fair.
I do enjoy this fair. It's a nice trip to see tons of things that I never had a chance to see. I was and am curious about the life of a farmer. If I have chance, I will definitely try to be a farmer for a while.

May 17, 2013

RPKI Hands On [1] -- Fetch RPKI database

Fairly easy. Use RSYNC to synchronize all data from 5 RIR databases to the local storage.

The easy BASH script is provided here:
https://gist.github.com/digizeph/5536389#file-fetchrpki-sh


How to be a good PhD student [01]

I "Interviewed" with the senior PhD student in my group. He is graduating soon, and he provides many good insights of what a good researcher should look like and how can your decide if you are really belongs to this research topic. Here is a draft of summary of what he has told me. I can't write down everything but I do try my best to collect strings from his talk and summarize the best. It is just a draft, and I'd like to see it to be a more mature guide for us new PhD students.

Apr 24, 2013

SVN on HTTP for CentOS

Recently I was asked to setup a SVN repository for some collaborators of our lab due to their limitations of network access. The tasks seems to be easy, but without any experience on setting up http server and SVN repos, it could be a time sink. So here is some of my thoughts.

My really old lab machine is running a CentOS 4 system. So I followed the instructions of this post http://wiki.centos.org/HowTos/Subversion

But there is a major issue in this posts on httpd config that causes my SVN cannot work. The /etc/httpd/conf.d/subversion.conf file's SVNParentPath should be replaced with SVNPath. If not, when you trying to access the repo through http, you will always get "could not open the requested SVN filesystem".

Besides that, everything seems to be working fine.