首页 文章 精选 留言 我的

精选列表

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

领课教育—在线教育系统(部署文档)

1、项目源码导入 源码地址:https://gitee.com/roncoocom/roncoo-education 觉得我们项目还不错的朋友记得给个Star哦! 2、项目导入问题解决方法 (1)pom.xml文件报错,如图。 解答:这个是因为jdk和maven导致的,需要把Eclipse改为使用本地JDK(默认为JRE),maven最低版本要求3.5+ (2)很多get、set方法报错,如图。 解答:由于本项目使用了lombok来优化代码,消除冗长代码,所以如果 Eclipse没配置有lombok这个jar会 报错,需要配置lombok。 在Eclipse根目录加入lombok,eclipse.ini文件加入-javaagent:lombok.jar,重启eclipse即可。 使用IDEA的同学,也可以安装对应的插件 3、数据库脚本导入 获取数据库脚本,请加群! 群查找请看:https://gitee.com/roncoocom/roncoo-education 4、项目运行 (1)模块介绍: 注册中心(roncoo-education-server-eureka)配置中心(roncoo-education-server-config)课程模块(roncoo-education-course)用户模块(roncoo-education-user)系统模块(roncoo-education-system)后台模块(roncoo-education-boss)定时器(roncoo-education-job)网关工程(roncoo-education-gateway)链路监控(roncoo-education-server-zipkin)应用监控(roncoo-education-server-admin) (2)修改注册中心(application-dev.properties): info.eureka.host=localhost # 设置不注册自身eureka.client.register-with-eureka=falseeureka.client.fetch-registry=false (3)修改课程、用户、系统、后台模块、应用监控,定时器,网关(bootstrap.properties): info.eureka.host01=localhostinfo.eureka.host02=localhostspring.profiles.active=dev (4)修改配置中心(application-dev.properties): spring.data.elasticsearch.cluster-nodes= 节点spring.data.elasticsearch.cluster-name=集群名称spring.redis.host=redis地址spring.redis.port=redis端口spring.redis.password=redis密码 (5)修改配置中心模块工程数据库连接(roncoo-education-course-service-dev.properties)、(roncoo-education-user-service-dev.properties)和(roncoo-education-system-service-dev.properties): spring.datasource.druid.url=本地数据库连接spring.datasource.druid.username=mysql账号spring.datasource.druid.password=mysql密码mysql密码使用durid加密:java -cp druid-1.0.16.jar com.alibaba.druid.filter.config.ConfigTools 你的密码 (6)启动顺序:注册中心 → 配置中心→模块工程 → 定时器 → 网关工程 → 应用监控、链路监控(可以不启动) 注册中心地址:http://localhost:5761管理后台地址:http://localhost:5800网关服务地址:http://localhost:5840 5、运营后台运行 项目名称:roncoo-education-bossapi——主要存放了各个工程的接口config——主要配置网关地址,经过网关请求后台接口views——主要是存放页面修改config里index.js的dev为开发环境网关地址: 本地ip+网关端口修改config里build.js为开发环境网关地址: ip+网关端口 前端运行需要用到node Node版本:9.0.0以上 编译使用:安装依赖:npm install本地开发 启动项目:npm run dev打包正式环境:npm run build访问地址:http://localhost:5800/ 6、前端导入运行 前端源码地址:https://gitee.com/roncoocom/roncoo-education-webapi——主要存放了各个工程的接口config——主要配置网关地址,经过网关请求后台接口pages——主要是存放页面修改config里conf.js的开发环境网关地址: 本地ip+网关端口/#/ 前端运行需要用到Node Node版本: 9.0.0以上 编译使用:npm installnpm run dev前端访问地址:http://127.0.0.1:3000/

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

Zabbix4.0 for PostgreSQL (上篇):基础环境的搭建部署

概述 Zabbix大家都很熟悉,一般的是使用MySQL作为存储库来使用的,而我看使用手册上是使用postgresql也是可以的,所以就做了一次基于pg的zabbix搭建测试,记录下来,分享给大家 Server端配置 配置PG环境 安装好pg,且在root和postgres下都配置好pg的环境变量,以供后续使用 在hba控制文件中直接加入这一行 host zabbix zabbix 192.168.0.0/24 trust host all all 127.0.0.1/32 md5 配置apache 创建user [root@Zabbix_GW_TEST opt]# adduser apache 准备好安装包并解压 [root@Zabbix_GW_TEST opt]# ls httpd-2.4.37.tar.gz httpd-2.4.37.tar.gz [root@Zabbix_GW_TEST opt]# tar -xvzf httpd-2.4.37.tar.gz 编译安装 执行编译命令 [root@Zabbix_GW_TEST httpd-2.4.37]# ./configure --prefix=/usr/local/apache --enable-rewrite --enable-deflate --enable-expires --enable-headers --enable-modules=most --with-mpm=worker --enable-so 报错: configure: error: APR not found. Please read the documentation. 解决: yum install apr yum install apr-util-devel 报错: configure: error: in `/opt/httpd-2.4.37': configure: error: C compiler cannot create executables See `config.log' for more details 解决: yum install gcc 问题: configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/ 解决: yum -y install pcre-devel 问题: configure: error: mod_deflate has been requested but can not be built due to prerequisite failures 解决: yum install -y zlib-devel 以下画面说明编译成功 configure: summary of build options: Server Version: 2.4.37 Install prefix: /usr/local/apache C compiler: gcc -std=gnu99 CFLAGS: -pthread CPPFLAGS: -DLINUX -D_REENTRANT -D_GNU_SOURCE LDFLAGS: LIBS: C preprocessor: gcc -E 继续安装 gmake gmake install 安装成功之后安装目录也就生成文件了 [root@Zabbix_GW_TEST apache]# ls bin build cgi-bin conf error htdocs icons include logs man manual modules 建立脚本根目录 用来存放html信息 mkdir /home/www chown -R apache:apache /home/www 配置运行参数 [root@nfs httpd-2.2.31]# vim /usr/local/apache/conf/httpd.conf #监听port Listen 80 #运营apache服务的用户及用户组,为apache User apache Group apache #管理员的邮箱是 ServerAdmin 1058582934@qq.com #配置脚本根目录 DocumentRoot "/home/www" #配置 ServerName 127.0.0.1:80 <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow allow from all </Directory> <Directory "/home/www"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> 配置环境变量 添加一行环境变量到文件中 export PATH=/usr/local/apache/bin:$PATH [root@Zabbix_GW_TEST apache]# source ~/.bash_profile [root@Zabbix_GW_TEST apache]# which apachectl /usr/local/apache/bin/apachectl 启动apache服务 apachectl start 顺便配置开机自动 vim /etc/rc.d/rc.local /usr/local/apache/bin/apachectl start 至此,Apache配置完成 安装配置php 安装php依赖包 wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz tar zxf libiconv-1.14.tar.gz ./configure --prefix=/usr/local/libiconv make make install 准备好包并解压 tar -xvzf php-5.5.38.tar.gz 编译 ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-xmlrpc --with-openssl --with-zlib --with-freetype-dir --with-gd --with-jpeg-dir --with-png-dir --with-iconv=/usr/local/libiconv --enable-short-tags --enable-sockets --enable-soap --enable-mbstring --enable-static --enable-gd-native-ttf --with-curl --with-xsl --enable-ftp --with-libxml-dir --with-pgsql=/usr/postgresql --enable-fpm --enable-bcmath --with-gettext 报错 Sorry, I cannot run apxs. Possible reasons follow: 1. Perl is not installed 2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs 3. Apache was not built using --enable-so (the apxs usage page is displayed) The output of /usr/local/apache/bin/apxs follows: ./configure: /usr/local/apache/bin/apxs: /replace/with/path/to/perl/interpreter: bad interpreter: No such file or directory configure: error: Aborting 解决:将apache的bin文件下的apxs文件第一行改为 #!/usr/bin/perl -w 报错: configure: error: xml2-config not found. Please check your libxml2 installation yum install libxml2-devel 报错 configure: error: Cannot find OpenSSL's <evp.h> yum install openssl openssl-devel 报错 configure: error: Please reinstall the libcurl distribution - easy.h should be in <curl-dir>/include/curl/ yum install curl curl-devel 报错 configure: error: There is something wrong. Please check config.log for more information. curl-devel-7.15.5-2.el5安装 报错 configure: error: jpeglib.h not found. yum -y install libjpeg-devel 报错 configure: error: png.h not found. yum install libpng libpng-devel 报错: configure: error: freetype-config not found. yum install freetype-devel 报错 configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution yum -y install libxslt libxslt-devel 显示如下,则编译完成 creating main/internal_functions_cli.c +--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+ Thank you for using PHP. config.status: creating php5.spec config.status: creating main/build-defs.h config.status: creating scripts/phpize config.status: creating scripts/man1/phpize.1 config.status: creating scripts/php-config config.status: creating scripts/man1/php-config.1 config.status: creating sapi/cli/php.1 config.status: creating sapi/fpm/php-fpm.conf config.status: creating sapi/fpm/init.d.php-fpm config.status: creating sapi/fpm/php-fpm.service config.status: creating sapi/fpm/php-fpm.8 config.status: creating sapi/fpm/status.html config.status: creating sapi/cgi/php-cgi.1 config.status: creating ext/phar/phar.1 config.status: creating ext/phar/phar.phar.1 config.status: creating main/php_config.h config.status: executing default commands 安装 make make install 准备配置文件 [root@Zabbix_GW_TEST php-5.5.38]# cp php.ini-development /usr/local/php/lib/php.ini [root@Zabbix_GW_TEST php-5.5.38]# vi /usr/local/php/lib/php.ini 修改配置文件 [root@nfs php-5.5.38]# cp php.ini-development /usr/local/php/lib/php.ini [root@nfs php-5.5.38]# vim /usr/local/php/lib/php.ini error_reporting = E_ALL & ~E_NOTICE #报告所有的错误,但除了E_NOTICE这一种 display_errors = On #在终端显示出错信息,这个在生产环境最好设置成off track_errors = Off #是否在变量$php_errormsg中保存最近一个错误或警告消息 post_max_size = 16M #表单最大提交的数据量大小 upload_max_filesize = 16M #准许上传文件大小限制为16M date.timezone = PRC #中华人民共和国时区 expose_php = Off #隐藏php版本信息 curl -I www.ha97.com HTTP/1.1 200 OK Server: nginx Date: Tue, 20 Jul 2010 05:45:13 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive Vary: Accept-Encoding #已经彻底隐藏了PHP版本。 extension_dir = "/usr/local/php/lib/php/extensions/no-debug-zts-20121212/" #扩展模块存放目录 修改Apache的文件,在重启 [root@nfs php-5.5.38]# vim /usr/local/apache/conf/httpd.conf 增加下面内容 <IfModule dir_module> DirectoryIndex index.php index.html </IfModule> <IfModule mime_module> AddType application/x-httpd-php-source .phps AddType application/x-httpd-php .php .phtml </IfModule> 换一个思路的nginx搭建 概述 在apache配置解析php的操作种,遇到种种坑,Apache的配置不太熟悉,界面打不开php文件,理论上问题是出在Apache配置访问php上。但是我能力有限,解决不来,所以就换一个NGINX试试。 编译安装 上传解压,并编译。NGINX的编译相对简单,就不做详细记录 tar -xvzf nginx-1.6.0.tar.gz cd nginx-1.6.0 ./configure --prefix=/usr/local/nginx --without-http_memcached_module --user=www --group=www --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module make make install 配置NGINX访问PHP 这个是NGINX的关键,因为zabbix的界面全部都是PHP语言写的,必须使用PHP软件才能解析应用 server { listen 80; server_name localhost; location ~ \.(php|php5)?$ { root /data/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /data/html$fastcgi_script_name; include fastcgi_params; } location ~* ^.+\.(ico|gif|jpg|jpeg|png|html|css|htm|bmp|js|svg)$ { root /data/html; } } 配置nginx.conf文件。增加两个location,第一个location增加的是站点的地址信息。第二个是增加解析各种图片样式的功能(因为在没有加的时候,我打开的zabbix界面全部都是只有文字,没有任何图片与样式,如下。原因就是PHP没有解析这些内容) 创建好站点目录 浏览器通过端口来访问服务器的文件,并用解析器解析,我们需要先准备好这些文件。zabbix的PHP文件是放在源码包里的,解压后就可以看到可以在上面的配置文件中可以看到我已经选择了/data/html cp -r /opt/zabbix-4.0.2/frontends/php/* /data/html 注意赋权 启动nginx 把环境变量配置在root下 export PATH=/usr/local/nginx/sbin:$PATH 启动nginx,没有报错则启动成功,看监听端口和后台进程 [root@Zabbix_GW_TEST ~]# netstat -lnp|grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 25373/nginx: master [root@Zabbix_GW_TEST ~]# ps -ef|grep nginx root 12817 10266 0 18:11 pts/1 00:00:00 grep --color=auto nginx root 25373 1 0 01:21 ? 00:00:00 nginx: master process nginx www 27717 25373 0 02:07 ? 00:00:00 nginx: worker process Zabbix配置 用户环境配置好 用户 adduser zabbix 编译zabbix 编译 ./configure --prefix=/usr/local/zabbix --enable-server --enable-proxy --enable-agent --enable-ipv6 --with-postgresql=/usr/local/pgsql/bin/pg_config --with-net-snmp --with-ssh2 --with-openipmi --with-ldap --with-libcurl --with-iconv 安装依赖 yum install net-snmp-devel yum install libssh2-devel yum install OpenIPMI-devel yum install openldap-devel yum install libevent-devel yum install curl-devel 编译到此界面则安装成功 *********************************************************** * Now run 'make install' * * * * Thank you for using Zabbix! * * <http://www.zabbix.com> * *********************************************************** 执行make install 配置好环境变量 将此行写进配置文件中 PATH=/usr/local/zabbix/bin:/usr/local/zabbix/sbin:$PATH 创建zabbix 数据库 postgres=# create role zabbix login postgres-# ; CREATE ROLE postgres=# \password zabbix Enter new password: Enter it again: postgres=# create database zabbix with template template0 encoding 'UTF8' ; CREATE DATABASE postgres=# grant all on database zabbix to zabbix; GRANT postgres=# \q 导入zabbix数据 在源码下,有zabbix数据库的数据 cd /opt/zabbix-4.0.2/database/postgresql/ psql -Uzabbix -dzabbix -h127.0.0.1 -f schema.sql psql -Uzabbix -dzabbix -h127.0.0.1 -f images.sql psql -Uzabbix -dzabbix -h127.0.0.1 -f data.sql 配置zabbix_server参数 [root@Zabbix_GW_server ~]# vim /usr/local/zabbix/etc/zabbix_server.conf #监听port ListenPort=10051 #日志存放地点及大小 LogFile=/tmp/zabbix_server.log LogFileSize=10 #pid文件存放地点 PidFile=/tmp/zabbix_server.pid #下面几个参数是配置数据库连接参数 DBHost=127.0.0.1 DBName=zabbix DBUser=zabbix DBPassword=zabbix DBPort=5432 #监听ip范围 ListenIP=0.0.0.0 #media types中使用script存放目录 AlertScriptsPath=/usr/local/zabbix/alertscripts 启动服务 zabbix_server 查看是否有错,就查看zabbix_server 的启动日志,如果有报错,按照报错修改。反正我安装的时候真的报错频出,经历过,懂得都懂 查看web界面 此时就可以通过web界面来访问zabbix了输入地址 可以看到,配存在一些问题也还是需要修改的,不然的话无法安装 agent端配置 概述 agnet端就是被监控的数据库主机,也是需要做一些安装 创建用户 groupadd zabbix useradd -g zabbix -s /sbin/nologin zabbix 编译安装 ./configure --prefix=/usr/local/zabbix-agent --enable-agent make install 无需指定其他的编译参数 修改配置文件 vi /usr/local/zabbix-agent/etc/zabbix_agentd.conf LogFile=/tmp/zabbix_agentd.log Server=192.168.6.17/32 Hostname=Zabbix agent 配置到环境变量 PATH=/usr/local/zabbix-agent/bin:/usr/local/zabbix-agent/sbin:$PATH 启动zabbix_agent 直接运行zabbix_agent命令,查看日志,观察是否正常 至此 至此,zabbix的基本配置完成。后续还要配置监控等操作。后面慢慢再说

资源下载

更多资源
Mario

Mario

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

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文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

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

用户登录
用户注册