📜 ⬆️ ⬇️

Install asterisk 1.6 from freepbx to centos 5.7 in amazon ec2



To begin with, in amazon EC2 we will create an Instance with a type t1.micro and ami-9f4f81f6, this is ami with a minimum centos 5.7 x64 and storage of a 6 Gigabyte EBS disk. server port 22 for ssh (you can add other rules), you will also be offered to create Key Pairs (key pairs for authorization via ssh), create them and save yourself the * .pem file. Next, create an Elastic IP (Allocate New Adress) and associate it with our Instance. Also I will answer that this Instance fits into the framework of free use in the first year of working with amazon .


To connect via ssh, I use putty , and it does not know how to work with * .pem keys. We convert pem using the puttygen utility, run the utility, click Load and select our pem file, click on Save private key and save the key in ppk (putty private key) format. To add keys to putty during authorization, I use pageant.exe , just run it and it will appear in the tray, go into it and click add key and select your key.
')
It's time to log in to our Instance, copy your Instance ip from Elastic IP, which you have tied to it, enter it into putty and log in as root, let you in without a password by key if you have done all the previous steps correctly.

Next, we need to install several repositories and I always put mc.
To install the EPEL repository, execute the following command:
rpm -Uvh download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
To connect repositories with asterisk, create 4 files in the /etc/yum.repos.d directory with the following content (the file names are in italics)
centos-asterisk.repo
[asterisk-current]
name=CentOS-$releasever - Asterisk - Current
baseurl=http://packages.asterisk.org/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium

[asterisk-beta]
name=CentOS-$releasever - Asterisk - Beta
baseurl=http://packages.asterisk.org/centos/$releasever/beta/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium


centos-digium.repo
[digium-current]
name=CentOS-$releasever - Digium - Current
baseurl=http://packages.digium.com/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium

[digium-beta]
name=CentOS-$releasever - Digium - Beta
baseurl=http://packages.digium.com/centos/$releasever/beta/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium


centos-asterisk-1.6.2.repo
[asterisk-1.6.2]
name=CentOS-$releasever - Asterisk 1.6.2
baseurl=http://packages.asterisk.org/centos/$releasever/asterisk-1.6.2/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium


centos-digium-1.6.2.repo
[digium-1.6.2]
name=CentOS-$releasever - Digium 1.6.2
baseurl=http://packages.digium.com/centos/$releasever/digium-1.6.2/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium


Next you need to install asterisk, freepbx and mc.
yum install asterisk freepbx mc -y

Now you can try restarting asterisk and apache
service asterisk restart
service httpd restart

Create a rule in Security Group to pass port 80 and try to access freepbx (web interface for configuring asterisk) at an address from Elastic Ip by scoring an address in the browser myelasticip

Source: https://habr.com/ru/post/132641/


All Articles