首页 文章 精选 留言 我的

精选列表

搜索[HTAP架构],共10000篇文章
优秀的个人博客,低调大师

构建基于GFS文件系统的RHCS架构集群

先创建共享存储服务器: [root@station39 ~]# yum install scsi-target-utils -y [root@station39 ~]# service tgtd start 查看下3260端口是否启动。 此时仅仅是提供的服务还没有提供任何共享的存储设备。 新建一个分区sda5,但是不要格式化: 新建一个target: [root@primary ~]# tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2011-04.com.a.linux:appdata [root@primary ~]# tgtadm --lld iscsi --op show --mode target 新建一个逻辑单元: [root@primary ~]# tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/sda5 [root@primary ~]# tgtadm --lld iscsi --op show --mode target 默认情况下SCSI设备禁止任何人访问。 设置访问控制权限: [root@primary ~]# tgtadm --lld iscsi --op bind --mode target --tid 1 -I 192.168.0.0/24 [root@primary ~]# tgtadm --lld iscsi --op show --mode target OK,此时共享设备就可以被客户端访问挂载了。 三个节点: node1.a.com 192.168.0.127 node2.a.com 192.168.0.61 node3.a.com 192.168.0.23 首先确保三台节点上iscsi-initiator-utils,ricci都安装完毕,在其中一个节点上安装luci。 yum install iscsi-initiator-utils -y yum install ricci -y yum install luci -y 编辑/etc/hosts 文件,确保三台节点之间可以互相解析。 192.168.0.127 node1.a.com node1 192.168.0.61 node2.a.com node2 192.168.0.23 node3.a.com node3 分别在每台节点上编辑/etc/iscsi/initiatorname.iscsi文件,给共享存储起一个别名: InitiatorName=iqn.2011-04.com.a.node1/2/3 启动iscsi,ricci服务 ,启动一台节点上的luci服务。 使用浏览器访问https://192.168.0.23/8084开始创建集群: cluster---->Create a New Cluster 给每个节点添加fence: 添加故障转移域: 在任意一个节点上查看集群状态: # cman_tool status # clustat 实现分布式文件锁: #service rgmangager start 配置LVM支持集群的形式: #lvmconf –enable-cluster #service clvmd start 查看GFS的模块是否已经加载: #lsmod | grep gfs 启动GFS文件系统: #service gfs start #service gfs2 start 将远端的共享存储挂载到节点上 #iscsiadm –m discovery –t sendtargets –p 192.168.0.39 #iscsiadm –m node –T iqn.2011-04.com.a.linux.appdata –p 192.168.0. 39 –l 在任意一个节点上对挂载的共享存储设备创建LVM: #pvcreate /dev/sdb #vgcreate vg1 /dev/sdb #lvcreate –L 5G –n gfsdata vg1 LVM已经创建成功,下面将vg1格式化为GFS文件系统: #gfs_mkfs –p lock_dlm –t gfs:gfsdata –j 5 /dev/vg1/gfsdata 挂载到本地目录下: mount –t gfs /dve/vg1/gfsdata /gfs 此时,无论你在哪个节点上对文件系统进行创建或者修改文件,其他节点上均可以看到。 本文转自 490999122 51CTO博客,原文链接:http://blog.51cto.com/lyp0909/550640,如需转载请自行联系原作者

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

实战从源码编译LAMP架构+Discuz搭建bbs论坛

实验环境:RHEL6.5 server1.example.com 172.25.254.1 实验环境:RHEL6.5 实验内容:1.MYSQL源码编译 2.NGINX源码编译 3.PHP源码编译 4.搭建论坛 安装包:cmake-2.8.12.2-4.el6.x86_64.rpm mysql-boost-5.7.11.tar.gz gd-devel-2.0.35-11.el6.x86_64.rpm nginx-1.9.14.tar.gz re2c-0.13.5-1.el6.x86_64.rpm php-5.6.19.tar.bz2 Discuz_X3.2_SC_UTF8.zip 1.MYSQL源码编译 1) [root@server1 1.mysql编译]# ls cmake-2.8.12.2-4.el6.x86_64.rpm mysql-boost-5.7.11.tar.gz [root@server1 1.mysql编译]# tar -zxf mysql-boost-5.7.11.tar.gz [root@server1 1.mysql编译]# cd mysql-5.7.11 2 ) [root@server1 1.mysql编译]# yum update cmake-2.8.12.2-4.el6.x86_64.rpm [root@server1 mnt]# yum install cmake gcc gcc-c++ ncurses-devel bison -y 3) cmake \ #检查编译环境 -DCMAKE_INSTALL_PREFIX=/usr/local/lnmp/mysql \##安装路径 -DMYSQL_DATADIR=/usr/local/lnmp/mysql/data\##数据路径 -DMYSQL_UNIX_ADDR=/usr/local/lnmp/mysql/data/mysql.sock \#套接字接口 -DWITH_MYISAM_STORAGE_ENGINE=1 \ ##mysql引擎 -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DDEFAULT_CHARSET=utf8\##使用utf8字符 -DDEFAULT_COLLATION=utf8_general_ci\##校验字符 -DEXTRA_CHARSETS=all\##安装所有扩展字符集 -DWITH_BOOST=boost/boost_1_59_0/\##boost路径 [root@server1 mysql-5.7.11]# make ###编译 [root@server1 mysql-5.7.11]# make install ###安装 注意: rm -fr CMakeCache.txt ##错误解决完毕每次删除 lscpu ##检测cpu top 按1 ##检测每个cpu负载 make -j2##用两个cpu做编译 4)设定mysql信息 [root@server1 php-5.6.19]# groupadd -g 27 mysql [root@server1 php-5.6.19]# useradd -u 27 -g 27 -s /bin/false mysql [root@server1 php-5.6.19]# cp /usr/local/lnmp/mysql/support-files/mysql.server /etc/init.d/ [root@server1 php-5.6.19]# mv /etc/my.cnf /etc/my.cnf.bak [root@server1 php-5.6.19]# cp /usr/local/lnmp/mysql/support-files/my-default.cnf /etc/my.cnf [root@server1 php-5.6.19]# vim /etc/profile PATH=$PATH:/usr/local/lnmp/mysql/bin [root@server1 php-5.6.19]# source /etc/profile [root@server1 php-5.6.19]# chown -R mysql.mysql /usr/local/lnmp/mysql [root@server1 php-5.6.19]# mysqld --initialize --user=mysql ( --initialize-insecure ##密码为空,--user=mysql ##运行用户 --basedir= ##mysql基本目录 --datadir= ##mysql数据目录) 2016-09-15T04:12:17.004704Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 。。。。。。。。。。。。。。 2016-09-15T04:12:17.626882Z 1 [Note] A temporary password is generated for root@localhost:jT!#LrMg-5t1 《《《数据库密码(安全初始化时需要使用) [root@server1 php-5.6.19]# chown -R root /usr/local/lnmp/mysql/ [root@server1 php-5.6.19]# chown -R mysql /usr/local/lnmp/mysql/data/ [root@server1 php-5.6.19]# /etc/init.d/mysql.server start [root@server1 php-5.6.19]# mysql_secure_installation ####安全初始化 Securing the MySQL server deployment. Enter password for user root: ###此处输入前边产生的密码 Press y|Y for Yes, any other key for No: y Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1 ##选择密码类型 Change the password for root ? ((Press y|Y for Yes, any other key for No) : y ###修改密码 New password: Re-enter new password: Estimated strength of the password: 100 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y Remove anonymous users? (Press y|Y for Yes, any other key for No) : y Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y All done! 2.NGINX源码编译 2.1关闭debug调式模式,屏蔽nginx版本号 [root@server1 mnt]# tar -zxf nginx-1.9.14.tar.gz [root@server1 mnt]# cd nginx-1.9.14 [root@server1 nginx-1.9.14]# vim src/core/nginx.h ##伪装版本 #define nginx_version 1009014 #define NGINX_VERSION "1.9.14" #define NGINX_VER "willis/" [root@server1 nginx-1.9.14]# vim auto/cc/gcc ##关闭debug调式 178 # debug 179 #CFLAGS="$CFLAGS -g" [root@server1 fpm]# groupadd -g 666 nginx [root@server1 fpm]# useradd -u 666 -g 666 -s /sbin/nologin nginx 2.2编译安装 [root@server1 nginx-1.9.14]# yum insall pcre-devel openssl-devel -y [root@server1 nginx-1.9.14]# ./configure \ > --prefix=/usr/local/lnmp/nginx \ > --with-http_ssl_module \ > --with-http_stub_status_module ##监控模块 [root@server1 nginx-1.9.14]# make [root@server1 nginx-1.9.14]# make install [root@server1 nginx-1.9.14]# cd /usr/local/lnmp/nginx/ [root@server1 nginx]# vim /etc/profile export PATH=$PATH:/usr/local/lnmp/mysql/bin:/usr/local/lnmp/nginx/sbin [root@server1 nginx]# source /etc/profile [root@server1 nginx]# nginx ##开启nginx [root@server1 nginx]# netstat -antple |grep nginx tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 181762 29192/nginx [root@server1 nginx]# curl -I localhost ##检测http协议提供程序 HTTP/1.1 200 OK Server: willis/ ###显示版本已经隐藏 Date: Thu, 15 Sep 2016 04:48:49 GMT Content-Type: text/html Content-Length: 612 Last-Modified: Wed, 14 Sep 2016 21:26:20 GMT Connection: keep-alive ETag: "57d9c07c-264" Accept-Ranges: bytes [root@server1 nginx]# du -sh /usr/local/lnmp/nginx/ ###轻量级nginx 944K/usr/local/lnmp/nginx/ [root@server1 nginx]# nginx -t ##检测nginx配置 nginx: the configuration file /usr/local/lnmp/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/lnmp/nginx/conf/nginx.conf test is successful [root@server1 nginx]# nginx -s reload ##加载配置 3.PHP源码编译 3.1编译安装php [root@server1 mnt]# ls gd-devel-2.0.35-11.el6.x86_64.rpm re2c-0.13.5-1.el6.x86_64.rpm php-5.6.19.tar.bz2 [root@server1 mnt]# yum install libxml2-devel curl-devel gd-devel-2.0.35-11.el6.x86_64.rpm gmp-devel net-snmp-devel.x86_64 re2c-0.13.5-1.el6.x86_64.rpm -y [root@server1 mnt]# tar -jxf php-5.6.19.tar.bz2 [root@server1 mnt]# cd php-5.6.19 [root@server1 php-5.6.19]# ./configure --prefix=/usr/local/lnmp/php \ > --with-config-file-path=/usr/local/lnmp/php/etc \ > --with-mysql=mysqlnd \##自动加载mysql信息 > --with-mysqli=mysqlnd \ > --with-pdo-mysql=mysqlnd \ > --with-openssl \ > --with-snmp \##加载简单网管协议 > --with-gd \##支持图形 > --with-zlib \##支持网页压缩 > --with-curl \##支持文本浏览 > --with-libxml-dir \##支持xml > --with-png-dir \##支持png图片 > --with-jpeg-dir \##支持jpeg > --with-freetype-dir \ > --without-pear \##不联网安装 > --with-gettext \## > --with-gmp \##支持gmp > --enable-inline-optimization \ > --enable-soap \##支持动态加载模块 > --enable-ftp \##支持ftp > --enable-sockets \##支持套结字 > --enable-mbstring \ > --enable-fpm \ > --with-fpm-user=nginx \##使php和nginx权限一致 > --with-fpm-group=nginx [root@server1 php-5.6.19]# make [root@server1 php-5.6.19]# make install 3.2php 配置 [root@server1 php-5.6.19]# cp php.ini-production /usr/local/lnmp/php/etc/php.ini [root@server1 php-5.6.19]# cd /usr/local/lnmp/php/etc [root@server1 etc]# cp php-fpm.conf.default php-fpm.conf [root@server1 etc]# vim php-fpm.conf 25 pid = run/php-fpm.pid [root@server1 etc]# vim php.ini 925 date.timezone = Asia/Shanghai 1001 pdo_mysql.default_socket=/usr/local/lnmp/mysql/data/mysql.sock 1150 mysql.default_socket=/usr/local/lnmp/mysql/data/mysql.sock 1209 mysqli.default_socket=/usr/local/lnmp/mysql/data/mysql.sock [root@server1 etc]# cd /mnt/php-5.6.19/sapi/fpm/ [root@server1 fpm]# mv init.d.php-fpm /etc/init.d/fpm [root@server1 fpm]# chmod +x /etc/init.d/fpm [root@server1 fpm]# chmod 775 /usr/local/ln [root@server1 fpm]# /etc/init.d/fpm start [root@server1 fpm]# vim /etc/profile export PATH=$PATH: /usr/local/lnmp/php/bin: /usr/local/lnmp/php/sbin [root@server1 fpm]# source /etc/profile [root@server1 fpm]# php -m ##查看php支持插件 3.3配置nginx使其支持php [root@server1 fpm]# vim /usr/local/lnmp/nginx/html/index.php ##php测试页 <?php phpinfo(); ?> [root@server1 fpm]# vim /usr/local/lnmp/nginx/conf/nginx.conf 47 location / { 48 root html; 49 indexindex.phpindex.html index.htm; 50 } 73 location ~ \.php$ { 74 root html; 75 fastcgi_pass 127.0.0.1:9000; 76 fastcgi_index index.php; 77 fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 78 include fastcgi.conf; ##修改成存在的名称 79 } [root@server1 fpm]# nginx -t nginx: the configuration file /usr/local/lnmp/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/lnmp/nginx/conf/nginx.conf test is successful [root@server1 fpm]# nginx -s reload 3.4测试nginx对php支持 4.搭建论坛 4.1新建数据库并赋权限 [root@server1 mnt]# ls Discuz_X3.2_SC_UTF8.zip [root@server1 mnt]# unzip Discuz_X3.2_SC_UTF8.zip -d /usr/local/lnmp/nginx/html [root@server1 mnt]# cd /usr/local/lnmp/nginx/html [root@server1 html]# mv upload/ bbs [root@server1 html]# chmod -R 777 bbs/ [root@server1 html]# mysql -uroot -p mysql> CREATE DATABAsE discuz; Query OK, 1 row affected (0.00 sec) mysql> CREATE USER discuz@localhost identified by 'Willis123./'; Query OK, 0 rows affected (0.00 sec) mysql> GRANT ALL ON discuz.* to discuz@localhost identified by 'Willis123./'; Query OK, 0 rows affected, 1 warning (0.00 sec) 4.2网页搭建论坛 搞定. 本文转自willis_sun 51CTO博客,原文链接:http://blog.51cto.com/willis/1853585,如需转载请自行联系原作者

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

JPDA 架构研究21 - JDI的Debugger的UI部分

引入: 前面揭示了JDI的Debugger如何建立连接,发送和处理请求,这里我们专注于人机交互部分,Debugger的UI,它主要负责如何把人发出的操作转为请求,以及把请求操作反映在调试器的界面上。 分析: 这个插件主要都定义在org.eclipse.jdt.debug.ui_<Version>.jar中的plugin.xml中,它提供了各种人机交互的插件功能。打的比方,我们看编辑器功能: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 < extension point = "org.eclipse.ui.editorActions" > < editorContribution targetID = "org.eclipse.jdt.ui.CompilationUnitEditor" id = "org.eclipse.jdt.debug.CompilationUnitEditor.BreakpointRulerActions" > < action label = "%AddBreakpoint.label" class = "org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate" actionID = "RulerDoubleClick" id = "org.eclipse.jdt.debug.ui.actions.ManageBreakpointRulerAction" > </ action > </ editorContribution > < editorContribution targetID = "org.eclipse.jdt.ui.ClassFileEditor" id = "org.eclipse.jdt.debug.ClassFileEditor.BreakpointRulerActions" > < action label = "%AddBreakpoint.label" class = "org.eclipse.debug.ui.actions.RulerToggleBreakpointActionDelegate" actionID = "RulerDoubleClick" id = "org.eclipse.jdt.debug.ui.actions.ManageBreakpointRulerAction" > </ action > </ editorContribution > < editorContribution targetID = "org.eclipse.jdt.debug.ui.SnippetEditor" id = "org.eclipse.jdt.debug.ui.JavaSnippetToolbarActions" > < action toolbarPath = "evaluationGroup" id = "org.eclipse.jdt.debug.ui.SnippetExecute" hoverIcon = "$nl$/icons/full/etool16/run_sbook.gif" class = "org.eclipse.jdt.internal.debug.ui.actions.ExecuteAction" disabledIcon = "$nl$/icons/full/dtool16/run_sbook.gif" enablesFor = "+" icon = "$nl$/icons/full/etool16/run_sbook.gif" helpContextId = "execute_action_context" label = "%Execute.label" tooltip = "%Execute.tooltip" > < selection class = "org.eclipse.jface.text.ITextSelection" > </ selection > </ action > < action toolbarPath = "evaluationGroup" id = "org.eclipse.jdt.debug.ui.SnippetDisplay" hoverIcon = "$nl$/icons/full/etool16/disp_sbook.gif" class = "org.eclipse.jdt.internal.debug.ui.actions.PopupDisplayAction" disabledIcon = "$nl$/icons/full/dtool16/disp_sbook.gif" enablesFor = "+" icon = "$nl$/icons/full/etool16/disp_sbook.gif" helpContextId = "display_action_context" label = "%Display.label" tooltip = "%Display.tooltip" > < selection class = "org.eclipse.jface.text.ITextSelection" > </ selection > </ action > < action toolbarPath = "evaluationGroup" id = "org.eclipse.jdt.debug.ui.SnippetInspect" hoverIcon = "$nl$/icons/full/etool16/insp_sbook.gif" class = "org.eclipse.jdt.internal.debug.ui.actions.PopupInspectAction" disabledIcon = "$nl$/icons/full/dtool16/insp_sbook.gif" enablesFor = "+" icon = "$nl$/icons/full/etool16/insp_sbook.gif" helpContextId = "inspect_action_context" label = "%Inspect.label" tooltip = "%Inspect.tooltip" > < selection class = "org.eclipse.jface.text.ITextSelection" > </ selection > </ action > </ editorContribution > </ extension > 从这里看出,它支持好几个操作:如CompilationUnitEditor的打断点 ,ClassFileEditor的打断点等。 每个操作都有用到的图标,用到的action响应类等,有兴趣的可以看下。 本文转自 charles_wang888 51CTO博客,原文链接:http://blog.51cto.com/supercharles888/1588681,如需转载请自行联系原作者

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

大数据分析需要分布式计算架构

我们说大数据分析,说云计算,都少不了分布式计算技术。因为要实现大规模的计算和数据分析,一台服务器肯定是不够的,你也不能简单地将不同功能模块分布到不同的机器上运行,这充其量也只能叫做scale-up,但是最终你一定需要scale-out,这才是真正的分布式计算,或者叫并行计算。 DeveloperWorks上今天刊载了一篇文章,展示了ZooKeeper这个分布式计算调度器的力量。这个Yahoo共享的开源项目已经在很多大型网站的后台分布式计算中得到了实际应用。 对于安管平台而言,你可以通过scale-up实现分布式事件采集,但是你需要用到scale-out才能实现分布式事件分析。 本文转自叶蓬 51CTO博客,原文链接:http://blog.51cto.com/yepeng/1127968,如需转载请自行联系原作者

资源下载

更多资源
优质分享App

优质分享App

近一个月的开发和优化,本站点的第一个app全新上线。该app采用极致压缩,本体才4.36MB。系统里面做了大量数据访问、缓存优化。方便用户在手机上查看文章。后续会推出HarmonyOS的适配版本。

腾讯云软件源

腾讯云软件源

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

Nacos

Nacos

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

Rocky Linux

Rocky Linux

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

用户登录
用户注册
修改密码
忘记密码