首页 文章 精选 留言 我的

精选列表

搜索[客户端v2],共10008篇文章
优秀的个人博客,低调大师

Java入门项目:学生信息管理系统V2

基于上次的项目进行代码优化重构。 案例功能简介:界面:无(上来还是对用户不友好,哈哈哈)功能: 添加学生信息(学号、姓名、年龄)删除指定学生信息显示所有学生信息 重构主要是对储存方式的改变,由数组储存变为集合储存。 项目跑起来效果 和之前一样,很尴尬,更新的只是储存方式。 一样的结构分层:界面层实现对业务层的调用 业务层 业务层接口 业务层实现:对数据层的调用 数据层 数据层接口 数据层实现 GitHub源代码地址:这里这里 代码文件结构: 学生类: 异常类: 管理接口: 管理实现类: 视图类:

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

Heartbeat-Gui V2 实现HA LAMP 搭建wordpress博客

环境: N F S:172.16.0.3 (OS CentOS 7) node1:172.16.0.5 (OS CentOS 6.7) node2:172.16.0.6 (OS CentOS 6.7) 浮动IP:172.16.0.168 php php-mysql 安装: #yuminstallphpphp-mysql俩个节点都安装 Heartbeat 安装: 互信操作:俩边都操作: #ssh-keygen-trsa #ssh-copy-id-i.ssh/id_rsa.pubroot@x.x.x.x 修改主机名: #cat/etc/sysconfig/network //node2NETWORKING=yesHOSTNAME=node2.sunshine.com #cat/etc/sysconfig/network//node1NETWORKING=yesHOSTNAME=node1.sunshine.com 本地/etc/hosts解析: #cat/etc/hosts|tail-2 172.16.0.5node2.sunshine.comnode2 172.16.0.6node1.sunshine.comnode1#cat/etc/hosts|tail-2 172.16.0.5node2.sunshine.comnode2 172.16.0.6node1.sunshine.comnode1 同步时间:两边都操作,这里测试就不做crontab 不同时间了: #servicentpdatestart #[root@HA2~]#date;sshnode2'date' WedOct2615:28:32CST2016 WedOct2615:28:32CST2016 重启: #shutdown-rnow 安装epel源: #rpm-Uivhftp://ftp.pbone.net/mirror/dl.iuscommunity.org/pub/ius/archive/Redhat/6/i386/epel-release-6-5.noarch.rpm 安装依赖: #yuminstallnet-snmp-libslibnetPyXMLpygtk2-libglade-y 安装Heartbeat相关程序包:找不到的同学别灰心我的百度云盘:http://pan.baidu.com/s/1boGx6t5 #rpm-ivhheartbeat-2.1.4-12.el6.x86_64.rpm\ >heartbeat-stonith-2.1.4-12.el6.x86_64.rpm\ >heartbeat-pils-2.1.4-12.el6.x86_64.rpm\ >heartbeat-gui-2.1.4-12.el6.x86_64.rpm 如报以下错误:安装libtool-ltdl 既可以: error:Faileddependencies: libltdl.so.7()(64bit)isneededbyheartbeat-2.1.4-12.el6.x86_64 libltdl.so.7()(64bit)isneededbyheartbeat-stonith-2.1.4-12.el6.x86_64 libltdl.so.7()(64bit)isneededbyheartbeat-pils-2.1.4-12.el6.x86_64#yuminstalllibtool-ltdl-y//安装libtool-ltdl -安装支持xshell Xmanger包,否则网络上很方法也是不可用的: #yuminstallxorg-x11-xauth//如果不安装使用hb_gui是无法调用x11 ha.cf配置: #grep-v"#"ha.cf logfile /var/log/heartbeat-log mcasteth0225.10.210.169410 auto_failbackon node node1.sunshine.com node node2.sunshine.com crm on ping172.16.0.1 #grep-v"#"authkeys auth2 2sha1Dn880wJZxfsUpioJWy7FgQ #passwdhacluster //在哪里启动,就在哪里设置hacluster密码 #hb_gui& compression bz2 compression_threshold2 authkeys配置 [root@node2ha.d]#catauthkeys|tail-4|grep-v"#" auth2 2sha1Dn880wJZxfsUpioJWy7FgQ 在node{1|2}清除iptables并关闭selinux #iptables-F#setenforce0#cat/etc/selinux/config|tail-3|head-1 SELINUXTYPE=targeted httpd 安装: #yuminstallhttpd-y //node{1|2} #echo"<h1>node1</h1>">/var/www/html/index.html //node1执行 #echo"<h1>node2</h1>">/var/www/html/index.html //node2执行 #curlnode{1,2} //访问测试 <h1>node1</h1> <h1>node2</h1> #servicehttpdstop;sshnode2'servicehttpdstop' Stoppinghttpd:[OK] Stoppinghttpd:[OK] #chkconfighttpdoff;sshnode2'chkconfighttpdoff'//关闭httpd自动启动 #chkconfighttpd--list;sshnode2'chkconfighttpd--list'//查看是否关闭 httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off NFS Server搭建:这是在NFS服务器上执行 #groupadd-g306mysql #useradd-g306-u306-M-rmysql #mkdir/data/mydata #chown-Rmysql.mysql/data/mydata #cat/etc/exports //编辑需要导出的文件 /data/mydata172.16.0.0/24(rw,no_root_squash) //no_root_squash表示远端主机root用户不转换nobody用户 #systemctlstartnfs.service //启动nfs服务 #cat/etc/rc.local|tail-1 //加入开机启动 /usr/bin/systemctlstartnfs.service PerconaMySQL 安装: #mount-tnfs172.16.0.3:/data/mydata/mydata //挂载nfs文件至本地 #yuminstallopenssl-devel-yes//安装openssl-devel包,至此Preconamysql的ssl #cd/usr/lib64//进入lib64#ln-slibssl.so.1.0.1elibssl.so.6//软连接,因为Preconamysql要依赖该库,但是我们系统上的是libssl.so.1.0.1e #ln-svlibcrypto.solibcrypto.so.6//软连接,因为Preconamysql要依赖该库,但是我们系统上的是libcrypto.so #tarxf/usr/local/src/Percona-Server-5.6.27-rel76.0-Linux.x86_64.ssl098e.tar.gz-C/usr/local//解压缩至/usr/local,个人习惯 #cd/usr/local//进入local #ln-svPercona-Server-5.6.27-rel76.0-Linux.x86_64.ssl098e.tar.gzmysql//不要问为什么,大家都这么做 #groupadd-g306mysql//新建组,指定GID306 #useradd-g306-u306-r-Mmysql//新建用户,指定GID,UID为306 #mkdir/mydata//创建NFS挂载点 #cd/usr/local/mysql//进入程序包 #chown-Rmysql.mysql./*//-R递归 #scripts/mysql_install_db--datadir=/mydata/--user=mysql//初始化 #cp-psupport-files/mysql.server/etc/init.d/mysqld//拷贝启动脚本 #vim/etc/my.cnf//mysql的配置文件,里面的参数我调的很小,是因为仅做博客测试使用 #TheMySQLserver[mysqld] port=3306 user=mysql datadir=/mydata tmpdir=/dev/shm slave-load-tmpdir=/tmp socket=/mydata/mysql.sock key_buffer_size=32M max_allowed_packet=8M#table_cache=30s join_buffer_size=16M sort_buffer_size=16Mread_buffer_size=16Mread_rnd_buffer_size=16M myisam_sort_buffer_size=32M query_cache_size=16M query_cache_type=1 max_tmp_tables=64 tmp_table_size=64M max_heap_table_size=64M thread_cache_size=32 thread_concurrency=16 max_connections=1986 max_user_connections=0 max_connect_errors=99999999 wait_timeout=28800 interactive_timeout=7200 slow_query_log=1 long_query_time=3 log_slow_slave_statements=1 #slow_query_log_timestamp_always=1 slow_query_log_file=/mydata/slow.log back_log=200 myisam_repair_threads=1 myisam-recover=DEFAULT expire_logs_days=20 pid-file=/mydata/mysql.pid binlog_format=mixed init-connect='SETNAMESutf8' character-set-server=utf8 skip-character-set-client-handshakebind-address=0.0.0.0 skip-external-locking#skip-symlink log-slave-updates skip-name-resolve#read_only skip-slave-start server-id=3306 log-bin=3306-bin relay-log=3306-relay-binlog-error=error.log#-------------innodb-------------- innodb_file_format=Barracuda default-storage-engine=InnoDB innodb_buffer_pool_size=64M innodb_additional_mem_pool_size=32M innodb_data_file_path=ibdata1:100M:autoextend#innodb_autoextend_increment=100M innodb_flush_log_at_trx_commit=0 innodb_log_buffer_size=8M innodb_log_file_size=32M innodb_log_files_in_group=3 innodb_max_dirty_pages_pct=90 innodb_lock_wait_timeout=20 innodb_file_per_table=1 innodb_flush_method=O_DIRECT innodb_support_xa=0 innodb_io_capacity=500 #innodb_buffer_pool_instances=4 [client] user=mysql port=3306 socket=/mydata/mysql.sock [myisamchk] key_buffer=32 sort_buffer_size=32 read_buffer=32M write_buffer=32M #servicemysqldstart //测试是否能够启动 #servicemysqldstop //然后停止服务 #chkconfigmysqldoff //关闭自动启动ps:node{1|2}都是一样的操作 安装博客 下载程序包 #cd/usr/local/src #wgethttps://cn.wordpress.org/wordpress-4.5.3-zh_CN.tar.gz 解压并设置 777 权限,这边为了方便 #tarxfwordpress-4.5.3-zh_CN.tar.gz-C/var/www/html/ #cd/var/www/html/ #chown-R777wordpress 手动启动mysql #servicemysqdstart 进入mysql创建wordpress库,提供给wordpress初始化呢使用 #mysql-uroot-p //回车输入自己的密码,没设定密码直接回车 #CREATEDATABASEwordpess; 授权wordpress库权限,生产机建议不要使用通配符 #GRANTALLONwordpress.*TOwordpress@‘172.16.%.%'INDENTIFIEDBY'redhat'; #FLUSHPRIVILEGES; 博客初始化:先手动启动mysql,初始化完毕后再手动关闭mysql,这里太简单 不上图了 1、填上mysql地址:也就是我们的浮动IP:172.16.0.168 2、填上用户:在数据库创建的:wordpress 3、填上密码:redhat 4、其它根据自己定义填写即可。 Hearbeat-Gui资源配置: #hb_gui& 1、Resources新建组资源,并命名,注意Parameters里面的值 2、访问测试 3、节点切换并访问测

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

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

用户登录
用户注册