1、virtualbox中虚拟机和主机共享粘贴板
https://jingyan.baidu.com/article/54b6b9c02a3c596c593b4734.html
2、目录没有写权限,编译时会出现cannot open output file a.out: Permission denied ”
https://blog.csdn.net/yangpeng111111/article/details/122103267
3、grep -v "^$"过滤空白行
^:从字符串开头进行匹配
$:从字符串末尾进行匹配
4、端口占用情况指令
netstat -anp | grep 80
5、移植boa(官网获取源码http://www.boa.org/)
主要参考https://blog.csdn.net/feit2417/article/details/84777523
https://www.jianshu.com/p/c4f0e4072fcc
https://www.jianshu.com/p/e678924d9788
安装软件apt-get install -y byacc apt-get install flex->解压源码->src下./configure配置->defines.h #define SERVER_ROOT "/boa"跟boa.conf中一致; compat.h boa.c log.c中都有修改部分 ->根据相应平台选择编译器编译->复制相应文件,修改boa.conf文件,注意添加
ServerName www.your.org.here
->组织html cgi文件用于访问->如果80端口被占用,可以修改boa.conf端口设置或者关闭80端口软件,./boa启动boa服务器
tip:使用post方式提交网页给cgi程序,然后网页会停留在post页面,使用
printf("<meta http-equiv=\"refresh\" content=\"1;url=../port.htm\">");
可以刷新页面
6、to do
cgi编程参考https://blog.csdn.net/drbinzhao/article/details/7058724
https://blog.csdn.net/manchestermi/article/details/50836834
boa+php