Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    How to install Kopano on Ubuntu Server 18.04

    Kopano Groupware Core
    4
    27
    7578
    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.
    • thctlo
      thctlo last edited by

      Great ;-), Always remember me as in, thctlo is trying to help not flame… i do that for you also. ;-)

      Ok, yes, clear, im totaly pro dropping 32bit, saves lots of hassle… but some users still might want a 32bit version, think in the small media pc’s. like a Pi low power devices… I think a few years and 32bit is gone.

      If you provide a repo with 32 and 64bit package you must split these, if these are mixed, the package cant determine what to install and the install will fail.
      I have also a few 32bits servers. If i put all packages in one folder and done make the separation in arch, packages fail when installing. I provide Debian samba packages for people on the samba list, i also learned the hardway …
      that how i know for sure… The samba and debian devs are great help in learning things like this.

      1 Reply Last reply Reply Quote 0
      • hispeed
        hispeed last edited by hispeed

        Thanks for your answers.
        I downloaded now the 64bit version. It was a mistake (for me) I usually use 64 Bit.

        cd /tmp
        wget https://download.kopano.io/community/core:/core-8.6.80.760_0%2B90-Debian_9.0-amd64.tar.gz
        cd core-8.6.80.760_0+90-Debian_9.0-amd64
        

        Now I probably have to do this command:

        apt-ftparchive packages . | gzip -9c > Packages.gz && echo „deb file:$(pwd) ./“ > /etc/apt/sources.list.d/kopano.list”
        

        What do I need to write into (pwd) ? A password for the package?

        fbartels 1 Reply Last reply Reply Quote 0
        • fbartels
          fbartels Kopano @hispeed last edited by fbartels

          @hispeed said in How to install Kopano on Ubuntu Server 18.04:

          Debian_9.0-amd64

          but that is now Debian 9. not Ubuntu 18.04

          @hispeed said in How to install Kopano on Ubuntu Server 18.04:

          What do I need to write into (pwd) ? A password for the package?

          just leave it as it is. this part will be replaced by the current directory by bash (http://tldp.org/LDP/abs/html/commandsub.html).

          Regards Felix

          Resources:
          https://kopano.com/blog/how-to-get-kopano/
          https://documentation.kopano.io/
          https://kb.kopano.io/

          Support overview:
          https://kopano.com/support/

          hispeed 1 Reply Last reply Reply Quote 0
          • hispeed
            hispeed @fbartels last edited by hispeed

            Yes you’re right. So once again:

            cd /tmp
            wget https://download.kopano.io/community/core:/core-8.6.80.760_0%2B90-Ubuntu_18.04-amd64.tar.gz
            tar xfvz core-8.6.80.760_0+90-Ubuntu_18.04-amd64.tar.gz
            cd core-8.6.80.760_0+90-Ubuntu_18.04-amd64
            apt-ftparchive packages . | gzip -9c > Packages.gz && echo „deb file:$(pwd) ./“ > /etc/apt/sources.list.d/kopano.list”
            

            and now I need to start the installation…? Which command do I use now?

            When I do apt update:

            root@svgwma-kopa-01:/tmp/core-8.6.80.760_0+90-Ubuntu_18.04-amd64# apt update
            N: Datei »kopano.list”« in Verzeichnis »/etc/apt/sources.list.d/« wird ignoriert, da sie eine ungültige Dateinamen-Erweiterung hat.
            E: Typ »„deb« in Zeile 1 der Quellliste /etc/apt/sources.list.d/kopano.list ist unbekannt.
            E: Die Liste der Quellen konnte nicht gelesen werden.
            root@svgwma-kopa-01:/tmp/core-8.6.80.760_0+90-Ubuntu_18.04-amd64#
            
            1 Reply Last reply Reply Quote 0
            • thctlo
              thctlo last edited by

              look here : https://documentation.kopano.io/kopanocore_administrator_manual/installing.html#installation
              and if the repo works:

              apt install kopano-server-packages 
              
              1 Reply Last reply Reply Quote 0
              • thctlo
                thctlo last edited by thctlo

                and what i do after,

                RANDOMPASSWD(){ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo; } 
                

                or run this on CLI or put it in .bashrc ( and type source .bashrc or logout/login again )
                With the latest versions of kopano the (most) of the defaults are ok.

                After the install create the kopano database. Read the manual, or use this more easy way, in my optionion.

                ##### Setup the Database
                # Set a random mysql password.
                SQLDBPWD="$(RANDOMPASSWD)"
                ##### Create database and set rights. 
                mysql --defaults-file=/etc/mysql/debian.cnf -Bse "CREATE DATABASE dbkopano"; 
                mysql --defaults-file=/etc/mysql/debian.cnf -Bse "CREATE USER ukopano@localhost IDENTIFIED BY '$SQLDBPWD'";
                mysql --defaults-file=/etc/mysql/debian.cnf -Bse "GRANT all ON dbkopano.* TO 'ukopano'@'localhost' IDENTIFIED BY '$SQLDBPWD'";
                

                ukopano = user
                dbkopano = database name

                change the “secret key in kopano-presence”

                sed -i "s/#server_secret_key = GEHEIM/server_secret_key = $(RANDOMPASSWD)/" /etc/kopano/presence.cfg
                
                1 Reply Last reply Reply Quote 0
                • thctlo
                  thctlo last edited by thctlo

                  @fbartels, the above options can also be used to create the sql database at install.

                  1 Reply Last reply Reply Quote 0
                  • hispeed
                    hispeed last edited by

                    If I do your command for the installation I get this error:

                    root@svgwma-kopa-01:/tmp/core-8.6.80.760_0+90-Ubuntu_18.04-amd64# apt install kopano-server-packages
                    N: Datei »kopano.list”« in Verzeichnis »/etc/apt/sources.list.d/« wird ignoriert, da sie eine ungültige Dateinamen-Erweiterung hat.
                    E: Typ »„deb« in Zeile 1 der Quellliste /etc/apt/sources.list.d/kopano.list ist unbekannt.
                    E: Die Liste der Quellen konnte nicht gelesen werden.
                    N: Datei »kopano.list”« in Verzeichnis »/etc/apt/sources.list.d/« wird ignoriert, da sie eine ungültige Dateinamen-Erweiterung hat.
                    

                    So probably is something wrong with the repo. It’s a fresh installation and I have only installed LAMP. I have not made any other changes to the system.

                    1 Reply Last reply Reply Quote 0
                    • thctlo
                      thctlo last edited by thctlo

                      @hispeed

                      ok, i’ll make it more easy for you. Follow this to the letter.

                      mkdir -p /home/kopano/amd64
                      mv /tmp/core-8.6.80.760_0+90-Ubuntu_18.04-amd64/*.deb /home/kopano/amd64/
                      cd /home/kopano
                      apt-ftparchive packages amd64/ > amd64/Packages
                      echo "deb [trusted=yes] file:/home/kopano amd64/" > /etc/apt/sources.list.d/kopano-com.list
                      apt update
                      apt install kopano-server-packages
                      

                      That should do it.

                      Please note that after a reboot your /tmp is empty and the folder core-8.6.80… is gone and you wil have message on every apt update

                      1 Reply Last reply Reply Quote 0
                      • hispeed
                        hispeed last edited by

                        Unfortunately it is still not working. The problem must be in the following file:

                        /etc/apt/sources.list.d/kopano.list
                        „deb file:/home/kopano/amd64/core-8.6.80.760_0+90-Ubuntu_18.04-amd64 ./“
                        

                        This is the error i get:

                        root@svgwma-kopa-01:/home/kopano/amd64# apt update
                        N: Datei »kopano.list”« in Verzeichnis »/etc/apt/sources.list.d/« wird ignoriert, da sie eine ungültige Dateinamen-Erweiterung hat.
                        E: Typ »„deb« in Zeile 1 der Quellliste /etc/apt/sources.list.d/kopano.list ist unbekannt.
                        E: Die Liste der Quellen konnte nicht gelesen werden.
                        root@svgwma-kopa-01:/home/kopano/amd64# nano /etc/apt/sources.list.d/kopano.list
                        
                        1 Reply Last reply Reply Quote 0
                        • fbartels
                          fbartels Kopano last edited by

                          @hispeed the quotes in your posts look weird. maybe that is actual a unicode quote? I’d recommend to just copy & paste the above examples.

                          Regards Felix

                          Resources:
                          https://kopano.com/blog/how-to-get-kopano/
                          https://documentation.kopano.io/
                          https://kb.kopano.io/

                          Support overview:
                          https://kopano.com/support/

                          1 Reply Last reply Reply Quote 0
                          • hispeed
                            hispeed last edited by hispeed

                            I set up a new server again because i probably messed around to much.

                            So far everything is fine.

                            mkdir -p /home/kopano/amd64
                            cd /home/kopano/amd64
                            wget https://download.kopano.io/community/core:/core-8.6.80.760_0%2B90-Ubuntu_18.04-amd64.tar.gz
                            tar xfvz core-8.6.80.760_0+90-Ubuntu_18.04-amd64.tar.gz
                            cd core-8.6.80.760_0+90-Ubuntu_18.04-amd64
                            cd /home/kopano
                            apt-ftparchive packages amd64/ > amd64/Packages
                            echo "deb [trusted=yes] file:/home/kopano amd64/" > /etc/apt/sources.list.d/kopano-com.list
                            apt update
                            apt install kopano-server-packages
                            
                            

                            @fbartels you wrote about the " which were looking strange to you. It comes from copy paste from your comment:

                            https://www.pc-howto.com/kopano-der-neue-stern-am-groupwarehimmel-teil-1/#comment-152876

                            Thanks for your help, Core installation successfull with those steps.

                            1 Reply Last reply Reply Quote 0
                            • thctlo
                              thctlo last edited by

                              Good to see it works now.

                              So the full “copy past part” is the following for others…
                              And you only need to change the filename/version for new versions.

                              if [ ! -d /home/kopano/amd64 ]
                              then
                                   mkdir -p /home/kopano/amd64
                              fi
                              cd /home/kopano/
                              
                              wget https://download.kopano.io/community/core:/core-8.6.80.760_0%2B90-Ubuntu_18.04-amd64.tar.gz
                              tar xfvz core-8.6.80.760_0%2B90-Ubuntu_18.04-amd64.tar.gz
                              mv core-8.6.80.760_0+90-Ubuntu_18.04-amd64/*.deb /home/kopano/amd64/
                              
                              apt-ftparchive packages amd64/ > amd64/Packages
                              if [ ! -f /etc/apt/sources.list.d/kopano-com.list ]
                              then
                                  echo "deb [trusted=yes] file:/home/kopano amd64/" > /etc/apt/sources.list.d/kopano-com.list
                              fi
                              
                              apt update
                              apt install kopano-server-packages
                              

                              @ fbartels
                              To make the community package better accessable. How about. this.

                              getting the latest version not with:
                              wget https://download.kopano.io/community/core:/core-8.6.80.760_0%2B90-Ubuntu_18.04-amd64.tar.gz
                              but with :
                              wget https://download.kopano.io/community/core:/core-8.6-latest-Ubuntu_18.04-amd64.tar.gz

                              This simplies getting the latest much.
                              Just an idee.

                              fbartels 1 Reply Last reply Reply Quote 0
                              • fbartels
                                fbartels Kopano @thctlo last edited by

                                @thctlo said in How to install Kopano on Ubuntu Server 18.04:

                                This simplies getting the latest much.

                                you could also do it dynamically. e.g. like curl -L `lynx -listonly -nonumbers -dump https://download.kopano.io/community/core:/ | grep Ubuntu_16.04-amd64.tar.gz` | tar -xz --strip-components 1 -f -

                                Regards Felix

                                Resources:
                                https://kopano.com/blog/how-to-get-kopano/
                                https://documentation.kopano.io/
                                https://kb.kopano.io/

                                Support overview:
                                https://kopano.com/support/

                                1 Reply Last reply Reply Quote 0
                                • thctlo
                                  thctlo last edited by

                                  Thank you very much, thats a nice one to know.
                                  Any tips on … preventing downloading the same file again with this… :-),

                                  When my get all community files script is ready i’ll post it on the forum.
                                  I was at 99% and … i acedently deleted it… back to the old version and change it again.

                                  mhope 1 Reply Last reply Reply Quote 0
                                  • mhope
                                    mhope @thctlo last edited by

                                    @thctlo Hello,
                                    did you succeed in writing a script which downloads and installes the community files?
                                    I’m trying to install the community version on a fresh ubuntu 18.04 vm and am referring to the documentation.
                                    I was wondering, because no default configuration files where present in the /etc/kopano folder after installing all .deb packages.
                                    Therefore I’d like to try your script.
                                    Best regards,
                                    Marco

                                    fbartels 1 Reply Last reply Reply Quote 0
                                    • fbartels
                                      fbartels Kopano @mhope last edited by

                                      @mhope said in How to install Kopano on Ubuntu Server 18.04:

                                      because no default configuration files where present in the /etc/kopano folder

                                      this is expected as explained in https://documentation.kopano.io/kopanocore_administrator_manual/configure_kc_components.html#configure-the-kopano-server

                                      Regards Felix

                                      Resources:
                                      https://kopano.com/blog/how-to-get-kopano/
                                      https://documentation.kopano.io/
                                      https://kb.kopano.io/

                                      Support overview:
                                      https://kopano.com/support/

                                      mhope 1 Reply Last reply Reply Quote 0
                                      • mhope
                                        mhope @fbartels last edited by

                                        @fbartels Thank you very much for your quick response! I’ll refer to the manual.
                                        Best regards,

                                        Marco

                                        1 Reply Last reply Reply Quote 0
                                        • thctlo
                                          thctlo last edited by

                                          Hai,

                                          Yes, the scripts im using is fine now, but it only installs and setups a repo.
                                          and thanks Felix for the curl example. :-)
                                          im using now.

                                          But as fbartels (felix) is saying, use the manual to configure.
                                          That what i also do.

                                          All what this script do is, give you the option to
                                          apt-get install …

                                          #!/bin/bash
                                          
                                          # Kopano communtiy package downloader
                                          # you run it, it get the lastest versions and your ready to install kopano.
                                          # a local file repo is create, which you can use for a webserver also.
                                          
                                          
                                          KOPANO_COMMUNITIE_URL="https://download.kopano.io/community"
                                          KOPANO_COMMUNITIE_PKG="core archiver deskapp files mdm smime webapp webmeetings"
                                          # these need some extra love..   
                                          # mattermost kapp konnect kweb libkcoidc mattermost-plugin-kopanowebmeetings mattermost-plugin-notifymatters  
                                          
                                          # dont change the base once its set.
                                          # if you do you need to change the the file:
                                          #  /etc/apt/sources.list.d/local-file.list also.
                                          BASE_FOLDER=/home/kopano
                                          
                                          # a subfolder in kopano.
                                          KOPANO_EXTRACT2FOLDER="apt"
                                          
                                          
                                          #### Program
                                          if [ ! -d $BASE_FOLDER ]
                                          then
                                              mkdir $BASE_FOLDER
                                              cd $BASE_FOLDER
                                          else
                                              cd $BASE_FOLDER
                                          fi
                                          
                                          # apt-get install curl lynx --no-install-recommendsd
                                          OSNAME="$(lsb_release -si)"
                                          OSDIST="$(lsb_release -sc)"
                                          OSDISTVER="$(lsb_release -sr)"
                                          OSDISTVER0="$(lsb_release -sr|cut -c1).0"
                                          
                                          if [ "${OSNAME}" = "Debian" ]
                                          then
                                              # Needed for Kopano Community ( used Debian_9.0 )
                                              GET_OS="${OSNAME}_${OSDISTVER0}"
                                          else
                                              # For ubuntu results in Ubuntu_18.04
                                              GET_OS="${OSNAME}_${OSDISTVER}"
                                          fi
                                          
                                          GET_ARCH="$(dpkg --print-architecture)"
                                          
                                          for pkglist in $KOPANO_COMMUNITIE_PKG
                                          do
                                              if [ "${pkglist}" = "files" ]||[ "${pkglist}" = "mdm" ]||[ "${pkglist}" = "webapp" ]
                                              then
                                                  echo "Getting and extracting $pkglist to ${KOPANO_EXTRACT2FOLDER}. ( -all ) "
                                                  curl -q -L $(lynx -listonly -nonumbers -dump "${KOPANO_COMMUNITIE_URL}/${pkglist}:/" | grep "${GET_OS}-all".tar.gz) \
                                                  | tar -xz -C ${KOPANO_EXTRACT2FOLDER} --strip-components 1 -f -
                                              else
                                                  echo "Getting and extracting $pkglist to ${KOPANO_EXTRACT2FOLDER}. ( -${GET_ARCH} ) "
                                                  curl -q -L $(lynx -listonly -nonumbers -dump "${KOPANO_COMMUNITIE_URL}/${pkglist}:/" | grep "${GET_OS}-${GET_ARCH}".tar.gz) \
                                                  | tar -xz -C ${KOPANO_EXTRACT2FOLDER} --strip-components 1 -f -
                                              fi
                                          done
                                          
                                          if [ ! -d $KOPANO_EXTRACT2FOLDER ]
                                          then
                                              mkdir $KOPANO_EXTRACT2FOLDER
                                              cd $KOPANO_EXTRACT2FOLDER
                                          else
                                              cd $KOPANO_EXTRACT2FOLDER
                                          fi
                                          
                                          if [ "${GET_ARCH}" = "amd64" ]; then
                                              if [ ! -d amd64 ]; then
                                                  mkdir amd64
                                              elif [ "${GET_ARCH}" == "i386" ] || [ "${GET_ARCH}" == "i686" ]; then
                                                  if [ ! -d i386 ]; then
                                                      mkdir i386
                                                  fi
                                              fi
                                          fi
                                          # Create arch based folder.
                                          if [ "${GET_ARCH}" = "amd64" ]; then
                                              mv -n *_amd64.deb amd64/
                                              mv -n *_all.deb amd64/
                                              rm *.deb
                                          elif [ "${GET_ARCH}" == "i386" ] || [ "${GET_ARCH}" == "i686" ]; then
                                              mv -n *_i386.deb i386/
                                              mv -n *_all.deb i386/
                                              rm *.deb
                                          fi
                                          
                                          # Create the Packages file so apt knows what to get.
                                          apt-ftparchive packages ${GET_ARCH}/ > ${GET_ARCH}/Packages
                                          
                                          if [ ! -e /etc/apt/sources.list.d/kopano-community.list ]
                                          then
                                              echo "# file repo format " > /etc/apt/sources.list.d/kopano-community.list
                                              echo "deb [trusted=yes] file:${BASE_FOLDER}/${KOPANO_EXTRACT2FOLDER}/ ${GET_ARCH}/" >> /etc/apt/sources.list.d/kopano-community.list
                                              echo "# webserver format" >> /etc/apt/sources.list.d/kopano-community.list
                                              echo "#deb [trusted=yes] http://localhost/apt ${GET_ARCH}/" >> /etc/apt/sources.list.d/kopano-community.list
                                              echo "installed file /etc/apt/sources.list.d/kopano-community.list"
                                              apt-get update -y
                                          else
                                              apt-get update -y
                                          fi
                                          
                                          # and show some versions.
                                          apt-cache policy kopano-server-packages
                                          
                                          mhope 1 Reply Last reply Reply Quote 0
                                          • mhope
                                            mhope @thctlo last edited by

                                            @thctlo Thank you very much. This makes installation of the community-packages much easier. I’m looking forward to a running a working kopano-installation on my Ubuntu 18.04 VM.

                                            Best regards,

                                            Marco

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post