Pretty easy, here you go:
sudo apt-get install openjdk-6-jdk
Default apt-get to yes
The problem with:
apt-get --yes install $something
is that it will ask for a manual confirmation if the package signature owner's public-key is not in the keyring, or some other conditions. to be sure it does not ask a confirmation just do this:
apt-get --yes --force-yes install $something
If you want to have these settings permanent, create a file in /etc/apt/apt.conf.d/, like /etc/apt/apt.conf.d/90forceyes with the following content:
APT::Get::Assume-Yes "true";
APT::Get::force-yes "true";
Adding users to sudoers
If there is a sudo group, you can do the following:
$sudo adduser <username> sudo
This works because /etc/sudoers is pre-configured to grant permissions to all members of this group (You should not have to make any changes to this):
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
Otherwise, you can add the user directly
$nano /etc/sudoers
add the following to the end of the file, and save:
username ALL=(ALL) ALL
Quick SSH on Ubuntu 12.04
sudo apt-get install openssh-server
After the installation, you can SSH onto your machine, this is not secure and good for a home network solution, but you'll need to investigate security if you are going to hang the machine outside a Firewall.
Ubuntu Firewall Fix in Virtualbox
The following was done to allow Ubuntu 10.10 access to repositories through firewall, confirmed to work for Ubuntu 12.04
1. Update proxy configurations
1.1. System, Preferences, "Network Proxy", "Manual Proxy Configurations", "Use the same...", "Apply System Wide..."
1.2. System, Administration, "Synaptic Package Manager", "Settings", "Preferences", "Network", "HTTP Proxy:"
2. edit the following file: /etc/apt/apt.conf as sudo su
You should already see the proxy settings from previous steps; however, it is missing your credentials, these need added and the appliance needs restarted.
Format is as follows:
Acquire::http::proxy "http://user:pass@proxy.xxxx.xxxx:port";
3. You will need to restart before these changes start working
Note: Do not bother editing /etc/bash.bashrc it does not help anymore
Linux search commands
Use the following two command to research program usage in Linux:
The following will show you the location of the program you run from the command/defined:
$which command-to-lookup
The following will show you where the basic places for the command happen to be:
$locate command-to-lookup
Setup Subversion (SVN) Server in Ubuntu 12.04
1. Install Subversion
sudo apt-get install subversion libapache2-svn apache2
2. Where you want to keep repository?
sudo mkdir /svn
sudo gedit /etc/apache2/mods-enabled/dav_svn.conf
Delete everything and make it this instead:
<Location /svn>
DAV svn
SVNParentPath /svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>
3. Create a user
sudo htpasswd -cm /etc/apache2/dav_svn.passwd username
4. Setup first repository
cd /svn
sudo svnadmin create test
5. Make sure you have all of the proper permissions for the repository
sudo chown -R www-data:www-data /svn
6. Restart Apache service
sudo /etc/init.d/apache2 restart
7. You are now ready to use TortoiseSVN for Windows or RapidSVN for Linux
8. Your repository URL is http://localhost/svn/test
Note: It looks like RapidSVN does not like spaces in its file names.
Please see PDF for original notes.
Ubuntu SSH Steps
1. Ubuntu needs to run in Virtual Box as a bridged network
2. Make sure you have SSH installed, it will automatically start
sudo apt-get install ssh
3. Use ifconfig to get the virtual machine's IP address
4. Use putty and SSH onto that machine or FileZilla
You can remove SSH by (did not disable)
sudo apt-get remove ssh
Start/Stop with:
sudo /etc/init.d/ssh stop
sudo /etc/init.d/ssh start
Open in Terminal / Open terminal here
Ubuntu does not have a default open in terminal context, install the following to add "Open in Terminal"
sudo apt-get install nautilus-open-terminal
This will not take effect until you restart or do the following command:
nautilus -q
Installing Netbeans on Ubuntu 12.04 VirtualBox
Text Version of this post: Installing Netbeans on Ubuntu 12.04 in VirtualBox.txt
Downloaded the complete version of Netbeans for Linux
http://netbeans.org/downloads/7.1.1/
Ended up downloading this "netbeans-7.1.1-ml-linux.sh"
Tried to install but it complained that Java was not installed. It prompted with URL to use, followed URL to here:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Downloaded the "jdk-7u5-linux-i586.tar.gz" version as opposed to the RPM version.
Found a Ubuntu help site with instructions on how to install:
http://askubuntu.com/questions/55848/how-do-i-install-oracle-java-jdk-7
Uncompress it
tar -xvf jdk-7u2-linux-i586.tar.gz
had to make a jvm directory (deviation from instructions)
sudo mkdir /usr/lib/jvm
JDK 7 package is extracted into ./jdk1.7.0_02 directory. - Now move the JDK 7 directory to /usr/lib
sudo mv ./jdk1.7.0_02 /usr/lib/jvm/jdk1.7.0
Ran the following three commands:
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
The article continued but that seemed enough to get this working, it seems like there would be issues if another JVM is installed. Refer to the article to change things.
Net beans was installed here by default and it launches by double-clicking the "netbeans" icon.
/home/mruckman/netbeans-7.1.1/bin
It has necessary to update the configuration file of NetBeans in order to see the menu selections, they did not play well with Ubunutu's layout:
gedit /home/mruckman/netbeans-7.1.1/etc/netbeans.conf
Add the following line, at the end of the line starting with netbeans_default_options=" and within the closing double-quote:
-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd --laf Metal
