摘要: import random def Verifi_code(): code = [] for i in range(6): if i == random.randint(1,5): code.append(str(random.randint(1,5))) else: temp = random.r 阅读全文
posted @ 2017-03-25 11:52 aallennty 阅读(119) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: UTF-8 -*- import smtplib from email.mime.text import MIMEText msg = MIMEText('hello, send by Python...', 'plain', 'utf-8') from_addr = ' 阅读全文
posted @ 2017-03-25 11:52 aallennty 阅读(151) 评论(0) 推荐(0) 编辑
摘要: centos解决办法:[root@tyzz MyBlog-Flask]# yum install -y MySQL-python 阅读全文
posted @ 2017-03-25 11:52 aallennty 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 安装nginx的时候出现 ./configure: error: SSL modules require the OpenSSL library. 解决方法: Centos需要安装openssl-develUbuntu则需要安装:sudo apt-get install libssl-dev 安装n 阅读全文
posted @ 2017-03-25 11:52 aallennty 阅读(3296) 评论(0) 推荐(0) 编辑
摘要: 一、用户创建、权限、删除1、连接MySql操作连接:mysql -h 主机地址 -u 用户名 -p 用户密码 (注:u与root可以不用加空格,其它也一样)断开:exit (回车)终端输入mysql -h 127.0.0.1 -u root -p 然后输入密码。就可以连接到本地的MySql数据库了。 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 使用MySQL执行update的时候报错: Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disab 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 1.首先确认服务器出于安全的状态,也就是没有人能够任意地连接MySQL数据库。因为在重新设置MySQL的root密码的期间,MySQL数据库完全出于没有密码保护的状态下,其他的用户也可以任意地登录和修改MySQL的信息。可以采用将MySQL对外的端口封闭,并且停止Apache以及所有的用户进程的方法 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 基本sed编程举例-n 只输出处理后的行-i 直接修改读取的文件内容,而不是输出到终端-r 使用扩展正则表达式打印指定行[root@tyzZ SED]# cat file xdtn 6/56 12356 G 8 34 78zdyn 6/56 12... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 查询文件空行所在的行号[root@tyzz ~]# awk '{if ($0~/^$/)print NR}' test 368[root@tyzz ~]# grep -n ^$ test 3:6:8:[root@tyzz ~]# grep -n ^$ test |tr... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(109) 评论(0) 推荐(0) 编辑
摘要: jdk环境搭建 [root@tyzz ~]# tar -zxvf jdk-8u91-linux-x64.tar.gz [root@tyzz ~]# mv jdk1.8.0_91/ /usr/local/jdk1.8[root@tyzz ~]# ln -s /usr/local/jdk1.8/ ... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(113) 评论(0) 推荐(0) 编辑
摘要: scott用户下:SQL> select * from tab;TNAME TABTYPE CLUSTERID------------------------------ ------- ----------BONUS ... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 多行文件 合并为一行[root@tyzz ~]# echo $aroot:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin ad... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(100) 评论(0) 推荐(0) 编辑
摘要: [root@tyzz ~]# w 23:13:58 up 11 days, 9:15, 1 user, load average: 0.00, 0.01, 0.05USER TTY LOGIN@ IDLE JCPU PCPU WHATro... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(193) 评论(0) 推荐(0) 编辑
摘要: [root@tyzz ~]# w 23:13:58 up 11 days, 9:15, 1 user, load average: 0.00, 0.01, 0.05USER TTY LOGIN@ IDLE JCPU PCPU WHATro... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(307) 评论(0) 推荐(0) 编辑
摘要: iptables的三张表[root@tyzz ~]# iptables -t filter mangle nat导入导出配置文件[root@tyzz ~]# iptables-save >1.ipt[root@tyzz ~]# cat 1.ipt # Gene... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 查看定时任务[root@tyzz ~]# crontab -l#secu-tcs-agent monitor, install at Tue Feb 14 11:57:11 CST 2017* * * * * /usr/local/sa/agent/secu-tcs-agent... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(146) 评论(0) 推荐(0) 编辑
摘要: rsync远程下拉:[root@tyzz ~]# rsync -avPz -e "ssh -p 22" 192.168.74.129:/tmp/111 /mnt/111/The authenticity of host '192.168.74.129 (192.168.74.1... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(90) 评论(0) 推荐(0) 编辑
摘要: mysql二进制 包 安装[root@tyrr src]# useradd -s /sbin/nologin -M mysql[root@tyrr src]# id mysqluid=500(mysql) gid=500(mysql) 组=500(mysql)[root@tyr... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 配置虚拟主机安装discuz[root@tyrr www]# cd[root@tyrr ~]# mkdir -p /data/www[root@tyrr ~]# cd /data/www/[root@tyrr www]# unzip Discuz_X3.2_SC_GBK.zip... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(299) 评论(0) 推荐(0) 编辑
摘要: apache日志切割apache日志格式配置文件中的设置vim /usr/local/apache2/conf/httpd.conf # # The following directives define some format nicknames for use... 阅读全文
posted @ 2017-03-25 11:51 aallennty 阅读(93) 评论(0) 推荐(0) 编辑