sudo kill `sudo lsof -t -i:8080`If the above does not work, trysudo kill $(sudo lsof -t -i:8080)
Tuesday, March 25, 2014
Kill a process on a port in ubuntu
Labels:
Ubuntu
Monday, March 24, 2014
Install tomcat 7 manually in ubuntu and integrate with eclipse
- Download Tomcat 7 tar.gz
- Run the following commands
- Add following two lines after the first line and close gedit after saving the changes
- To integrate with eclipse
- Start the Tomcat server using following command to check if it is working
- Stop the server by pressing ctrl+c
- To change the port number, open server.xml in gedit
- Change all the occurrences of
to - Verify installation at: http://localhost:8081/
cd /path/to/downloaded/file
tar xvzf apache-tomcat-7.0.52.tar.gz
sudo mv apache-tomcat-7.0.52/ /usr/share/tomcat7
sudo gedit /usr/share/tomcat7/bin/catalina.sh
JAVA_HOME="/usr/lib/jvm/java-6-openjdk-i386"
JRE_HOME="/usr/lib/jvm/java-6-openjdk-i386/jre"
cd /usr/share/tomcat7
sudo ln -s /var/lib/tomcat7/conf conf
sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
sudo ln -s /var/log/tomcat7 log
sudo chmod -R 777 /usr/share/tomcat7/conf
sudo /usr/share/tomcat7/bin/catalina.sh run
sudo gedit /usr/share/tomcat7/conf/server.xml
Sunday, March 23, 2014
Configure tomcat 6 for eclipse in ubuntu
- Install tomcat 6 in ubuntu by running the below commands
- In the eclipse main menu go to Help ->Install New Software...
- Make the settings as below by selecting the highlighted plugins under Web, XML, Java EE and OSGi Enterprise Development select option
- Select Windows -> Preferences -> Server -> Runtime Environments
- Click on Add…
- Select "Apache Tomcat v6.0" and click on Next
- Enter “/usr/share/tomcat6″ into the “Tomcat installation directory” field
- Click Ok
- Now Right click on your project and Run As -> Run on Server
sudo apt-get update
sudo apt-get install tomcat6
sudo service tomcat6 stop
cd /usr/share/tomcat6
sudo ln -s /var/lib/tomcat6/conf conf
sudo ln -s /etc/tomcat6/policy.d/03catalina.policy conf/catalina.policy
sudo ln -s /var/log/tomcat6 log
sudo chmod -R 777 /usr/share/tomcat6/conf
Create dynamic web project in eclipse for ubuntu platform
- Install eclipse from Ubuntu Software Center
- Open eclipse and select the required workspace
- In the main menu go to Help->Install New Software...
- Make the settings as below by selecting the highlighted plugins under Web, XML, Java EE and OSGi Enterprise Development select option
- Make sure to select 'All Available Sites' in the dropdown
- Now on click of File->New->Project.. a select wizard shows up
- Scroll down to find Web option. Click on the arrow to find 'Dynamic Web Project' option. Click on it to create a new Dynamic Web Project
Labels:
Eclipse
Wifi not working in ubuntu
- Connect to a wired internet connection to first install the additional drivers.
- Check if all the hardware drivers are installed. Go to System Settings -> Additional Drivers (Under Hardware Group). It will automatically check for missing drivers and ask to activate.
- If the above method does not work, go to Ubuntu Software Center and type 'additional drivers' in the search box. There will be results like Additional Drivers (jockey-kde) and Additional Drivers (jockey-gtk). Make sure both are installed.
- Go to Network Connections either from Dash Home or by clicking the network icon at the top right menu of the desktop.
- Under Wireless tab click on 'Edit...' if the connection details has already been added else click on 'Add'.
- Under Wireless tab enter SSID as given by your internet provider. Leave all the other settings as is. Make sure 'Connect automatically' is checked.
- Then under Wireless Security tab, select WEP for Security dropdown and enter the key as given by your internet provider. Leave all the other settings as is.
- After the changes click on Save.
- Wifi connections must now be detected automatically.
Labels:
Ubuntu
Thursday, March 6, 2014
Resize an existing virtualbox hard drive in guest windows xp using host windows 7
- Create a new hard disk
- Click on Settings in virtualbox
- Select Storage tab
- Click on Add Hard Disk icon
- Set a sufficient amount of dynamically expanding disk space
- Clone your old hard disk
- Check the location of VBoxManage and your old hard disk .vdi file [ex: in my computer i have VBoxManage at G: and old_hard_disk.vdi at C:\Users\acer\VirtualBox VMs\old_hard_disk_dir\old_hard_disk.vdi]
- Open up cmd in windows 7, go to the location of VBoxManage and type as below:
- You see something like this:
- Replace the old guest hard disk with your new hard disk (i.e. new_hard_disk.vdi)
- Go to the settings for the guest VM and choose the “Storage” options
- Select the new disk created and make it IDE Primary Slave under the Attributes column
- Select the old disk and remove it by clicking on - icon at the bottom
- Start the guest os i.e windows xp
- Resize the Guest File System
- Install partition manager tool in windows xp
- Select the newly created drive. Right click on it and select Resize Partition
- Follow on screen instructions to finish the partitioning
- Restart the guest os if required
C:\Users\acer>G:
G:\>VBoxManage clonehd "C:\Users\acer\VirtualBox VMs\old_hard_disk_dir\old_hard_disk.vdi" "C:\Users\acer\VirtualBox VMs\old_hard_disk_dir\new_hard_disk.vdi" --existing
Oracle VM VirtualBox Command Line Management Interface Version 3.2.12
(C) 2005-2010 Oracle Corporation All rights reserved.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: ee28ab8b-8232-4c76-8c1b-184afdd1dd27
Labels:
Virtualbox,
Windows,
Windows 7
Tuesday, March 4, 2014
Eclipse menus are cut off in ubuntu 13.10
- Open your eclipse.desktop file
- Replace the Exec= line with this
- Save the file
sudo -H gedit /usr/share/applications/eclipse.desktop
Exec=env UBUNTU_MENUPROXY= eclipse
(If you can't find it in this path, try in ~/.local/share/applications/eclipse.desktop. Otherwise, you could have to find yours using locate command).
NOTE: If you can't find your eclipse.desktop file, you can simply create one from scratch in the above path, and fill it with these lines:
[Desktop Entry]
Type=Application
Name=Eclipse
Icon=eclipse
Exec=env UBUNTU_MENUPROXY= eclipse
Terminal=false
Categories=Development;IDE;Java;
Subscribe to:
Posts (Atom)









