在VirtualBox 5.2.22上安装Mac OS X Snow Leopard(10.6.3),具体步骤,依照下列的步骤操作即可。
以下步骤适用于 Mac OS X Lion(10.7)/Mac OS X Mountain Lion(10.8)。
继续阅读在VirtualBox 5.2.22上安装Mac OS X Snow Leopard(10.6.3)
在VirtualBox 5.2.22上安装Mac OS X Snow Leopard(10.6.3),具体步骤,依照下列的步骤操作即可。
以下步骤适用于 Mac OS X Lion(10.7)/Mac OS X Mountain Lion(10.8)。
继续阅读在VirtualBox 5.2.22上安装Mac OS X Snow Leopard(10.6.3)
Introducing Cache Pseudo-Locking to reduce memory access latency
继续阅读Introducing Cache Pseudo-Locking to reduce memory access latency
如果直接点击屏幕下方的Xcode图标,回弹出一个Xcode的启动框,右边会列出你最近打开过的工程,如果想清除这些记录,就点击Xcode的菜单栏的“File”菜单,然后选择 Open Recent ,然后就能看到Clear Menu了,点击后,再次启动Xcode就看不到先前打开过的工程了。
尝试在在macOS Mojave (10.14.1)
系统上使用Xcode 10.1
进行IOKit Framework
相关的开发,没有在网上找到合适的例子,自己摸索了一下步骤。
继续阅读在macOS Mojave (10.14.1)系统上使用Xcode 10.1导入IOKit Framework开发
这篇文章会手把手教你如何用 VirtualBox 进行 macOS 内核的源码级调试。虽然这些步骤都是在 VirtualBox上进行的,但在 VMWare 上也是通用的,甚至更简单。
继续阅读用VirtualBox 5.2.20调试macOS内核
macOS Mojave(10.14/10.14.1)
无法删除从应用商店下载的macOS High Sierra
安装文件,现象如下图:一直使用的服务器使用的是ubuntu 16.04.5
,默认启用了vsftpd
服务。但是最近在执行软件更新之后,出现vsftpd
服务无法启动的问题。
当时是按照 Centos/Ubuntu FTP服务器的架设和配置 进行配置的。
具体的错误信息如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
root@xxxx:~# service vsftpd status ● vsftpd.service - vsftpd FTP server Loaded: loaded (/etc/systemd/system/vsftpd.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sat 2018-11-03 20:36:08 CST; 1min 53s ago Process: 31620 ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, status=2) Process: 31617 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS) Main PID: 31620 (code=exited, status=2) Nov 03 20:36:08 xxxx systemd[1]: Starting vsftpd FTP server... Nov 03 20:36:08 xxxx systemd[1]: Started vsftpd FTP server. Nov 03 20:36:08 xxxx systemd[1]: vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT Nov 03 20:36:08 xxxx systemd[1]: vsftpd.service: Unit entered failed state. Nov 03 20:36:08 xxxx systemd[1]: vsftpd.service: Failed with result 'exit-code' |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
root@xxxx:~# sudo systemctl status vsftpd.service ● vsftpd.service - vsftpd FTP server Loaded: loaded (/etc/systemd/system/vsftpd.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sat 2018-11-03 20:47:51 CST; 1min 34s ago Process: 31820 ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, status=2) Process: 31817 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS) Main PID: 31820 (code=exited, status=2) Nov 03 20:47:51 xxxx systemd[1]: Starting vsftpd FTP server... Nov 03 20:47:51 xxxx systemd[1]: Started vsftpd FTP server. Nov 03 20:47:51 xxxx systemd[1]: vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT Nov 03 20:47:51 xxxx systemd[1]: vsftpd.service: Unit entered failed state. Nov 03 20:47:51 xxxx systemd[1]: vsftpd.service: Failed with result 'exit-code'. |
从错误信息中,我们可以看到返回的错误信息如下:
1 |
Process: 31820 ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf (code=exited, status=2) |
错误代码为2
,查询Linux
的系统错误代码,错误信息为"errno2 : No such file or directory
"。
打开/etc/vsftpd.conf
,可以看到,里面的配置文件中
1 2 3 |
# This option specifies the location of the RSA certificate to use for SSL # encrypted connections. rsa_cert_file=/etc/ssl/private/vsftpd.pem |
我们发现已经找不到这个SSL
证书了。
解决方法如下:
1.首先移除已经安装好的服务,并且删除配置文件
1 2 3 |
$ sudo apt-get remove --purge vsftpd $ sudo apt-get install vsftpd |
然后按照 Centos/Ubuntu FTP服务器的架设和配置 重新配置一遍。安装的时候,会自动搜寻系统已经安装的有效证书,如果找不到,会自己生成一份证书。
2.也可以手工生成一份自签名的证书,推荐这个方法
1 |
$ sudo openssl req -x509 -nodes -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem -days 365 -newkey rsa:2048 |
How to secure VSFTPD FTP Server using a self-signed SSL/TLS certificate in CentOS 7 – FTPS
WDMyCloud
的编译环境2.从高版本Debian
源里下载git-2.19
的源代码包,然后手工编译,如下:
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 |
$ cd ~/wdmc-build/64k-wheezy #https://packages.debian.org $ su $ cd build/root $ mkdir git $ cd git $ wget http://http.debian.net/debian/pool/main/g/git/git_2.19.1+next.20181026.orig.tar.gz $ wget http://http.debian.net/debian/pool/main/g/git/git_2.19.1+next.20181026-1.debian.tar.xz $ cd ../../../ $ chroot build $ mount -t proc none /proc $ mount -t devtmpfs none /dev $ mount -t devpts none /dev/pts $ export DEBIAN_FRONTEND=noninteractive $ export DEBCONF_NONINTERACTIVE_SEEN=true $ export LC_ALL=C $ export LANGUAGE=C $ export LANG=C $ export DEB_CFLAGS_APPEND='-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE' $ export DEB_BUILD_OPTIONS=nocheck $ cd root/git # 当前的压缩文件,解压缩出的文件目录是”0250525e“ $ tar xvf *.orig.tar.gz $ tar xvf *.debian.tar.xz -C 0250525e/ $ cd 0250525e # 解决不能正确编译的问题 $ sed -i "s/dh \$\@ --with apache2/dh \$\@/g" debian/rules # 交叉编译的程序,测试用例不能完全通过,我们关闭测试用例这部分 $ sed -i "s/^TEST[ \t]*=[ \t]*test/TEST=/g" debian/rules # 安装依赖 $ apt-get update $ apt-get upgrade $ apt-get install asciidoc # 此版本git默认不使用openssl,因此安装 libcurl4-gnutls-dev 而不是 ibcurl4-openssl-dev $ apt-get install libcurl4-gnutls-dev $ apt-get install libpcre2-dev # DEB_BUILD_OPTIONS="nocheck nodoc" 不需要测试用例,不需要帮助文档, 目前如果设置了"nodoc",最后打包的时候会缺少文件 $ DEB_BUILD_OPTIONS="nocheck" dpkg-buildpackage -d -b -uc |
1 2 3 4 5 6 7 8 |
make[1]: Entering directory `/root/git/0250525e' dh_install --arch Can't exec "/root/git/0250525e/debian/git.install": No such file or directory at /usr/share/perl5/Debian/Debhelper/Dh_Lib.pm line 643. dh_install: cannot run debian/git.install: No such file or directory make[1]: *** [override_dh_install-arch] Error 2 make[1]: Leaving directory `/root/git/0250525e' make: *** [binary] Error 2 dpkg-buildpackage: error: debian/rules binary gave error exit status 2 |
1 2 3 4 5 6 |
$ rm -rf debian/git.install $ rm -rf debian/git-el.install # 重新编译 $ DEB_BUILD_OPTIONS="nocheck" dpkg-buildpackage -d -b -uc |
1 2 3 |
dh_installdeb: unknown dpkg-maintscript-helper command: dir_to_symlink make: *** [binary] Error 25 dpkg-buildpackage: error: debian/rules binary gave error exit status 2 |
dpkg
的版本太低,导致部分命令无法正确执行,执行如下命令即可:
1 2 3 4 |
$ rm -rf debian/git.maintscript # 重新编译 $ DEB_BUILD_OPTIONS="nocheck" dpkg-buildpackage -d -b -uc |
如果上述源代码的下载存在问题,可以本站下载一份文件拷贝:
git_2.19.1+next.20181026.orig.tar
git_2.19.1+next.20181026-1.debian.tar
一直使用VirtualBox
安装的Debian
环境编译WD MyCloud
的代码。但是最近VirtualBox
升级后,升级增强功能,然后共享粘贴板就不能使用了。
如果执行
1 |
$ VBoxClient --clipboard |
1 |
VBoxClient: Failed to connect to the VirtualBox kernel service, rc=VERR_FILE_NOT_FOUND |
在使用SSH客户端进行连接管理的时候如果长时间不输入命令, 服务器会自动断开连接, 尤其是有的人使用SSH作为代理连接这样的情况更是突出, 因此我在网上搜集了可以让 SSH 保持连接的方法与大家分享
通过修改 sshd 的配置文件,能够让 SSH Server 发送“心跳”信号来维持持续连接,下面是设置的内容
打开服务器 /etc/ssh/sshd_config,我在最后增加一行
1 2 3 |
ClientAliveInterval 60 ClientAliveCountMax 1 |
这 样,SSH Server 每 60 秒就会自动发送一个信号给 Client,而等待 Client 回应,(注意:是服务器发心跳信号,不是客户端,这个有别于一些 FTP Client 发送的 KeepAlives 信号哦~~~),如果客户端没有回应,会记录下来直到记录数超过 ClientAliveCountMax 的值时,才会断开连接。
只要在/etc/ssh/ssh_config文件里加两个参数就行了
1 2 3 |
TCPKeepAlive yes ServerAliveInterval 300 |
前一个参数是说要保持连接,后一个参数表示每过5分钟发一个数据包到服务器表示“我还活着”
如果你没有root权限,修改或者创建~/.ssh/ssh_config也是可以的
在这种方法中, 如果你只想针对某一个ssh连接进行持续, 你可以将上述配置文件复制一下进行修改然后在连接的时候使用 -F参数进行配置文件的指定。 当然因为只需要修改两个参数, 你也可以直接在连接命令中进行设定即:
1 |
$ ssh -o TCPKeepAlive=yes -o ServerAliveInterval=300 xx@xx.com -p xxxx |