Kayıtlar

Temmuz, 2012 tarihine ait yayınlar gösteriliyor

set JAVA for Suse

 sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.7.0_05/bin/java" 3  sudo update-alternatives --config java

Change Date time on Linux

You just need to use “date” command followed by the month, day, hour, minute, and year all numeric and no spaces. # date 021415232010 Sun Feb 14 15:23:31 PST 2010

list memory usage of application in ubuntu

$ ps euf If I run free -m I get total used free shared buffers cached Mem: 496 489 6 0 4 452 -/+ buffers/cache: 33 462 Swap: 511 4 507   If I run ps euf I get USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 948 0.0 0.0 5928 472 tty6 Ss+ Aug25 0:00 /sbin/getty 384 root 947 0.0 0.0 5928 472 tty5 Ss+ Aug25 0:00 /sbin/getty 384 root 946 0.0 0.0 5928 472 tty4 Ss+ Aug25 0:00 /sbin/getty 384 root 945 0.0 0.0 5928 472 tty3 Ss+ Aug25 0:00 /sbin/getty 384 root 944 0.0 0.0 5928 472 tty2 Ss+ Aug25 0:00 /sbin/getty 384 root 943 0.0 0.1 51856 536 hvc0 Ss Aug25 0:00 /bin/login -- root 978 0.0 0.4 20580 2424 hvc0 S Aug25 0:01 \_ -bash TERM= root 7593 0.0 0.1 10332 524 hvc0 T Aug25 0:00

View in tar file

Task: List the contents of a tar file Use the following command: $ tar -tvf file.tar

How to install and configure tomcat 6 in ubuntu server

Tomcat is a well known and widely used java servlet container. These days I am planning a project, which needs a tomcat 6 in ubuntu server. I found that to make tomcat work in ubuntu is very easy, but you need have a little trick to change your server listening port from 8080 to 80. Here I give you the way that I make it work. 1. Install tomcat 6 in ubuntu normally, you just need to type the following command to install it sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples 2. Start tomcat sudo /etc/init.d/tomcat6 start   Now, you can use your browser to navigate this address: http://<your ip>:8080   And you will see the tomcat It works! page Usually, HTTP server works with the port 80, but the default port for tomcat is 8080, that is why we need specify 8080 after your ip address. To change the default port from 8080 to 80, type the following command in the terminal: sudo vim /etc/tomcat6/server.xml Find

Linux Check Memory Usage

free command Display free memory size in MB: $ free -m Output: total used free shared buffers cached Mem: 750 625 125 0 35 335 -/+ buffers/cache: 254 496 Swap: 956 0 956   Displays a line containing the totals memory in MB: $ free -t -m Output: total used free shared buffers cached Mem: 750 625 125 0 35 335 -/+ buffers/cache: 253 496 Swap: 956 0 956 Total: 1707 625 1082 vmstat command Type vmstat command at shell prompt: $ vmstat Output: procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 0 131620 35432 341496 0 0 42 82 737 1364 15 3 81 1 top command Type top command at the s