Install PIAF 2.0.6.5.0 on existing CentOS of a VPS
系統環境:CentOS 6.4 64-bit
下載位址:http://sourceforge.net/projects/pbxinaflash/files/ ,下載目錄 PIAF-2.0.6.5.0-CentOS-6.5。
# cd ~ # wget -O pbxinaflash20650-x86_64.iso "http://sourceforge.net/projects/pbxinaflash/files/PIAF-2.0.6.5.0-CentOS-6.5/pbxinaflash20650-x86_64.iso/download" # mkdir /mnt/iso # mount -o loop pbxinaflash20650-x86_64.iso /mnt/iso
編輯套件庫位址
# cat << "EOF" > /etc/yum.repos.d/CentOS-Local.repo [c6-local] name=CentOS-$releasever - Media baseurl=file:///mnt/iso/ gpgcheck=0 enabled=0 EOF
使用 ISO 內的套件檔作以下安裝
# yum --disablerepo=\* --enablerepo=c6-local downgrade krb5-libs mysql-libs python \ glib2 openssl python-libs curl libxml2 libcurl libtasn1 glibc glibc-common # yum --disablerepo=\* --enablerepo=c6-local upgrade # yum --disablerepo=\* --enablerepo=c6-local groupinstall \ additional-devel base cifs-file-server compat-libraries \ console-internet core debugging development mail-server \ ftp-server hardware-monitoring java-platform legacy-unix \ mysql network-file-system-client network-tools php performance \ perl-runtime security-tools server-platform server-policy \ system-management system-admin-tools web-server # yum --disablerepo=\* --enablerepo=c6-local install \ kernel-devel php php-mysql php-gd php-mbstring php-pear \ php-pear-db perl perl-libwww-perl perl-DateManip perl-DBD-mysql \ perl-DBI perl-Net-DNS perl-suidperl perl-XML-Parser \ audiofile-devel dhcp gd lm_sensors libusb-devel mysql-devel \ gcc-c++ flite flite-devel automake xinetd tftp-server piafdl \ piafxtras joe gtk2 gtk2-devel arts arts-devel esound-devel \ jack-audio-connection-kit lcms libart_lgpl-devel libogg-devel \ libvorbis-devel nas pulseaudio-libs SDL alsa-lib-devel libmng \ libtool-ltdl libtool-ltdl-devel qt dialog coreutils sqlite-devel \ libstdc++-devel tzdata ntp ntpdate php-process php-imap php-xml # yum install krb5-libs mysql-libs python glib2 openssl python-libs \ curl libxml2 libcurl libtasn1 glibc glibc-common
更新系統時間
/usr/sbin/ntpdate -su pool.ntp.org
新增需要的檔案目錄
mkdir -p /etc/pbx mkdir -p /etc/viaf mkdir -p /etc/siaf mkdir -p /etc/xiaf mkdir -p /etc/yiaf mkdir -p /etc/ciaf mkdir -p /etc/fiaf mkdir -p /etc/miaf date --iso-8601=minutes > /etc/pbx/.installdate date --iso-8601=minutes > /etc/viaf/.installdate date --iso-8601=minutes > /etc/siaf/.installdate date --iso-8601=minutes > /etc/xiaf/.installdate date --iso-8601=minutes > /etc/yiaf/.installdate date --iso-8601=minutes > /etc/ciaf/.installdate date --iso-8601=minutes > /etc/fiaf/.installdate date --iso-8601=minutes > /etc/miaf/.installdate echo "20650" > /etc/pbx/.isoversion echo "20650" > /etc/viaf/.isoversion echo "20650" > /etc/siaf/.isoversion echo "20650" > /etc/xiaf/.isoversion echo "20650" > /etc/yiaf/.isoversion echo "20650" > /etc/ciaf/.isoversion echo "20650" > /etc/fiaf/.isoversion echo "20650" > /etc/miaf/.isoversion echo "ks" > /etc/pbx/.installmethod echo "ks" > /etc/viaf/.installmethod echo "ks" > /etc/siaf/.installmethod echo "ks" > /etc/xiaf/.installmethod echo "ks" > /etc/yiaf/.installmethod echo "ks" > /etc/ciaf/.installmethod echo "ks" > /etc/fiaf/.installmethod echo "ks" > /etc/miaf/.installmethod
其他一些設定
cp -f /usr/src/piafxtras/preinstallmenu/piafxtras-menu /usr/local/sbin/piafxtras-menu chmod +x /usr/local/sbin/piafxtras-menu # Ignore any error message for this command: rpm -e readahead # Note: Your "/etc/ssh/sshd_config" will be overwritten after the command below. # Do NOT change SSH port at this time, because PIAF IPTables rules allow only port 22 /usr/local/sbin/newparadigm.sh # These may be needed if you use other VPS but NOT on DigitalOcean: # sed -i 's|quiet||' /boot/grub/grub.conf # sed -i 's|rhgb||' /boot/grub/grub.conf # sed -i 's/[ ]*$//' /boot/grub/grub.conf # sed -i '/vmlinuz-2.6/ s|$| vga=791 |' /boot/grub/grub.conf
[optional] 如果要使用 Travelin' Man 功能,須邀安裝套件 bind-utils
yum install bind-utils
關閉 SELinux & IPtables
sed -i 's/SELINUX=.*$/SELINUX=disabled/' /etc/selinux/config chkconfig iptables off
重新開機
umount /mnt/iso reboot
重開機再登入後,應該要出現這訊息
*******************************************************
* Please make a selection A, B or C only! *
* A = Continue with the installation of our products *
* B = Load extra drivers for your hardware *
* C = Command Line Interface *
*******************************************************
輸入 A > 選擇 PIAF > 使用合約 YES > 選擇要安裝的類型:Green-PIAF - Asterisk 11/Dahdi
NOTE:
幾分鐘以後,
1. 需要按 Enter 兩次
2. 詢問 是否啟用進階設定,選擇 No
3. 不要使用 make menuconfig,選擇 Y
4. 時區設定,按 Enter 用預設(以後再來調整)
5. 輸入 Y 繼續
6. FreePBX 版本,選擇 3. FreePBX 2.11
7. 輸入 Y 繼續
8. 按 Enter 繼續
9. 輸入提示字元,進入密碼設定
10. 輸入 B 開始手動設定密碼,密碼要包含英文與數字
11. 顯示設定總表,如果沒問題,按 Enter 繼續安裝去喝一杯咖啡,安裝會需要一些時間。
安裝完成後,系統會自動重新啟動。
登入系統後,在 Console 畫面應該要顯示所有服務都是 ONLINE,否則就要重新安裝。
使用 ISO 作系統升級時,遇到以下錯誤:
Error: Package: gtk2-immodule-xim-2.18.9-12.el6.x86_64 (@anaconda-CentOS-201303020151.x86_64/6.4)
Requires: gtk2 = 2.18.9-12.el6
Removing: gtk2-2.18.9-12.el6.x86_64 (@anaconda-CentOS-201303020151.x86_64/6.4)
gtk2 = 2.18.9-12.el6
Updated By: gtk2-2.20.1-4.el6.x86_64 (c6-local)
gtk2 = 2.20.1-4.el6
Ans:這是因為 ISO 檔內缺少 gtk2-immodule-xim 套件升級檔,使用網路方式,先升級這個套件。
# yum update gtk2-immodule-xim
Error: kernel conflicts with bfa-firmware-3.0.3.1-1.el6.noarch
Ans:ISO 檔內缺少 bfa-firmware 套件升級檔
yum update bfa-firmware
Images 0 | ||
---|---|---|
No images to display in the gallery. |