1. Installing Apache Tomcat 6 on Snow Leopard ( OSX 10.6 )

    It’s been a long time since I worked on a JSP project and I’m now … Read More »

  2. How I migrate servers in 20 minutes

    This somewhat requires you’ve followed my suggestions on not committing yourself to a certain host or your own DNS or mail servers, if not the extra steps might take you 10 more minutes, maybe days.

    There are plenty of ways to migrate to a new server depending on how you’ve setup the server or your host, these are just to show the simplicity of my migrations after following the post linked above.

    Step 1:

    Rsync your other server’s files to the new one.

    SSH into your new box and run rsync to connect to the old machine through ssh. It’s going to pull over every file to the new host that you specify.

    rsync -avz -e ssh root@[OLD MACHINE IP]:/home /

    example

    rsync -avz -e ssh root@64.13.227.XX:/home /

    This is probably the most important time saver, it will help dramatically in a planned migration since you can run this multiple times after the initial sync. The purpose of rsync is that it will only pull over changed files since the initial rsync.

    Step 2.

    Run a mysqldump your DB and either use scp to grab the file from your old host or use wget after placing the dump in an accessible place on your webserver. Then just import it after receiving it on the new host.

    Step 3.

    For people running their own server you’ll now just need to reconfigure apache, which shouldn’t take long since there will only be slight changes in the new httpd.conf file.

  3. Installing Webmin on CentOS

    One of the first things I did on my Media Tempe (dv) was install webmin because I’m a huge fan of easy it let’s you manage your web/server, e.g. web interface to quickly change config files or restart particular services without having to login through SSH.
    A more official description:webmin.jpg

    Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely.

    Add the following section to /etc/yum.repos.d/CentOS-Base.repo

    [dag]
    name=Dag RPM Repository for Red Hat Enterprise Linux
    baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
    gpgcheck=1
    enabled=1

    Install GPG key/signature by running

    # rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

    Run

    # yum install webmin

    Your webmin should now be available at

    http://your.ip.address:10000/

    or

    https://your.ip.address:10000/

    and you can login using your root account.

    I would highly recommend the stressfree theme for webmin, it makes it much easier to navigate. Also, Virtualmin is a must if you manage a lot of domains, it “supports the creation and management of Apache virtual hosts, BIND DNS domains, MySQL databases, and mailboxes and aliases with Sendmail or Postfix”.

  4. Installing SVN and Trac on Fedora Core 6 for Apache

    For some reason or another I could not find good documentation on installing Subversion and Trac on fc6 while also using Apache so I’ve simply just documented what I’ve learned and just implemented on my own system.

    This tutorial is about the installation of a development enviroment on FC6 it’s not a how-to for using it. If you need to know more I recommend reading Version Control with Subversion (I just ordered it).

    Requirements

    You need to install these packages before we start (use yum install package-name).

    • Trac – documentation wiki and bug-tracking software.
    • Subversion – source code control system.
    • Apache – duh.

    (more…)

  5. fedora over ubuntu

    One of my tasks this week was to setup a web server for some sites currently hosted on the tragedy of the grid. I don’t want to talk about the (mt) grid since I’ve said so much about it before but to answer “why?” I’m still on the grid for production sites is, I’ve been too busy to migrate them and at one point I was going to put them on a spry VPS but my DB was too large for their contrants, very weird indeed and I could made it work but I pushed it aside.

    This week I couldn’t wait any longer I was getting so many CS calls about it “being down” or “Sooo Slow” that it became a big priority. I was planning to install Ubuntu server and setup the system in a few hours but I had so many issues with Ubuntu Server. I rather not go into details because I can’t remember them all but one major problem was webmin and gnome. I hate to rely on a UI to manage a server but it makes my tasks so much easier. Gnome installed fine after an apt-get command but there are so many dependencies that it took hours for it to download and install. At that point I was already frustrated with the install that the problems with webmin, configuration and installing some other server packages I had givin up and started the fedora core 6 downloads.

    Today I had the time to finish the system but the installation was as easy as Ubuntu except for the 5 CDs it took to install everything. That was the only downside for fedora over Ubuntu. But at least it’s a complete web server after install. Without phpMyadmin and webmin installed I was able to serve up whatever I needed with just a few service starts. The management tool provided as well are perfectly suited and easy to use. I can’t remember the particulars but it seemed Ubuntu wanted me to configure way to much after install without any management tools, fedora can serve a test page from apache after install and if not the tools provided make it a few clicks away.

    After a few yum installs and eventually remembering to edit my host file in order to get webmin to show (from the host machine) I had a production server ready.

    fedora has some great advatages over Ubuntu IMO: First SELinux (security) and server management tools. Another feature over Ubuntu right now would be the Xen support and management tools built into core 6. The Xen management will definitely help me get a couple webservers (maybe one for myself) installed with the little time I already have instead of wasting time figuring out how to install and configure it for Ubuntu.

    This post is not saying fedora is a better web server then Ubuntu but for ease of use it’s clearly better out of the box.

  6. How to manually hardlink

    How to manually hardlink multiple files to point to one single file. This will drastically help you if you have multiple files that are all the same because instead of editing all of the files you just need to edit one.

    This is the command that I ran
    #find . -name ‘FiletoFind.txt’ -exec ln -f newfile_hardlink.txt {} \;

    FiletoFind.txt is the file name that you want to search for. newFile_hardlink.txt is the file you want all the files to look at after they are found.

    I then executed,
    #ls -alh newFile_hardlink.txt

    This will show you how many files you hardlinked to that one file.

    After doing this for a work project I got, -rw-r–r– 4031 dcameron apache 1.3K Dec 15 18:45 newFile_hardlink.txt

    Wow, four thousand files that I just saved myself from editing.

  7. XAMPP on IntelMacs

    For some reason you need to uncomment your mod_rewrite module in apache’s config file in order for apache to start through XAMPP.

    XAMPP on IntelMac Instructions:
    1. download and install XAMPP for MAC (ppc).
    2. open /Applications/xampp/etc/httpd.conf
    3. insert a # in front of LoadModule rewrite_module modules/mod_rewrite.so
    4. Save the File
    5. Start XAMPP … Read More »

  8. Dyndns


    I finally found a reason for my dyndns account. And what’s cool is all I need to do is edit my apache to a non-blocked port (by time warner) and I can have another webhost but this time at my house for dev. Also, my router will automatically updates dyndns for me.

  9. v10.5

    Apache 2.0, Ruby on Rails and Subversion are included, and support for script-to-framework programming is available, allowing Python and Ruby scripting to access Mac OS X specific APIs, just to name an example.read more | digg story … Read More »

  10. Up too late with this BS

    I’m having some serious DNS issues and how I have to have the www prefix for the domain to even work. And I have all my dns settings on default. What’s even stranger is Sara’s site is working only without the www prefix. And here DNS settings are default; with www.crazysox.net. CNAME crazysox.net and even *.crazysox.net. CNAME crazysox.net. doesn’t work.

    I’ve tried everything: Browser cache (which is why I never saw this earlier), server reset, apache restart, dns restart. I’ve had to run service httpd restart so many times I won’t EVER forget it.

    I am so screwed.

    I just hope it on of those weird ISP issues, something to do with TTL or some sh*t like that. I don’t know but I have to go to bed and I hope it repairs itself soon. Oh yeah and the domains that don’t work with or without the prefix get redirected to the default vhost. So for now I’m redirecting all traffic here.

    Now I can’t wait to see if my server crashes tonight. What a great day I’m in store for tomorrow.