在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
项目中遇到一个bug,查了一下问题在于mysql查询条件不区分大小写
比如 test表里面存储了两列数据
| col0 | col1 | col2 |
| tmp | 1 | 1 |
| TMP | 2 | 2 |
查询语句 select * from test where col0 = 'tmp'
两行都能搜索出来。第一次拿到这一个结果,我的内心是这样的:WTF、EXM、你TMD是来逗我的吧
但事实摆在面前,不能不认怂。下一步究其根本,这个答案很靠谱
以下引自:https://blog.csdn.net/Veir_123/article/details/73730751
Mysql默认的字符检索策略:utf8_general_ci,表示不区分大小写;utf8_general_cs表示区分大小写,utf8_bin表示二进制比较,同样也区分大小写 。(注意:在Mysql5.6.10版本中,不支持utf8_genral_cs!!!!)
创建表时,直接设置表的collate属性为utf8_general_cs或者utf8_bin;如果已经创建表,则直接修改字段的Collation属性为utf8_general_cs或者utf8_bin。
直接修改sql语句,在要查询的字段前面加上binary关键字即可。
-- 在每一个条件前加上binary关键字
select * from test where binary col0 = 'tmp';
-- 将参数以binary('')包围
select * from test where col0 = binary('tmp');
一直使用VirtualBox安装的Debian环境编译WD MyCloud的代码。但是最近VirtualBox升级后,升级增强功能,然后共享粘贴板就不能使用了。
如果执行
|
1 |
$ VBoxClient --clipboard |
|
1 |
VBoxClient: Failed to connect to the VirtualBox kernel service, rc=VERR_FILE_NOT_FOUND |