/
RPM Installation

RPM Installation

Installing Machbase

Linux on the Redhat / CentOS family can install Machbase via the rpm file.

Download the latest RPM package first. You can download it with the command below.

$ wget http://www.machbase.com/dist/machbase-fog-x.x.x.official-LINUX-X86-64-release.rpm


The command to install after downloading the file is as follows.

$ sudo yum install machbase-fog-x.x.x.official-LINUX-X86-64-release.rpm

Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Examining machbase-fog-x.x.x.official-LINUX-X86-64-release.rpm: machbase-x.x.x-official.x86_64
Marking machbase-fog-x.x.x.official-LINUX-X86-64-release.rpm to be installed
Loading mirror speeds from cached hostfile
 * base: data.aonenetworks.kr
 * extras: data.aonenetworks.kr
 * updates: data.aonenetworks.kr
Resolving Dependencies
--> Running transaction check
---> Package machbase.x86_64 0:x.x.x-official will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================
 Package         Arch          Version                 Repository                                                 Size
=======================================================================================================================
Installing:
 machbase        x86_64        x.x.x-official         /machbase-fog-x.x.x.official-LINUX-X86-64-release        632 M

Transaction Summary
=======================================================================================================================
Install       1 Package(s)

Total size: 632 M
Installed size: 632 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : machbase-x.x.x-official.x86_64                                                                     1/1

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

Ulimit check
65535 PASS

Machbase startup
-----------------------------------------------------------------
     Machbase Administration Tool
     Release Version - x.x.x.official
     Copyright 2014, MACHBASE Corp. or its subsidiaries
     All Rights Reserved
-----------------------------------------------------------------
-----------------------------------------------------------------
     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.

MWA startup
SERVER HAS BEEN RESET
SERVER STARTED, PID : 7757
     Connection URL : http://192.168.0.55: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
  Verifying  : machbase-x.x.x-official.x86_64                                                                     1/1

Installed:
  machbase.x86_64 0:x.x.x-official

Complete!


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@localhost ~]$ cd /opt/machbase
[root@localhost machbase]# ls -l
total 4
lrwxrwxrwx. 1 root     root       28 Jan  2 14:12 current -> /opt/machbase/versions/x.x.x
drwxr-xr-x. 3 machbase machbase 4096 Jan  2 14:12 versions
[root@localhost machbase]$


A shell script, machbased, is installed in the /etc/init.d directory, and you can manage Machbase with this.

[root@localhost ~]$ cd /etc/init.d
[root@localhost init.d]# ls -l machbased
-rwxr-xr-x. 1 root root 8446 Oct 30 16:11 machbased
[root@localhost machbase]$


Deleting Machbase



To delete Machbase, use the following command.

[root@localhost ~]$ sudo yum remove machbase


Managing  Machbase 


If you install the Machbase server using rpm, 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@localhost init.d]$ service machbased
Usage: /etc/init.d/machbased {start|stop|kill|restart|createdb|destorydb|check|MWA|console|port|exe|collector|help}


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

This is the command 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 ~]$

Related content