上一页 1 ··· 6 7 8 9 10 11 12 下一页

mysql表引擎myisam改为innodb

摘要: 1、进入数据库 2、SELECT CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements FROM information_schema.tables AS tb WHERE table_schema = ' 阅读全文
posted @ 2018-08-06 14:10 狄成 阅读(1724) 评论(0) 推荐(0) 编辑

python字符串

摘要: isdigit() 判断字符串是否由数字组成 join() 返回通过指定字符连接序列中元素后生成的新字符串 阅读全文
posted @ 2018-07-26 16:45 狄成 阅读(130) 评论(0) 推荐(0) 编辑

linux虚拟机设置本地yum源

摘要: 1、挂载ISO镜像 2、创建文件夹,用于挂载光盘,mkdir /mnt/cdrom mount /dev/cdrom /mnt/cdrom 3、修改 repo 文件 baseurl=file:///挂载光盘的文件夹 gpgcheck=0 关闭 enabled=1 开启 阅读全文
posted @ 2018-06-20 11:22 狄成 阅读(1371) 评论(0) 推荐(1) 编辑

python3读取excel数据

摘要: import xlrd worksheet = xlrd.open_workbook('XXXX.xlsx') #打开excel文件 sheet_names= worksheet.sheet_names() #获取excel中所有工作表名 sheet2 = worksheet.sheet_by_na 阅读全文
posted @ 2018-06-06 15:17 狄成 阅读(9261) 评论(0) 推荐(0) 编辑

expect远程登录服务器并执行命令

摘要: #!/usr/bin/expectset timeout 120 #设置执行超时时间,任何输入120秒后退出set password "password" #set设置password名,值为passwordspawn ssh -p 端口 root@ip #连接用户主机账号expect "*pass 阅读全文
posted @ 2018-06-05 15:13 狄成 阅读(855) 评论(0) 推荐(0) 编辑

sed中支持变量的处理方法

摘要: 1.eval sed ’s/$a/$b/’ filename2.sed "s/$a/$b/" filename3.sed ’s/’$a’/’$b’/’ filename 4.sed s/$a/$b/ filename 第一种eval sed -i 's!gcomm://!gcomm://$IP_2! 阅读全文
posted @ 2018-06-05 14:48 狄成 阅读(8983) 评论(0) 推荐(0) 编辑

monit安装配置

摘要: 环境centos5(32bit),monit-5.17.1,下载地址 https://bitbucket.org/tildeslash/monit/downloads/ 1、tar zxvf monit-5.17.1-linux-x86.tar.gz 2、cp monit-5.17.1/conf/m 阅读全文
posted @ 2018-05-24 17:57 狄成 阅读(519) 评论(0) 推荐(0) 编辑

php新加扩展模块

摘要: 记录下在已经编译安装的PHP上面增加扩展模块,下面以安装mbstring.so为例 1、进入PHP源码文件中的mbstring文件夹,一般都是在ext目录 cd php-5.5.29/ext/mbstring/ 2、找到phpize文件执行,如不知道安装在哪里,可以使用find命令查找 3、执行完p 阅读全文
posted @ 2018-05-15 10:34 狄成 阅读(99) 评论(0) 推荐(0) 编辑

centos6.5(64bit),python2.6.6安装MySQLdb模块

摘要: 1、下载MySQL-python、setuptools安装包 2、tar zxvf setuptools-0.6c11.tar.gz 3、cd setuptools-0.6c11 4、python setup.py install 注意:如果安装过程中报错,error: command 'gcc' 阅读全文
posted @ 2018-05-14 10:40 狄成 阅读(136) 评论(0) 推荐(0) 编辑

esxi导出ovf模板注意事项

摘要: 1、网卡配置文件注释掉MAC地址 2、Linux机器删除70文件,/etc/udev/rules.d/70-persistent-net.rules 3、编辑设置,CD/DVD选择客户端设备 阅读全文
posted @ 2018-02-04 13:42 狄成 阅读(909) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 下一页