========================
Asterisk Installation
========================
Installation
-------------
**Prerequisites**
* gcc
* gcc-c++
* libxml2-devel
* ncurses-devel
* mysql
* mysql-devel
* mysql-server
* php php-mysql
* php-devel
* openssl
* openssl-devel
# Install Prerequisites
``yum -y install gcc gcc-c++ libxml2-devel ncurses-devel mysql mysql-devel mysql-server php php-mysql php-devel openssl openssl-devel``
On a typical system, you'll want to download three components:
* Asterisk
* DAHDI
* libpri
The libpri library allows Asterisk to communicate with ISDN connections.
The DAHDI library allows Asterisk to communicate with analog and digital telephones and telephone lines, including connections to the Public Switched Telephone Network, or PSTN. It should also be installed on new systems, even if you don't immediately plan on using analog or digital connections to your Asterisk system.
DAHDI
DAHDI stands for Digium Asterisk Hardware Device Interface, and is a set of drivers and utilities for a number of analog and digital telephony cards, such as those manufactured by Digium. The DAHDI drivers are independent of Asterisk, and can be used by other applications. DAHDI was previously called Zaptel, as it evolved from the Zapata Telephony Project.
The DAHDI code can be downloaded as individual pieces (dahdi-linux for the DAHDI drivers, and dahdi-tools for the DAHDI utilities. They can also be downloaded as a complete package called dahdi-linux-complete, which contains both the Linux drivers and the utilities.
**Install Libpri**
# Change diretory to /usr/local/src
``cd /usr/local/src``
# Download Libpri
``wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.12.tar.gz``
# Extract tar source
``tar -zxvf libpri-1.4.12.tar.gz``
# Compile Source using make
``cd libpri-1.4.12/``
``make``
# Install source
``make install``
**Install Dahdi**
# Change diretory to /usr/local/src
``cd /usr/local/src``
# Download Dahdi
``wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-2.6.0+2.6.0.tar.gz``
# Extract tar source
``tar -zxvf dahdi-linux-complete-2.6.0+2.6.0.tar.gz``
# Compile Source using make
``cd dahdi-linux-complete-2.6.0+2.6.0/``
``make``
# Install source
``make install``
``make config``
**Install Asterisk**
# Change diretory to /usr/local/src
``cd /usr/local/src``
# Download Asterisk
``wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.10.1.tar.gz``
# Extract source
``tar -zxvf asterisk-1.8.10.1.tar.gz``
# Run Configuration script
``cd asterisk-1.8.10.1/``
``./configure``
This will run for a couple of minutes, and warn you of any missing system libraries or other dependencies. Upon completion, you should see a message that looks similar to the one shown below. (Obviously, your host CPU type may be different than the below.)
.. code-block:: java
:linenos:
.$$$$$$$$$$$$$$$=..
.$7$7.. .7$$7:.
.$7$7.. .7$$7:.
.$$:. ,$7.7
.$7. 7$$$$ .$$77
..$$. $$$$$ .$$$7
..7$ .?. $$$$$ .?. 7$$$.
$.$. .$$$7. $$$$7 .7$$$. .$$$.
.777. .$$$$$$77$$$77$$$$$7. $$$,
$$$~ .7$$$$$$$$$$$$$7. .$$$.
.$$7 .7$$$$$$$7: ?$$$.
$$$ ?7$$$$$$$$$$I .$$$7
$$$ .7$$$$$$$$$$$$$$$$ :$$$.
$$$ $$$$$$7$$$$$$$$$$$$ .$$$.
$$$ $$$ 7$$$7 .$$$ .$$$.
$$$$ $$$$7 .$$$.
7$$$7 7$$$$ 7$$$
$$$$$ $$$
$$$$7. $$ (TM)
$$$$$$$. .7$$$$$$ $$
$$$$$$$$$$$$7$$$$$$$$$.$$$$$$
$$$$$$$$$$$$$$$$.
configure: Package configured for:
configure: OS type : linux-gnu
configure: Host CPU : x86_64
configure: build-cpu:vendor:os: x86_64 : unknown : linux-gnu :
configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu :
# Run menuselect to select asterisk options
``make menuselect``
select required options & continue
# Compile source
``make``
The compiling step will take several minutes, and you'll see the various file names scroll by as they are being compiled. Once Asterisk has finished compiling, you'll see a message that looks like:
.. code-block:: java
:linenos:
+--------- Asterisk Build Complete ---------+
+ Asterisk has successfully been built, and +
+ can be installed by running: +
+ +
+ make install +
+-------------------------------------------+
+--------- Asterisk Build Complete ---------+
# Now install compiled asterisk source
``make install``
# When finished, Asterisk will display the following warning:
.. code-block:: java
:linenos:
+---- Asterisk Installation Complete -------+
+ +
+ YOU MUST READ THE SECURITY DOCUMENT +
+ +
+ Asterisk has successfully been installed. +
+ If you would like to install the sample +
+ configuration files (overwriting any +
+ existing config files), run: +
+ +
+ make samples +
+ +
+-------------------------------------------+
+---- Asterisk Installation Complete -------+
# To install a set of sample configuration files for Asterisk
``make sample``
# Now that you have Asterisk compiled and installed, the last step is to install the initialization script, or initscript.
``make config``
# Start dahdi
``lsmod | grep dahdi``
# If the command returns nothing, then DAHDI has not been started. Start DAHDI by running
``/etc/init.d/dadhi start``
# Start Asterisk
``/etc/init.d/asterisk start``
============================================
Installing & Settingup Sangoma USBFXO Card
============================================
Introduction
-------------
Sangoma's USBfxo is a low-cost development tool kit, ideal for those just getting started with Asterisk® or those who just want a simple external solution.The USBfxo is easy to install. There is no need to open up the computer to insert an interface card. Simply plug it in, and set up your Asterisk system; configure Sangoma's Wanpipe® drivers, as you would with any Sangoma card, and you're set to go. You can even connect multiple USBfxos in one system.The USBfxo fully supports Asterisk on Linux systems and includes Zaptel/DAHDI drivers.
* Dual FXO ports
* Easy installation, no need to open up computer to install PCI/PCIe card
* Supports up to 2 simultaneous calls
* Compact plastic enclosure
* Low power consumption, takes power from USB bus
* USB 2.0 compliant (compatible with USB 1.1)
Installation
-------------
**Prerequisites**
* C developement tools ...(gcc)
* C++ developement tools
* Make utility
* Ncurses library
* Perl developement tools
* AWK
* FLEX
* Patch
* libtermcap-devel
* bison
* libtools
* autoconf
* automake
* kernel-devel
# Install Prerequites
``yum -y install kernel-devel-$(uname -r) libtool* make gcc patch perl bison gcc-c++ ncurses-devel flex libtermcap-devel autoconf* automake* autoconf``
**NOTE:** Before Installation of wanpipe connect your USBFXO Card to USB port.
# Download USBFXO Wanpipe Driver
``cd /usr/local/src``
``wget ftp://ftp.sangoma.com/linux/current_wanpipe/wanpipe-3.5.25.tgz``
# Extract tar source
``tar -zxvf wanpipe-3.5.25.tgz``
``cd wanpipe-3.5.25/``
# To Setup wanpipe driver with dahdi use following command
``./Setup dahdi``
# Once you run above command it will ask you for dahdi source directory, enter the path where you have your dahdi source in our case it is "/usr/local/src/dahdi-linux-complete-2.6.0+2.6.0/", so wanpipe driver will compile with dahdi source & will install detected USBFXO Card.
# After complete installation varify installation using command
``ifconfig``
``wanrouter hwprobe``
===================================
FreePBX Configuration & IVR Setup
===================================
Ater installing FreePBX point your browser to `<http://yourip/admin>`_ & login to freepbx dashboard default login & password is admin/admin.After login dashboard shows many options as shown in image below. If you have error for symlinks as shown in image delete that file from /etc/asterisk & run configuration script /var/lib/asterisk/bin/retrive_conf.
# As per above image to solve symlink error for **sip_notify.conf** follow the steps given below,
``rm /etc/asterisk/sip_notify.conf``
``cd /var/lib/asterisk/bin``
``./retrive_conf``
# Now refresh browser to check symlink error again, if you get same error again follow the above steps until error get solve.
# Now install required modules to create IVR
# click on Module Admin on dashboard & check all repositories box & click on 'check online' as shown in image below
# To setup IVR we require dahdi_config & IVR module, so select both & click on 'process' as shown in image below
# Now click on Apply Configuration
# After applying configuration click on dahdi tab as shown in image
# Check all box & click on save do not change any option.
# Now Click on Trunks to add trunk as shown in image below
# Click on Add Zap Trunk (DAHDi compatibility mode) & add trunk name 'from-pstn' & dont change in setting & click on submit button
# Now Click on Extensions to add extension
# add extension as shown in images below
# Now add your IVR Announcement
# Click on add system recording
# click on browse & select your ivr announcement & rename as per requirement as shown in images above
# After adding system recording click on IVR & click on add ivr
# setup ivr options as shown in image
# Now route your inbound calls on IVR
# Click on inbound route & add inbound route name & redirect option select ivr as shown in image below
# Now goto terminal & type asterisk -rvvvv & call on your number & check your IVR
``asterisk -rvvvvv``
Unreal IRC Installation & Basic Configuration
===============================================
Unreal IRC Installation & Basic Configuration
===============================================
Introduction
-------------
Internet Relay Chat (IRC) is a protocol for real-time Internet text messaging (chat) or synchronous conferencing. It is mainly designed for group communication in discussion forums, called channels, but also allows one-to-one communication via private message as well as chat and data transfer, including file sharing.
UnrealIRCd is an Open Source IRC Server. Unreal was created from the Dreamforge IRCd that was formerly used by the DALnet IRC Network. Over the years, many new and exciting features have been added to Unreal. Some of Unreal's most notable features include:
* Channel Half-ops (+h)
* Channel Owners (+q) and Channel Admins (+a)
* Advanced anti-flood and anti-spam systems (such as Spamfilter)
* Advanced banning through 'extended bans'
* Swear filtering (+G)
* Channel linking (+L)
* Hostname cloaking (+x)
* Color blocking and stripping (+c/+S)
* Vhosts
* WebTV Support
* DCCDeny
* SSL encrypted client and server connections
* Ziplinks
* Advanced and highly configurable configuration file
* Module support
* Extensive documentation in several languages (in HTML and on IRC through /HELPOP)
* And much more... see also the Features section in the official documentation
Unreal can run on several operating systems. Unreal works on most nix OSes including Linux, BSD, MacOS X, Solaris, and HP-UX. Unreal also works on Windows (NT4/2K/XP/2003/Vista/7).
====================================
Installation & Basic Configuration
====================================
Installation
-------------
# First of All add user irc
``useradd irc``
``cd /home/irc/``
# As root user download UNREAL IRC
``wget http://www.unrealircd.com/downloads/Unreal3.2.9.tar.gz``
# Extract unreal Tar Ball
``tar -zxvf Unreal3.2.9.tar.gz``
``cd Unreal3.2.9/``
# Run Config script & keep everything default as shown in image
``./Config``
# Compile Unreal source
``make``
# Copy example config file as unrealircd.conf
``cp doc/example.conf unrealircd.conf``
# Open unrealircd.conf & edit "this is me block" & "this is admin block" & "this is services block" as shown in images below
``vi unrealircd.conf``
# After editing unrealircd.conf file, now setup services for IRC
# Download services version 4.3 as shown below
``cd /home/irc``
``wget http://www.surrealchat.net/services/releases/srsv-0.4.3.0.tar.bz2``
# Before installing services install prerequisites, i.e Perl & perl Modules (Event,Date::Parse, & Math::BigInt)
``cpan``
``install Event``
``install Date::Parse``
``install Math::BigInt``
# Login to Mysql Database & create database services
``create database services;``
# Extract Tar ball
``tar -jxvf srsv-0.4.3.0.tar.bz2``
``cd srsv-0.4.3.0/``
# Copy Example Config Folder as Config
``cp -avr example-config/ config/``
# Change Mysql Credentials in sql.conf as shown in image
``vi config/sql.conf``
# Run Database Setup Script
``./db-setup.pl``
# Start unreal irc using following command
``cd /home/irc/Unreal3.2/``
``./unreal start``
# Now Start IRC Services as user irc
``chown -R irc:irc /home/irc/srsv-0.4.3.0/``
``cd /home/irc/srsv-0.4.3.0/``
``./services.pl``
# Now Connect to IRC Server using any irc client as shown in image below
Monday, April 2, 2012
GIT Source Code Management and Version control
=============================
Gitolite Introduction by Yogesh Panchal
=============================
Introduction
-------------
**What is Git ?**
Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Branching and merging are fast and easy to do.
`More Info Here <http://git-scm.com/>`_
**What is Gitolite ?**
Gitolite allows you to setup git hosting on a central server, with fine-grained access control and many more powerful features.
Gitolite is an access control layer on top of git. Here's an "executive summary":
* use a single unix user ("real" user) on the server
* provide access to many gitolite users
* they are not "real" users
* they do not get shell access
* control access to many git repositories
* read access controlled at the repo level
* write access controlled at the branch/tag/file/directory level, including who can rewind, create, and delete branches/tags
* can be installed without root access, assuming git and perl are already installed
* authentication is most commonly done using sshd, but you can also use httpd if you prefer (this may require root access)
`More Info Here <http://sitaramc.github.com/gitolite/>`_
======================
Gitolite Installation
======================
Prerequisites
--------------
* Perl 5.8.8
* git (yum install git or sudo apt-get install git)
Installation Steps
-------------------
# First Login as root & Add user called "git"
``$ useradd git``
``$ passwd git``
# Now Login as root to any local system & Add user called "gitadmin"
``$ useradd gitadmin``
``$ passwd gitadmin``
# Switch to User gitadmin & generate ssh key as shown
``$ su gitadmin``
``$ ssh-keygen``
# Copy ssh public key as gitadmin.pub
``$ cp .ssh/id_rsa.pub gitadmin.pub``
# Now Copy this ssh key on git server
``$ scp gitadmin.pub git@gitserver:``
# Now Login to git server as user "git" & download gitolite source
``$ git clone http://github.com/sitaramc/gitolite.git``
# Change directory gitolite & run "gl-system-install" command
``$ cd gitolite/``
``$ src/gl-system-install``
# Now run "gl-setup" command
``$ source ~/.bash_profile``
``$ gl-setup gitadmin.pub``
# once you run "gl-setup gitadmin.pub" command hit enter & then the Vi editor pops up, exit it by typing ":wq" (colon, then the letter 'w' & 'q'), hit enter. Then the installs complete.
#
#
#
# Finally clone the gitolite admin repository
``$ git clone git@gitserver:gitolite-admin.git``
# Add New Repo & New User Key
``$ cd gitolite-admin``
``$ vi conf/gitolite.conf``
# Add Following lines for to add New Repo
`` Repo RepoName``
`` RW+ Username``
# Where Reponame is name of the repo & username is name of user key
# After Adding Repo Generate User Key on user's system
``$ ssh-keygen``
# Copy public key to Gitadmin's system & Add to keydir in gitolite-admin folder
``$ cp .ssh/id_rsa.pub user.pub``
``$ scp user.pub gitadmin@serverip:``
# On Gitadmin's system
``$ cp user.pub gitolite-admin/keydir/``
# Now Commit your changes & push changes on git server
``$ git status``
``$ git add conf/gitolite.conf``
``$ git add keydir/user.pub``
``$ git commit -m "added new Repo & New User"``
``$ git push origin master``
No comments:
Post a Comment