Install PIAF2 on VPS(CentOS 6)

    版本為 12:22, 15 Nov 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    Install PIAF 2.0.6.5.0 on existing CentOS of a VPS

    系統環境:CentOS 6.4 64-bit

    升級作業系統

    將 CentOS 升級至 6.5

    # yum update
    # reboot
    

    下載 PIAF2 ISO 檔

    下載位址: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-Media.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
    
    Powered by MindTouch Core