Asterisk基本知识

原帖:http://www.afuns.cn/upload/msn/8011F2A53503284C_391.html


安装CentOS 5.4 DVD 光盘版,选择costom安装方式,不安装无用的,如果想方便那不选上x-windows .
进到#号下,一般我们选择/usr/src目录进行下载及安装:
cd /usr/src
//进行环境配置:
//更换语言:
vi /etc/sysconfig/i18n
//将LANG="zh_CN.UTF-8" 换成 LANG="en_US.UTF-8"
//增加DNS解晰:
vi /etc/resolv.conf
//添加 nameserver 202.97.224.68
//安装YUM环境:
http://www.afuns.cn/index.php?p=36&a=view&r=23
//安装开发环境及编绎环境:
yum -y groupinstall 'Development Tools'
yum -y install libtool*
yum -y install kernel-heads*
yum -y install ncurses-dev*
yum -y install kernel-devel
yum install -y kernel kernel-devel
//安装apache、PHP、MYSQL环境:
yum -y install httpd php mysql mysql-server php-mysql
/sbin/chkconfig httpd on
/sbin/chkconfig --add mysqld
/sbin/chkconfig mysqld on
/sbin/service httpd start
/sbin/service mysqld start
//设置mysql数据库root帐号密码。
mysqladmin -u root password 'newpassword' [引号内填密码]
//让mysql数据库更安全
mysql -u root -p [此时会要求你输入刚刚设置的密码,输入后回车即可]
mysql> DROP DATABASE test; [删除test数据库]
mysql> DELETE FROM mysql.user WHERE user = ''; [删除匿名帐户]
mysql> FLUSH PRIVILEGES; [重载权限]
//安装apache扩展 //安装php的扩展//安装mysql扩展
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
yum -y install php-gd
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
//下载最新的ver:1.6版本
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.10.2.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.2.8-rc1.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.6.2.1.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-2.3.0.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-2.3.0.tar.gz
//安装libpri:
tar zxvf libpri-1.4.10.2.tar.gz
cd libpri-1.4.10.2
make
make install
cd ..
//安装dahdi驱动:
tar zxvf dahdi-linux-2.3.0.tar.gz
cd dahdi-linux-2.3.0
make
make install
cd ..
//安装dahdi-tools工具:
tar zxvf dahdi-tools-2.3.0.tar.gz
cd dahdi-tools-2.3.0
./configure
make
make install
make config
cd ..
//安装asterisk:
tar zxvf asterisk-1.6.2.8-rc1.tar.gz
cd asterisk-1.6.2.8-rc1
./configure
make
make install
make config
make samples
cd ..
//安装asterisk扩展包(H323\mysql支持):
tar zxvf asterisk-addons-1.6.2.1.tar.gz
cd asterisk-addons-1.6.2.1
./configure
make
make install
make samples
至此asterisk的基本环境安装完毕!

另:安装asterisk的yum方式:

Use the text editor of your choice to create a new file named "centos-asterisk.repo" in the "/etc/yum.repos.d" folder. Add the following text to the file:
[asterisk-tested]
name=CentOS-$releasever - Asterisk - Tested
baseurl=http://packages.asterisk.org/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium
[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
Save the new file and create another named "centos-digium.repo" and insert the following text:
[digium-tested]
name=CentOS-$releasever - Digium - Tested
baseurl=http://packages.digium.com/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium
[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
At this point your system has been updated to use the Asterisk and Digium repositories in addition to the base CentOS repositories. You are now ready to install Asterisk. To star the installation, execute the following at the Linux command line:
[root@localhost~]# yum install asterisk16 asterisk16-configs asterisk16-voicemail dahdi-linux dahdi-tools libpri
The system will respond with something like:

 
 

你可能感兴趣的:(apache,mysql,数据库,centos,System,扩展)