随笔分类 -  linux

摘要:1. echo "newpasswd" | passwd --stdin username 密码中不能有特殊字符串(如引号),修改完后 history -c2. 先新建一个临时文件tmppasswd.txt放置账号密码,内容格式 username:newpasswd(sunnom:123456) 再用命令修改 chpasswd < tmppasswd.txt 密码是明文文件,可以使用特殊字符串3. 先用openssl passwd -1 生成密码,再写入tmppasswd.txt(root:$1ri2hceVU$WIf.firUBn97JKswK9E) 再用命令修改 阅读全文

posted @ 2014-03-30 22:51 sunnom 阅读(362) 评论(0) 推荐(0) |

摘要:#!/bin/sh## nginx Startup script for nginx## chkconfig: - 85 15# processname: nginx# config: /etc/nginx/nginx.conf# config: /etc/sysconfig/nginx# pidfile: /var/run/nginx.pid# description: nginx is an HTTP and reverse proxy server#### BEGIN INIT INFO# Provides: nginx# Required-Start: $local_fs $remot 阅读全文

posted @ 2014-03-08 01:36 sunnom 阅读(165) 评论(0) 推荐(0) |

摘要:1.下载nginx -1.2.5.tar.gz www.nginx.org/en/download.html tar -zxvf nginx -1.2.5.tar.gz2.编译工具 #yum -y install gcc gcc-c++ autoconf automake #yum -y install zlib zlib-devel openssl openssl-devel pcre-devel zlib : nginx 提供gzip 模块,需要zlib 库支持 。 pcre :支持地址重写rewrite 功能。3. 建用户:groupadd -r nginx useradd -s /sb 阅读全文

posted @ 2014-02-26 18:23 sunnom 阅读(219) 评论(0) 推荐(0) |

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3