Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Wednesday, June 17, 2015

Kill Multiple Instances of a running process in single linux command

Day to day activity of a developer involved to work with deployment machine . Therefore its good to know basic commands .

Find process id's and kill them with single command :

Suppose , one need to find out process id of running tomcat and kill those process .

 for pid in $(ps -ef | grep apache-tomcat-7.0.50 | awk '{print $2}'); do kill -9 $pid; done

Tuesday, January 03, 2012

Install Apache Web Server From Source


For complete installation documentation, see [ht]docs/manual/install.html or

http://httpd.apache.org/docs/2.2/install.html
 
 Step One : Download  *.tar.gz file from the following link:

 http://mirrors.ispros.com.bd/apache//httpd/httpd-2.2.21.tar.gz

Step Two : Issue following command
$ ./configure --prefix=PREFIX

Step Three : Issue the following command
$ make

Step Four : Issue the following command (need to be root user)
$ make install

Step Five : Issue the following command
$ PREFIX/bin/apachectl start

Step Six : Now open browser and test that apache2 is running by writing the url  : http://localhost

Thta's all.



Find List of Installed Package In Debian

Package management and listing installed package in debian is a regular task to us.And simple linux command can help us to find list of packages which are installed.


To find is php is installed we can use :

dpkg --get-selections | grep php


libapache2-mod-php5                             install
php-geshi                                                 install
php5                                                         install
php5-cli                                                     install
php5-common                                           install
php5-ldap                                                 install
php5-mysql                                               install



To find is python is installed we can use :

dpkg --get-selections | grep python



gimp-python                                     install
ipython                                         install
python                                          install
python-4suite-doc                               install
python-4suite-xml                               install
python-apt                                      install
python-beagle                                   install
python-brlapi                                   install
python-cairo                                    install
python-central                                  install
python-cups                                     install
python-cupsutils                                install
python-dbus                                     install
python-dev                                      install
python-dulwich                                  install
python-eggtrayicon                              install
python-elementtree                              install
python-fpconst                                  install
python-gdata                                    install
python-gdbm                                     install
python-glade2                                   install
python-gmenu                                    install

----------

-----

And to list all installed package under debian we can simply use :

dpkg --get-selections