Centos 7 Asterisk 13.3.2 install with kernel 3.19.8 update
I am not going to cover basic OS install here, You should have your OS installed and able to reach the internet. I did the Desktop install as I will be using this for other purposes. If this is a production asterisk only system you should do a minimal install.
I logged in as root user via putty/ssh.
Get your system ready.
Install some prereqs
# cd /root
# contrib/scripts/install_prereq install
Turn off firewall and iptables if they are on.
# systemctl disable firewalld.service
# systemctl stop firewalld.service
# systemctl disable iptables.service
# systemctl stop iptables.service
Disable selinux if it is enforced.
# vi /etc/sysconfig/selinux
SELINUX=disabled
reboot if you have changed these
# reboot
Install NTP and turn on of not already.
# yum -y install ntp*
# systemctl disable chronyd.service
# systemctl enable ntpd.service
# systemctl start ntpd.service
# ntpq -p
# date
Update system and reboot.
# yum -y update
# reboot
I update the kernel as this is new build an I like to use a good updated kernel when I start things out. This "could be" optional. I don't know. I have not tried this on another kernel.
Update kernel to latest 3.x (3.19.8).
Get required packages for the kernel update, and some for asterisk install.
# yum -y groupinstall "Development Tools"
# yum -y install ncurses-devel qt-devel hmaccalc zlib-devel binutils-devel elfutils-libelf-devel wget bc gzip uuid* libuuid-devel jansson* libxml2* sqlite* openssl*
# yum -y update
Now from /root directory download the kernel source.
# wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.19.8.tar.gz
Unzip and extract the source file.
# gzip -d ./linux-3.19.8.tar.gz
# tar -xvf ./linux-3.19.8.tar -C /usr/src/
Now let’s go to our source directory and configure the new Kernel. I just left everything alone and saved the file before I exit the menu.
# cd /usr/src/linux-3.19.8/
# make menuconfig
Compile kernel.
# make
Now go get coffee or beer. The compile will take a bit.
Install kernel.
# make modules_install
# make install
When finished lets reboot and use the new kernel. This will not be the default selection in grub so after you reboot the machine you need to press enter when you see the grub menu. You will only have a few seconds so beware.
You must be at console for choosing the kernel at boot manually. After we set this to to default kernel in grub we can return to putty.
# reboot
On boot screen select the new kernel for boot. After the boot and login type:
# uname -r
3.19.8
Looks like I am on the new Kernel.
Now set new kernel for default boot. I also leave console and return to putty here.
Check menu entries in grub.
# grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2
CentOS Linux 7 (Core), with Linux 3.19.8
CentOS Linux 7 (Core), with Linux 3.10.0-229.el7.x86_64
CentOS Linux 7 (Core), with Linux 3.10.0-229.4.2.el7.x86_64
CentOS Linux 7 (Core), with Linux 0-rescue-455229da2acf4d3b941fda6a689c779c
Check current default.
# grub2-editenv list
saved_entry=CentOS Linux (3.10.0-229.4.2.el7.x86_64) 7 (Core)
Set new default.
# grub2-set-default "CentOS Linux 7 (Core), with Linux 3.19.8"
Check new default.
# grub2-editenv list
saved_entry=CentOS Linux (3.19.8) 7 (Core)
Now reboot and make sure new kernel is set for default.
# reboot
# uname -r
3.19.8
Download Asterisk and supported packages.
# cd /root
Get libpri.
# wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
# gzip -dfv libpri-1.4-current.tar.gz
# tar -xvf libpri-1.4-current.tar -C /usr/src/
Get DAHDI.
# wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
# gzip -dfv dahdi-linux-complete-current.tar.gz
# tar -xvf dahdi-linux-complete-current.tar -C /usr/src/
Get asterisk.
# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
# gzip -dfv asterisk-13-current.tar.gz
# tar -xvf asterisk-13-current.tar -C /usr/src/
DAHDI install.
# cd /usr/src/dahdi-linux-complete*
# make
# make install
# make config
libpri install.
# cd /usr/src/libpri*
# make
# make install
Asterisk install
# cd /usr/src/asterisk*
# ./configure --libdir=/usr/lib64
# make menuselect
# make
# make install
# ldconfig
Optional items.
# cd /usr/src/asterisk*
# make samples
# make progdocs
See if asterisk will run.
# asterisk -vvv &
# ps -ef | grep asterisk
root 15498 2402 0 21:12 pts/0 00:00:00 asterisk -vvv
Now go to asterisk console.
# asterisk -r
-- Remote UNIX connection
Asterisk 13.3.2, Copyright (C) 1999 - 2014, 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 13.3.2 currently running on centos7vm (pid = 15498)
centos7vm*CLI> help
Get asterisk to start up on boot
# cd /usr/src/asterisk*
# make config
# /sbin/chkconfig --add asterisk
# /sbin/chkconfig asterisk on
Enjoy!
No comments:
Post a Comment