首页 文章 精选 留言 我的

精选列表

搜索[本地大模型],共10000篇文章
优秀的个人博客,低调大师

Java-Win10下JDK10.0.2版本环境变量配置

今天由于实在不能忍受卡顿的机器,重装了一下系统,Win10专业版,之前的开发环境全部需要重装一遍,以前使用的JDK8,现在JDK10都已经出来了,于是想着装起来试一下。 下载安装包 首先到Oracle官方网站下载地址下载JDK 10.0.2 Download JDK 安装JDK 安装这块没什么好讲的,直接双击安装就可以了,这里有一个发现,就是安装完成后在JDK的lib文件夹下找不到熟悉的tools.jar,之前安装8以前版本的时候都有这个,后面的环境变量配置会有不同。 配置环境变量 重点来了,经过我多次测试,环境变量按如下配置即可 JDK8及以前版本经常配置的用户变量JAVA_HOME在JDK10下不需要再配置了; 新增系统变量CLASSPATH,输入值【.;C:\Program Files\Java\jdk-10.0.2\lib】 CLASSPATH 在系统变量Path中新增值【C:\Program Files\Java\jdk-10.0.2\bin】 Path 现在打开控制台,输入Java -version,可以看到如下结果 1.png

优秀的个人博客,低调大师

MySQL主从架构由5.5版本升级到5.6方案

主从架构[一主多从]升级步骤 1. 首先安装最新版本的MySQL mysql-5.6.26.tar.gz :每台主机分别安装目录:/usr/local/mysql-5.6 yum install libaio-devel 编译参数 /usr/local/cmake/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql-5.6 \ -DMYSQL_DATADIR=/usr/local/mysql-5.6/data \ -DWITH_MYISAM_STORAGE_ENGINE=1 \ -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_ARCHIVE_STORAGE_ENGINE=1 \ -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \ -DENABLE_LOCAL_INFILE=1 \ -DDEFAULT_CHARSET=utf8 \ -DDEFAULT_COLLATION=utf8_general_ci \ -DEXTRA_CHARSETS=all \ -DMYSQL_TCP_PORT=3306 \ -DWITH_DEBUG=OFF \ -DWITH_READLINE=1 \ -DWITH_EMBEDDED_SERVER=1 \ -DMYSQL_UNIX_ADDR=/tmp/mysql6.sock \ -DWITH_SSL=bundled \ -DENABLE_DTRACE=OFF make;make install 软件安装OK 2. 停止其中一个从库: 将原版本中的数据[data]目录[/usr/local/mysql]拷贝到新版本对应的目录下面[/usr/local/mysql-5.6] cp -r /usr/local/mysql/data /usr/local/mysql-5.6/ 3. 变更权限: chown -R root . chown -R mysql data 4. 变更启动脚本 rm -f /etc/init.d/mysqld cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld-5.5 cp /usr/local/mysql-5.6/support-files/mysql.server /etc/init.d/mysqld-5.6 chmod +x /etc/init.d/mysqld-5.* 5.启动新版本实例 注意:配置文件必须配置正确,如果配置了旧的参数,会导致实例无法启动 /etc/init.d/mysqld-5.6 start 然后观察错误文件,会看到如下报错: 2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'setup_actors' has the wrong structure 2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'setup_objects' has the wrong structure 2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_index_usage' has the wrong structure 2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_table' has the wrong structure 2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'table_lock_waits_summary_by_table' has the wrong structure 2015-08-04 13:16:31 18815 [ERROR] Column count of mysql.threads is wrong. Expected 14, found 3. Created with MySQL 50518, now running 50626. Please use mysql_upgrade to fix this error. 2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_current' has the wrong structure 2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_history' has the wrong structure 2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_history_long' has the wrong structure 2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_thread_by_event_name' has the wrong structure 2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_account_by_event_name' has the wrong structure 2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_user_by_event_name' has the wrong structure 2015-08-04 13:16:31 18815 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_host_by_event_name' has the wrong structure 6. 运行新版本下的升级脚本进行升级检查,修复mysql库中的主要表 /usr/local/mysql-5.6/bin/mysql_upgrade -u root -proot Warning: Using a password on the command line interface can be insecure. Looking for 'mysql' as: /usr/local/mysql_5.6/bin/mysql Looking for 'mysqlcheck' as: /usr/local/mysql-5.6/bin/mysqlcheck Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql6.sock' Warning: Using a password on the command line interface can be insecure. Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql6.sock' Warning: Using a password on the command line interface can be insecure. mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK mysql.general_log OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK mysql.servers OK mysql.slave_master_info OK mysql.slave_relay_log_info OK mysql.slave_worker_info OK mysql.slow_log OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK Running 'mysql_fix_privilege_tables'... Warning: Using a password on the command line interface can be insecure. Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql6.sock' Warning: Using a password on the command line interface can be insecure. Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/tmp/mysql6.sock' Warning: Using a password on the command line interface can be insecure. babysitter.abc OK babysitter.account_tactics_daily_availability OK babysitter.andtlhz_new OK 7. 检查完后重启实例 /etc/init.d/mysqld-5.6 restart 配置文件 [client] #default-character-set = utf8 port = 3306 socket = /tmp/mysql6.sock [mysqld] #skip-grant-tables user = mysql port = 3306 socket = /tmp/mysql6.sock pid-file = /usr/local/mysql-5.6/data/mysql-upgrade-master.pid #pid-file = /usr/local/mysql-5.6/data/[主机名].pid #pid-file = /usr/local/mysql-5.6/data/[主机名].pid ################## basedir = /usr/local/mysql-5.6 datadir = /usr/local/mysql-5.6/data server-id = 1 #server-id = 2 #从库1配置 #server-id = 3 #从库2配置 log_slave_updates = 1 log_slave_updates = 0 #从库配置 log-bin = mysql-bin #log-bin = mysql-bin #从库不需要开启binlog binlog_format = mixed binlog_cache_size = 64M max_binlog_cache_size = 128M expire_logs_days = 2 max_binlog_size = 1G binlog-ignore-db = mysql binlog-ignore-db = test binlog-ignore-db = information_schema binlog-ignore-db = performance_schema query_cache_type =0 key_buffer_size = 384M sort_buffer_size = 2M read_buffer_size = 2M read_rnd_buffer_size = 16M join_buffer_size = 2M thread_cache_size = 8 query_cache_size = 32M query_cache_limit = 2M query_cache_min_res_unit = 2K thread_concurrency = 32 table_open_cache = 512 open_files_limit = 10240 back_log = 600 max_connections = 5000 max_connect_errors = 6000 external-locking = FALSE max_allowed_packet = 10M default-storage-engine = MYISAM thread_stack = 192K transaction_isolation = READ-COMMITTED tmp_table_size = 256M max_heap_table_size = 512M bulk_insert_buffer_size = 64M long_query_time = 2 slow_query_log slow_query_log_file = /usr/local/mysql-5.6/data/slow_query.log skip-name-resolve explicit_defaults_for_timestamp = true #新版本关于时间戳的新特性配置 innodb_buffer_pool_size = 512M innodb_data_file_path = ibdata1:256M:autoextend innodb_file_io_threads = 4 innodb_thread_concurrency = 8 innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 16M innodb_log_file_size = 128M innodb_log_files_in_group = 3 innodb_max_dirty_pages_pct = 90 innodb_lock_wait_timeout = 120 innodb_file_per_table = 1 innodb_flush_method = O_DIRECT [mysqldump] quick max_allowed_packet = 10M [mysql] no-auto-rehash safe-updates [mysqlhotcopy] interactive-timeout [myisamchk] key_buffer_size = 256M sort_buffer_size = 256M read_buffer = 2M write_buffer = 2M ################## 以上操作顺序为:从1》从2》主 特别注意配置文件的正确性 磁盘空间足够存放两份旧数据的大小 旧数据不动,以防升级失败,可以回退到旧版本 本文转自andylhz 51CTO博客,原文链接:http://blog.51cto.com/andylhz2009/1844007,如需转载请自行联系原作者

资源下载

更多资源
腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册