栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

User-Level Flask Stack + SpringBoot + VUE + MySQL Stand-Alone deploy

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

User-Level Flask Stack + SpringBoot + VUE + MySQL Stand-Alone deploy

勿忘初心

搭建统一集成开发运行部署环境,单用户整合全部依赖,实现独立运行,独立打包迁移发布!!!
让 Linux 成为更好的 Linux …

/home/pss
/home/pss/bin

/home/pss/flask-web

/home/pss/jdk
/home/pss/maven
/home/pss/spring-boot

/home/pss/etc
/home/pss/mysql

/home/pss/nginx
cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
wget https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-5.7.35.tar.gz
cd mysql-5.7.35
yum install -y libaio cmake
yum install -y gcc-c++ bison-devel ncurses-devel bison
yum install -y perl perl-devel perl perl-devel
yum install -y openssl openssl-devel
yum install npm.x86_64
yum install git-all.noarch
/home/pss/install/mysql-5.7.35>npm --version
8.3.1

su - pss

mkdir $HOME/mysql
mkdir $HOME/mysql/data
mkdir $HOME/etc

touch $HOME/mysql/mysql.sock
touch $HOME/mysql/data/mysql.log
touch $HOME/mysql/data/mysql.pid
wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz
wget https://dlcdn.apache.org/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz --no-check-certificate

/home/pss/install/mysql-5.7.35>vi kmake
cmake 
-DCMAKE_INSTALL_PREFIX=$HOME/mysql 
-DMYSQL_DATADIR=$HOME/mysql/data 
-DSYSCONFDIR=$HOME/etc 
-DWITH_BOOST=boost 
-DWITH_MYISAM_STORAGE_ENGINE=1 
-DWITH_INNObase_STORAGE_ENGINE=1 
-DWITH_MEMORY_STORAGE_ENGINE=1 
-DWITH_READLINE=1 
-DMYSQL_UNIX_ADDR=$HOME/mysql/mysql.sock 
-DMYSQL_TCP_PORT=3306 
-DENABLED_LOCAL_INFILE=1 
-DWITH_PARTITION_STORAGE_ENGINE=1 
-DEXTRA_CHARSETS=all 
-DDEFAULT_CHARSET=utf8 
-DDEFAULT_COLLATION=utf8_general_ci
/home/pss/install/mysql-5.7.35>chmod +x kmake
/home/pss/install/mysql-5.7.35>kmake
-- Running cmake version 2.8.12.2
-- Could NOT find Git (missing:  GIT_EXECUTABLE)
-- Configuring with MAX_INDEXES = 64U
-- CMAKE_GENERATOR: Unix Makefiles
-- SIZEOF_VOIDP 8
-- MySQL 5.7.35
-- Packaging as: mysql-5.7.35-Linux-x86_64
-- DTRACE is enabled
-- Local boost dir /home/pss/install/mysql-5.7.35/boost/boost_1_59_0
-- Found /home/pss/install/mysql-5.7.35/boost/boost_1_59_0/boost/version.hpp
-- BOOST_VERSION_NUMBER is #define BOOST_VERSION 105900
-- BOOST_INCLUDE_DIR /home/pss/install/mysql-5.7.35/boost/boost_1_59_0
-- NUMA library missing or required version not available
-- OPENSSL_INCLUDE_DIR = /usr/include
-- OPENSSL_LIBRARY = /usr/lib64/libssl.so
-- CRYPTO_LIBRARY = /usr/lib64/libcrypto.so
-- OPENSSL_MAJOR_VERSION = 1
-- OPENSSL_MINOR_VERSION = 00
-- OPENSSL_FIX_VERSION = 02
-- SSL_LIBRARIES = /usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl
-- AWK_EXECUTABLE is /bin/gawk
-- Could NOT find Git (missing:  GIT_EXECUTABLE)
-- LIBEVENT_VERSION_STRING 2.1.11-stable
-- LIBEVENT_VERSION (bundled) 2.1.11
-- WITH_PROTOBUF=bundled
-- protobuf version is 2.6
-- You need to set WITH_CURL. This variable needs to point to curl library.
-- Creating LDAP authentication SASL client library.
-- Required SASL header is missing.Skipping the LDAP SASL client authentication plugin.
-- Library mysqlclient depends on OSLIBS -lpthread;m;rt;/usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl
-- MERGE_CONVENIENCE_LIBRARIES TARGET mysqlclient
-- MERGE_CONVENIENCE_LIBRARIES LIBS clientlib;dbug;strings;vio;mysys;mysys_ssl;zlib
-- MERGE_CONVENIENCE_LIBRARIES MYLIBS clientlib;dbug;strings;vio;mysys;mysys_ssl;zlib
-- Using Boost headers from /home/pss/install/mysql-5.7.35/boost/boost_1_59_0
-- MYSQLX - Text log of protobuf messages enabled
-- checking for module 'libtirpc'
--   package 'libtirpc' not found
-- checking for module 'libtirpc'
--   package 'libtirpc' not found
-- RPC_INCLUDE_DIRS /usr/include
-- Googletest was not found. gtest-based unit tests will be disabled. You can run cmake . -DENABLE_DOWNLOADS=1 to automatically download and build required components from source.
-- If you are inside a firewall, you may need to use an https proxy: export https_proxy=http://example.com:80
-- executable target mysqld debug_target /home/pss/install/debug/sql/mysqld
-- Library mysqlserver depends on OSLIBS -lpthread;m;rt;/usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl;crypt
-- MERGE_CONVENIENCE_LIBRARIES TARGET mysqlserver
-- MERGE_CONVENIENCE_LIBRARIES LIBS dbug;strings;regex;mysys;mysys_ssl;vio;zlib;/usr/lib64/libssl.so;/usr/lib64/libcrypto.so;dl;crypt;federated_embedded;myisammrg_embedded;myisam_embedded;blackhole_embedded;heap_embedded;partition_embedded;innobase_embedded;lz4_lib;archive_embedded;csv_embedded;ngram_parser_embedded;sql_embedded
-- MERGE_CONVENIENCE_LIBRARIES MYLIBS dbug;strings;regex;mysys;mysys_ssl;vio;zlib;federated_embedded;myisammrg_embedded;myisam_embedded;blackhole_embedded;heap_embedded;partition_embedded;innobase_embedded;lz4_lib;archive_embedded;csv_embedded;ngram_parser_embedded;sql_embedded
-- library target mysqlserver debug_target /home/pss/install/debug/archive_output_directory/libmysqld.a
-- INSTALL mysqlclient.pc lib/pkgconfig
-- Skipping deb packaging on unsupported platform .
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- COMPILE_DEFINITIONS: _GNU_SOURCE;_FILE_OFFSET_BITS=64;HAVE_CONFIG_H
-- CMAKE_C_FLAGS: -fPIC -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing  -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement
-- CMAKE_CXX_FLAGS: -fPIC -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing  -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter
-- CMAKE_CXX_FLAGS_DEBUG: -DENABLED_DEBUG_SYNC -DSAFE_MUTEX -g
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -ffunction-sections -fdata-sections -O3 -g -DNDEBUG
-- CMAKE_CXX_FLAGS_RELEASE: -ffunction-sections -fdata-sections -O3 -DNDEBUG
-- CMAKE_CXX_FLAGS_MINSIZEREL: -ffunction-sections -fdata-sections -Os -DNDEBUG
-- CMAKE_C_link_FLAGS:
-- CMAKE_CXX_link_FLAGS:
-- CMAKE_EXE_linkER_FLAGS
-- CMAKE_MODULE_linkER_FLAGS
-- CMAKE_SHARED_linkER_FLAGS
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    WITH_MEMORY_STORAGE_ENGINE
    WITH_READLINE

-- Build files have been written to: /home/pss/install/mysql-5.7.35
/home/pss/install/mysql-5.7.35>make
[  0%] Built target INFO_BIN
[  0%] Built target INFO_SRC
[  0%] Built target abi_check
[  1%] Built target lz4_lib
[  1%] Built target zlib
[  1%] Built target libedit_common
[  1%] Built target libedit_vi
[  1%] Built target libedit_emacs
[  1%] Built target libedit_func
[  1%] Built target libedit_fcns
[  1%] Built target libedit_help
[  3%] Built target edit
[  4%] Built target event_core
[  4%] Built target event_extra
[  4%] Built target event_openssl
[  4%] Built target event_pthreads
[  6%] Built target strings
[  6%] Built target gen_dtrace_header
[ 11%] Built target mysys
[ 11%] Built target dbug
[ 12%] Built target vio
[ 12%] Built target regex
[ 12%] Built target re
[ 12%] Built target base64_test
[ 12%] Built target queues
[ 12%] Built target thr_lock
[ 12%] Built target mysys_ssl
[ 12%] Built target comp_err
[ 12%] Built target GenError
[ 13%] Built target clientlib
[ 13%] Built target libmysql
[ 13%] Built target libmysql_api_test
[ 13%] Built target mysqlclient
[ 14%] Built target binlogevents_static
[ 14%] Built target binlogstandalone_shared
[ 14%] Built target binlogstandalone_static
[ 14%] Built target federated
[ 14%] Built target federated_embedded
[ 15%] Built target myisammrg
[ 17%] Built target myisammrg_embedded
[ 19%] Built target myisam
[ 22%] Built target myisam_embedded
[ 22%] Built target myisam_ftdump
[ 22%] Built target myisamchk
[ 22%] Built target myisamlog
[ 22%] Built target myisampack
[ 28%] Built target perfschema
[ 29%] Built target mytap
[ 29%] Built target pfs_server_stubs
[ 29%] Built target pfs-t
[ 29%] Built target pfs_account-oom-t
[ 29%] Built target gen_lex_hash
[ 30%] Built target GenServerSource
[ 30%] Built target archive
[ 30%] Built target blackhole
[ 31%] Built target heap
[ 31%] Built target partition
[ 38%] Built target innobase
[ 39%] Built target csv
[ 39%] Built target ngram_parser
[ 39%] Built target comp_sql
[ 39%] Built target GenSysSchema
[ 39%] Built target gen_lex_token
[ 39%] Built target GenDigestServerSource
[ 39%] Built target GenBootstrapPriv
[ 51%] Built target sql
[ 52%] Built target binlog
[ 52%] Built target master
[ 53%] Built target slave
[ 53%] Built target rpl
[ 53%] Built target pfs_connect_attr-t
[ 53%] Built target pfs_host-oom-t
[ 53%] Built target pfs_instr-oom-t
[ 53%] Built target pfs_instr-t
[ 53%] Built target pfs_instr_class-oom-t
[ 53%] Built target pfs_instr_class-t
[ 53%] Built target pfs_misc-t
[ 53%] Built target pfs_noop-t
[ 53%] Built target pfs_user-oom-t
[ 53%] Built target blackhole_embedded
[ 54%] Built target heap_embedded
[ 54%] Built target hp_test1
[ 54%] Built target hp_test2
[ 55%] Built target mysqlservices
[ 55%] Built target example
[ 55%] Built target partition_embedded
[ 61%] Built target innobase_embedded
[ 61%] Built target archive_embedded
[ 61%] Built target csv_embedded
[ 61%] Built target replication_observers_example
[ 62%] Built target keyring_file
[ 62%] Built target ftexample
[ 62%] Built target ngram_parser_embedded
[ 62%] Built target test_session_detach
[ 62%] Built target test_session_in_thd
[ 62%] Built target test_session_info
[ 62%] Built target test_sql_2_sessions
[ 63%] Built target test_sql_all_col_types
[ 63%] Built target test_sql_cmds_1
[ 63%] Built target test_sql_commit
[ 63%] Built target test_sql_complex
[ 63%] Built target test_sql_errors
[ 63%] Built target test_sql_lock
[ 63%] Built target test_sql_processlist
[ 63%] Built target test_sql_replication
[ 63%] Built target test_sql_shutdown
[ 63%] Built target test_sql_sqlmode
[ 63%] Built target test_sql_stored_procedures_functions
[ 63%] Built target test_sql_views_triggers
[ 63%] Built target test_x_sessions_deinit
[ 63%] Built target test_x_sessions_init
[ 63%] Built target rewriter
[ 63%] Built target daemon_example
[ 63%] Built target version_token
[ 63%] Built target auth
[ 63%] Built target auth_socket
[ 63%] Built target auth_test_plugin
[ 63%] Built target mysql_no_login
[ 63%] Built target qa_auth_client
[ 63%] Built target qa_auth_interface
[ 63%] Built target qa_auth_server
[ 63%] Built target test_framework
[ 63%] Built target test_services
[ 63%] Built target test_services_thread
[ 63%] Built target connection_control
[ 63%] Built target semisync_master
[ 63%] Built target semisync_slave
[ 64%] Built target rewrite_example
[ 64%] Built target audit_null
[ 64%] Built target test_security_context
[ 64%] Built target validate_password
[ 64%] Built target test_udf_services
[ 64%] Built target GenLiteProtos
[ 66%] Built target protoclib
[ 68%] Built target protobuf
[ 68%] Built target protoc
[ 69%] Built target protobuf-lite
[ 74%] Built target mysqlx
[ 75%] Built target mysqlxtest
[ 75%] Built target keyring_udf
[ 76%] Built target gr_unit_test_resource
[ 81%] Built target group_replication
[ 81%] Built target no_plan-t
[ 81%] Built target simple-t
[ 81%] Built target skip-t
[ 81%] Built target skip_all-t
[ 81%] Built target todo-t
[ 81%] Built target basic-t
[ 81%] Built target innochecksum
[ 81%] Built target lz4_decompress
[ 81%] Built target my_print_defaults
[ 81%] Built target perror
[ 81%] Built target replace
[ 81%] Built target resolve_stack_dump
[ 81%] Built target resolveip
[ 82%] Built target zlib_decompress
[ 82%] Built target mysql
[ 82%] Built target mysql_config_editor
[ 82%] Built target mysql_install_db
[ 82%] Built target mysql_plugin
[ 82%] Built target mysql_secure_installation
[ 83%] Built target mysql_ssl_rsa_setup
[ 84%] Built target client_base
[ 84%] Built target mysqlcheck_core
[ 84%] Built target GenFixPrivs
[ 84%] Built target mysql_upgrade
[ 84%] Built target mysqladmin
[ 84%] Built target mysqlbinlog
[ 84%] Built target mysqlcheck
[ 84%] Built target mysqldump
[ 84%] Built target mysqlimport
[ 84%] Built target mysqlshow
[ 84%] Built target mysqlslap
[ 84%] Built target mysqltest
[ 88%] Built target mysqlpump_lib
[ 88%] Built target boost_lib
[ 88%] Built target mysqlpump
[ 88%] Built target bug25714
[ 88%] Built target mysql_client_test
[ 88%] Built target locking_service
[ 88%] Built target mysql_tzinfo_to_sql
[ 88%] Built target mysqld
[ 88%] Built target sqlgunitlib
[ 88%] Built target udf_example
[ 88%] Built target GenYaccEmbeddedSource
[100%] Built target sql_embedded
[100%] Built target mysqlserver
[100%] Built target mysql_client_test_embedded
[100%] Built target mysql_embedded
[100%] Built target mysqltest_embedded
[100%] Built target my_safe_process
/home/pss/install/mysql-5.7.35>
/home/pss/install/mysql-5.7.35>make install
/home/pss>cat /home/pss/etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[client]
default-character-set=utf8

[mysqld]
federated
port      = 3306
basedir   = /home/pss/mysql
datadir   = /home/pss/mysql/data
tmpdir    = /home/pss/mysql/data
socket    = /home/pss/mysql/mysql.sock
log-error = /home/pss/mysql/data/mysql.log
pid-file  = /home/pss/mysql/data/mysql.pid

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 512M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
#server_id = 11

explicit_defaults_for_timestamp

# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 256M
sort_buffer_size = 64M
read_rnd_buffer_size = 32M

max_connections=3000

group_concat_max_len = 409600
log_bin_trust_function_creators = 1

sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,PIPES_AS_CONCAT,ANSI_QUOTES
cd $HOME/mysql/bin
/home/pss/mysql/bin>
/home/pss/mysql/bin>./mysqld --user=mysql --basedir=$HOME/mysql --datadir=$HOME/mysql/data/ --initialize
/home/pss/mysql/data>cat mysql.log
2022-03-10T03:28:15.614691Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2022-03-10T03:28:17.183936Z 0 [Warning] InnoDB: New log files created, LSN=45790
2022-03-10T03:28:17.304546Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2022-03-10T03:28:17.403060Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 205e5e55-a022-11ec-a93c-fa163e533aaf.
2022-03-10T03:28:17.411703Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2022-03-10T03:28:17.621612Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2022-03-10T03:28:17.621630Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2022-03-10T03:28:17.622411Z 0 [Warning] CA certificate ca.pem is self signed.
2022-03-10T03:28:17.715257Z 1 [Note] A temporary password is generated for root@localhost: !hlf#!h(,8pG

A temporary password is generated for root@localhost: !hlf#!h(,8pG

/home/pss/bin>mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 3
Server version: 5.7.35

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

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> SET PASSWORD = PASSWORD('password@dbadmin');
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password@dbadmin' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)

############################################################
PATH=$HOME/mysql/bin:$PATH:$HOME/nginx/sbin:$HOME/bin:.
export PATH
############################################################
JAVA_HOME=$HOME/jdk
JRE_HOME=$HOME/jdk/jre

PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib

export JAVA_HOME JRE_HOME PATH CLASSPATH
############################################################
CATALINA_HOME=$HOME/tomcat
CATALINA_base=$HOME/tomcat

PATH=$PATH:$CATALINA_base/bin

export PATH CATALINA_base
############################################################
/home/pss>java --version
java 17.0.2 2022-01-18 LTS
Java(TM) SE Runtime Environment (build 17.0.2+8-LTS-86)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.2+8-LTS-86, mixed mode, sharing)
/home/pss>
/home/pss>
/home/pss>mvn --version
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /home/pss/maven
Java version: 17.0.2, vendor: Oracle Corporation, runtime: /home/pss/jdk
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.el7.x86_64", arch: "amd64", family: "unix"
/home/pss>
/home/pss>
/home/pss>python --version
Python 3.8.6
/home/pss>
 
 
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/767111.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号