Здесь я потерял час на том, что установил переменные окружения в одной консоли, а установку дистрибутива запустил в другой, в результате у меня все время устанавливалась java 6 вместо 7. Причина невнимательности в том, что я прерывал процесс дня на два (Вспоминал LAMP и наоткрывал консолей... поупражнялся, а потом "вернулся", но не туда...) Пост получился длинным, но последовательным.
Опубликовано: 29 июня 2014 г.
How to install RapidMiner Server on an Ubuntu 12.04 machine. Bonus feature, how to install RapidMiner extensions on the server.
How to correct JAVA_HOME which should point to a JDK not a JRE folder?
JAVA_HOME does not point to the JDK
3.3 Creating and Using a Database
Chapter 3 Tutorial This chapter provides a tutorial introduction to MySQL by showing how to use the mysql client program to create and use a simple database. mysql (sometimes referred to as the “terminal monitor” or just “monitor”) is an interactive program that enables you to connect to a MySQL server, run queries, and view the results. mysql may also be used in batch mode: you place your queries in a file beforehand, then tell mysql to execute the contents of the file. Both ways of using mysql are covered here.
How To Create a New User and Grant Permissions in MySQL
Installing and Starting RapidMiner Server
Разархивируем дистрибутив¶
Куда заливать сайт на Java? Устанавливаю первый раз..., Искать рекомендации некогда, потому припомним рекомендации для Python... и распакуем все в домашнюю поддиректорию.
# Я сначала посмотрел, что содержится в архиве,
# но копипаст из консоли (ниже) подробнее
!unzip -l /home/kiss/Downloads/rapidminer-server-installer-2.4.0.zip
kiss@kali:~/jServer$ unzip /home/kiss/Downloads/rapidminer-server-installer-2.4.0.zip
Archive: /home/kiss/Downloads/rapidminer-server-installer-2.4.0.zip
creating: rapidminer-server-installer-2.4.0/
creating: rapidminer-server-installer-2.4.0/lib/
inflating: rapidminer-server-installer-2.4.0/lib/rapidminer-server-installer-2.4.0.jar
inflating: rapidminer-server-installer-2.4.0/lib/rapidminer-license-core-3.0.2-SNAPSHOT.jar
inflating: rapidminer-server-installer-2.4.0/lib/rapidminer-license-api-3.0.0.jar
inflating: rapidminer-server-installer-2.4.0/lib/jackson-core-2.4.0.jar
inflating: rapidminer-server-installer-2.4.0/lib/jackson-databind-2.4.0.jar
inflating: rapidminer-server-installer-2.4.0/lib/jackson-annotations-2.4.0.jar
creating: rapidminer-server-installer-2.4.0/bin/
inflating: rapidminer-server-installer-2.4.0/bin/rapidminer-server-installer.bat
inflating: rapidminer-server-installer-2.4.0/bin/rapidminer-server-installer
inflating: rapidminer-server-installer-2.4.0/EULA.txt
creating: rapidminer-server-installer-2.4.0/data/
creating: rapidminer-server-installer-2.4.0/data/native_x86/
inflating: rapidminer-server-installer-2.4.0/data/native_x86/README-service.txt
inflating: rapidminer-server-installer-2.4.0/data/native_x86/service.bat
inflating: rapidminer-server-installer-2.4.0/data/native_x86/jbossweb.exe
inflating: rapidminer-server-installer-2.4.0/data/native_x86/jbosswebw.exe
inflating: rapidminer-server-installer-2.4.0/data/native_x86/jbosssvc.exe
creating: rapidminer-server-installer-2.4.0/data/native_x86/native/
inflating: rapidminer-server-installer-2.4.0/data/native_x86/native/tcnative-1.dll
inflating: rapidminer-server-installer-2.4.0/data/native_x86/native/openssl.exe
creating: rapidminer-server-installer-2.4.0/data/native_x64/
inflating: rapidminer-server-installer-2.4.0/data/native_x64/README-service.txt
inflating: rapidminer-server-installer-2.4.0/data/native_x64/service.bat
inflating: rapidminer-server-installer-2.4.0/data/native_x64/jbossweb.x64.exe
inflating: rapidminer-server-installer-2.4.0/data/native_x64/jbosswebw.x64.exe
inflating: rapidminer-server-installer-2.4.0/data/native_x64/jbosssvc.exe
creating: rapidminer-server-installer-2.4.0/data/native_x64/native/
inflating: rapidminer-server-installer-2.4.0/data/native_x64/native/tcnative-1.dll
inflating: rapidminer-server-installer-2.4.0/data/native_x64/native/openssl.exe
inflating: rapidminer-server-installer-2.4.0/data/RapidMiner-Server-JBoss-Bundle.zip
creating: rapidminer-server-installer-2.4.0/data/jdbc/
inflating: rapidminer-server-installer-2.4.0/data/jdbc/mysql-connector-java-5.1.31.jar
inflating: rapidminer-server-installer-2.4.0/data/jdbc/postgresql-9.3-1101-jdbc4.jar
inflating: rapidminer-server-installer-2.4.0/data/jdbc/sqljdbc4-4.0.jar
inflating: rapidminer-server-installer-2.4.0/data/jdbc/ojdbc7-12.1.0.1.jar
Пробуем сделать все по-взрослому. Не спешим работать с правами супервользователя
!ls -lR ~/jServer/rapidminer-server-installer-2.4.0/
####Теперь проверим версию Java (нам нуна 7-я)
root@kali:/home/kiss# java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-1~deb7u1)
OpenJDK Server VM (build 24.79-b02, mixed mode)
Напомню, что в Kali эта версию надо подключать, т.к. по умолчанию грузится 6-ая. Для этого пришлось выполнить вот эти команды:
root@kali:/home/kiss# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java 1051 manual mode
Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java to provide /usr/bin/java (java) in manual mode
Задаем переменную окружения¶
Нужно задать путь к jdk (а не к jre). ошибок здесь много, потому в начале поста есть ссылки на случай возникновения ошибок.
root@kali:/home/kiss# JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
root@kali:/home/kiss# export JAVA_HOME
root@kali:/home/kiss# echo $JAVA_HOME
/usr/lib/jvm/java-7-openjdk-i386
####Создаем базуданных
root@kali:/var/www/revive-adserver# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 766
Server version: 5.5.43-0+deb7u1 (Debian)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> status
--------------
mysql Ver 14.14 Distrib 5.5.43, for debian-linux-gnu (i686) using readline 6.2
Connection id: 766
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.5.43-0+deb7u1 (Debian)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/run/mysqld/mysqld.sock
Uptime: 7 days 15 hours 23 min 42 sec
Threads: 1 Questions: 26912 Slow queries: 0 Opens: 392 Flush tables: 1 Open tables: 109 Queries per second avg: 0.040
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| openx_1 |
| openx_2 |
| performance_schema |
+--------------------+
5 rows in set (0.00 sec)
mysql> create database srminer;
Query OK, 1 row affected (0.00 sec)
mysql> create user 'miner'@'localhost' identified by 'digg';
Query OK, 0 rows affected (0.11 sec)
mysql> grant all privileges on srminer.* to 'miner'@'localhost';
Query OK, 0 rows affected (0.02 sec)
show grants for miner
mysql>create user 'newuser'@'localhost' IDENTIFIED BY 'password'; #has no permissions to do anything with the databases
mysql>GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; # to all databases !!! like root?
FLUSH PRIVILEGES; # update
GRANT [type of permission] ON [database name].[table name] TO ‘[username]’@'localhost’;
REVOKE [type of permission] ON [database name].[table name] FROM ‘[username]’@‘localhost’;
mysql> help show
Name: 'SHOW'
Description:
SHOW has many forms that provide information about databases, tables,
columns, or status information about the server. This section describes
those following:
SHOW AUTHORS
SHOW {BINARY | MASTER} LOGS
SHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]
SHOW CHARACTER SET [like_or_where]
SHOW COLLATION [like_or_where]
SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]
SHOW CONTRIBUTORS
SHOW CREATE DATABASE db_name
SHOW CREATE EVENT event_name
SHOW CREATE FUNCTION func_name
SHOW CREATE PROCEDURE proc_name
SHOW CREATE TABLE tbl_name
SHOW CREATE TRIGGER trigger_name
SHOW CREATE VIEW view_name
SHOW DATABASES [like_or_where]
SHOW ENGINE engine_name {STATUS | MUTEX}
SHOW [STORAGE] ENGINES
SHOW ERRORS [LIMIT [offset,] row_count]
SHOW EVENTS
SHOW FUNCTION CODE func_name
SHOW FUNCTION STATUS [like_or_where]
SHOW GRANTS FOR user
SHOW INDEX FROM tbl_name [FROM db_name]
SHOW MASTER STATUS
SHOW OPEN TABLES [FROM db_name] [like_or_where]
SHOW PLUGINS
SHOW PROCEDURE CODE proc_name
SHOW PROCEDURE STATUS [like_or_where]
SHOW PRIVILEGES
SHOW [FULL] PROCESSLIST
SHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]
SHOW PROFILES
SHOW SLAVE HOSTS
SHOW SLAVE STATUS
SHOW [GLOBAL | SESSION] STATUS [like_or_where]
SHOW TABLE STATUS [FROM db_name] [like_or_where]
SHOW [FULL] TABLES [FROM db_name] [like_or_where]
SHOW TRIGGERS [FROM db_name] [like_or_where]
SHOW [GLOBAL | SESSION] VARIABLES [like_or_where]
SHOW WARNINGS [LIMIT [offset,] row_count]
like_or_where:
LIKE 'pattern'
| WHERE expr
If the syntax for a given SHOW statement includes a LIKE 'pattern'
part, 'pattern' is a string that can contain the SQL "%" and "_"
wildcard characters. The pattern is useful for restricting statement
output to matching values.
Several SHOW statements also accept a WHERE clause that provides more
flexibility in specifying which rows to display. See
http://dev.mysql.com/doc/refman/5.5/en/extended-show.html.
URL: http://dev.mysql.com/doc/refman/5.5/en/show.html
Далее автор собщил, что скрипт установки rapidminer-server-installer¶
В нашем дистрибутиве он в папке bin
root@kali:/home/kiss/jServer/rapidminer-server-installer-2.4.0/lib# java -jar rapidminer-server-installer-2.4.0.jar
no main manifest attribute, in rapidminer-server-installer-2.4.0.jar
localhost
!cat /tmp/RMS_installer.xml
RapidMiner Server was successfully installed!
To start RapidMiner Server,
go to '/var/jserver/bin' and execute the 'standalone.sh' file.
To manage RapidMiner Server
after it has been started, visit the following URL with your browser: 'http://kali:8585'.
The initial password for the user "admin" is "changeit". Please do so immediately.
kiss@kali:/var/jserver/bin$ bash standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /var/jserver
JAVA: /usr/lib/jvm/java-6-openjdk-i386/bin/java
JAVA_OPTS: -server -Xms512m -Xmx1024m -XX:MaxPermSize=256m -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
=========================================================================
java.lang.IllegalArgumentException: Failed to instantiate class "org.jboss.logmanager.handlers.PeriodicRotatingFileHandler" for handler "FILE"
at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:118)
at org.jboss.logmanager.config.LogContextConfigurationImpl.doPrepare(LogContextConfigurationImpl.java:333)
at org.jboss.logmanager.config.LogContextConfigurationImpl.prepare(LogContextConfigurationImpl.java:290)
at org.jboss.logmanager.config.LogContextConfigurationImpl.commit(LogContextConfigurationImpl.java:299)
at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:505)
at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:96)
at org.jboss.as.logging.logmanager.ConfigurationPersistence.configure(ConfigurationPersistence.java:128)
at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:300)
at org.jboss.logmanager.LogManager.readConfiguration(LogManager.java:262)
at java.util.logging.LogManager$2.run(LogManager.java:294)
at java.util.logging.LogManager$2.run(LogManager.java:292)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:292)
at java.util.logging.LogManager.getLogManager(LogManager.java:275)
at java.util.logging.Logger.<init>(Logger.java:254)
at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1327)
at java.util.logging.LogManager$RootLogger.<init>(LogManager.java:1325)
at java.util.logging.LogManager$1.run(LogManager.java:196)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(LogManager.java:173)
at org.jboss.modules.Main.main(Main.java:313)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:534)
at org.jboss.logmanager.config.AbstractPropertyConfiguration$ConstructAction.validate(AbstractPropertyConfiguration.java:116)
... 20 more
Caused by: java.io.FileNotFoundException: /var/jserver/standalone/log/server.log (No such file or directory)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:210)
at org.jboss.logmanager.handlers.FileHandler.setFile(FileHandler.java:154)
at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.setFile(PeriodicRotatingFileHandler.java:105)
at org.jboss.logmanager.handlers.FileHandler.setFileName(FileHandler.java:192)
at org.jboss.logmanager.handlers.FileHandler.<init>(FileHandler.java:122)
at org.jboss.logmanager.handlers.PeriodicRotatingFileHandler.<init>(PeriodicRotatingFileHandler.java:73)
... 25 more
!java -version
!echo $JAVA_HOME
Как могла потеряться ппеременная окружения $JAVA_HOME, е же ее устанавливал, но это было вчера..., потом я переводил компьютер в спящий режим... неужели пожтому? ? Знаний не хватает, объяснить не могу... Просто смотрим скрипт, да, там есть эта переменная окружения:
!cat /var/jserver/bin/standalone.sh
Выставим все снова
root@kali:/home/kiss/jServer/rapidminer-server-installer-2.4.0/bin# JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
root@kali:/home/kiss/jServer/rapidminer-server-installer-2.4.0/bin# export JAVA_HOME
root@kali:/home/kiss/jServer/rapidminer-server-installer-2.4.0/bin# echo $JAVA_HOME
/usr/lib/jvm/java-7-openjdk-i386
И снова получаем же ошибку
kiss@kali:/var/jserver/bin$ bash standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /var/jserver
JAVA: /usr/lib/jvm/java-6-openjdk-i386/bin/java
JAVA_OPTS: -server -Xms512m -Xmx1024m -XX:MaxPermSize=256m -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
!update-alternatives --config java
! bash standalone.sh
И тут до меня доходит, что переменную окружения я назначил в одной консоли, а скрипт выполнял в другой... Типичная ошибка невнивательного чайника. Запустился откуда надо и получил огромный вывод в консоль, но при загрузке страницы:
Попробовал занрузить в браузере http://kali:8585 и был переадресоан на http://kali:8585/RA/faces/restricted/index.xhtml¶
JBWEB000065: HTTP Status 404 - /RA/faces/restricted/index.xhtml
JBWEB000309: type JBWEB000067: Status report
JBWEB000068: message /RA/faces/restricted/index.xhtml
JBWEB000069: description JBWEB000124: The requested resource is not available.
JBoss Web/7.2.0.Final
Потом еще раз заглянул в консоль, там по прежнему грузится java6, решил вручную назначить переменную окружения JAVA
root@kali:/var/jserver/bin# JAVA=/usr/lib/jvm/java-7-openjdk-i386/bin/java
root@kali:/var/jserver/bin# export JAVA
root@kali:/var/jserver/bin# echo $JAVA
/usr/lib/jvm/java-7-openjdk-i386/bin/java
root@kali:/var/jserver/bin# echo $JAVA_HOME
/usr/lib/jvm/java-7-openjdk-i386
root@kali:/var/jserver/bin# java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-1~deb7u1)
OpenJDK Server VM (build 24.79-b02, mixed mode)
root@kali:/var/jserver/bin# bash standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /var/jserver
JAVA: /usr/lib/jvm/java-7-openjdk-i386/bin/java
JAVA_OPTS: -server -Xms512m -Xmx1024m -XX:MaxPermSize=256m -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
И вот все заработало, правда пришлось заменить kali на localhost¶
http://localhost:8585/RA/faces/login.xhtml;jsessionid=OZEtMVwTKlYkCOMHFikVALVA
Нужно было ввести юзера admin и пароль changeit, появилась страница с доп. настройками:
RapidMiner Server Installation - Step 1
Your RapidMiner Server installation is not yet complete. The following steps must be executed before RapidMiner Server can be used for the first time.
INFO: Result of SQL dialect autodetection: MYSQL.
INFO: Quartz tables must be created.
INFO: com.rapidanalytics.uploaddir not set.
INFO: com.rapidanalytics.plugindir not set.
SQL Dialect
Create SQL tables for the Quartz scheduler automatically
RapidMiner Server can automatically create tables that are required for the Quartz scheduler automatically. If you would like to create these tables yourself, uncheck this box. You will then be shown an SQL script that you must run in your database.
Plugin directory
Upload directory
Сначала создал папки, а потом в браузере их назначил
/tmp/jserver/plugins
/tmp/jserver/upload
ПОлучается, что всего у нас три места , вот третье
/var/jserver
Нажал на кнопку "Продолжить" в браузере и получил:
RapidMiner Server Installation - Step 2
box_software.png RapidMiner Server Installation - Step 2
Executing installation.
INFO: Quartz tables successfully created.
INFO: SQL dialect specified: MYSQL.
INFO: Quartz tables found.
INFO: Quartz started
INFO: Startup complete.
Посты чуть ниже также могут вас заинтересовать
Комментариев нет:
Отправить комментарий