$ git ls-remote
From ssh://user@ip/dir
somehash HEAD
somehash refs/heads/master
Setting Up Glassfish3 Application Server
Continue from Install Glassfish3 JEE Application Server
-
glassfish@server:~$ cd /home/glassfish
- Create a domain:
glassfish@server:~$ glassfish3/bin/asadmin create-domain release
Done!
Install Glassfish3 JEE Application Server
On the server:
- Add user glassfish
-
root@server:~$ cd /home/glassfish
-
root@server:~$ wget http://download.java.net/glassfish/3.1.1/release/glassfish-3.1.1.zip
-
root@server:~$ unzip glassfish-3.1.1.zip
Done!
Continue with Setup Glassfish3 JEE Application Server
Prevent git user from logging in via ssh
Problem:
If you have a git server running, that is hosting projects multiple users are working on, you may want to prevent these users to log in to server via ssh.
They should only be allowed to push and pull things from git repository (ssh) but should have no rights on the server.
Solution:
-
Change
/etc/passwdfrom something like this:[...] git:x:1001:1001:,,,:/home/git:/bin/bash [...]
to something like this:
[...] git:x:1001:1001:,,,:/home/git:/usr/bin/git-shell [...]
(assuming git userid is
1001and git home is/home/git) -
Append to
/etc/shells:
/usr/bin/git-shell.
It should look something like this:[...] /usr/bin/screen /usr/bin/git-shell [...]
“You Ain’t Gonna Need It”
The more programming experience you gain, the more you will realize how important this principle really is: Wikipedia.org: You Ain’t Gonna Need It. In combination with proper Code Refactoring, your coding will be much faster and straight forward!
Read this book:
Refactoring: Improving the Design of Existing Code
Install Java
On a server environment, you don’t need the complete jre package. It also includes some desktop-specific packages. What you rather want to install is
*jre-headless:
user@server:~$ sudo apt-get install openjdk-6-jre-headless
handle password by ssh Agent
user@client:~$ ssh-add path/to/auth/file/user_rsa Enter passphrase for path/to/auth/file/user_rsa: Identity added: path/to/auth/file/user_rsa (path/to/auth/file/user_rsa)
ssh connection by RSA, disable password login
On the client:
user@client:~$ ssh-keygen -t rsa
user@client:~$ ssh-copy-id -i path/to/auth/file/user_rsa.pub user@server
On the server:
user@server:~$ sudo nano /etc/ssh/sshd_config
add/ change following:
RSAAuthentication yes
PubkeyAuthentication yes
ChallengeResponseAuthentication no
PasswordAuthentication no
user@server:~$ sudo service ssh restart
Add user to sudoers
root@server:~$ visudoadd/ change following:
user ALL=(ALL) ALL
Add user
root@server:~$ adduser user