Friday, December 21, 2012

exim4 remove all queues or pending emails

1. list all queues or pending emails or not sent emails
$ exim -bp

2. remove a specific queue
$ exim -Mrm EmailID

3. remove all queues
$ exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash
$ exim -bp | exiqgrep -i | xargs exim -Mrm

Thursday, December 13, 2012

The VMware Authorization Service is not running

Problem: The VMware Authorization Service is not running


1. Go to run and type services.msc
2. Look for Vmware Authorization Service
3. Right Click and Click "Start"

Monday, November 12, 2012

Debian Squeeze 6.0 Installer

URL from Debian Website (netinst cd image)  :

# edit the file
nano /etc/apt/sources.list

# add into the list
deb squeeze/updates main
deb-src squeeze/updates main

deb squeeze main non-free
deb-src squeeze main non-free

deb squeeze-updates main
deb-src squeeze-updates main

# update the repositories
apt-get update

Thursday, November 8, 2012

Install Asterisk 11 on Debian 6 / Debian Squeeze

Asterisk 11 - Debian Squeeze


1. You need to install the dependencies.
apt-get install build-essential linux-headers-2.6.32-5-686 libxml2-dev libncurses5-dev libgtk2.0-dev libnewt0.52 libnewt-dev

2. Download the asterisk 11 package. I usually download it in the "/usr/src/" directory.
cd /usr/src

3. Extract the asterisk 11 source.
tar -zxvf asterisk-11-current.tar.gz

4. Go to the extracted directory.
cd /usr/src/asterisk-11-current

5. Configure and compile asterisk 11
make menuselect

Depending on your needs, you can enable some add-ons like format_mp3. Go to Add-ons and enable "format_mp3".

For this to work, you need to install subversion and get the mp3 source.

apt-get install subversion


make all
make install
make samples
make config
make install-logrotate

6. Run asterisk in verbose mode to check if it was installed properly.
asterisk -vvvvvvvvvvc

7. Automate asterisk service to run on startup.
update-rc.d asterisk defaults

8. You're done! Enjoy!

Wednesday, June 13, 2012

Asterisk 1.8 on Debian Squeeze 6.0

System requirements:
Operating System: debian Squeeze 6.0

1. Install Debian Squeeze 6.0
2. Edit the debian source list.
$nano /etc/apt/sources.list
deb squeeze main
deb-src squeeze main

deb squeeze/updates main
deb-src squeeze/updates main

deb squeeze-updates main
deb-src squeeze-updates main

deb testing main

deb squeeze-backports main

3. Update it!
$apt-get update

OPTIONAL: Incase you encounter a GPG error.
$apt-cache search keyring | grep debian
$apt-get install debian-multimedia-keyring
$apt-get update

4. install the dependencies
$apt-get install build-essential gcc make linux-headers-2.6.32-5-686 libxml2-dev libncurses5-dev libgtk2.0-dev libnewt0.52 libnewt-dev libssl-dev

5. Download the asterisk package. I used asterisk 1.8.3

6. Extract it!
$tar -zxvf asterisk-1.8-current.tar.gz

7. go to the directory and install it.
$ cd /usr/src/asterisk-1.8.3
$make install
$make samples
$make config
$make install-logrotate

8.Run the asterisk to see if the installation works!
$asterisk -vvvvvvvvvvc

9. Automate the asterisk service on startup
$update-rc.d asterisk defaults

10. Change your date and time.
$dpkg-reconfigure tzdata

Current default time zone: 'Asia/Manila'
Local time is now:      Fri Feb 17 08:22:36 PHT 2012.
Universal Time is now:  Fri Feb 17 00:22:36 UTC 2012.

11. update your date and time.
$apt-get install ntpdate

12. install "screen"
$apt-get install screen

13. install sox
$apt-get install sox

14. install lame
#go to /usr/src and download the latest version of lame
#Extract it!
$tar -zxvf download
$mv download lame-3.99.4
#go to the lame directory
$cd /usr/src/lame-3.99.4
$make install


install Dahdi and Libpri for Meetme
1. Download dahdi and libri
$cd /usr/src/

2. Extract it
$tar -zxvf libpri-1.4-current.tar.gz
$tar -zxvf dahdi-linux-complete-current.tar.gz

3. Go to libri directory and install
$cd /usr/src/libpri-1.4.12
$make install

4. Go to Dahdi directory and install
$cd /usr/src/dahdi-linux-complete-2.6.0+2.6.0
$make install
$make config

5. open /etc/dahdi/modules and remove all the devices that you don't have
$nano /etc/dahdi/modules
#uncomment all the devices you don't have

6. check if dahdi is working

7. rebuild asterisk with meetme. install the dependencies for the GUI of menuselect.
$apt-get install libnewt0.52 libnewt-dev
$cd asterisk-1.8.3
#check if the meetme module is included
$make menuselect
#it should be under > application > app_meetme
$make install
$make samples
$make config

OTRS 3.1.5 on debian squeeze 6.0

1. install all depencies/packages
apt-get install apache2 perl mysql-server libnet-ldap-perl libgd-graph-perl libapache2-mod-perl2 libsoap-lite-perl libnet-dns-perl libpdf-api2-perl libdigest-md5-perl make gcc

2. configure apache2
#enable rewrite abilities
a2enmod rewrite

#create a file in the /etc/apache2/sites-available/
cd /etc/apache2/sites-available/
nano otrs
#inside the otrs file
<VirtualHost *:80>
     ServerName otrs.local
     ServerAlias www.otrs.local
     DocumentRoot /srv/www/otrs.local/public_html/
     ErrorLog /srv/www/otrs.local/logs/error.log
     CustomLog /srv/www/otrs.local/logs/access.log combined
#All of the files for the sites that you host will be located in directories that exist underneath /srv/www. You can symbolically link these directories to other locations if you need them to exist in other places.
#ErrorLog and CustomLog entries are suggested for more fine-grained logging, but are not required. If they are defined (as shown above), the logs directories must be created before you restart Apache.

#create the site with public_html and logs inside the folder /srv/www
mkdir -p /srv/www/otrs.local/public_html
mkdir /srv/www/otrs.local/logs

#enable site
a2ensite otrs.local

#reload apache2
/etc/init.d/apache2 reload

ln -s /opt/otrs /srv/www/otrs.local/public_html/otrs

3. download the otrs package and extract
#go to the site
cd /opt/otrs

#download the OTRS installer package from source
tar xvf otrs-3.1.5.tar.gz

#move the extracted folder to otrs
mv otrs-3.1.5 otrs
ln -s /opt/otrs /srv/www/otrs.local/public_html/otrs

#4. verify that all perl modules are working

#5. create user and group for OTRS
useradd -d /opt/otrs/ -c 'OTRS user' otrs
usermod -G www-data otrs

#6 copy the configuration files
cp Kernel/ Kernel/
cp Kernel/Config/ Kernel/Config/

#7. check that all modules required for running otrs are installed
perl -cw /opt/otrs/bin/cgi-bin/ #should see "syntax ok"
perl -cw /opt/otrs/bin/ #should see "syntax ok"

#8. we give the permissions to the folder otrs
bin/ --otrs-user=otrs --web-user=www-data --otrs-group=www-data --web-group=www-data /opt/otrs

#9 edit the configuration of apache for the otrs site
#create a symoblic link on the apache2 httpd conf
ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/conf.d/otrs.conf

Thursday, March 22, 2012

how to check if service is running in debian

Syntax: ps xa -f | grep (name of the service you are looking for)


Service: openvpn

Syntax: ps xa -f | grep openvpn

root@asterguy:~# ps xa -f | grep openvpn
root      1233     1  0 21:53 ?        Ss     0:00 /usr/sbin/openvpn --writepid /var/run/ --daemon ovpn-server --cd /etc/openvpn --config /etc/openvpn/server.conf
root      2029  1918  0 22:15 pts/0    S+     0:00 grep openvpn