OpenBTS: Build OpenBTS 4.0: Difference between revisions

From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs)
New page: Sumber: https://github.com/RangeNetworks/dev/wiki Development Environment Use this section to setup a development environment that is identical to those used internally at Range Networ...
 
Onnowpurbo (talk | contribs)
 
(46 intermediate revisions by the same user not shown)
Line 2: Line 2:




==Persiapan Environment==


Development Environment
'''* Siapkan Ubuntu Server 32 bit 12.04.'''
** SSH terinstalasi & beroperasi
** username openbts
** password openbts


Use this section to setup a development environment that is identical to those used internally at Range Networks. We are working to support other development environments setups in the future but this one is guaranteed to work.
* Ada sambungkan ke [[Internet]] untuk men-download [[source code]].
Install Base Operating System


If you're already running Ubuntu Desktop or Server 32-bit 12.04, you can skip this section.
* Sebaiknya IP address yang digunakan 192.168.0.21 & 192.168.0.22


    download Ubuntu Server 32-bit 12.04.4 LTS from here
* Instalasi aplikasi pendukung
    boot the .iso on a fresh machine (VMWare virtual machines are also often used)
    select "English" for language
    press F4
    select "Install a minimal system" from install type
    select "Install Ubuntu Server" from main menu
    select your language
    select your country
    use keyboard layout auto-detection or select the country and layout
    enter a hostname
    enter "openbts" for "full name for the new user"
    enter "openbts" for "username for your account"
    enter and confirm a password for the openbts account
    select "no" to "Encrypt your home directory?"
    select "Guided - Use Entire Disk" for "Partitioning method"
    select/confirm the disk you'd like to use
    select "yes" to "Write the changes to disks?"
    enter nothing for "HTTP Proxy" and select continue
    select "No automatic updates"
    toggle OpenSSH on in "Software selection"
    select "continue"
    select "yes" to "Install the GRUB boot loader on a hard disk"
    select "continue" to "Finish the installation"


Update Git
sudo apt-get install m4 autoconf autotools-dev automake libsqlite3-dev sqlite3 libssl-dev libssl-doc zlib1g-dev \
build-essential dh-apparmor dpkg-dev fakeroot g++ g++-4.6 gettext html2text intltool-debian libalgorithm-diff-perl \
libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl libgettextpo0 libmail-sendmail-perl libstdc++6-4.6-dev \
libsys-hostname-long-perl libunistring0 dh-apparmor dpkg-dev fakeroot g++ g++-4.6 gettext \
html2text intltool-debian dh-translations intltool libxml-parser-perl python-scour libsqlite0 libsqlite0-dev \
libodbc1 odbcinst odbcinst1debian2 unixodbc-dev python-software-properties


The OpenBTS project utilizes several new features in Git. To make sure your client is compatible (e.g. newer than 1.8.2), perform the following.
==Update Git==


$ sudo add-apt-repository ppa:git-core/ppa
Pastikan menggunakan git versi terakhir
(press enter to continue)
$ sudo apt-get update
$ sudo apt-get install git


Once you have git installed, most of the remaining installation process is automated via scripts.
sudo apt-get install python-software-properties
Downloading
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git


Several software components are needed to actually create a usable mobile network. To efficiently manage them, we've prepared some scripts to automate the clone, pull, branch and build operations.
==Download Tool==
Tools


From the command line in your fresh development environment, execute the following to download the most recent set of tools:
Check versi git, misalnya


  $ git clone https://github.com/RangeNetworks/dev.git
  git --version


Before proceeding, these tools require that you are using a modern version of Git (>1.8.2). Check now if you are:
hasilnya pastikan >1.8.2


  $ git --version
  git version 2.3.1
git version 1.9.1


Components


This development scripts assume that you have SSH keys set up for GitHub. If you do not, please follow these instructions to set them up before proceeding.
download tool development terbaru


Now, to download all of the components simply run the clone.sh script.
rm -Rf /usr/local/src/dev
cd /usr/local/src
git clone https://github.com/RangeNetworks/dev.git


$ cd dev
==Download Source Code==
$ ./clone.sh


Selecting a Branch or Tag
Proses download [[source code]] menggunakan SSH secara automatis login. Ini hanya bisa dilakukan jika kita sudah
[[OpenBTS: Generating SSH Key untuk GitHub | generate SSH key untuk GitHub]].
Lakukan [[OpenBTS: Generating SSH Key untuk GitHub | generate SSH key untuk GitHub]] sebelum melakukan perintah di bawah ini.


Before building, you should choose which branch or tag you'd like to compile using switchto.sh.


  $ ./switchto.sh master
  cd /usr/local/src/dev
(or)
  ./clone.sh
$ ./switchto.sh 4.0
(or)
  $ ./switchto.sh v4.0.0


Building
==Build==


The build.sh script will automatically install any build dependencies (building them manually when required). After dependencies are taken care of, each component is compiled into an installable package.


$ ./build.sh
Kita perlu memilih branch yang akan di compile menggunakan switchto.sh.
'''Sebaiknya pilih branch MASTER terlebih dulu'''


Compiled packages are now in a new directory named BUILD-sometimestamp.
Untuk RangeNetworks RAD1
Installing


Use dpkg to install the fresh packages (this will complain about dependencies):
./switchto.sh master
./build.sh SDR1
cd  BUILDS/2015-03-06--06-12-58/
dpkg -i *.deb
sudo apt-get -f install


$ sudo dpkg -i BUILD-timestamp/*.deb
Packages yang berhasil di compile ada di


To have Aptitude resolve the dependencies, execute the following:
BUILDS/tanggal-jam-menit-detik/
BUILDS/2015-03-05--11-58-24/  (contoh)


$ sudo apt-get -f install
Jika ingin branch yang lebih tinggi lakukan


When prompted about overwriting existing configuration files, use your own judgement. It is recommended to overwrite all files to make sure things work out of the box. However, overwriting /etc/network/interfaces will set your system to a static IP instead of whatever you had configured previously.
./switchto.sh 4.0
Running
./build.sh SDR1


Each component has an Upstart service definition for Ubuntu. To start all the required services, execute the following:
Naga-naganya lebih aman menggunakan master.


$ sudo start sipauthserve
==Install==
$ sudo start smqueue
$ sudo start openbts
$ sudo start asterisk


Conversely, to stop them:
Gunakan dpkg untuk menginstalasi package (ini akan complain depedencies):


  $ sudo stop sipauthserve
  sudo dpkg -i BUILDS/2015-03-05--11-58-24/*.deb
$ sudo stop smqueue
$ sudo stop openbts
$ sudo stop asterisk


Exploring
atau


placeholder
cd /usr/local/src/dev/BUILDS/2015-03-05--11-58-24/
dpkg -i *.deb


Gunakan aptitude untuk mengatasi masalah dependencies


sudo apt-get -f install


Jika di tanya tentang overwrite file konfigurasi, anda harus menentukan. Sangat disarankan untuk overwrite semua file konfigurasi agar jalan dengan baik.


Overwrite /etc/network/interfaces akan menset menjadi sebuah [[IP]] statik yang berbeda dari yang sebelumnya.


==Running==
Seharusnya bisa lebih manusiawi menggunakan perintah berikut, entah kenapa tidak jalan,
sudo start sipauthserve
sudo start smqueue
sudo start openbts
sudo start asterisk
Untuk men-stop jalankan perintah:
sudo stop sipauthserve
sudo stop smqueue
sudo stop openbts
sudo stop asterisk


==Referensi==
==Referensi==


* https://github.com/RangeNetworks/dev/wiki
* https://github.com/RangeNetworks/dev/wiki
* https://help.github.com/articles/generating-ssh-keys
==Pranala Menarik==
* [[Git: compile dari source code]] '''bagi mereka yang bernyali'''

Latest revision as of 10:19, 7 April 2017

Sumber: https://github.com/RangeNetworks/dev/wiki


Persiapan Environment

* Siapkan Ubuntu Server 32 bit 12.04.

    • SSH terinstalasi & beroperasi
    • username openbts
    • password openbts
  • Sebaiknya IP address yang digunakan 192.168.0.21 & 192.168.0.22
  • Instalasi aplikasi pendukung
sudo apt-get install m4 autoconf autotools-dev automake libsqlite3-dev sqlite3 libssl-dev libssl-doc zlib1g-dev \
build-essential dh-apparmor dpkg-dev fakeroot g++ g++-4.6 gettext html2text intltool-debian libalgorithm-diff-perl \
libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl libgettextpo0 libmail-sendmail-perl libstdc++6-4.6-dev \
libsys-hostname-long-perl libunistring0 dh-apparmor dpkg-dev fakeroot g++ g++-4.6 gettext \
html2text intltool-debian dh-translations intltool libxml-parser-perl python-scour libsqlite0 libsqlite0-dev \
libodbc1 odbcinst odbcinst1debian2 unixodbc-dev python-software-properties

Update Git

Pastikan menggunakan git versi terakhir

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

Download Tool

Check versi git, misalnya

git --version

hasilnya pastikan >1.8.2

git version 2.3.1


download tool development terbaru

rm -Rf /usr/local/src/dev
cd /usr/local/src
git clone https://github.com/RangeNetworks/dev.git

Download Source Code

Proses download source code menggunakan SSH secara automatis login. Ini hanya bisa dilakukan jika kita sudah generate SSH key untuk GitHub. Lakukan generate SSH key untuk GitHub sebelum melakukan perintah di bawah ini.


cd /usr/local/src/dev
./clone.sh

Build

Kita perlu memilih branch yang akan di compile menggunakan switchto.sh. Sebaiknya pilih branch MASTER terlebih dulu

Untuk RangeNetworks RAD1

./switchto.sh master
./build.sh SDR1
cd  BUILDS/2015-03-06--06-12-58/
dpkg -i *.deb
sudo apt-get -f install

Packages yang berhasil di compile ada di

BUILDS/tanggal-jam-menit-detik/
BUILDS/2015-03-05--11-58-24/   (contoh)

Jika ingin branch yang lebih tinggi lakukan

./switchto.sh 4.0
./build.sh SDR1

Naga-naganya lebih aman menggunakan master.

Install

Gunakan dpkg untuk menginstalasi package (ini akan complain depedencies):

sudo dpkg -i BUILDS/2015-03-05--11-58-24/*.deb

atau

cd /usr/local/src/dev/BUILDS/2015-03-05--11-58-24/
dpkg -i *.deb

Gunakan aptitude untuk mengatasi masalah dependencies

sudo apt-get -f install

Jika di tanya tentang overwrite file konfigurasi, anda harus menentukan. Sangat disarankan untuk overwrite semua file konfigurasi agar jalan dengan baik.

Overwrite /etc/network/interfaces akan menset menjadi sebuah IP statik yang berbeda dari yang sebelumnya.

Running

Seharusnya bisa lebih manusiawi menggunakan perintah berikut, entah kenapa tidak jalan,

sudo start sipauthserve
sudo start smqueue
sudo start openbts
sudo start asterisk

Untuk men-stop jalankan perintah:

sudo stop sipauthserve
sudo stop smqueue
sudo stop openbts
sudo stop asterisk

Referensi


Pranala Menarik