• Linux 中 Ctrl-c, Ctrl-z, Ctrl-d 的使用

    14-07-09 14:25 866 0 技术

    Ctrl-c: ( kill foreground process ) 发送 SIGINT 信号给前台进程组中的所有进程,强制终止程序的执行;

    ctrl-z: ( suspend foreground process ) 发送 SIGTSTP 信号给前台进程组中的所有进程,常用于挂起一个进程,而并

    非结束进程,用户可以使用使用fg/bg操作恢复执行前台或后台的进程。fg命令在前台恢复执行被挂起的进 程,此时可以使用ctrl-z再次挂起该进程,bg命令在后台恢复执行被挂起的进程,而此时将无法使用ctrl-z 再次挂起该进程; 一个比较常用的功能: 正在使用vi编辑一个文件时,需要执行shell命令查询一些需要的信息,可以使用ctrl-z挂起vi,等执行 完shell命令后再使用fg恢复vi继续编辑你的文件(当然,也可以在vi中使用!command方式执行shell命令, 但是没有该方法方便)。

    ctrl-d: ( Terminate input, or exit shell ) 一个特殊的二进制值,表示 EOF,作用相当于在终端中输入exit后回车;

    还有以下几个:

    ctrl-/ 发送 SIGQUIT 信号给前台进程组中的所有进程,终止前台进程并生成 core 文件 ctrl-s 中断控制台输出 ctrl-q 恢复控制台输出 ctrl-l 清屏

    其实,控制字符都是可以通过stty命令更改的,可在终端中输入命令”stty -a”查看终端配置

  • Linux 创建 www 的用户组和用户,并且不允许登录权限

    14-07-06 14:13 619 0 技术
    # id www
    id: www: no such user
    
    # groupadd www
    # useradd -g www -s /sbin/nologin www
    
    # id www
    uid=1000(www) gid=1000(www) 组=1000(www)
    
  • FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream

    14-06-26 10:15 23378 0 技术

    错误原因及解决方法:

    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
    

    而 Nginx 识别不到 /scripts 路径,所以 phpinfo 验证信息就无法正常通过,需要修改如下:

    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    

    注意:$document_root 代表当前请求在 root 指令中指定的值。

  • CentOS 服务器搭建 Shadowsockets 教程

    14-06-20 15:25 24742 0 技术
    yum install python-setuptools m2crypto supervisor
    easy_install pip
    pip install shadowsocks
    
    /usr/bin/python /usr/bin/ssserver -p 443 -k yourpassword -m aes-256-cfb --user nobody -d start
    
  • 解决错误:nginx: [emerg] unknown log format "main"

    14-06-14 21:10 23663 0 技术

    重启 nginx 出现了如下错误:

    nginx: [emerg] unknown log format "main" in /usr/local/nginx/conf/nginx.conf:34
    

    解决办法:

    打开 nginx.conf,”main” 错误是因为丢失了 log_format 选项,把 log_format 所在行的注释去掉就 OK 了。

  • Windows 修改 Caps Lock 为 Control 键

    14-05-25 15:36 23668 0 技术

    保存以下内容到 ChangeCapsToControl.reg

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
    "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
    

    双击替换成功!

  • 运行IPCONFIG /FlushDNS后Could not flush the DNS Resolver Cache: 执行期间,函数出了问题

    14-04-26 12:26 807 0 未分类
  • Linux(CentOS)卸载apache php mysql(转载,备忘)

    14-04-19 21:51 506 0 未分类
  • Yii Framework 中文社区 QQ 群一览表

    14-04-15 09:30 23176 0 未分类

    为了让大家有一个良好的学习交流环境,特将Yii Framework 中文社区全部QQ群公布! 希望大家踊跃发言,我们会不定期清理长期潜水人员!

  • Centos6 yum搭建Linux+Nginx+PHP+MYSQL(LNMP)

    14-03-17 21:25 861 0 未分类

文章归档

文章日历

2024 年 05 月
29 30 31 01 02 03 04
05 06 07 08 09 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
27 28 29 30 31 01 02

文章标签

最新评论

友情链接