Friday 18 October 2013

Install WordPress via SSH

  1. SSH into your server, then navigate to your domain’s web root:
    cd /var/www/vhosts/example.com/httpdocs
  2. Grab the latest WP install
    wget http://wordpress.org/latest.tar.gz
  3. Get the files out of the archive:
    tar xfz latest.tar.gz
  4. Navigate to the wordpress subfolder:
    cd wordpress
  5. Copy everything back up to the web root:
    cp -rpf * ../
  6. Navigate back up to web root:
    cd ..
  7. Remove the wordpress subfolder:
    rm -rf wordpress
  8. Remove the downloaded archive file:
    rm -f latest.tar.gz
Source : http://code.garyjones.co.uk/install-wordpress-ssh

Sunday 6 October 2013

How to Install Asterisk 11 in RHEL/CentOS/Fedora and Ubuntu/Debian/Linux Mint

Asterisk is an Open Source software PBX (Private Branch Exchange), developed by Mark Specer of Digium. It allows you to make calls to one another which may have connected to other PSTN (Public Switched Telephone Network) and Voice over Internet Protocol (VoIP). Asterisk runs on Linux, BSD, MacOSX and others. Having built-in features like voicemail, conferencing, IVR, queuing etc.
In this article, we are going to see a basic installation and working of Asterisk 11 in RHEL 6.4/6.3/6.2/6.1/6.0, CentOS 6.4/6.3/6.2/6.1/6.0, Fedora 18,17,16, Ubuntu 12.10/12.04/11.10, Linux Mint 14/13 and Debian Linux Operating Systems.

1. Preparation for Installation

First, you make sure that your system is up-to-date, if not try to update the system and then install dependencies packages using “yum command” and “apt-get command“, before installing Asterisk on your system.
On RHEL/CentOS/Fedora
# yum -y update
# yum install -y make wget openssl-devel ncurses-devel newt-devel libxml2-devel kernel-devel gcc gcc-c++ sqlite-devel
Turn Off SELinux by changing the line “enforcing” to “disabled” in /etc/selinux/config file.
SELINUX=disabled
Once you disabled SELinux, you need to reboot the system.
reboot
On Ubuntu / Linux Mint / Debian
# su root
# apt-get update && apt-get upgrade -y && reboot
# apt-get install build-essential wget libssl-dev libncurses5-dev libnewt-dev  libxml2-dev linux-headers-$(uname -r) libsqlite3-dev

2. Downloading DAHDI, LibPRI and Asterisk Tarballs

Download the source tarballs, these following commands will download current release of DAHDI 2.6, LibPRI 1.4 and Asterisk 11.
# cd /usr/src/
# wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz
Next, extract the files from source tarballs using “tar command” as shown below.
# tar zxvf dahdi-linux-complete-current.tar.gz
# tar zxvf libpri-1.4-current.tar.gz
# tar zxvf asterisk-11-current.tar.gz

3. Configuring, Compiling And Installing

Go to the each directory from where you have downloaded and extracted the packages and start running the following commands to install DAHDI, LibPRI and Asterisk.
Installing DAHDI.
# cd /usr/src/dahdi-linux-complete-2.6.2+2.6.2/
# make && make install && make config
Installing LibPRI
# cd /usr/src/libpri-1.4.14/
# make && make install
Installing Asterisk
Next, run the “configure” script will vary depending upon whether your system is 32-bit or 64-bit. In the middle, when “menuselect” command executes, select your desired options and then hit “Save and Exit” option and the installation will continuous.
Run this command if you’re installing Asterisk on a 32-bit OS.
# cd /usr/src/asterisk-11.3.0/
# ./configure && make menuselect && make && make install && make samples && make config
Run this command if you’re installing Asterisk on a 64-bit OS.
# cd /usr/src/asterisk-11.3.0/
# ./configure --libdir=/usr/lib64 && make menuselect && make && make install && make samples && make config
Following are the some Asterisk configuration files and their locations.
  1. /etc/asterisk/ – configuration files.
  2. /var/lib/asterisk/ – contains images, firmware, keys, sounds sample files.
  3. /usr/lib/asterisk/modules/ – contains all loadable modules.

4. Starting DAHDI and Asterisk Services

Enable the DAHDI and Asterisk services at system boot time.
# chkconfig dahdi on
# chkconfig asterisk on
Start the DAHDI and Asterisk.
# service dahdi start
# service asterisk start

5. Connecting to Asterisk CLI

Run the following command to connect to the Asterisk CLI.
# asterisk -rvvvvv

Asterisk 11.3.0, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 11.3.0 currently running on tecmint (pid = 1820)
tecmint*CLI>

6. Asterisk Console Commands

It’s similar to IOS. From Asterisk terminal anytime you can use ‘Tab key‘ or type ‘?‘ for help or command auto complete.
tecmint*CLI>
!              acl            ael            agent          agi            aoc            
calendar       cc
cdr            cel            channel        cli            confbridge     config         
console        core
data           database       devstate       dialplan       dnsmgr         dundi          
event          fax
features       file           group          hangup         help           http           
iax2           indication
local          logger         manager        mgcp           minivm         mixmonitor     
module         moh
no             originate      parkedcalls    phoneprov      presencestate  pri            
queue          realtime
reload         rtcp           rtp            say            sip            skinny         
stun           timing
udptl          ulimit         unistim        voicemail

7. Useful Commands from Asterisk CLI

  1. restart gracefully – Restart Asterisk gracefully.
  2. restart now – Restart immediately.
  3. restart when convenient – Restart Asterisk when call is empty.
  4. reload – Configuration reload.
  5. stop gracefully – Gracefully Asterisk shutdown.
  6. stop now – Shutdown immediately.
  7. stop when convenient – Shutdown Asterisk when call is empty.

8. Command Line Parameters

Following are the available command line parameters of Asterisk.
-h : Help. Run '/sbin/asterisk -h' to get a list of the available command line parameters.
-C <configfile>: Starts Asterisk with a different configuration file than the default /etc/asterisk/asterisk.conf.
-f : Foreground. Starts Asterisk but does not fork as a background daemon.
-c : Enables console mode. Starts Asterisk in the foreground (implies -f), with a console command line interface (CLI) that can be used to issue commands and view the state of the system.
-r : Remote console. Starts a CLI console which connects to an instance of Asterisk already running on this machine as a background daemon.
-R : Remote console. Starts a CLI console which connects to an instance of Asterisk already running on this machine as a background daemon and attempts to reconnect if disconnected.
-t : Record soundfiles in /var/tmp and move them where they belong after they are done.
-T : Display the time in "Mmm dd hh:mm:ss" format for each line of output to the CLI.
-n : Disable console colorization (for use with -c or -r)
-i: Prompt for cryptographic initialization passcodes at startup.
-p : Run as pseudo-realtime thread. Run with a real-time priority. (Whatever that means.)
-q : Quiet mode (supress output)
-v : Increase verbosity (multiple v's = more verbose)
-V : Display version number and exit.
-d : Enable extra debugging across all modules.
-g : Makes Asterisk dump core in the case of a segmentation violation.
-G <group> : Run as a group other than the caller.
-U <user> : Run as a user other than the caller
-x <cmd> : Execute command <cmd> (only valid with -r)

9. Reference Link

  1. http://www.asterisk.org/
Source : http://www.tecmint.com/how-to-install-asterisk-11-in-linux-distributions/

How to Install Asterisk-GUI

After I try to install asterisk on my previous writings, it seems so hard to configure with CLI. However i’m just a newbie…remember that. So, I’m trying to find an easy way to configure using ‘Asterisk-gui’. actually there are many third-party applications developed for asterisk, such as pbxware, asterisk now, freepbx, briker, etc. asterisk-gui is a web interface, it’s just like you have installing a trixbox on your own.
Here is step by step installation:
1. Go to your installation directory (for example: /usr/src), download the latest version:
[root@gembul ~]# cd /usr/src/
[root@gembul src]# svn checkout http://svn.digium.com/svn/asterisk-gui/trunk asterisk-gui

this is will create directory named asterisk-gui

2. Enter asterisk-gui directory, compile and install:
[root@gembul asterisk-gui]# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for uname... /bin/uname
checking for gcc... gcc
##################################### skipped #####################################
configure: Package configured for:
configure: OS type : linux-gnu
configure: Host CPU : x86_64

[root@gembul asterisk-gui]# make && make install
##################################### skipped #####################################
+------- Asterisk-GUI Build Complete -------+
+ Asterisk-GUI has successfully been built, +
+ and can be installed by running: +
+ +
+ make install +
+-------------------------------------------+
+---- Asterisk GUI Installation Complete ---+
+ +
+ YOU MUST READ THE SECURITY DOCUMENT +
+ +
+ Asterisk-GUI has successfully been +
+ installed. +
+ +
+-------------------------------------------+
+ +
+ BEFORE THE GUI WILL WORK +
+ +
+ Before the GUI will run, you must perform +
+ some modifications to the Asterisk +
+ configuration files in accordance with +
+ the README file. When done, you can +
+ check your changes by doing: +
+ +
+ make checkconfig +
+ +
+-------------------------------------------+

3. Configure general parameters, I suggest to backup your default configuration first. and then modify manager.conf http.conf files:
[root@gembul asterisk]# cp -r /etc/asterisk /etc/asterisk.backup
[root@gembul asterisk]# vi /etc/asterisk/manager.conf

[general]
enabled = yes
webenabled = yes
port = 5038
bindaddr = 0.0.0.0

[gembuls]
secret = your_password
permit=0.0.0.0/0.0.0.0
read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
write = system,call,agent,user,config,command,reporting,originate
[root@gembul asterisk]# vi /etc/asterisk/http.conf
[general]
enabled = yes
bindaddr = 0.0.0.0
bindport = 8088
prefix = gui
enablestatic = yes

4. Reload/restart your asterisk
[root@gembul asterisk]# asterisk -r
Asterisk 1.6.2.21, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.21 currently running on gembul (pid = 3108)
Verbosity is at least 3
gembul*CLI>

or restart the asterisk:
[root@gembul asterisk]# /etc/init.d/asterisk restart
Stopping safe_asterisk: [ OK ]
Shutting down asterisk: [ OK ]
Starting asterisk: [ OK ]
[root@gembul asterisk]#

5. Open asterisk-gui on your browser with address:
http://localhost:8088/gui/static/config/index.html
source:
asterisk.org
sourceforge.net


nyolong seko : http://gembuls.wordpress.com/2011/12/28/how-to-install-asterisk-gui/

Tuesday 1 October 2013

RESET SAMSUNG ML-2240



Samsung ML-2240 setelah counter pagenya menunjukkan angka di atas 1800, maka printer ini akan blink yang disertai dengan berkedipnya lampu merah pada printer. Lampu merah tersebut menunjukkan bahwa toner telah habis. Walaupun toner sudah kita refill, namun lampu merah tersebut tidak bisa hilang.
reset samsung ml-2240
Hal ini mengakibatkan printer Samsung Ml-2240 ini tidak bisa ngeprint. Agar printer Samsung ML-2240 ini dapat berpungsi kembali, maka kita harus mereset ulang kembali counter page tersebut dengan cara manual menggunakan jumper atau dengan membeli alat chip. Untuk cara reset manual Samsung Ml-2240 menggunakan jumper akan kami jelaskan di sini.
Sebelum kita melakukan reset printer Samsung ML-2240, sebaiknya anda melakukan test printer untuk melihat OS Version dan hasil terakhir Toner Page Count dari printer Samsung ML-2240.


Cara test printer Samsung ML2240:
1. Hidupkan printer, dan tunggu sampai proses kalibrasi selesai
2. Pasang kertas 3 lembar, kemudian tekan tombol Resume selama 3 detik. Lepas tekanan pada tombol resume, dan printer melakukan test print.

3. Setelah selesai test print, perhatikan OS Version dari hasil test printer anda.
Ada beberapa tipe OS Version dari Samsung ML-2240 ini yang tidak dapat kita reset secara manual menggunakan jumper. Adapun tipe OS Version Samsung ML-2240 yang dapat di reset adalah :
1.01.00.68
1.01.00.70
1.01.00.72
1.01.00.76
1.01.00.77
1.01.00.78
semuanya bisa di reset pake jumper atau disolder.
Tapi kalo yang OS versi :
1.01.00.82
1.01.00.83
Masih belum bisa di reset pake jumper.
Langkah-langkah reset printer Samsung ML-2240
A. Peralatan yang dibutuhkan :
- Obeng plus (+), dan obeng minus (-)
- Kabel atau kawat kecil untuk jumper
B. Langkah-langkah reset printer Samsung ML-2240
- Lepas semua kabel printer (kabel power printer dan kabel data printer), dan pastikan switch printer dalam keadaan OFF
- Lepas dua buah baut yang ada pada bagian kiri dan kanan di belakang printer menggunakan obeng plus (+)

- Setelah kedua baut dilepas, dan soket pengunci dibuka, geser cover ke samping secara pelan-pelan.

- Lepas kipas pendingin yang menempel pada cover

- Akan terlihat dua buah mesin printer Samsung ML-2240, yaitu mesin power supply dan motherboard.
reset counter page
- Cari dan perhatikan IC EEPROM kaki 8 yang menempel pada mainboard printer Samsung ML-2240, yaitu ic U6 dengan nomor 93C66WP.

- Setelah IC U6 ditemukan, pasang dan hubungkan jumper atau kawat kecil pada ic kaki 1 dan 4
Kalau terbiasa menggunakan solder, solder aja kabel tersebut pada kaki 1 dan 4 agar anda tidak ribet memegangnya.
samsung ml-2240
- Setelah kaki 1 dan 4 pada ic dihubungkan, pasang kabel power, dan hidupkan printer.
- Tunggu beberapa saat hingga printer selesai kalibrasi dan lampu menunjukkan warna hijau
- Setelah lampu hijau, matikan printer, kemudian lepas kabel atau kawat yang menempel pada kaki 1 dan 4 IC EEPROM 93C66WP
- Tutup kembali cover belakang printer tersebut dan jangan lupa pasang dua buah baut skrup yang dilepas tadi.
Reset Samsung ML-2240 telah selesai dilakukan, dan printer beroperasi kembali.

Source : http://www.teknisiprinter.com/reset-samsung-ml2240.htm