Blog

setting up a git repository

On the server
  1. Install git:
    user@server:~$ sudo apt-get install git
  2. Create a user git (see here).
  3. Generate a key pair for password-less login for the git user (see here)
  4. Set the user’s shell to git-shell
    1. Change etc/passwd from something like this:
      [...]
      git:x:1001:1001:,,,:/home/git:/bin/false
      [...]
      to something like this:
      [...]
      git:x:1001:1001:,,,:/home/git:/usr/bin/git-shell
      [...]
      (assuming git userid is 1001, git groupid is 1001 and git home is /home/git)
    2. Append to /etc/shells: /usr/bin/git-shell. It should look something like this:
      [...]
      /usr/bin/git-shell
      [...]
  5. Create the repository:
    user@server:~$ mkdir repository.git
    user@server:~$ cd repository.git
    user@server:~$ git init --bare
On the client
  1. Clone the repository:
    user@client:~$ git clone git@server-adress:/home/git/repository.git
  2. Done!
Usage info Everyone pushing and pulling to/from this repository will require the ssh key created in step 3. Note that the unix user git was created only for accessing the server, a committer’s ID is actually defined in ~.gitconfig.

setting up glassfish3 application server

  1. Create a user glassfish (see here).
  2. Change to user glassfish:
    sudo su glassfish
  3. Go home:
    cd
  4. Get glassfish 3.1.2:
    wget http://download.java.net/glassfish/3.1.2/release/glassfish-3.1.2.zip
  5. Extract:
    unzip glassfish-3.1.2.zip
  6. Create domain:
    glassfish3/bin/asadmin create-domain test
    Enter name for admin user and password.
  7. Enable secure login:
    glassfish3/glassfish/bin/asadmin --host localhost --port [adminport] enable-secure-admin
  8. Start domain:
    glassfish3/glassfish/bin/asadmin start-domain test
  9. Done! Access from anywhere at http:yourdomainorip:[adminport]