Quick Deployment
If you are new to Linkis, you can ignore this chapter, however, if you are already a Linkis user, we recommend you reading the following article before installing or upgrading: Brief introduction of the difference between Linkis1.0 and Linkis0.X.
Please note: Apart from the four EngineConnPlugins included in the Linkis 1.0 installation package by default: Python/Shell/Hive/Spark. You can manually install other types of engines such as JDBC depending on your own needs. For details, please refer to EngineConnPlugin installation documents.
Engines that Linkis 1.0 has adapted by default are listed below:
The following is the dependency information for each engine.
Engine Type | Dependency | Special Instructions |
---|---|---|
Python | Python Environment | If the path of logs and result sets are configured as hdfs://, then the HDFS environment is needed. |
JDBC | No dependency | If the path of logs and result sets are configured as hdfs://, then the HDFS environment is needed. |
Shell | No dependency | If the path of logs and result sets are configured as hdfs://, then the HDFS environment is needed. |
Hive | Hadoop and Hive Environment | |
Spark | Hadoop/Hive/Spark |
Requirement: At least 3G memory is required to install Linkis.
The default JVM heap memory of each microservice is 512M, and the heap memory of each microservice can be adjusted uniformly by modifying . If your computer resource is limited, we suggest modifying this parameter to 128M. as follows:
# java application default jvm memory.
export SERVER_HEAP_SIZE="128M"
The following pieces of software must be installed:
- MySQL (5.5+), How to install MySQL
b. Create user
For example: The deployment user is hadoop.
- Create a deployment user on the machine for installation.
sudo useradd hadoop
- Since the services of Linkis use sudo -u {linux-user} to switch engines to execute jobs, the deployment user should have sudo permission and do not need to enter the password.
vi /etc/sudoers
hadoop ALL=(ALL) NOPASSWD: NOPASSWD: ALL
Set the following global environment variables on each installation node so that Linkis can use Hadoop, Hive and Spark.
vim /home/hadoop/.bash_rc ##Take the deployment user hadoop as an example.
The following is an example of setting environment variables:
- If you want to equip your Pyspark and Python with drawing functions, you need to install the drawing module on each installation node. The command is as follows:
python -m pip install matplotlib
c. Preparing installation package
Download the latest installation package from the Linkis release. ()
Decompress the installation package to the installation directory and modify the configuration of the decompressed file.
#version >=1.0.3
tar -xvf apache-linkis-x.x.x-incubating-bin.tar.gz
vi deploy-config/linkis-env.sh
#SSH_PORT=22 #Specify SSH port. No need to configuer if the stand-alone version is installed
LINKIS_HOME=/appcom/Install/Linkis # Specify installation directory.
WORKSPACE_USER_ROOT_PATH=file:///tmp/hadoop # Specify user root directory. Generally used to store user's script and log files, it's user's workspace.
RESULT_SET_ROOT_PATH=file:///tmp/linkis # The result set file path, used to store the result set files of the Job.
ENGINECONN_ROOT_PATH=/appcom/tmp #Store the installation path of ECP. A local directory where deploy user has write permission.
ENTRANCE_CONFIG_LOG_PATH=file:///tmp/linkis/ #Entrance's log path
## LDAP configuration. Linkis only supports deploy user login by default, you need to configure the following parameters to support multi-user login.
#LDAP_URL=ldap://localhost:1389/
#LDAP_BASEDN=xxx
e. Basic configuration modification(Rely on HDFS/Hive/Spark)
vi deploy-config/linkis-env.sh
f. Modify the database configuration
# set the connection information of the database
# including ip address, database's name, username and port
# Mainly used to store user's customized variables, configuration parameters, UDFs, and samll functions, and to provide underlying storage of the JobHistory.
MYSQL_HOST=
MYSQL_PORT=
MYSQL_DB=
MYSQL_USER=
MYSQL_PASSWORD=
sh bin/install.sh
2. Installation steps
- The install.sh script will ask you whether to initialize the database and import the metadata.
It is possible that a user might repeatedly run the install.sh script and results in clearing all data in databases. Therefore, each time the install.sh is executed, user will be asked if they need to initialize the database and import the metadata.
Please select yes on the first installation.
Please note: If you are upgrading the existing environment of Linkis from 0.X to 1.0, please do not choose yes directly, refer to Linkis1.0 Upgrade Guide first.
3. Whether install successfully
You can check whether the installation is successful or not by viewing the logs printed on the console.
If there is an error message, check the specific reason for that error or refer to FAQ for help.
Note" class="reference-link">Note
Because the mysql-connector-java driver is under the GPL2.0 agreement and does not meet the license policy of the Apache open source agreement, starting from version 1.0.3, the official deployment package of the Apache version is provided. The default is no mysql-connector-java-x.x.x.jar dependency package, you need to add dependencies to the corresponding lib package during installation and deployment
Copy the mysql driver package to the lib package path
cp mysql-connector-java-5.1.49.jar {LINKIS_HOME}/lib/linkis-spring-cloud-services/linkis-mg-gateway/
cp mysql-connector-java-5.1.49.jar {LINKIS_HOME}/lib/linkis-commons/public-module/
5. Linkis quick startup
(1). Start services
Run the following commands on the installation directory to start all services.
(2). Check if start successfully
You can check the startup status of the services on the Eureka, here is the way to check:
Open http://${EUREKA\_INSTALL\_IP}:${EUREKA\_PORT} on the browser and check if services have registered successfully.
If you have not specified EUREKA_INSTALL_IP and EUREKA_INSTALL_IP in config.sh, then the HTTP address is
As shown in the figure below, if all the following micro-services are registered in the Eureka, it means that they’ve started successfully and been able to work.