海运的博客

Cygwin使用Vim插件管理器Vundle错误error setting certificate verify locations解决

发布时间:December 16, 2012 // 分类:Vim,Cygwin // No Comments

Cygwin下使用Vundle通过Github安装VIM插件时提示以下错误:

error: error setting certificate verify locations:
CAfile: /usr/ssl/certs/ca-bundle.crt
CApath: none while accessing https://github.com/
fatal: HTTP request failed

通过apt-cyg安装ca-certificates解决:

apt-cyg install ca-certificates

或跳过CA验证:

export GIT_SSL_NO_VERIFY=1

Windows/Cygwin下安装配置SSH服务器

发布时间:December 5, 2012 // 分类:Cygwin // No Comments

1.Cygwin安装OpenSSH,可使用apt-cyg包管理器快速安装。

apt-cyg install openssh

配置OpenSSH服务,以管理员运行Cygwin Terminal。

$ ssh-host-config
*** Info: Generating /etc/ssh_host_key
*** Info: Generating /etc/ssh_host_rsa_key
*** Info: Generating /etc/ssh_host_dsa_key
*** Info: Generating /etc/ssh_host_ecdsa_key
*** Info: Creating default /etc/ssh_config file
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/README.privsep.
*** Query: Should privilege separation be used? (yes/no) yes
*** Info: Updating /etc/sshd_config file

*** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: [] ssh
*** 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: You appear to be running Windows XP 64bit, Windows 2003 Server,
*** Info: or later.  On these systems, it's not possible to use the LocalSystem
*** Info: account for services that can change the user id without an
*** Info: explicit password (such as passwordless logins [e.g. public key
*** Info: authentication] via sshd).

*** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless a similar 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.
*** Query: Do you want to use a different name? (yes/no) yes
*** Query: Enter the new user name: ssh
*** Query: Reenter: ssh

*** Query: Create new privileged user account 'ssh'? (yes/no) yes
*** Info: Please enter a password for new user ssh.  Please be sure
*** Info: that this password matches the password rules given on your system.
*** Info: Entering no password will exit the configuration.
*** Query: Please enter the password:
*** Query: Reenter:

*** Info: User 'ssh' has been created with password 'passwd'.
*** 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 'ssh' account.

*** Info: Also keep in mind that the user 'ssh' needs read permissions
*** Info: on all users' relevant files for the services running as 'ssh'.
*** Info: In particular, for the sshd server all users' .ssh/authorized_keys
*** Info: files must have appropriate permissions to allow public key
*** Info: authentication. (Re-)running ssh-user-config for each user will set
*** Info: these permissions correctly. [Similar restrictions apply, for
*** Info: instance, for .rhosts files if the rshd server is running, etc].


*** Info: The sshd service has been installed under the 'ssh'
*** 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!

启动SSH服务:

cygrunsrv -S sshd

Windows下安装Cygwin及包管理器apt-cyg

发布时间:December 5, 2012 // 分类:Cygwin // No Comments

Cygwin可以在Windows下使用unix环境Bash和各种功能强大的工具,对于Linux管理员来说不想使用Linux桌面是必备的工具。
Cygwin下也有类似Linux下包管理工具apt-cyg,可以方便的通过网络安装各种软件。
1.下载安装:http://cygwin.com/setup.exe
2.选择安装源及软件,如需安装apt-cyg需安装以下软件包:

wget
tar
gawk
bzip2

3.Cygwin安装完成后打开Cygwin Terminal安装apt-cyg包管理器:

wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg -P /bin
chmod.exe +x /bin/apt-cyg

apt-cyg安装源为ftp://mirror.mcs.anl.gov,设置为网易镜像源。

 apt-cyg -m http://mirrors.163.com/cygwin/

使用apt-cyg安装软件:

apt-cyg update
#更新源
apt-cyg install ping -u
#使用参数u不必每次都更新源
Working directory is /setup
Mirror is http://mirrors.163.com/cygwin/

Installing ping
Found package ping
--2012-12-05 09:59:20--  http://mirrors.163.com/cygwin//release/ping/ping-1.0-1.tar.bz2
正在解析主机 mirrors.163.com (mirrors.163.com)... 123.58.173.89, 123.58.173.106
正在连接 mirrors.163.com (mirrors.163.com)|123.58.173.89|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:8352 (8.2K) [application/octet-stream]
正在保存至: “ping-1.0-1.tar.bz2”

100%[==============================================>] 8,352       --.-K/s 用时 0.1s

2012-12-05 09:59:21 (64.1 KB/s) - 已保存 “ping-1.0-1.tar.bz2” [8352/8352])

Unpacking...
Package ping requires the following packages, installing:
cygwin
Package cygwin is already installed, skipping
Package ping installed

Cygwin安装procps,包含uptime/free/top等常用工具:

bin/prockill.exe
bin/procps.exe
sbin/sysctl.exe
usr/bin/free.exe
usr/bin/pgrep.exe
usr/bin/pkill.exe
usr/bin/pmap.exe
usr/bin/pwdx.exe
usr/bin/skill.exe
usr/bin/slabtop.exe
usr/bin/snice.exe
usr/bin/tload.exe
usr/bin/top.exe
usr/bin/uptime.exe
usr/bin/vmstat.exe
usr/bin/w.exe
usr/bin/watch.exe

DOS命令输出编码为GBK,Cygwin下默认为UTF-8,兼顾显示乱码的问题设置Cygwin编码为GBK:

export LANG="zh_CN.GBK"

其它设置:

alias ls="ls --color=auto"
export PS1="\[\e]0;\w\a\]\[\e[32m\]\u@\h:\[\e[33m\]\w\[\e[0m\]\$ "
分类
最新文章
最近回复
  • opnfense: 谢谢博主!!!解决问题了!!!我之前一直以为内置的odhcp6就是唯一管理ipv6的方式
  • liyk: 这个方法获取的IPv6大概20分钟之后就会失效,默认路由先消失,然后Global IPV6再消失
  • 海运: 不好意思,没有。
  • zongboa: 您好,請問一下有immortalwrt設定guest Wi-Fi的GUI教學嗎?感謝您。
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...