摘要: 首先创建一个普通用户,并且给普通用户设置一个密码,保证能用su 命令能用普通用户登录 [root@ahu ~] useradd test [root@ahu ~] passwd test New password: Retype new password: passwd: all authentic 阅读全文
posted @ 2017-06-16 14:20 于欢水 阅读(14357) 评论(1) 推荐(1) 编辑
摘要: MySQL忘记密码的解决办法: [root@localhost ~] mysql uroot p ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 阅读全文
posted @ 2017-06-16 14:15 于欢水 阅读(205) 评论(0) 推荐(0) 编辑
摘要: Shell判断 按照文件类型进行判断 b 判断文件是否存在,并且是否为快设备文件(是块设备文件为真) c 判断文件是否存在,并且是否为字符设备文件(是字符设备文件为真) d 判断文件是否存在,并且是否为目录文件(是目录为真) e 判断文件是否存在,存在为真 f 判断文件是否存在,并且是否为普通文件( 阅读全文
posted @ 2017-06-16 14:11 于欢水 阅读(1915) 评论(0) 推荐(0) 编辑
摘要: 利用extundelete工具恢复磁盘误删除的数据 原理: 简单介绍下关于inode的知识。在Linux下可以通过“ls id”命令来查看某个文件或者目录的inode值,例如查看根目录的inode值,可以输入: [root@Virtual Server 100 shell] ls id / 2 / 阅读全文
posted @ 2017-06-16 14:10 于欢水 阅读(16028) 评论(0) 推荐(0) 编辑
摘要: #python3 #!/usr/bin/env python #coding:utf-8 import random import string random_str = list(string.ascii_letters + string.digits + '!@#$%^&*') print (' 阅读全文
posted @ 2017-06-16 13:57 于欢水 阅读(473) 评论(0) 推荐(0) 编辑
摘要: Cenos6.5升级Python2.6到2.7 1.下载源码包 wget https://www.python.org/ftp/python/2.7.12/Python 2.7.12.tgz 2.进行解压,准备编译安装 tar zxvf Python 2.7.12.tgz cd Python 2.7 阅读全文
posted @ 2017-06-16 09:24 于欢水 阅读(1173) 评论(0) 推荐(0) 编辑
摘要: 1. 准备 yum install mod_ssl openssl 2. 生成一个自签名证书 cd /etc/pki/CA 1.生成2048位的加密私钥 openssl genrsa out server.key 2048 2.生成证书签名请求 openssl req new key server. 阅读全文
posted @ 2017-06-16 09:23 于欢水 阅读(624) 评论(0) 推荐(0) 编辑
摘要: 一、LAMP环境部署 1、安装php 1.安装yum源 rpm Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel release 6 8.noarch.rpm rpm Uvh http://rpms.famillecollet. 阅读全文
posted @ 2017-06-16 09:21 于欢水 阅读(618) 评论(0) 推荐(0) 编辑