.. _installation: 3. Installation =============== CGRateS can be installed via packages as well as Go automated source install. We recommend using source installs for advanced users familiar with Go programming and packages for users not willing to be involved in the code building process. 3.1. Using packages ~~~~~~~~~~~~~~~~~~~ Depending on the packaged distribution, following methods are available: 3.1.1. Debian ------------- This is for the moment the only packaged and the most recommended to use method to install CGRateS. CGRateS development team maintains official debian packages out of master branch, released under nightly tag in aptitude. There are two main ways of installing the maintained packages: 3.1.1.1. Aptitude repository ++++++++++++++++++++++++++++ Add the gpg key: :: sudo wget -O - http://apt.cgrates.org/apt.cgrates.org.gpg.key | sudo apt-key add - Add the repository in apt sources list: :: echo "deb http://apt.cgrates.org/debian/ nightly main" | sudo tee /etc/apt/sources.list.d/cgrates.list Update & install: :: sudo apt-get update sudo apt-get install cgrates Once the installation is completed, one should perform the :ref:`post-install` section in order to have the CGRateS properly set and ready to run. After *post-install* actions are performed, CGRateS will be configured in **/etc/cgrates/cgrates.json** and enabled in **/etc/default/cgrates**. 3.1.1.2. Manual installation of .deb package out of archive server ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Run the following commands: :: wget http://pkg.cgrates.org/debian/master/cgrates_current_amd64.deb dpkg -i cgrates_current_amd64.deb As a side note on http://pkg.cgrates.org one can find an entire archive of CGRateS packages. 3.1.2. Redhat/Fedora/CentOS ------------- There are two main ways of installing the maintained packages: 3.1.2.1. YUM repository ++++++++++++++++++++++++++++ To install CGRateS out of YUM execute the following commands :: sudo tee -a /etc/yum.repos.d/cgrates.repo > /dev/null <