#> wget --no-check-certificate https://sourceforge.net/projects/elastix/files/Elastix%20PBX%20Appliance%20Software/4.0.0/Elastix-4.0.74-Stable-x86_64-bin-10Feb2016.iso/download -O Elastix-4.0.74-Stable-x86_64-bin-10Feb2016.iso #> mkdir /mnt/ISO #> mount -o loop Elastix-4.0.74-Stable-x86_64-bin-10Feb2016.iso /mnt/ISO/
關閉 SELinux
#> sed -i 's/SELINUX=.*$/SELINUX=disabled/' /etc/selinux/config #> setenforce 0 #> vi /etc/yum.repos.d/Elastix-cd.repo
[elastix-cd] name=Elastix RPM Repository for CentOS baseurl=file:///mnt/ISO gpgcheck=0 enabled=1
安裝 EPEL 套件庫
#> wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm #> rpm -ivh epel-release-latest-7.noarch.rpm
安裝 ISO 檔內的 kernel-* 套件
NOTE:
CentOS 版本必須低於 ISO 檔內的版本,否則無法安裝 kernel 套件。
安裝後重新開機,CentOS 必須使用安裝後的 kernel 開機。
#> cd /mnt/ISO/Elastix #> yum --nogpgcheck --disablerepo=\* --enablerepo=epel,elastix-cd localinstall kernel-3.10.0-229.14.1.el7.x86_64.rpm kernel-devel-3.10.0-229.14.1.el7.x86_64.rpm #> reboot
安裝 RPM 檔
#> mount -o loop Elastix-4.0.74-Stable-x86_64-bin-10Feb2016.iso /mnt/ISO/ #> sed -n '/%packages/,/%end/p' /mnt/ISO/ks/anaconda-ks.cfg | sed '/^%/d' > elastix4-packages.lst #> yum -y --nogpgcheck --disablerepo=\* --enablerepo=epel,elastix-cd install $(cat elastix4-packages.lst | grep -v "^elastix\|RoundCubeMail\|freePBX\|lcdelastix\|wanpipe\|dahdi\|rhino" ) | tee yum-install-1.log #> systemctl start mariadb #> mysqladmin -u root -p password 'eLaStIx.2oo7' #> yum -y --nogpgcheck --disablerepo=\* --enablerepo=epel,elastix-cd install $(cat elastix4-packages.lst | grep "RoundCubeMail\|freePBX\|lcdelastix" ) | tee yum-install-2.log #> yum -y --nogpgcheck --disablerepo=\* --enablerepo=epel,elastix-cd install $(cat elastix4-packages.lst | grep "^elastix" | grep -v "elastix-pbx\|elastix-reports\|a2billing") | tee yum-install-3.log #> yum -y --nogpgcheck --disablerepo=\* --enablerepo=epel,elastix-cd install $(cat elastix4-packages.lst | grep "elastix-pbx\|elastix-reports\|a2billing") | tee yum-install-4.log #> systemctl enable mariadb #> systemctl enable httpd #> reboot #> /usr/bin/elastix-admin-passwords --init #> reboot
登入 SSH 後,如果 console 出現以下訊息,表示安裝成功;如果沒見到這訊息,很可能安裝不完整。
Welcome to Elastix
----------------------------------------------------
Elastix is a product meant to be configured through a web browser.
Any changes made from within the command line may corrupt the system
configuration and produce unexpected behavior; in addition, changes
made to system files through here may be lost when doing an update.
To access your Elastix System, using a separate workstation (PC/MAC/Linux)
Open the Internet Browser using the following URL:
http://xxx.xxx.xxx.xxx
如果沒出現上述訊息,試著執行以下指令,將管理密碼作初始化試試
/usr/bin/elastix-admin-passwords --init
管理介面的預設帳號密碼:admin / palosanto。
要修改密碼,執行以下指令
/usr/bin/elastix-admin-passwords --change
NOTE:重設密碼時,同時需要設定 MySQL 與 PBX 管理密碼。
- elastix4-packages.lst,這是利用安裝ISO檔內的 ks.cfg 篩選出需要安裝的套件清單。
- 所有套件必須分兩次安裝,不然會安裝失敗。先安裝 elastix-*、freePBX 以外的套件。
- elastix-admin-passwords 第一次啟動時必須執行一次這指令,用來設定 MySQL 與網頁管理的密碼。