Cheatsheet
Maven
mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp
cd my-webapp
mvn -Dwtpversion=R7 eclipse:eclipse
mvn package
Setup Hardy on Slicehost
Log in as root:
passwd
nano /etc/apt/sources.list - Add multiverse to the end of all the lines
apt-get update
apt-get upgrade
apt-get clean
adduser USERNAME (Enter all prompted information)
visudo
Add - "USERNAME ALL=(ALL) ALL" to the end of the file and save. (Toggle down to the last line, hit SHIFT+a, carriage return, type it, hist ESC, then SHIFT+:, x, enter.
logout and log back in with your new username. YOU SHOULD NOT BE USING ROOT.
Subversion
sudo apt-get install subversion
sudo svnadmin create /path/to/your/repository
sudo nano /path/to/your/repository/conf/svnserve.conf
Uncomment out these lines:
anon-access = none
auth-access = write
password-db = passwd
Close.
sudo nano /path/to/your/svn/myfirstrepository/conf/passwd
Add a username = password
Close.
libapache2-svn
sudo apt-get install apache2
sudo apt-get install libapache2-svn
sudo /etc/init.d/apache2 restart
sudo a2enmodssl
sudo nano /etc/apache2/ports.conf - Make sure "Listen 443" is in there
sudo apt-get install ssl-cert
sudo mkdir /etc/apache2/ssl
sudo /usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/myown-ssl
sudo nano /etc/apache2/sites-available/myown-ssl
1) NameVirtualHost *:443
2) <VirtualHost *:443>
3) Add the Following before </VirtualHost>
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem
SSLProtocol all
SSLCipherSuite HIGH:MEDIUM
a2ensite myown-ssl
sudo /etc/init.d/apache2 restart
sudo nano/etc/apache2/mods-available/dav_svn.conf
sudo /etc/init.d/apache2 restart
sudo chown -R www-data:www-data /path/to/your/repository
sudo chmod -R g+ws /path/to/your/repository
sudo htpasswd -c /etc/apache2/dav_svn.passwd svnuser
svn import .bashrc https://localhost/svn/testfile -mlogentry
vsftpd
sudo apt-get install vsftpd
sudo apt-get install ftp
sudo nano /etc/vsftpd.conf
Change anonymous_enable=NO
Uncomment local_enable=YES
Uncomment write_enable=YES
Uncomment chroot_local_user=YES
Close.
sudo /etc/init.d/vsftpd restart
ftp localhost to test
iptables Setup (Yes, this is mandatory)
iptables -A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
Coming soon
Installing JBoss
wget http://downloads.sourceforge.net/jboss/jboss-5.0.0.CR2.zip
unzip jboss-5.0.0.CR2.zip
Check Open Ports
netstat -anp --tcp --udp | grep LISTEN