nsq install
NSQ docker install
下载nsq镜像
1
[root@k8s1 ~]# docker pull nsqio/nsq
run nsqlookupd
1
2
3
4[root@k8s1 ~]# docker run --name nsqlookupd -p 4160:4160 -p 4161:4161 nsqio/nsq:latest /nsqlookupd
or:
[root@k8s1 ~]# docker run --name nsqlookupd -p 5160:4160 -p 5161:4161 nsqio/nsq:latest /nsqlookupdrun nsqd
1
2
3
4
5
6
7
8
9
10
11
12
13[root@k8s1 ~]# docker run --name nsqd -p 4150:4150 -p 4151:4151 nsqio/nsq:latest /nsqd --broadcast-address=192.168.1.2 --lookupd-tcp-address=192.168.1.2:4160
or:
[root@k8s1 ~]# docker run -p 4150:4150 -p 4151:4151 -p 4152:4152 -v /home/docker/certs:/etc/ssl/certs \
nsqio/nsq:latest /nsqd \
--tls-root-ca-file=/etc/ssl/certs/certs.crt \
--tls-cert=/etc/ssl/certs/cert.pem \
--tls-key=/etc/ssl/certs/key.pem \
--tls-required=true \
--tls-client-auth-policy=require-verify
or:
[root@k8s1 ~]# docker run nsqio/nsq:latest /nsqd --data-path=/datarun nsqadmin
1
[root@k8s1 ~]# docker run --name nsqadmin -p 4171:4171 nsqio/nsq:latest /nsqadmin --lookupd-http-address=192.168.1.2:4161
nsq info
NSQ 简介
1 | NSQ是一个基于Go语言的分布式实时消息平台,它基于MIT开源协议发布,代码托管在GitHub. |
NSQ 组成
1 | NSQ是由四个重要组件构成 |
NSQ特点
1 | * 具有分布式且无单点故障的拓扑结构,支持水平扩展,在无中断情况下能够无缝地添加集群节点 |
glusterfs install
GlusterFS install
格式化磁盘
1
2
3
4
5
6* 通过LVM 创建磁盘
* 通过mkfs.xfs 格式化磁盘
mkfs.xfs -i size=512 /dev/sdb
mkdir -p /data/brick
echo '/dev/sdb /data/brick xfs defaults 1 2' |tee -a /etc/fstab
mount -aGlusterFS基础依赖包安装
1
[root@10 app]# yum -y install xfsprogs fuse fuse-libs
GlusterFS yum源
1
2
3
4
5
6
7[root@10 app]# wget -O /etc/yum.repo.d/glusterfs.repo http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/gluster-epel.repo
[root@10 app]# yum makecache
or:
[root@10 app]# wget -O /etc/yum.repo.d/glusterfs.repo http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/gluster-epel.repo
[root@10 app]# sed -in 's/LATEST/3.7.14/g' /etc/yum.repos.d/glusterfs-epel.repo
[root@10 app]# sed -in 's/EPEL.repo/CentOS/g' /etc/yum.repos.d/glusterfs-epel.repo
[root@10 app]# yum makecacheGlusterFS 安装
1
[root@10 app]# yum -y install glusterfs glusterfs-server glusterfs-fuse glusterfs-geo-replication
GlusterFS 启动
1
2[root@10 app]# systemctl start glusterd
[root@10 app]# systemctl enable glusterdGlusterFS 设置可信任存储池
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15//在server1上执行:
[root@10 app]# gluster peer probe 192.168.1.12
//在server2上执行:
[root@10 app]# gluster peer probe 192.168.1.11
//查看存储池状态:
[root@10 app]# gluster peer status
//从存储池中移除节点
[root@10 app]# gluster peer detach 192.168.1.12
注意:
* 一旦设置了可信的存储池,就会仅允许存储池中的被信任的节点主动发现其它的新节点,并将其加入到池中.而一个独立的新节点,是不被允许自行加入可信存储池中的.
* GlusterFS对于每个节点都会生成一个UUID来标识,因此如果节点的IP或主机名发生了变化,只需要重新执行peer probe即可.不过如果一个主机名曾经用过,想再改回去,则gluster会提示已经保存过.此时只能把节点detach掉,然后重新probe.GlusterFS 创建 一个GlusterFS卷
1
2
3
4
5
6GlusterFS卷共有三基本类型:
* Distributed(分布存储)
* Striped(将一个文件分成多个固定长度的数据,分布存放在所有存储块,相当于RAID0)
* Replicated(镜像存储,相当于RAID1)
基于striped和replicated,结合使用distributed后,又可以扩展出分布式分片存储卷和分布式镜像存储卷两种新的类型.而后两种扩展类型并没有新的命令格式,仅是通过设置数据冗余份数和添加进逻辑卷的bricks数量来动态定义的.1
2
3
4
5//创建一个GlusterFS Replicated卷
[root@10 app]# gluster volume create gv0 replica 2 192.168.1.11:/data/brick/gv0 192.168.1.12:/data/brick/gv0 force
[root@10 app]# gluster volume start gv0
[root@10 app]# gluster volume info1
2
3
4
5//创建一个GlusterFS Striped逻辑卷(创建一个名字为gv1,包含两个存储块,使用TCP协议的Striped逻辑卷)
[root@10 app]# gluster volume create gv1 stripe 2 transport tcp 192.168.1.11:/data 192.168.1.12:/data
[root@10 app]# gluster volume start gv1
[root@10 app]# gluster volume info1
2
3
4
5//创建一个GlusterFS Distributed逻辑卷
[root@10 app]# gluster volume create gv2 192.168.1.11:/data 192.168.1.12:/data
[root@10 app]# gluster volume start gv2
[root@10 app]# gluster volume info1
2
3//停止和删除逻辑卷
[root@10 app]# gluster volume stop gv0
[root@10 app]# gluster volume delete gv01
2
3
4
5
6
7//与存储块brick相关的逻辑卷管理(在gv0卷中增加一个存储块192.168.1.13:/data)
[root@10 app]# gluster volume add-brick gv0 192.168.1.13:/data
[root@10 app]# gluster volume rebalance gv0 start
//删除Brick
[root@10 app]# gluster volume remove-brick gv0 192.168.1.13:/data
[root@10 app]# gluster volume rebalance gv0 startGlusterFS 设置卷参数
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21//设置服务器仲裁
[root@10 app]# gluster volume set volume1 cluster.server-quorum-type server
[root@10 app]# gluster volume set all cluster.server-quorum-ratio 50%
//配置允许的链接的client
[root@10 app]# gluster volume set volume1 auth.allow 192.168.1.12,192.168.1.13
//操作超时
[root@10 app]# gluster volume set volume1 network.frame-timeout 1800
//网络超时超时
[root@10 app]# gluster volume set volume1 network.ping-timeout 10
//IO线程
[root@10 app]# gluster volume set volume1 performance.io-thread-count 32
//IO缓存,注意此配置需要客户端提供不低于此内存的配置
[root@10 app]# gluster volume set data performance.cache-size 200MB
//禁用nfs
[root@10 app]# gluster volume set data nfs.disable onGlusterFS 客户端连接
1
2
3
4
5
6[root@10 app]# yum install -y glusterfs-fuse
[root@10 app]# mkdir /volume1
[root@10 app]# mount –t glusterfs 192.168.1.11:/volume1 /volume1
or:
[root@10 app]# echo "192.168.13.1:/data /mnt/glusterfs glusterfs defaults 0 0" |tee -a /etc/fstab
[root@10 app]# mount -a
glusterfs info
GlusterFS 简介
1 | GlusterFS是Scale-Out存储解决方案Gluster的核心,它是一个开源的分布式文件系统,具有强大的横向扩展能力,通过扩展能够支持数PB存储容量和处理数千客户端.GlusterFS借助TCP/IP或InfiniBandRDMA网络将物理分布的存储资源聚集在一起,使用单一全局命名空间来管理数据. |
1 | * GlusterFS是一个分布式的可横向扩展的文件系统,支持快速扩充更多的存储空间.自动地失效转移是它的一项基础功能.GlusterFS没有一个集中式的元数据管理服务. |
GlusterFS 特点
1 | * 扩展性和高性能 |
GlusterFS 术语
1 | * GNFS和KNFS |
elasticsearch four search type
elasticsearch 四种搜素类型
ES 四种搜索类型
1
2
3
4
5ES 在查询时,可以指定搜索类型有四种:
* QUERY_THEN_FETCH
* QUERY_AND_FEATCH
* DFS_QUERY_THEN_FEATCH
* DFS_QUERY_AND_FEATCH理解分布式搜索
1
2
3
4
5
6
7
8
9
10
11分布式搜索背景介绍:
ES 天生就是为分布式而生,但分布式有分布式的缺点,比如: 要搜索某个单词,但是数据却分别在5个分片(Shard)上,这5个分片可能在5台主机上面.因为全文搜索天生就要排序(照匹配度进行排名),但数据却在5个分片上,如何得到最后正确的排序呢?ES是这样做的,大概分三步:
1.ES 客户端将会同时向5个分片发起搜索请求
2.这5个分片基于本分片的内容独立完成搜索,然后将符合条件的结果全部返回
3.客户端将返回的结果进行重新排序和排名,最后返回给用户.也就是说,ES的一次搜索,是一次scatter/gather过程(这个跟mapreduce也很类似)
然而这其中有两个问题:
1.数量问题
比如,用户需要搜索"衣服",要求返回符合条件的前10条.但在5个分片中,可能都存储着衣服相关的数据.所以ES会向这5个分片都发出查询请求,并且要求每个分片都返回符合条件的10条记录.当ES得到返回的结果后,进行整体排序,然后取最符合条件的前10条返给用户.这种情况,ES中5个shard最多会收到10*5=50条记录,这样返回给用户的结果数量会多于用户请求的数量.
2.排名问题
上面说的搜索,每个分片计算符合条件的前10条数据都是基于自己分片的数据进行打分计算的.计算分值使用的词频和文档频率等信息都是基于自己分片的数据进行的,而ES进行整体排名是基于每个分片计算后的分值进行排序的(相当于打分依据就不一样,最终对这些数据统一排名的时候就不准确了),这就可能会导致排名不准确的问题.如果我们想更精确的控制排序,应该先将计算排序和排名相关的信息(词频和文档频率等打分依据)从5个分片收集上来,进行统一计算,然后使用整体的词频和文档频率为每个分片中的数据进行打分,这样打分依据就一样了.1
2
3再举个例子解释一下[排名问题]:
假设某学校有一班和二班两个班级.期末考试之后,学校要给全校前十名学员发奖金.但是一班和二班考试的时候使用的不是一套试卷.一班使用的是A卷[ A 卷偏容易];二班使用的是B卷[ B 卷偏难].结果就是一班的最高分是100分,最低分是80分.二班的最高分是70分,最低分是30分.这样全校前十名就都是一班的学员了.这显然是不合理的.因为一班和二班的试卷难易程度不一样,也就是打分依据不一样,所以不能放在一块排名.
如果想要保证排名准确的话,需要保证一班和二班使用的试卷内容一样.可以这样做,把A卷和B卷的内容组合到一块,作为C卷.一班和二班考试都使用C卷,这样他们的打分依据就一样了,最终再根据所有学员的成绩排名求前十名就准确合理了。四种搜索类型介绍
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* query and fetch
向索引的所有分片(shard)都发出查询请求,各分片返回的时候把元素文档(document)和计算后的排名信息一起返回.
这种搜索方式是最快的.因为相比下面的几种搜索方式,这种查询方法只需要去shard查询一次.但是各个shard返回的结果的数量之和可能是用户要求的size的n倍.
优点:只需要查询一次
缺点:返回的数据量不准确,可能返回(N*分片数量)的数据并且数据排名也不准确
* query then fetch(ES默认的搜索方式)
如果你搜索时,没有指定搜索方式,就是使用的这种搜索方式.这种搜索方式.大概分两个步骤:
第一步,先向所有的shard发出请求,各分片只返回文档id(注意,不包括文档document)和排名相关的信息(也就是文档对应的分值),然后按照各分片返回的文档的分数进行重新排序和排名,取前size个文档
第二步,根据文档id去相关的shard取document.这种方式返回的document数量与用户要求的大小是相等的
优点:返回的数据量是准确的
缺点:性能一般,并且数据排名不准确
* DFS query and fetch
这种方式比第一种方式多了一个DFS步骤,有这一步,可以更精确控制搜索打分和排名.也就是在进行查询之前,先对所有分片发送请求,把所有分片中的词频和文档频率等打分依据全部汇总到一块,再执行后面的操作.
优点:数据排名准确
缺点:性能一般,返回的数据量不准确,可能返回(N*分片数量)的数据
* DFS query then fetch
比第2种方式多了一个DFS步骤,也就是在进行查询之前,先对所有分片发送请求,把所有分片中的词频和文档频率等打分依据全部汇总到一块,再执行后面的操作.
优点:返回的数据量是准确的,数据排名准确
缺点:性能最差(这个最差只是表示在这四种查询方式中性能最慢,也不至于不能忍受,如果对查询性能要求不是非常高,而对查询准确度要求比较高的时候可以考虑这个)
其他: DFS 是一个什么样的过程?
DFS其实就是在进行真正的查询之前,先把各个分片的词频率和文档频率收集一下,然后进行词搜索的时候,各分片依据全局的词频率和文档频率进行搜索和排名.显然如果使用DFS_QUERY_THEN_FETCH这种查询方式,效率是最低的,因为一个搜索,可能要请求3次分片.但使用DFS方法,搜索精度是最高的.
总结一下:
1.从性能考虑QUERY_AND_FETCH是最快的,DFS_QUERY_THEN_FETCH是最慢的
2.从搜索的准确度来说,DFS要比非DFS的准确度更高
windows modify hosts
HOSTS文件无法修改以及禁止修改的解决办法
1 | 在修改HOSTS文件时,总是提示路径不对,无法保存 |
windows ipsec set
windows ipsec set
1 | 导出IPsec安全策略:Netsh ipsec static exportpolicy file = d:\ExportSecurity.ipsec |
删除所有的安全策略
1
echo ipsec static delete all > c:/temp.ips
建立一个新的安全策略
1
2rem 创建安全策略mrdTomcat
echo ipsec static add policy name = mrdTomcat >> c:/temp.ips创建筛选操作(允许和拒绝)
1
2
3rem 创建筛选操作
echo ipsec static add filteraction name = allow action = permit >> c:/temp.ips
echo ipsec static add filteraction name = deny action = block >> c:/temp.ips创建筛选器并对其设置过滤规则
1
2
3
4
5
6
7
8
9
10
11
12
13
14rem 自身连接
echo ipsec static add filterlist name = allow_me >> c:/temp.ips
echo ipsec static add filter filterlist = allow_me srcaddr = me dstaddr = 10.0.0.0 dstmask = 255.0.0.0 protocol = any mirrored = yes >> c:/temp.ips
echo ipsec static add filter filterlist = allow_me srcaddr = me dstaddr = 127.0.0.1 protocol = any mirrored = yes >> c:/temp.ips
rem 中控连接22
echo ipsec static add filterlist name = allow_22 >> c:/temp.ips
echo ipsec static add filter filterlist = allow_22 srcaddr = 111.206.12.11 dstaddr = me dstport = 22 description = cc_access protocol = TCP mirrored = yes >> c:/temp.ips
echo ipsec static add filter filterlist = allow_22 srcaddr = 220.181.142.11 dstaddr = me dstport = 22 description = cc_access protocol = TCP mirrored = yes >> c:/temp.ips
rem 拒绝其他所有ip
echo ipsec static add filterlist name = deny_all >> c:/temp.ips
echo ipsec static add filter filterlist = deny_all srcaddr = me dstaddr = any dstport = 0 protocol = any mirrored = yes >> c:/temp.ips
echo ipsec static add filter filterlist = deny_all srcaddr = any dstaddr = me dstport = 0 protocol = any mirrored = yes >> c:/temp.ips将筛选器规则加入到安全策略
1
2
3
4echo ipsec static add rule name = allow_me Policy = mrdTomcat filterlist = allow_me filteraction = allow >> c:/temp.ips
echo ipsec static add rule name = allow_22 Policy = mrdTomcat filterlist = allow_22 filteraction = allow >> c:/temp.ips
echo ipsec static add rule name = allow_3389 Policy = mrdTomcat filterlist = allow_3389 filteraction = allow >> c:/temp.ips
echo ipsec static add rule name = deny_all Policy = mrdTomcat filterlist = deny_all filteraction = deny >> c:/temp.ips1
2
3
4rem 连接zabbix
echo ipsec static add filterlist name = allow_zabbix >> c:/temp.ips
echo ipsec static add filter filterlist = allow_zabbix srcaddr = x.x.x.0 srcmask = 255.255.255.0 dstaddr = me dstport = 10050 description = zabbix_to_me protocol = TCP mirrored = yes >> c:/temp.ips
echo ipsec static add filter filterlist = allow_zabbix srcaddr = me dstaddr = any dstport = 10051 description = me_to_zabbix protocol = TCP mirrored = yes >> c:/temp.ips1
2
3
4rem 连接snmp
echo ipsec static add filterlist name = allow_snmp >> c:/temp.ips
echo ipsec static add filter filterlist = allow_snmp srcaddr = x.x.x.0 srcmask = 255.255.255.0 dstaddr = me dstport = 161 description = snmp_to_me protocol = UDP mirrored = yes >> c:/temp.ips
echo ipsec static add filter filterlist = allow_snmp srcaddr = me dstaddr = any dstport = 161 description = me_to_snmp protocol = UDP mirrored = yes >> c:/temp.ips1
2
3
4rem 连接icmp
echo ipsec static add filterlist name = allow_icmp >> c:/temp.ips
echo ipsec static add filter filterlist = allow_icmp srcaddr = x.x.x.0 srcmask = 255.255.255.0 dstaddr = me description = snmp_to_me protocol = ICMP mirrored = yes >> c:/temp.ips
echo ipsec static add filter filterlist = allow_icmp srcaddr = me dstaddr = any description = me_to_icmp protocol = ICMP mirrored = yes >> c:/temp.ips激活安全策略
1
echo ipsec static set policy name = mrdTomcat assign = y >> c:/temp.ips
应用配置
1
netsh -f "c:/temp.ips"
ipsec 参数
1 | C:\Users\Administrator>netsh ipsec static add filter /? |
windows cygwin install
- 在windows 2008 R2上安装sshd服务(cygwin)
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=> 1. 通过"远程桌面"登录到Win服务器(Ctrl+R => mstsc => Login)
=> 2. 下载cygwin软件包,并安装(默认安装位置即可)
=> 3. cygwin安装软件(基础软件包,根据自己项目需求):
zip =>必须
unzip =>必须
openssh =>必须
openssl =>必须
rsync
crontab
autoconf2.5
automake1.9
binutils
gcc
gcc-core
gcc-g++
gcc-mingw-core
gcc-mingw-g++
gdb
sed
vim
telnet
=> 4. cygwin软件安装
=> 5.在下方的系统变量里点击新建,在弹出的对话框里新建变量CYGWIN,值为ntsec tty,然后双击打开系统变量里的PATH,追加C:\Cygwin64\bin\
=> 6.ssh
$ mkpasswd -l > /etc/passwd
$ mkgroup -l > /etc/group
=> 7. cygwin安装sshd服务
=> ssh-host-config =>(管理员身份运行)
=> 8. cygwin启动sshd服务
=> cygrunsrv --start sshd
cygrunsrv --stop sshd
cygrunsrv -R sshd
=> 9. cygwin常用命令
=> cygrunsrv -L 查看安装的服务
=> 10. cygwin 删除之前安装的sshd配置,重新初始化配置
=> rm -rf /etc/ssh*
rm -rf /var/log/sshd.log
ssh-host-config
=> 11. 注意
sshd在cyg_server帐户下运行,你在初始化sshd配置的时候会创建一个用户,默认用户为cyg_server
=> 12. login
=> ssh Administrator@IP
注意: 用户名第一个字母必须大写
=> 13. 无密码登录
ssh-copy-id -i ~/.ssh/id_dsa.pub Administrator@115.159.101.156
1 | $ ssh-host-config |
cygwin install
创建目录
1
2软件包存放位置: C:\install\setup-x86_64.exe
双击软件包: setup-x86_64.exe选择国内源
1
2
3http://mirrors.ustc.edu.cn/cygwin/ 推荐
http://mirrors.163.com/cygwin/
http://mirrors.sohu.com/cygwin/安装软件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16Category:
Admin
Base
Devel
Editors:
vim
Net
System
Utils
openssh
vim
zip
unzip
curl
wget将”C:\cygwin64\bin”添加到windows环境变量中
配置openssh
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
73
74
75
76
77$ ssh-host-config
*** Info: Generating missing SSH host keys
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
*** Info: Creating default /etc/ssh_config file
*** Info: Creating default /etc/sshd_config file
*** Info: StrictModes is set to 'yes' by default.
*** Info: This is the recommended setting, but it requires that the POSIX
*** Info: permissions of the user's home directory, the user's .ssh
*** Info: directory, and the user's ssh key files are tight so that
*** Info: only the user has write permissions.
*** Info: On the other hand, StrictModes don't work well with default
*** Info: Windows permissions of a home directory mounted with the
*** Info: 'noacl' option, and they don't work at all if the home
*** Info: directory is on a FAT or FAT32 partition.
# "StrictModes"设置ssh在接收登录请求之前是否检查'用户家目录'和'rhosts文件'的权限和所有权
# 这通常是必要的,因为新手经常会把自己的目录和文件设成任何人都有写权限,我建议选择'no'
*** Query: Should StrictModes be used? (yes/no) no
*** Info: Note that creating a new user requires that the current account have
*** Info: Administrator privileges. Should this script attempt to create a
# 创建一个新的本地用户,叫sshd,默认用户被禁止登陆
*** Query: new local account 'sshd'? (yes/no) yes
*** Info: Updating /etc/sshd_config file
*** Query: Do you want to install sshd as a service?
# 是否想将sshd服务加入到windows 服务中
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
#
*** Query: Enter the value of CYGWIN for the daemon: [] binmode ntsec
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires. You need to have or to create a privileged
*** Info: account. This script will help you do so.
*** Info: It's not possible to use the LocalSystem account for services
*** Info: that can change the user id without an explicit password
*** Info: (such as passwordless logins [e.g. public key authentication]
*** Info: via sshd) when having to create the user token from scratch.
*** Info: For more information on this requirement, see
*** Info: https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1
*** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless such an account
*** Info: already exists). This account is then used to run these special
*** Info: servers.
*** Info: Note that creating a new user requires that the current account
*** Info: have Administrator privileges itself.
*** Info: No privileged account could be found.
*** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
# 如果用相同的名字cyg_server,输入no
*** Query: Do you want to use a different name? (yes/no) no
*** Query: Create new privileged user account 'WIN-5GSU1CSQSAB\cyg_server' (Cygwin name: 'cyg_server')? (yes/no) yes
*** Info: Please enter a password for new user cyg_server. Please be sure
*** Info: that this password matches the password rules given on your system.
*** Info: Entering no password will exit the configuration.
# 为cyg_server设置密码
*** Query: Please enter the password:
*** Query: Reenter:
*** Info: User 'cyg_server' has been created with password 'FT7m4VhgN9W1212'.
*** Info: If you change the password, please remember also to change the
*** Info: password for the installed services which use (or will soon use)
*** Info: the 'cyg_server' account.
*** Info: The sshd service has been installed under the 'cyg_server'
*** Info: account. To start the service now, call `net start sshd' or
*** Info: `cygrunsrv -S sshd'. Otherwise, it will start automatically
*** Info: after the next reboot.
*** Info: Host configuration finished. Have fun!启动openssh服务
1
2
3
4
5net start sshd 启动
net stop sshd 关闭
cygrunsrv --start sshd 启动
cygrunsrv --stop sshd 关闭