Install from deb packages

List of Contents

Environment Settings

When you install "machbase" package, binary files such as machsql, machadmin and machcollector will be created as symbolic link in the "/usr/bin" directory. With these binary files, users can execute it right away, however, in order to work properly, environment variable "$MACHBASE_HOME" should be set beforehand.

The command for this process is as shown below. In the case of bash, put the script below in the /root/.bashrc file as follows.

export MACHBASE_HOME=/opt/machbase/current 
export PATH=$MACHBASE_HOME/bin:$PATH 
export LD_LIBRARY_PATH=$MACHBASE_HOME/lib:$LD_LIBRARY_PATH

Installation

Machbase can be installed by using deb file for the users who use Debian OS. To execute the file in the location where the package was downloaded, use the command below.

sudo dpkg -i machbase-std-3.5.0.826b8f2.official-LINUX-X86-64-release.deb
​
# in case of dependency problem, execute the command below.
sudo apt-get install -f
sudo dpkg -i machbase-std-3.5.0.826b8f2.official-LINUX-X86-64-release.deb

Example:

mach@ubuntu:~$ sudo dpkg -i machbase-std-3.5.0.826b8f2.official-LINUX-X86-64-release.deb
Selecting previously unselected package machbase.
(Reading database ... 78073 files and directories currently installed.)
Preparing to unpack machbase-std-3.5.0.826b8f2.official-LINUX-X86-64-release.deb ...
Unpacking machbase (3.5.0) ...
Setting up machbase (3.5.0) ...

Create database
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Database created successfully.

Ulimit check
65535 PASS

Machbase startup
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for Machbase server start.
Machbase server started successfully.

Machcollectormanager startup
-----------------------------------------------------------------
     Machcollector administration tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved.
-----------------------------------------------------------------
Waiting for collectormanager start.
.Collectormanager started successfully.

MWA startup
SERVER HAS BEEN RESET
SERVER STARTED, PID : 21785
     Connection URL : http://192.168.0.100:5001
Machbase has been installed in : /opt/machbase/
To start Machbase, run the command : service machbased start
To change server port, run the command : service machbased port
To use interactive SQL, execute : machsql
Documentation is available at http://www.machbase.com/document
Processing triggers for ureadahead (0.100.0-16) ...

Once it is installed, "/opt/machbase" folder will be created and the default port is set to 5656. Then, a database will be created, and the server and web server will start automatically.

mach@localhost:~$ ls -al /opt/ |grep machbase
drwxr-xr-x   3 machbase machbase 4096 Nov  3 14:16 machbase

In the Machbase, there are two directories. In the "current" directory, it has the latest symbolic link. And all the versions of Machbase can be found in the "versions" directory as shown below.

mach@localhost:~$ ls -al /opt/machbase
total 12
drwxr-xr-x  3 machbase machbase 4096 Nov  3 14:16 .
drwxr-xr-x. 7 root       root       4096 Nov  2 16:26 ..
lrwxrwxrwx  1 root       root         30 Nov  3 14:16 current -> /opt/machbase/versions/3.5.0
drwxr-xr-x  3 machbase machbase 4096 Nov  3 09:51 versions
mach@localhost:~$ ls -al /opt/machbase/versions/
total 12
drwxr-xr-x  3 machbase machbase 4096 Nov  3 09:51 .
drwxr-xr-x  3 machbase machbase 4096 Nov  3 14:16 ..
drwxr-xr-x 15 machbase machbase 4096 Nov  3 14:16 3.5.0
mach@localhost:~$ ls -al /opt/machbase/versions/3.5.0/
total 60
drwxr-xr-x 15 machbase machbase 4096 Nov  3 14:16 .
drwxr-xr-x  3 machbase machbase 4096 Nov  3 09:51 ..
drwxr-xr-x  6 machbase machbase 4096 Nov  3 14:16 3rd-party
drwxr-xr-x  2 machbase machbase 4096 Nov  3 14:16 bin
drwxr-xr-x  4 machbase machbase 4096 Nov  3 14:16 collector
drwxr-xr-x  2 machbase machbase 4096 Nov  3 14:17 conf
drwxr-xr-x  3 machbase machbase 4096 Nov  3 14:17 dbs
drwxr-xr-x  3 machbase machbase 4096 Nov  3 14:16 doc
drwxr-xr-x  2 machbase machbase 4096 Nov  3 14:16 include
drwxr-xr-x  2 machbase machbase 4096 Nov  3 14:16 install
drwxr-xr-x  2 machbase machbase 4096 Nov  3 14:16 lib
drwxr-xr-x  2 machbase machbase 4096 Nov  3 14:16 msg
drwxr-xr-x  8 machbase machbase 4096 Nov  3 14:16 sample
drwxr-xr-x  2 machbase machbase 4096 Nov  3 09:51 trc
drwxr-xr-x  3 machbase machbase 4096 Nov  3 09:51 webadmin

Un-Installation

To delete the program, use the command below. When the program is deleted, all the database will be deleted as well.

sudo dpkg -r machbase

machbased

If the package was installed with DEB, machbased will be installed in "/etc/init.d/". This shell script is created on the assumption that "/opt/machbase/current" is "MACHBASE_HOME".

In the "/etc/init.d", the shell script "machbased" will be installed. With this shell script, users can easily use the installed machbase.

mach@localhost:~$ ls -al /etc/init.d/ |grep machbased
-rwxr-xr-x   1 root root  4042 Nov  3 09:51 machbased

Make sure that machbase is set as the symbolic link in the "/opt/machbase/current" directory.

With this shell script, install machbase by using deb package, and then, it is easy to use features of machbase. machbased provides basic features of machbase as shown below.

service machbased {start | stop | kill | createdb | destorydb | status | web | console | port | exe | help}

Start

It starts the server and is the same feature with "machadmin -u".

[mach@localhost ~]$ sudo service machbased start
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official 
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for Machbase start.
Startup completed.
[mach@localhost ~]$

Stop

It stops the server and is the same feature with "machadmin -s".

[mach@localhost ~]$ sudo service machbased stop
[sudo] password for mach: 
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official 
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for shut down server...
Server shut down successfully.
[mach@localhost ~]$

Restart

It restarts the server.

[mach@localhost ~]$ sudo service machbased restart
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2b.official 
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for server shutdown...
Server shut down successfully.

Terminate DB

It kills the server and is the same feature with "machadmin -k".

[mach@localhost ~]$ sudo service machbased kill
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official 
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for Machbase terminated...
Server terminated successfully.
[mach@localhost ~]$

Createdb

It creates a database and is the same feature with "machadmin -c".

[mach@localhost ~]$ sudo service machbased createdb
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Database created successfully.
[mach@localhost ~]$

Destroydb

It deletes a database and is the same feature with "machadmin -d".

[mach@localhost ~]$ sudo service machbased destroydb
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official 
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Destroy Machbase database. Are you sure?(y/N) y

Check

It checks the status of database. It is the same feature with "machadmin -e".

[mach@localhost ~]$ sudo service machbased check
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official 
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Machbase server is running with PID (61998).
[mach@localhost ~]$

MWA

The below lists are about servers and commands of Machbase Web Analytics. Refer to MWA for more information.

[mach@localhost ~]$ sudo service machbased MWA help

example of command:
  * MWAserver start
    Startup WebServer
  * MWAserver restart
    Restart WebServer
  * MWAserver stop
    Shutdown WebServer
  * MWAserver reset
    Reset WebServer Database
  * MWAserver port NUMBER
    Change WebServer Port
[mach@localhost ~]$

Console

It can access to "machsql", the Machbase console. It is also possible to set additional options. Refer to machsql for more information.

[mach@localhost ~]$ sudo service machbased console
=================================================================
     Machbase Client Query Utility
     Release Version 3.5.0.826b8f2.official
     Copyright 2015, Machbase Inc. or its subsidiaries.
     All Rights Reserved.
=================================================================
Machbase server address (Default:127.0.0.1): 
Machbase user ID  (Default:SYS)
Machbase user password: 
MACHBASE_CONNECT_MODE=INET, PORT=5656
mach>

Port

It changes the port of Machbase database. While running this command, put the port number that you want to use, then the changed port number will be used hereafter. If none is specified, the current port will be used. Once the port number is changed, it requires to start the database again in order to apply it properly.

[mach@localhost ~]$ sudo service machbased port

The default port for the Machbase server is 5656. If you want to use 5656 as Machbase server port, press return key. Otherwise enter an alternative port here:
Use current port.
[mach@localhost ~]$

Exe

It was created in order to use binary files in the "$MACHBASE_HOME/bin" directory. It can be worked with options as well.

[mach@localhost ~]$ sudo service machbased exe machadmin -e
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 3.5.0.826b8f2.official 
     Copyright 2014, Machbase Inc. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Machbase server is running with PID(61998).
[mach@localhost ~]$

Collector

Collector commands are for machcollector and are used for Standard edition only. This provides basic commands that are provided by machcollectoradmin. It includes the feature to change port numbers.

[mach@localhost ~]$ sudo service machbased collector help
List of commands:
  * machbased collector start
    machcollectormanager starts.
  * machbased collector stop
    machcollectormanager shutdown.
  * machbased collector kill
    Terminate machcollectormanager.
  * machbased collector destroy
    Destroy machcollectormanager meta data.
  * machbased collector add_server
    Add an Machbase server to machcollectormanager.
  * machbased collector port
    Change the default port. Now: 9999
[mach@localhost ~]$

help

It shows the instructions and commands available for "machbased".

[mach@localhost ~]$ sudo service machbased help

List of commands:
  * machbased start
    Machbase server starts.
  * machbased stop
    Machbase server shutdown.
  * machbased kill
    Terminate Machbase server.
  * machbased restart
    Restart Machbase server.
  * machbased createdb
    Create Machbase database.
  * machbased destroydb
    Destroy Machbase database.
  * machbased check
    Check whether Machbase server is running.
  * machbased console
    Start machsql, Machbase client query utility.
  * machbased port
    Change the default port. Now: 5656
  * machbased exe XXX
    use /opt/Machbase/current/bin/ binary files
  * machbased MWA [start|restart|stop|reset|port]
    Machbase web analytics server [startup|restart|shutdown|resetmeta|portchange]
  * machbased collector [startup|shutdown|destroy|add_server|port]
    Execute machcollectormanager command.
[mach@localhost ~]$

results matching ""

    No results matching ""