Install And Configure LTSP Server In Ubuntu 12.04 with Dnsmasq

LibreOffice 4.0.4 Has Been Released. Install It On Ubuntu 13.04 , 13.10

Install Skype 4.2 in Ubuntu 13.10/13.04/12.10 and 12.04

Skype allows people to communicate with each other by messaging, voice calling and video calling over internet. Skype also provides services for phone calls on the telephone networks ....

Display Username On Unity Panel In Ubuntu 13.04 and Ubuntu 13.10

Install and Configure Apache Traffic Server on Ubuntu Server 12.04


Apache Traffic server is a reverse proxy, cache proxy and forward proxy. Web proxy caching enables you to store copies of frequently accessed web objects and then serve this information to users on demand. It improves performance and frees up Internet bandwidth for other tasks.


Installation


Installation of Apache Traffic Server is bit tricky on Ubuntu due to absence of standard apt-get easy installer package. Well but its not that difficult though. I am writing down step by step process for easy understandability.

Download latest tar.bz2 from apache website and put that on Ubuntu server any directory.

wget http://www.apache.org/dyn/closer.cgi/trafficserver/trafficserver-4.0.1.tar.bz2

tar xf trafficserver-4.0.1.tar.bz2

cd trafficserver-4.0.1

 sudo apt-get install g++ libssl-dev tcl-dev libexpat1-dev libpcre3-dev libcap-dev libcap2

 ./configure

 $ make

 $ sudo make install

Server level configuration

 

After successful installation, open ld.so.conf (sudo vi /etc/ld.so.conf) and add following line.
include /usr/local/libexec/trafficserver

Run the following command: 
sudo ldconfig

Steps for Start and stop


To start Traffic Server manually, issue the following command, passing in the attribute start. This command starts all the processes that work together to process Traffic Server requests as well as manage, control, and monitor the health of the Traffic Server system.

sudo service trafficserver start/stop

All the configuration parameter related to cache are located in /usr/local/etc/trafficserver/records.config file after making any configuration changes do run command traffic_line -x to apply the configuration changes.

Installation Directories


When we install traffic server, we had not provide the installation directories for config files and executable. These stuffs has been placed with default conventions.

All configurations files :

/usr/local/etc/trafficserver/

All executables :

/usr/local/libexec/trafficserver

Important Configuration Files & Usage

 

sudo vi /usr/local/etc/trafficserver/records.config

For changing default port as well as connection time out etc. related data.
Don't forget to execute following command in case of minor rule change:

sudo traffic_line -x

In case of severe change like port etc please make sure you had restarted the server:

sudo service trafficserver restart

For Configuring the mapping 

 

sudo vi /usr/local/etc/trafficserver/remap.config

In the above file, we can provide as many map, reverse map, redirect, reverse redirect configurations.

Apache Virtual Host Specific Configuration

 

Step 1:
sudo vi /usr/local/etc/trafficserver/records.config

In the file make following changes so config read like below
CONFIG proxy.config.reverse_proxy.enabled INT 1
CONFIG proxy.config.url_remap.pristine_host_hdr INT 1 (It make sure host name in http header doesn't change)
CONFIG proxy.configurl_remap.remap_required INT 1

Step 2:
sudo traffic_line -x

Step 3:
sudo vi /usr/local/etc/trafficserver/remap.config

Step 4:
sudo traffic_line -x
Above configuration is sufficient for setting the initial reverse proxy to listen on default port and serve the request based on domain name from provider (Apache)


Cache Configuration


CONFIG proxy.config.cache.ram_cache.size INT -1 (default value 1 MB per 1 GB Disk Space, alternatively you can set 20971520 (20 MB))

Monitoring Traffic & Log File


Log file location - var/log/trafficserver

Command-line Torrent Client With Deluge-console On Ubuntu 13.10, 13.04, 12.10, 12.04 and Linux Mint 14, 15


Deluge-console

 

Deluge is a full featured bit torrent client for Linux, OS X, Unix and Windows. It uses libtorrent in its backend and features multiple user-interfaces including; GTK,Web and console. It has been designed using the client server model with a daemon process that all the bittorrent activity. The deluge daemon is able to run on headless machines with the user-interfaces being able to connect remotely from any platform.


Features 


*  Core/UI split allowing Deluge to run as a daemon
*  Connect remotely to the Deluge daemon
*  Web UI
*  Console UI
*  GTK+ UI
*  BitTorrent Protocol Encryption
*  Mainline DHT
*  Local Peer Discovery(aka LSD)
*  FAST protocol extension
*  uTorrent Peer Exchange
*  UPnP and NAT-PMP
*  Proxy support
*  Web seed
*  Private Torrents
*  Global and per-torrent speed limits
*  Configurable bandwidth scheduler
*  Password protection
*  RSS(via Plugin)

Open a terminal and paste the following command to install deluge-console

sudo apt-get install deluge-console && sudo apt-get install deluged

Setup Deluge Console 


Start the console interface

Enter the deluge console:

deluge-console

Connect to your daemon (your daemon port can be found on your slot info page):
connect 127.0.0.1:{{DELUGEDPORT}}

Commands


Help commands can be displayed for each command using the --help flag.

add

 

Add a torrent
Usage: add [-p <save-location>] <torrent-file> [<torrent-file> ...]
Options:
-p PATH, --path=PATH  save path for torrent

cache

 

Show information about the disk cache
Usage: cache

config

 

Show and set configuration values
Usage: config [key1 [key2 ...]]
config --set key value
Options:
-s SET, --set=SET  set value for key

connect

 

Connect to a new deluge server.
Usage: connect <host[:port]> <username> <password>

debug

 

Enable and disable debugging
Usage: debug [on|off]

del

 

Remove a torrent
Usage: rm <torrent-id>
Options:
--remove_data  remove the torrent's data

exit

 

Exit from the client.
Usage: exit

halt

 

Shutdown the deluge server.
Usage: halt

help

 

displays help on other commands
Usage: help [command]

info

 

Show information about the torrents
Usage: info [<torrent-id> [<torrent-id> ...]]
You can give the first few characters of a torrent-id to identify the torrent.
Options:
-v, --verbose - shows more information per torrent
-i, --id - use internal id instead of torrent name
--sort=SORT - sort items.  Possible keys: state, save_path, tracker,
tracker_status, next_announce, name, total_size,
progress, num_seeds, total_seeds, num_peers,
total_peers, eta, download_payload_rate,
upload_payload_rate, ratio, distributed_copies,
num_pieces, piece_length, total_done, files,
file_priorities, file_progress, peers, is_seed,
is_finished, active_time, seeding_time
--sort-reverse=SORT_REV - sort items in reverse order.  Same keys allowed as for --sort.

pause

 

Pause a torrent
Usage: pause [ * | <torrent-id> [<torrent-id> ...] ]

plugin

 

Manage plugins with this command
Usage: plugin [ -l | --list ]
plugin [ -s | --show ]
plugin [ -e | --enable ] <plugin_name>
plugin [ -d | --disable ] <plugin_name>
Options:
-l, --list - lists available plugins
-s, --show - shows enabled plugins
-e ENABLE, --enable=ENABLE - enables a plugin
-d DISABLE, --disable=DISABLE - disables a plugin

quit

 

Exit from the client.
Usage: quit

recheck

 

Forces a recheck of the torrent data
Usage: recheck [ * | <torrent-id> [<torrent-id> ...] ]

resume

 

Resume a torrent
Usage: resume [ * | <torrent-id> [<torrent-id> ...] ]

rm

 

Remove a torrent
Usage: rm <torrent-id>
Options:
--remove_data - remove the torrent's data

[How To] Display A Message At Terminal login On Ubuntu


If you want to see the message when you open the terminal or after you are login in tty1-6, just put this line at the end of ~/.bashrc file (open it from terminal with gedit ~/.bashrc):

echo "Welcome $USER, today's date is $(date +"%A, %d-%m-%y")"

If you want to see the message after you are login in GUI, do the following:


Create a new file name_and_date.sh:

gedit ~/bin/name_and_date.sh

Put next 2 lines inside:

#!/bin/bash

notify-send "Hello" "Hello $USER, today's date is $(date +"%A, %d-%m-%y")"

Save the file and close it.

Make the file exacutable:

chmod +x ~/bin/name_and_date.sh

Search in Dash for Startup Applications, open it and click Add.

Under name type "Show my name and date" or something you will recognise.

Under command type: /home/$USER/bin/name_and_date.sh (change $USER with your user name).

Under comment (if you want), type a brief description.

[How To] Install And Configure Rabbitmq On Amazon EC2.


RabbitMQ is open source message broker software (i.e., message-oriented middleware) that implements the Advanced Message Queuing Protocol (AMQP) standard. The RabbitMQ server is written in Erlang and is built on the Open Telecom Platform framework for clustering and failover.


Instructions to install Rabbitmq on Amazon EC2 instances.


First you have to enable epel repo. Edit the following file using vi and change Enabled=0 to 1 in first section called [epel].

sudo vi /etc/yum.repos.d/epel.repo

After that, the first section will look like this

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

Now install the Rabbitmq using the following command.

sudo yum install rabbitmq-server 

Install the developement files.

sudo yum install librabbitmq-devel

Start the rabbitmq server.

sudo service rabbitmq-server start

Or you can also install Rabbitmq from source.


yum install gcc gcc-c++ make libxslt fop ncurses-devel openssl-devel *openjdk-devel unixODBC unixODBC-devel
wget http://www.erlang.org/download/otp_src_R15B01.tar.gz
tar zxvf otp_src_R15B01.tar.gz
cd otp_src_R15B01
./configure --with-ssl
make
sudo make install
wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.8.1/rabbitmq-server-2.8.1-1.noarch.rpm
sudo /etc/init.d/rabbitmq-server start

[Solved] -bash: mail: command not found in Redhat CentOS Amazon EC2


By default, Amazon EC2 has not prepacked with mail utilities. So whenever you tried to send a mail from command line, you will get an error message that says: -bash: mail: command not found. Its because of you don't have required mail packages.



Copy and paste the following command to install mailutils in Amzon EC2.
sudo yum install mailx

Now test it by sending a mail from command line.
echo "This will go into the body of the mail." | mail -s "Testing from EC2." you@example.com

Note: Change you@example.com to your email address.

[How To] Install Varnish Reverse Proxy On Ubuntu 13.10, 13.04, 12.04


Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture.

Varnish is distributed in the Ubuntu package repositories, but the version there might be out of date, and generally recommend using the packages provided by varnish-cache.org.

To use the varnish-cache.org repository, do the following

Open a Terminal and paste the following commands one by one.
curl http://repo.varnish-cache.org/debian/GPG-key.txt | sudo apt-key add -
echo "deb http://repo.varnish-cache.org/ubuntu/ precise varnish-3.0" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install varnish

Here is a small diagram that simply shows how Varnish works.

[How To] Lock Terminal size or Change Any Other Application behaviour in Ubuntu using devilspie


devilspie, a non-gui utility that lets you make applications start in specified workplaces, in specified sizes and placements, minimized or maximized and much more based on simple config files.



To install devilspie you can use Ubuntu Software Center or run the following command in terminal:
sudo apt-get install devilspie

You can start in terminal devilspie with:
devilspie

Now we are going to configure devilspie to lock gnome-terminal size:



Create a new directory to store your new devilspie-related configuration file:

mkdir ~/.devilspie

Create a new custom configuration file; for example:
gedit ~/.devilspie/gnome-terminal.ds

Paste in the following configuration code to your new file:
(if (is (application_name) "Terminal")
    (begin
    (undecorate)      
        (geometry "730x450")
        (center)
    )
)

There are some more examples:


Example 1


Move Firefox to workspace 2 and maximize it:
(if
    (is (application_name) "firefox-bin")
    (begin
       (set_workspace 2)
       (maximize)
    )
)

Example 2


Pin the Gaim Buddylist to all workspaces, with a size of 340×630 pixels and at position (4,150):

(if
    (and
        (is (application_name) "gaim")
        (is (window_name) "Buddy List")
    )
    (begin
        (pin)
        (geometry "340x630+4+150")
    )
)

Example 3


Move Skype to workspace 1, set its size to 300×600 pixels, center it, make it “always on top” and let it skip pager and tasklist:
(if
    (matches (application_name) "^Skype")
    (begin
        (geometry "300x600")
        (center)
        (above)
        (skip_pager)
        (skip_tasklist)
    )
)

Example 4


Move a gaim window that is neither the buddy list nor an IRC conversation:
(if
    (and
        (is (application_name) "gaim")
        (not (is (window_name) "Buddy List"))
        (not (contains (window_name) "#"))
    )
    (geometry "+0+313")
)

Example 5


Remove the window decoration from all windows:
(undecorate)
Combine two rules into one file:
(begin
    (if
        (is (application_name) "firefox-bin")
        (begin
            (set_workspace 2)
            (maximize)
        )
    )
    (if
        (and
            (is (application_name) "gaim")
            (not (is (window_name) "Buddy List"))
            (not (contains (window_name) "#"))
        )
        (geometry "+0+313")
    )
)