安裝MySQL管理平臺Yearning-小白教程

1: 安裝Nginx服務器

可以看我之前的文章: Nginx

2: 安裝MySQL服務器

可以看我之前的文章: MySQL

3:安裝 Python3.6
cd /service/tools/
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz

解壓

mkdir -p /usr/local/python3
tar -avxf Python-3.6.4.tgz -C /usr/local/python3/

進行配置

cd /usr/local/python3/
./configure --prefix=/usr/local/python3
make && make install

建立軟連接

ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.6 /usr/bin/pip3
安裝 bison
cd /application/tools

wget http://ftp.gnu.org/gnu/bison/bison-2.5.tar.bz2

tar xf bison-2.5.tar.bz2

cd bison-2.5

./configure --prefix=/usr/local && make && make install
**安裝報錯解決方法:**

 ** 註釋掉643這一行 **
/*_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");*/
  
**原處添加下面3行** 
#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif

重新安裝

make && make install
安裝inception
cd /usr/local/
wget https://github.com/mysql-inception/inception/archive/master.zip
unzip master.zip
cd inception-master/
sh inception_build.sh builddir linux

修改配置

cat /etc/inc.cnf
###################
[inception]
general_log=1
general_log_file=inc.log
port=6669
socket=/tmp/inc.socket
character-set-client-handshake=0
character-set-server=utf8
# 這裏的數據庫是填inception的庫,也用作備份庫
inception_remote_system_password=123456
inception_remote_system_user=root
inception_remote_backup_port=3306
inception_remote_backup_host=127.0.0.1
inception_support_charset=utf8
inception_enable_nullable=0
inception_check_primary_key=1
inception_check_column_comment=1
inception_check_table_comment=1
inception_osc_min_table_size=1
inception_osc_bin_dir=/usr/bin
inception_osc_chunk_time=0.1
inception_ddl_support=1
inception_enable_blob_type=1
inception_check_column_default_value=1
###################

啓動服務

nohup /usr/local/inception-master/builddir/mysql/bin/Inception --defaults-file=/etc/inc.cnf &

如果顯示下文

(inception_env) [root@localhost inception-master]# mysql -uroot -h127.0.0.1 -P 6669
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: Inception2.1.50 1

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

# 有如下輸出即可
MySQL [(none)]> inception get variables;
+------------------------------------------+---------------------------------------------+
| Variable_name                            | Value                                       |
+------------------------------------------+---------------------------------------------+
| autocommit                               | OFF                                         |
| bind_address                             | *                                           |
| character_set_system                     | utf8                                        |
| character_sets_dir                       | /usr/local/inception-master/share/charsets/ |
| connect_timeout                          | 10                                          |
| date_format                              | %Y-%m-%d                                    |
| datetime_format                          | %Y-%m-%d %H:%i:%s                           |
| general_log                              | ON                                          |
| general_log_file                         | inc.log                                     |
| inception_check_autoincrement_datatype   | ON                                          |
| inception_check_autoincrement_init_value | ON                                          |
| inception_check_autoincrement_name       | ON                                          |
| inception_check_column_comment           | ON                                          |
| inception_check_column_default_value     | ON                                          |
| inception_check_dml_limit                | ON                                          |
| inception_check_dml_orderby              | ON                                          |
| inception_check_dml_where                | ON                                          |
| inception_check_identifier               | ON                                          |
| inception_check_index_prefix             | ON                                          |
| inception_check_insert_field             | ON                                          |
| inception_check_primary_key              | ON                                          |
| inception_check_table_comment            | ON                                          |
| inception_check_timestamp_default        | ON                                          |
| inception_ddl_support                    | ON                                          |
| inception_enable_autoincrement_unsigned  | ON                                          |
| inception_enable_blob_type               | ON                                          |
| inception_enable_column_charset          | OFF                                         |
| inception_enable_enum_set_bit            | OFF                                         |
| inception_enable_foreign_key             | OFF                                         |
| inception_enable_identifer_keyword       | OFF                                         |
| inception_enable_not_innodb              | OFF                                         |
| inception_enable_nullable                | OFF                                         |
| inception_enable_orderby_rand            | OFF                                         |
| inception_enable_partition_table         | OFF                                         |
| inception_enable_pk_columns_only_int     | OFF                                         |
| inception_enable_select_star             | OFF                                         |
| inception_enable_sql_statistic           | ON                                          |
| inception_max_char_length                | 16                                          |
| inception_max_key_parts                  | 5                                           |
| inception_max_keys                       | 16                                          |
| inception_max_primary_key_parts          | 5                                           |
| inception_max_update_rows                | 10000                                       |
| inception_merge_alter_table              | ON                                          |
| inception_osc_alter_foreign_keys_method  | none                                        |
| inception_osc_bin_dir                    | /usr/bin                                    |
| inception_osc_check_alter                | ON                                          |
| inception_osc_check_interval             | 5.000000                                    |
| inception_osc_check_replication_filters  | ON                                          |
| inception_osc_chunk_size                 | 1000                                        |
| inception_osc_chunk_size_limit           | 4.000000                                    |
| inception_osc_chunk_time                 | 0.100000                                    |
| inception_osc_critical_thread_connected  | 1000                                        |
| inception_osc_critical_thread_running    | 80                                          |
| inception_osc_drop_new_table             | ON                                          |
| inception_osc_drop_old_table             | ON                                          |
| inception_osc_max_lag                    | 3.000000                                    |
| inception_osc_max_thread_connected       | 1000                                        |
| inception_osc_max_thread_running         | 80                                          |
| inception_osc_min_table_size             | 1                                           |
| inception_osc_on                         | ON                                          |
| inception_osc_print_none                 | ON                                          |
| inception_osc_print_sql                  | ON                                          |
| inception_osc_recursion_method           | processlist                                 |
| inception_password                       |                                             |
| inception_read_only                      | OFF                                         |
| inception_remote_backup_host             | 127.0.0.1                                   |
| inception_remote_backup_port             | 3306                                        |
| inception_remote_system_password         | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9   |
| inception_remote_system_user             | root                                        |
| inception_support_charset                | utf8                                        |
| inception_user                           |                                             |
| interactive_timeout                      | 28800                                       |
| max_allowed_packet                       | 1073741824                                  |
| max_connect_errors                       | 100                                         |
| max_connections                          | 151                                         |
| net_buffer_length                        | 16384                                       |
| net_read_timeout                         | 30                                          |
| net_write_timeout                        | 60                                          |
| port                                     | 6669                                        |
| query_alloc_block_size                   | 8192                                        |
| query_prealloc_size                      | 8192                                        |
| socket                                   | /tmp/inc.socket                             |
| thread_handling                          | one-thread-per-connection                   |
| thread_stack                             | 262144                                      |
| time_format                              | %H:%i:%s                                    |
| version                                  | Inception2.1.50                             |
| version_comment                          | Source distribution                         |
| version_compile_machine                  | x86_64                                      |
| version_compile_os                       | Linux                                       |
| wait_timeout                             | 28800                                       |
+------------------------------------------+---------------------------------------------+
90 rows in set (0.00 sec)

表示安裝成功

下載Yearning

git clone https://github.com/cookieY/Yearning.git

進行解壓

unzip Yearning-2.1.5.linux-amd64.zip
cd Yearning-go

配置連接

vim conf.toml 
[Mysql]
Db = "Yearning"
Host = "127.0.0.1"
Port = "3306"
Password = "123456"
User = "sea"

[General]
SecretKey = "dbcjqheupqjsuwsm"

創建使用的數據庫

create database Yearning DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

啓動

./Yearning -m

提示

初始化成功!
用戶名: admin
密碼:Yearning_admin

表示安裝成功

啓動

./Yearning -s -b "10.211.55.40" -p "8000" &
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章