Showing posts with label Tips and News. Show all posts
Showing posts with label Tips and News. Show all posts

Monday, September 10, 2012

Linux alternative/equivalent for AcDsee

digiKam

digiKam is an advanced digital photo management application for Linux, Windows, and Mac-OSX.  The people who inspired digiKam's design are the photographers like you who want to view, manage, edit, enhance, organize, tag, and share photographs under Linux systems.

http://www.digikam.org

darktable

darktable is an open source photography workflow application and RAW developer. A virtual lighttable and darkroom for photographers. It manages your digital negatives in a database, lets you view them through a zoomable lighttable and enables you to develop raw images and enhance them.

http://www.darktable.org

Shutter - Screenshot tool

Shutter is a feature-rich screenshot program. You can take a screenshot of a specific area, window, your whole screen, or even of a website – apply different effects to it, draw on it to highlight points, and then upload to an image hosting site, all within one window. Shutter is free, open-source, and licensed under GPL v3.


http://shutter-project.org

Thursday, April 21, 2011

Show All Running Processes in Linux

How do I see all running process in Linux?

You need to use the ps command. It provide information about the currently running processes, including their process identification numbers (PIDs). Both Linux and UNIX support ps command to display information about all running process. ps command gives a snapshot of the current processes. If you want a repetitive update of this status, use top command.

ps command

Type the following ps command to display all running process:
# ps aux | less
Where,
  • -A: select all processes
  • a: select all processes on a terminal, including those of other users
  • x: select processes without controlling ttys

Task: see every process on the system

# ps -A
# ps -e

Task: See every process except those running as root

# ps -U root -u root -N

Task: See process run by user vivek

# ps -u vivek

Task: top command

The top program provides a dynamic real-time view of a running system. Type the top at command prompt:
# top

Task: display a tree of processes

pstree shows running processes as a tree. The tree is rooted at either pid or init if pid is omitted. If a user name is specified, all process trees rooted at processes owned by that user are shown.
$ pstree

Task: Print a process tree using ps

# ps -ejH
# ps axjf

Task: Get info about threads

Type the following command:
# ps -eLf
# ps axms

Task: Get security info

Type the following command:
# ps -eo euser,ruser,suser,fuser,f,comm,label
# ps axZ
# ps -eM

Task: Save Process Snapshot to a file

Type the following command:
# top -b -n1 > /tmp/process.log
Or you can email result to yourself:
# top -b -n1 | mail -s 'Process snapshot' you@example.com

Task: Lookup process

Use pgrep command. pgrep looks through the currently running processes and lists the process IDs which matches the selection criteria to screen. For example display firefox process id:
$ pgrep firefox
Following command will list the process called sshd which is owned by root user.
$ pgrep -u root sshd

Say hello to htop and atop

htop is interactive process viewer just like top, but allows to scroll the list vertically and horizontally to see all processes and their full command lines. Tasks related to processes (killing, renicing) can be done without entering their PIDs. To install htop type command:
# apt-get install htop
or
# yum install htop
Now type the htop command at the shell prompt:
# htop

atop program

The program atop is an interactive monitor to view the load on a Linux system. It shows the occupation of the most critical hardware resources (from a performance point of view) on system level, i.e. cpu, memory, disk and network. It also shows which processes are responsible for the indicated load with respect to cpu- and memory load on process level; disk- and network load is only shown per process if a kernel patch has been installed. Type the following command to start atop:
# atop


http://www.cyberciti.biz/faq/show-all-running-processes-in-linux/

Thursday, March 3, 2011

installing IntelliJ IDEA on ubuntu

To Install IntelliJ IDEA 8.1 on ubuntu

Following are the steps :

1.first you need install java for you need to run below command on terminal.

admin@smartproteam~$ sudo apt-get install sun-java6-jdk

2.Now you need to download IntelliJ IDEA from below source

click here to download

3.Unpack the idea-8.1.3.tar.gz with tar xfz

admin@smartproteam~$ tax xfz idea-8.1.3.tar.gz

after extracting rename the file to idea-8 to make it simple

4.now copy idea-8 file to /usr/lib/

admin@smartproteam~$ sudo idea-8 -R /usr/lib

Now you need to configure the JDK_HOME and path for IDEA

5first you need to edit /etc/environment by running below command

admin@smartproteam~$ sudo gedit /etc/environment

add below lines to /etc/environment

export JDK_HOME=”/usr/lib/jvm/java-6-sun/”

add /usr/lib/idea-8/bin to this path

PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/idea-8/bin”

after setting above once logout and login

6.now run below idea.sh to launch the IntelliJ IDEA like below

admin@smartproteam~$ idea.sh

now you can launch the Intellij

Source

Monday, February 28, 2011

How to Install Apache, PHP, MySQL, and PHPMyAdmin on Ubuntu

Install Apache:
sudo apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils

Install PHP:
sudo apt-get install php5 libapache2-mod-php5 php5-common php5-gd php5-mysql php5-imap php5-cli php5-cgi php-pear php-auth

Install MySQL:
sudo apt-get install mysql-server mysql-client
here you will be ask to input root password for the mysql

Install PhpMyAdmin:
sudo apt-get install phpmyadmin
here you will be asked some question to configure the phpmyadmin, just go through the wizard after it finish installed.

To set up under Apache all you need to do is include the following line in /etc/apache2/apache2.conf.

Include /etc/phpmyadmin/apache.conf
(It might be no need to add this line any more - http://manoftoday.wikidot.com/ubuntu#toc26)

Now your server is ready. Before you test please make sure to restart the server:

/etc/init.d/mysql restart
/etc/init.d/apache2 restart

then point your browser to
http://localhost/phpmyadmin

Enable mod_rewrite
sudo a2enmod rewrite

Install cURL
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl

Enable modules

sudo a2enmod cache & a2enmod disk_cache & a2enmod proxy & a2enmod proxy_http & a2enmod headers & a2enmod expires


Other tools

sudo apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl


[SOLVED] “Could not reliably determine the server’s fully qualified domain name, using … for ServerName”

You might probably faced the same following error while you were restarting the Apache server on Ubuntu.

in either httpd.conf or apache2.conf in /etc/apache2 and restart apache the notice will disappear. 

sudo gedit /etc/apache2/httpd.conf
sudo gedit /etc/apache2/apache2.conf

By default httpd.conf file will be blank. Now, simply add the following line to the file.

ServerName localhost

Save the file and exit from gEdit.

Finally restart the server.
sudo /etc/init.d/apache2 restart

(http://russenreaktor.wordpress.com/2010/04/17/solved-%E2%80%9Ccould-not-reliably-determine-the-server%E2%80%99s-fully-qualified-domain-name-using-for-servername%E2%80%9D/)



More Help:
https://help.ubuntu.com/community/phpMyAdmin

https://help.ubuntu.com/community/ApacheMySQLPHP

Source:
http://www.ivankristianto.com/os/ubuntu/howto-install-apache-php-mysql-and-phpmyadmin-on-ubuntu/1027/

Friday, February 11, 2011

Set-up ClamAV on Ubuntu

sudo apt-get install clamav

sudo freshclam


which will install the ClamAV antivirus program and download its database of virus signatures. (In the future, Ubuntu will automatically run freshclam to update the database every day.)

Now let's suppose you're exporting a directory called /home/me/publicdata to your Windows users. You can scan that directory by typing

sudo clamscan -r /home/me/publicdata

and see what it reports. You can tell clamscan to remove infected files automatically (type "man clamscan" for details), but I suggest the first time out you look at the clamscan report and determine for yourself what files look suspicious.

After you've cleaned everything up, you'll probably want to run clamscan every day, or if your users are out of control, every hour. Here's a simple script that runs clamscan and mails a report to the address in NOTIFY. Replace "me@example.com" with the address to which you want reports to be sent, and "/home/me/publicdata" with the directory you want scanned (clamscan will automatically examine all the subdirectories of this directory as well):

#!/bin/sh
TARGET=/home/me/publicdata
NOTIFY=me@example.com

clamscan -r $TARGET 2>&1 | mail -s 'Clamscan report' $NOTIFY

(You may not have the "mail" program installed. Run "sudo apt-get install bsd-mailx" if it's missing.)

Use an editor to create that file in /usr/local/sbin. I recommend the nano editor because it has help menus. At the prompt in a Terminal, type

sudo nano /usr/local/sbin/virusscan.sh

then copy the code above into that file. Hold down the Ctrl key and type S; say "yes" to save the file, then hold down Ctrl and type X to exit nano.

Only two more tasks await. First, you must make the script executable by running the command:

sudo chmod u+x,go-x /usr/local/sbin/virusscan.sh

This will allow the "root" (administrative) user, and only the root user, to execute this script. Finally, to make this script run every hour, you should create a "symbolic link" to the file (rather like a Windows "shortcut") in the directory /etc/cron.hourly like this:

sudo cd /etc/cron.hourly
sudo ln -s /usr/local/sbin/virusscan.sh

This will run the script once each hour. (You can limit it to once a day by replacing "cron.hourly" with "cron.daily" above.)


Source : http://ubuntuforums.org/showthread.php?t=1580738

Clamscan Option : http://linux.die.net/man/1/clamscan

Howto Install Clam AntiVirus with GTK frontend GUI : http://www.ubuntugeek.com/howto-install-clam-antivirus-with-gtk-frontend-gui.html

Thursday, February 10, 2011

How to check port activity and manage

netstat

netstat -e -e

netstat -pant

1- Find what application/process is using the pro, type:

sudo netstat -lpn |grep :8080

and press Enter.

You will get an output similar to this one

tcp6 0 0 :::8080 :::* LISTEN 6782/java

2- I have got the process Id, which is 6782, now this is the process that is using port 8080.

3- Kill the process, type:kill 6782

kill 6782

and now port 8080 is free.

How to Login as a Root User

Type this command in Terminal

sudo passwd root

Login as a root user

sudo su

Source:
http://tutorial.downloadatoz.com/ubuntu-10-04-guide-how-to-login-as-a-root-user.html

Setup OpenSSH Server on Ubuntu

Setting up an SSH server on Ubuntu is about as simple as it gets. The server of choice is OpenSSH.

Run this command from a terminal window:

sudo apt-get install ssh

To test that it’s working, you can try to ssh into your own machine:

ssh [user]@[pc-ip]

The authenticity of host ‘localhost (127.0.0.1)’ can’t be established.
RSA key fingerprint is 98:8a:b8:b2:9e:8a:84:e0:d4:08:27:fb:74:f0:de:d4.
Are you sure you want to continue connecting (yes/no)?

Looks like it’s working! Naturally our ssh client doesn’t have the key for the server, since we just installed it. You can type yes to continue or just hit Ctrl-C to stop.

Source:
http://www.howtogeek.com/howto/ubuntu/setup-openssh-server-on-ubuntu-linux/

How to run sh files on Ubuntu

.sh file is nothing but the shell script to install given application or to perform other tasks under UNIX like operating systems. The easiest way to run .sh shell script in Linux or UNIX is to type the following commands. Open the terminal (your shell prompt) and type the command:

sh file.sh

OR

bash file.sh

.sh File As Root User

Sometime you need to install application which requires root level privalage
Some time you need root access to install application; without root, you won't have the necessary permissions to install application or make system level modifications. Root access is disabled by default on many Linux and UNIX like systems. Simply use sudo or su as follows:

sudo bash filename.sh

Type your password. Another option is to use the su command as follows to become superuser:

su -

Type root user password and finally run your script:

bash filename.sh

chmod Command: Run Shell Script In Linux

Another recommend option is to set an executable permission using the chmod command as follows:

chmod +x file.sh

Now your can run your .sh file as follows

./file.sh

Source: http://www.cyberciti.biz/faq/run-execute-sh-shell-script/

Utorrent on Ubuntu

Download Utorrent:
http://user.utorrent.com/downloads/linux

Starting utorrent server on bootup

http://pastebin.com/UE3kDg00
(between "<>" are the values to change in your case)


After, in linux distros like Ubuntu (and similar), you should do:
1) Copy the init script to "/etc/init.d/":

sudo cp /etc/init.d/utserver-daemon

2) Execute this:

sudo chmod +x /etc/init.d/utserver-daemon

2) And this:

sudo update-rc.d utserver-daemon defaults

And go on!

Execute manually the script with:

sh -x /etc/init.d/utserver-daemon {start|stop|restart}


To start automatically:
sudo update-rc.d utorrent defaults
To remove:
sudo update-rc.d -f utorrent remove

Useful links:
http://forum.utorrent.com/viewtopic.php?id=83538

http://forum.utorrent.com/viewtopic.php?id=85144

http://forum.utorrent.com/viewtopic.php?id=85144

Tuesday, November 23, 2010

Install Setup PHP cURL

Assume you have already setup LAMP. To install or setup cURL on your Linux machine like Ubuntu, run the following line of shell command in your terminal:

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl

Now you have PHP cURL installed, the next thing you need to do is to restart apache2, run the following command in your terminal:

sudo /etc/init.d/apache2 restart

source

Wednesday, November 3, 2010

How to create virtual host on linux

sudo gedit /etc/apache2/apache2.conf

A search for the word virtual bring us to the following line:
# Include the virtual host configurations:
Include sites-enabled/

Change it like this:
# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/[^.#]*

This mean that when starting apache, it will look for files in /etc/apache2/sites-enabled/.
Lets go there and see what is in.

$cd /etc/apache2/sites-enabled/
$ls -l
total 1
lrwxrwxrwx 1 root root 36 2005-12-27 01:42 000-default -> /etc/apache2/sites-available/default

Well, this only links to the file in directory /etc/apache2/sites-available/ . You might wonder what is the point in doing such. Well, this simply allows you, mainly when you are using your box as a web server, to:

1. Have a simple main configuration file

2. Do be able to edit or create a new host by creating/editing a file from /etc/apache2/sites-available/

3. In case your web server doesn't restart because of misconfiguration, you can simply remove the link from the file in /etc/apache2/sites-enabled/ pointing to the malformed file in /etc/apache2/sites-available/

Now let say you want to be able to map the domain name dev.example.com to you local machine, using the code file in /home/myuser/public_html/example.com/.
While in /etc/apache2/sites-available, create a new file (let say example.com.conf)

$sudo gedit example.com.conf

NameVirtualHost 127.0.0.1:80

ServerName dev.example.com
ServerAlias www.dev.example.com
ServerAdmin emaildev.example.com
DocumentRoot /var/www/dev.example.com/html


Order Deny,Allow
Allow from all
# Don't show indexes for directories
Options -Indexes




Note:People who don't want to bother knowing how the site enabling system works might just jump to the end of the article to find debian built-in command syntax. If you want to know how it works, or do not use a debian based distro, carry on.

Now, we specified a new host to apache but it is not yet linked to the repertory where apache actually look for virtual hosts. Let go to:

$cd /etc/apache2/sites-enabled/

and create a link to the file we just created:

$sudo ln -s /etc/apache2/sites-available/example.com.conf example.com.conf

Now apache is almost ready to restart, but before doing so, we must inform our linux system that dev.example.com and www.dev.example.com are not to be looked for on the net, but on the local machine instead.
To do so, simply edit /etc/hosts and add the new host names at the end of the line beginning by 127.0.0.1, which is localhost.
In the end, your file should look like:

127.0.0.1 localhost.localdomain localhost dev.example.com www.dev.example.com

And now we are done, simply reload apache:

sudo /etc/init.d/apache2 reload
or
sudo /etc/init.d/apache2 restart

Open your web browser and enter the following address dev.example.com. Magic, it runs the same as when you were using http://localhost/~myuser/example.com but it is far more usefull when devellopping a web service and want to be able to develop applications on your machine just like it is where the real web site.

Edit: As you can see from the comments, many people pointed out that you can use a debian specific command (so if you are not using a debian based system, don't expect to find that command :) ).
to enable a new virtual host simply type:

sudo a2ensite mysiteavailable-site

to disable a virtual host:

sudo a2dissite mysiteavailable-site

where mysiteavailable-site is the name of the virtual hos you want to enable/disable, so in out example: example.com.conf

More info : read here

http://www.debuntu.org/2006/02/22/7-virtual-hosting-using-apache-2

Tuesday, November 2, 2010

Working easy on Linux with Webmin

Official Webmin website
http://www.webmin.com/

If you are using the DEB version of webmin, first download the file and then run the command :

dpkg --install webmin_1.530_all.deb

The install will be done automatically to /usr/share/webmin, the administration username set to root and the password to your current root password. You should now be able to login to Webmin at the URL http://localhost:10000/. Or if accessing it remotely, replace localhost with your system's IP address.

If Debian complains about missing dependencies, you can install them with the command :

apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions

If you are installing on Ubuntu and the apt-get command reports that some of the packages cannot be found, edit /etc/apt/sources.list and make sure the lines ending with universe are not commented out.

Some Debian-based distributions (Ubuntu in particular) don't allow logins by the root user by default. However, the user created at system installation time can use sudo to switch to root. Webmin will allow any user who has this sudo capability to login with full root privileges.

If you want to connect from a remote server and your system has a firewall installed, see this page for instructions on how to open up port 10000.

How to change webmin default port

# Stop webmin with the command /etc/webmin/stop
# Edit the line port in /etc/webmin/miniserv.conf
# Start webmin with the command /etc/webmin/start

How to kill a process on Linux

Here's a couple of commands that may come in useful:
sudo fuser -n tcp 10001
This should output something like:
10000/tcp: 5543
(List which process is using tcp port 10000)
From here you can just do
sudo kill 5543
netstat -l | less
(display listening server sockets)
(hit the "space key" to move down a page and hit the "q" key to quit)

How do I install .deb packages?

Type the following command:
$ sudo dpkg -i package.deb

Reset GNOME Keyring Password on Ubuntu

Method 1:

It is possible to clobber your keyring passphrase and settings from the Terminal. Open a terminal (Applications > Accessories > Terminal), and run the command:

rm ~/.gnome2/keyrings/login.keyring

On older systems you may need to try:

rm ~/.gnome2/keyrings/default.keyring

Method 2:

The second method bypasses the Terminal and uses the graphical interface strictly. To delete your current keyring, follow the steps below:

1. Navigate to Applications > Accessories > Passwords and Encryption Keys
2. Select the far-right tab “Passwords”
3. Select your keyring
4. Right-click and attempt “Change Password” or, if that doesn’t work, select “Delete”