Install .NET Core Runtime on Linux CentOS / Oracle x64

Add the dotnet product feed Before installing .NET, you’ll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine. Open a terminal and run the following commands:

  Install the .NET Runtime Update the products available for installation, then install the .NET Runtime. In your terminal, run the following commands:

  The previous command will install the .NET Core Runtime Bundle, which includes the .NET Core runtime and the ASP.NET Core runtime. To […]

龙生   23 Mar 2019
View Details

在CentOS7上安装RabbitMQ

安装过程参考官网: Installing on RPM-based Linux (RHEL, CentOS, Fedora, openSUSE) 首先需要安装erlang,参考:http://fedoraproject.org/wiki/EPEL/FAQ#howtouse

安装过程中会有提示,一路输入“y”即可。 完成后安装RabbitMQ: 先下载rpm:

下载完成后安装:

完成后启动服务:

可以查看服务状态:

这里可以看到log文件的位置,转到文件位置,打开文件: 这里显示的是没有找到配置文件,我们可以自己创建这个文件

编辑内容如下:

这里的意思是开放使用,rabbitmq默认创建的用户guest,密码也是guest,这个用户默认只能是本机访问,localhost或者127.0.0.1,从外部访问需要添加上面的配置。 保存配置后重启服务:

此时就可以从外部访问了,但此时再看log文件,发现内容还是原来的,还是显示没有找到配置文件,可以手动删除这个文件再重启服务,不过这不影响使用

  开放5672端口:

在Windows上进行测试: 新建.net core控制台项目,引用RabbitMQ.Client包:

测试代码:

也可以使用官网的例子(这里更清晰): http://www.rabbitmq.com/tutorials/tutorial-one-dotnet.html 发送端:

接收端:

在Windows上发送,在CentOS上接收,效果如图:   开启管理UI:

在Windows下打开地址:

用户名和密码都是 guest 这样就可以方便管理RabbitMQ了。   from:https://www.cnblogs.com/uptothesky/p/6094357.html

龙生   23 Mar 2019
View Details

RabbitMQ用户增删及权限控制

用户角色分类 none:无法登录控制台 不能访问 management plugin,通常就是普通的生产者和消费者。 management:普通管理者。 仅可登陆管理控制台(启用management plugin的情况下),无法看到节点信息,也无法对policies进行管理。用户可以通过AMQP做的任何事外加: 列出自己可以通过AMQP登入的virtual hosts 查看自己的virtual hosts中的queues, exchanges 和 bindings 查看和关闭自己的channels 和 connections 查看有关自己的virtual hosts的“全局”的统计信息,包含其他用户在这些virtual hosts中的活动。 policymaker:策略制定者。 management可以做的任何事外加: 查看、创建和删除自己的virtual hosts所属的policies和parameters monitoring:监控者。 management可以做的任何事外加: 列出所有virtual hosts,包括他们不能登录的virtual hosts 查看其他用户的connections和channels 查看节点级别的数据如clustering和memory使用情况 查看真正的关于所有virtual hosts的全局的统计信息 同时可以查看rabbitmq节点的相关信息(进程数,内存使用情况,磁盘使用情况等) administrator:超级管理员。 policymaker和monitoring可以做的任何事外加: 创建和删除virtual hosts 查看、创建和删除users 查看创建和删除permissions 关闭其他用户的connections 创建用户

  例:创建一个超级用户

  查看用户列表

  为用户赋权

  删除用户

  修改用户的密码

   from: https://www.cnblogs.com/xinxiucan/p/7940953.html

龙生   23 Mar 2019
View Details

RabbitMQ从入门到精通—安装

安装脚本

发现错误

解决方案

启动RabbitMQ

使用过程错误小记 user ‘guest’ – User can only log in via localhost 登录响应如下:

我实在docker中创建rabbitmq的,然后将端口15672映射到宿主机器上的15672,所以也算是远程登录,而guest用户要求只能使用localhost登录,所以要想远程登录必须新建用户。

新建用户无法登录

需要授予用户角色

用户授权

关于RabbitMQ权限和角色管理 参考:http://blog.csdn.net/zyz511919766/article/details/42292655   from:https://www.dev-heaven.com/posts/1914.html

龙生   23 Mar 2019
View Details

Redis服务停止报错解决方案[NOAUTH Authentication required]

Redis服务器设置密码后,使用service redis stop 会出现以下信息: service redis stop Stopping … OK (error) NOAUTH Authentication required. Waiting for Redis to shutdown … Waiting for Redis to shutdown … Waiting for Redis to shutdown … Waiting for Redis to shutdown … Waiting for Redis to shutdown … Waiting for Redis to shutdown … Waiting for Redis to shutdown … Waiting for Redis to shutdown … 出现这样的错误信息,redis 这时是没有停止服务的。可以使用ps -ef | grep redis  查进程号 然后kill 掉,如果在deamon下还需要去删除pid文件,有点繁琐。 解决办法: 用redis-cli 密码登陆(redis-cli -a  password)就OK了。 再用ps -ef | grep redis 可以看到redis进程已经正常退出。 修改redis服务脚本,加入如下所示的红色授权信息即可: vi /etc/init.d/redis $CLIEXEC -a "password" -p $REDISPORT shutdown from:https://www.cnblogs.com/jeffen/p/6068745.html

龙生   23 Mar 2019
View Details

CENTOS7下安装REDIS

一、安装redis 第一步:下载redis安装包 wget http://download.redis.io/releases/redis-4.0.6.tar.gz

  第二步:解压压缩包 tar -zxvf redis-4.0.6.tar.gz

  第三步:yum安装gcc依赖 yum install gcc

遇到选择,输入y即可   第四步:跳转到redis解压目录下 cd redis-4.0.6

  第五步:编译安装 make MALLOC=libc

  将/usr/local/redis-4.0.6/src目录下的文件加到/usr/local/bin目录 cd src && make install

  二、启动redis的三种方式   先切换到redis src目录下

  1、直接启动redis ./redis-server

  如上图:redis启动成功,但是这种启动方式需要一直打开窗口,不能进行其他操作,不太方便。   按 ctrl + c可以关闭窗口。   2、以后台进程方式启动redis 第一步:修改redis.conf文件 将

  修改为

  第二步:指定redis.conf文件启动 1 ./redis-server /usr/local/redis-4.0.6/redis.conf

  第三步:关闭redis进程 首先使用ps -aux | grep redis查看redis进程

  使用kill命令杀死进程

    3、设置redis开机自启动 1、在/etc目录下新建redis目录 mkdir redis

  2、将/usr/local/redis-4.0.6/redis.conf 文件复制一份到/etc/redis目录下,并命名为6379.conf

[…]

龙生   23 Mar 2019
View Details

Linux 软件安装到哪里合适,目录详解

Linux 的软件安装目录是也是有讲究的,理解这一点,在对系统管理是有益的 /usr:系统级的目录,可以理解为C:/Windows/,/usr/lib理解为C:/Windows/System32。 /usr/local:用户级的程序目录,可以理解为C:/Progrem Files/。用户自己编译的软件默认会安装到这个目录下。 /opt:用户级的程序目录,可以理解为D:/Software,opt有可选的意思,这里可以用于放置第三方大型软件(或游戏),当你不需要时,直接rm -rf掉即可。在硬盘容量不够时,也可将/opt单独挂载到其他磁盘上使用。 源码放哪里? /usr/src:系统级的源码目录。 /usr/local/src:用户级的源码目录。 —————--翻译——————- /opt Here’s where optional stuff is put. Trying out the latest Firefox beta? Install it to /opt where you can delete it without affecting other settings. Programs in here usually live inside a single folder whick contains all of their data, libraries, etc. 这里主要存放那些可选的程序。你想尝试最新的firefox测试版吗?那就装到/opt目录下吧,这样,当你尝试完,想删掉firefox的时候,你就可 以直接删除它,而不影响系统其他任何设置。安装到/opt目录下的程序,它所有的数据、库文件等等都是放在同个目录下面。 举个例子:刚才装的测试版firefox,就可以装到/opt/firefox_beta目录下,/opt/firefox_beta目录下面就包含了运 行firefox所需要的所有文件、库、数据等等。要删除firefox的时候,你只需删除/opt/firefox_beta目录即可,非常简单。 /usr/local This is where most manually installed(ie. outside of your package manager) software goes. It has the same structure as /usr. It is a good idea to leave /usr to your package manager […]

龙生   23 Mar 2019
View Details

解决Centos6.5中ssh登录时Warning:Permanently added (RSA) to the list of known hosts的警告

当主机使用ssh免密码登录时,弹出Warning:Permanently added (RSA) to the list of known hosts的警告,看着很碍眼。通过以下方法进行解决: 1:vim  /etc/ssh/ssh_config(master和slave1都需要设置) 找到#StrictHostKeyChecking ask去掉注释,并把ask改为no即可

龙生   23 Mar 2019
View Details

git-修改远程的URL

git remote set-url命令修改remote URL git remote set-url传递两个参数 remote name。例如,origin或者upstream new remote url。例如,git@github.com:USERNAME/OTHERREPOSITORY.git   例如:从SSH切换到HTTPS的远程URL 打开终端 切换到你项目的工作目录 列出remotes,是为了得到你想要改变的remote的名字

使用git remote set-url命令从SSH到HTTPS的远程URL

验证是否改变成功

  from:https://www.cnblogs.com/yandufeng/p/6423821.html

龙生   22 Mar 2019
View Details
1 158 159 160 434