ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    My trials of installing FreePBX

    Scheduled Pinned Locked Moved IT Discussion
    linuxfreepbxcloudatcostasteriskcentos 6
    57 Posts 6 Posters 21.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DashrenderD
      Dashrender
      last edited by Dashrender

      Here the second omission in the instructions. They don't tell you to change the directory before downloading FreePBX. I will include it here.

      cd /usr/src
      wget http://mirror.freepbx.org/freepbx-12.0.3.tgz
      tar vxfz freepbx-12.0.3.tgz
      

      Change some permissions

      chown asterisk. /var/run/asterisk
      chown -R asterisk. /etc/asterisk
      chown -R asterisk. /var/{lib,log,spool}/asterisk
      chown -R asterisk. /usr/lib/asterisk
      chown -R asterisk. /usr/lib64/asterisk
      mkdir /var/www/html
      chown -R asterisk. /var/www/
      

      Output

      # chown asterisk. /var/run/asterisk
      # chown -R asterisk. /etc/asterisk
      # chown -R asterisk. /var/{lib,log,spool}/asterisk
      chown -R asterisk. /usr/lib/asterisk
      chown -R asterisk. /usr/lib64/asterisk
      mkdir /var/www/html
      # chown -R asterisk. /usr/lib/asterisk
      chown: cannot access `/usr/lib/asterisk': No such file or directory
      # chown -R asterisk. /usr/lib64/asterisk
      # mkdir /var/www/html
      mkdir: cannot create directory `/var/www/html': File exists
      # chown -R asterisk. /var/www/
      

      Odd that there is no /usr/lib/asterisk - so I'll just make a mental note
      the /var/www/html directory already exists - so no big deal

      1 Reply Last reply Reply Quote 0
      • DashrenderD
        Dashrender
        last edited by Dashrender

        A few mods to Apache

        sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php.ini
        cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_orig
        sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/httpd/conf/httpd.conf
        service httpd restart
        

        Output
        Stopping httpd: [ OK ]
        Starting httpd: httpd: apr_sockaddr_info_get() failed for c1115759-27921.cloudatcost.com
        httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
        [ OK ]

        I'm going to have to fix apache so it knows it's FQDN

        1 Reply Last reply Reply Quote 0
        • DashrenderD
          Dashrender
          last edited by Dashrender

          Configure Asterisk database in MYSQL

          cd /usr/src/freepbx
          export ASTERISK_DB_PW=amp109
          mysqladmin -u root create asterisk 
          mysqladmin -u root create asteriskcdrdb
          

          And set permissions on dbs

          mysql -u root -e "GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"
          mysql -u root -e "GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY '${ASTERISK_DB_PW}';"
          mysql -u root -e "flush privileges;"
          

          Start Asterisk and install FreePBX

          cd /usr/src/freepbx
          ./start_asterisk start
          ./install_amp --installdb --username=asteriskuser --password=${ASTERISK_DB_PW}
          

          Output

          Checking for PEAR DB..OK
          Checking for PEAR Console::Getopt..OK
          Using username: asteriskuser
          Using password: ******
          Checking user..OK
          Checking if Asterisk is running..running with PID: 11666..OK
          Checking for /etc/amportal.conf../etc/amportal.conf does not exist, copying default
          Creating new /etc/amportal.conf
          Enter your USERNAME to connect to the 'asterisk' database:
           [asteriskuser]
          Enter your PASSWORD to connect to the 'asterisk' database:
           [amp109]
          Enter the hostname of the 'asterisk' database:
           [localhost]
          Enter a USERNAME to connect to the Asterisk Manager interface:
           [admin]
          Enter a PASSWORD to connect to the Asterisk Manager interface:
           [amp111]
          Enter the path to use for your AMP web root:
           [/var/www/html]
          
          PHP Warning:  mkdir(): File exists in /usr/src/freepbx/libfreepbx.install.php on line 197
          [FATAL] Cannot create /var/www/html!
          

          Pressing on (the following commands failed because FreePBX didn't do something right (only error noted above - according the instructions on FreePBX.org you can simply re run the install -
          ./install_amp --installdb --username=asteriskuser --password=${ASTERISK_DB_PW})

          amportal chown
          amportal a ma installall
          amportal a reload
          amportal a ma refreshsignatures
          amportal chown
          

          And now the system doesn't know amportal command

          OK I ran the ./install_amp command again and now amportal commands are working.

          Another mod for FreePBX, then we can start it

          ln -s /var/lib/asterisk/moh /var/lib/asterisk/mohmp3
          amportal restart
          

          Add the Commercial Modules repos

          cd /usr/src
          wget -P /etc/yum.repos.d/ -N http://yum.schmoozecom.net/schmooze-commercial/schmooze-commercial.repo
          yum clean all
          yum -y install php-5.3-zend-guard-loader sysadmin fail2ban incron ImageMagick
          service httpd restart
          amportal a ma download sysadmin
          amportal a ma install sysadmin
          
          1 Reply Last reply Reply Quote 0
          • DashrenderD
            Dashrender
            last edited by

            And now launching the web portal for the first time.

            FPBX-first-screen.JPG

            1 Reply Last reply Reply Quote 0
            • DashrenderD
              Dashrender
              last edited by Dashrender

              As you can see the system isn't setup to listen to FreePBX's .htaccess files so we have to enable the override to allow these to work.

              vi /etc/httpd/conf/httpd.conf
              

              find the line <Directory "/var/www/html"> then local AllowOverride about 14 lines down.
              Change AllowOverride = None to AllowOverride = All

              Save and quit. now reload httpd

              service httpd restart
              
              1 Reply Last reply Reply Quote 0
              • DashrenderD
                Dashrender
                last edited by

                Awesome - that worked.

                Nice clean console now..

                FPBX-second-screen.JPG

                1 Reply Last reply Reply Quote 0
                • DashrenderD
                  Dashrender
                  last edited by

                  Time for Server level SIP settings

                  Click on Settings at the top > Asterisk SIP settings

                  Type in your external IP address (or if the server is directly on the internet, click the Detect External IP)

                  Type in the range for your internal networks

                  Click Submit at the bottom to save the changes.

                  1 Reply Last reply Reply Quote 0
                  • DashrenderD
                    Dashrender
                    last edited by

                    OK Hubtech is holding my feet to the fire on these instructions... I need some tweaks I guess.

                    1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller
                      last edited by

                      Before doing all of this, did you try the official one line installation method?

                      https://gist.github.com/monobilisim/7812605

                      Just copy that script to your machine and run. Have not tested it personally, but it is from the vendor.

                      DashrenderD 1 Reply Last reply Reply Quote 0
                      • DashrenderD
                        Dashrender @scottalanmiller
                        last edited by

                        @scottalanmiller said:

                        Before doing all of this, did you try the official one line installation method?

                        https://gist.github.com/monobilisim/7812605

                        Just copy that script to your machine and run. Have not tested it personally, but it is from the vendor.

                        That distro is OLD

                        FreePBX Distro 5.211.65

                        1 Reply Last reply Reply Quote 0
                        • scottalanmillerS
                          scottalanmiller
                          last edited by

                          Maybe the script still works, though. Haven't looked through it, is it version dependent?

                          ? 1 Reply Last reply Reply Quote 0
                          • ?
                            A Former User @scottalanmiller
                            last edited by

                            @scottalanmiller said:

                            Maybe the script still works, though. Haven't looked through it, is it version dependent?

                            how would one test this out. i'll give it a shot

                            ? DashrenderD 2 Replies Last reply Reply Quote 1
                            • ?
                              A Former User @A Former User
                              last edited by

                              @Hubtech said:

                              @scottalanmiller said:

                              Maybe the script still works, though. Haven't looked through it, is it version dependent?

                              how would one test this out. i'll give it a shot

                              Run it and see what happens. It does specifically install Asterisk 11 though. 13 is the current.

                              1 Reply Last reply Reply Quote 1
                              • DashrenderD
                                Dashrender @A Former User
                                last edited by

                                @Hubtech said:

                                @scottalanmiller said:

                                Maybe the script still works, though. Haven't looked through it, is it version dependent?

                                how would one test this out. i'll give it a shot

                                from a new install, download that script and where ever you put it type ./freepbx-install.sh assuming you named the file that.

                                1 Reply Last reply Reply Quote 1
                                • DanpD
                                  Danp
                                  last edited by

                                  Found a newer version: https://gist.github.com/monobilisim/6f0502c0232d9bf245fb

                                  DashrenderD 1 Reply Last reply Reply Quote 2
                                  • DashrenderD
                                    Dashrender @Danp
                                    last edited by

                                    @Danp said:

                                    Found a newer version: https://gist.github.com/monobilisim/6f0502c0232d9bf245fb

                                    OK just re-imaged one of my other C@C servers and am running this script now.

                                    1 Reply Last reply Reply Quote 0
                                    • JaredBuschJ
                                      JaredBusch
                                      last edited by

                                      @Dashrender just wiped my C@C install to try this. We'll see if anything distracts me before I get done.

                                      1 Reply Last reply Reply Quote 0
                                      • JaredBuschJ
                                        JaredBusch
                                        last edited by JaredBusch

                                        well i would be starting on this is it ever finished reimaging...

                                        hah, and it completed ... now on to the setup.

                                        1 Reply Last reply Reply Quote 0
                                        • DashrenderD
                                          Dashrender
                                          last edited by

                                          I've already been distracted by my google voice problem.

                                          1 Reply Last reply Reply Quote 0
                                          • JaredBuschJ
                                            JaredBusch
                                            last edited by JaredBusch

                                            Okay, All kinds of problems with that script.

                                            I've cloned the git repo and will work on it.

                                            This is why you had so many problems.

                                            I've been wanting to spin up FreePBX anyway.

                                            DashrenderD 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 3 / 3
                                            • First post
                                              Last post