Installing Machbase

Download and install the Machbase package from the Machbase download site.

root@ubuntu:/usr/local/src# wget http://www.machbase.com/dist/machbase-fog-x.x.x.community-LINUX-X86-64-release.deb
root@ubuntu:/usr/local/src# sudo dpkg -i machbase-fog-x.x.x.community-LINUX-X86-64-release.deb
Selecting previously unselected package machbase.
(Reading database ... 464623 files and directories currently installed.)
Preparing to unpack machbase-fog-x.x.x.community-LINUX-X86-64-release.deb ...
Group machbase exist
Unpacking machbase (5.1.9) ...
Setting up machbase (5.1.9) ...

Create database
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 5.1.9.community
     Copyright 2014, MACHBASE Corp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Database created successfully.

Ulimit check
65535 PASS

Machbase startup
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - 5.1.9.community
     Copyright 2014, MACHBASE Corp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for Machbase server start.
Machbase server started successfully.

MWA startup
SERVER HAS BEEN RESET
SERVER STARTED, PID : 1957
     Connection URL : http://192.168.0.183: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 systemd (229-4ubuntu21.1) ...
Processing triggers for ureadahead (0.100.0-19) ...
root@ubuntu:/usr/local/src#

Index


If you have dependency problems during installation, you can install them with the following command:

root@ubuntu:/usr/local/src# sudo apt-get install -f
root@ubuntu:/usr/local/src# sudo dpkg -i machbase-fog-x.x.x.community-LINUX-X86-64-release.deb


When the installation is complete, the / opt / machbase folder is created and the default port is set to 5656. 
After that, the database is created and the Machbase server and the MWA Web server are automatically executed.
In the Machbase directory, there is a directory named 'current' which is a symbolic link to the latest version. In the versions directory, files are located according to the Machbase version.

root@ubuntu:/usr/local/src# cd /opt/machbase
root@ubuntu:/opt/machbase# ls -l
total 4
lrwxrwxrwx 1 root     root       28 Jan  3 00:25 current -> /opt/machbase/versions/5.1.9
drwxrwxr-x 3 machbase machbase 4096 Jan  3 00:25 versions
root@ubuntu:/opt/machbase#


Deleting Machbase

To delete Machbase, use the following command.

root@ubuntu:/opt/machbase# sudo dpkg -r machbase


Managing  Machbase 


If you install the Machbase server using deb, the /etc/init.d/machbased script file is installed and you can manage it conveniently.

The basic functions to be supported are as follows.

root@ubuntu:/opt/machbase# cd /etc/init.d
root@ubuntu:/etc/init.d# sudo service machbased
Usage: /etc/init.d/machbased {start|stop|kill|restart|createdb|destroydb|check|MWA|console|port|exe|collector|help}
root@ubuntu:/etc/init.d#


Start Server

Start the Machbase server. It is the same as machadmin -u.

[root@localhost ~]$ sudo service machbased start
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - x.x.x.official
     Copyright 2014, MACHBASE Corp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for Machbase server start.
Machbase server started successfully.
[root@localhost ~]$


Shut Down Server

Shut down the Machbase server normally. It is the same as machadmin -s.

[root@localhost ~]$ sudo service machbased stop
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - x.x.x.official
     Copyright 2014, MACHBASE Corp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for Machbase server shut down...
Machbase server shut down successfully.
[root@localhost ~]$


Stop  Server 

Force the Machbase server to abort. It is the same as machadmin -k.

[root@localhost ~]$ sudo service machbased kill
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - x.x.x.official
     Copyright 2014, MACHBASE Corp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for Machbase server terminated.
Machbase server terminated successfully.
[root@localhost ~]$


Restart  Server

Shut down normally and re-start the Machbase server. 

[root@localhost ~]$ sudo service machbased restart
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - x.x.x.official
     Copyright 2014, MACHBASE Corp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for Machbase server shut down...
Machbase server shut down successfully.
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - x.x.x.official
     Copyright 2014, MACHBASE Corp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Waiting for Machbase server start.
Machbase server started successfully.
[root@localhost ~]$


Create Database

Create a Machbase database. It is the same  as machadmin -c.

[root@localhost ~]$ sudo service machbased createdb
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - x.x.x.official
     Copyright 2014, MACHBASE Corp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Database created successfully.
[root@localhost ~]$


Delete Database

Delete the Machbase database. It is the same as machadmin -d.

[root@localhost ~]$ sudo service machbased destroydb
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - x.x.x.official
     Copyright 2014, MACHBASE Corp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Destroy Machbase database. Are you sure?(y/N) y
Database destoryed successfully.
[root@localhost ~]$


Check Server Status

Check the status of the Machbase server operation.  It is the same as machadmin -e.

[root@localhost ~]$ sudo service machbased check
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - x.x.x.official
     Copyright 2014, MACHBASE Corp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
Machbase server is running with PID(23542).
[root@localhost ~]$


MWA Management

These are the commands related to the  MWA (Machbase Web Analytics) web server.

[root@localhost ~]$ sudo service machbased  MWA
start | restart | stop | reset | port

# Start the MWA server.
[root@localhost ~]$ sudo service machbased MWA start
SERVER ALREADY STARTED
Connection URL : http://192.168.0.10:5001

# Shut down the MWA server.
[root@localhost ~]$ sudo service machbased MWA stop
SERVER STOPPED

# Change the MWA server port.
[root@localhost ~]$ sudo service machbased MWA port 5050
WEBSERVER PORT CHANGED : 5050

# Shut down and restart the MWA server.
[root@localhost ~]$ sudo service machbased MWA restart
SERVER IS RESTARTING
SERVER STOPPED
SERVER STARTED, PID : 23810
     Connection URL : http://192.168.0.10:5001
[root@localhost ~]$


Change Server Port

Change the port of the Machbase server. If you execute the command and enter the port to be changed, it changes to that port.  After the port change, you must restart the Machbase server to apply

[root@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.
[root@localhost ~]$


Collector Management

These are the commands to manage Machcollector.

[root@localhost ~]$ sudo service machbased collector
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
[root@localhost ~]$
  • No labels