摘要: 注:需要软件包可以加入QQ群下载(144486234)一、安装依赖包及下载软件包1、安装yum -y install make openldap-devel ntp vim-enhanced gcc gcc-c++ gcc-g77 flex bison autoconf bzip2-devel nc... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(534) 评论(0) 推荐(0)
摘要: 在网上看了很多文章,安装之后,重启php,总是报错,结合网上文章,自己测试发现一套可以使用的方法注:服务器上必须安装ffmpeg,然后在安装php ffmpeg扩展(这里服务器的ffmpeg和php扩展不是同一个包)安装步骤:一、服务器安装ffmpeg自带的yum源没有ffmpeg软件包,需要下载r... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(432) 评论(0) 推荐(0)
摘要: #coding=utf-8import osimport rec_dir = []txt_files = []def search_files(dir,key): dir = dir c_dir.append(dir) os.chdir(dir) all_files = os... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(781) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python#-*- coding:utf-8 -*-import randomcode = []for i in range(0,6): if i == random.randint(0,6): code.append(str(i)) els... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(71) 评论(0) 推荐(0)
摘要: UserParameter=sshd,sudo awk '/PasswordAuthentication/{if ( $2 == "no" ) {print "OK"} else {print "NOT OK"}}' /etc/ssh/sshd_configUserParameter=sshdroo... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(250) 评论(0) 推荐(0)
摘要: os.mkdir() #创建单层目录,目录存在抛出异常os.makedirs() #创建多级目录os.rmdir() #删除单层目录os.removedirs() #递归删除目录,从子目录到父目录逐层删除,遇到非空目录,抛出异常os.remove(path) #删除文件os.rename(old,... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(96) 评论(0) 推荐(0)
摘要: s为字符串s.isalnum() #所有字符都是数字或者字母,为真返回Ture,否则返回Falses.isalpha() #所有字符都是字符返回True,否则返回Falses.isdigit() #所有字符都是数字返回True,否则返回Falses.islower(0 #所有字符都是小写返回True... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(182) 评论(0) 推荐(0)
摘要: random#生成随机字符 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(73) 评论(0) 推荐(0)
摘要: print(help())#帮助文档help(list) print(dir())#列表形式打印内建方法 print(vars())#字典形式打印内建方法 type()#查看类型 import os#导入 reload(os) id()#查看系统内存存在ID位 ------------... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(161) 评论(0) 推荐(0)
摘要: import reimport urllib.requestimport randomimport osimport http.serverimport http.clientfrom urllib.error import URLError, HTTPErrorimport urllib.pars... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(3289) 评论(0) 推荐(0)
摘要: 查看从库报错 Last_SQL_Error: Could not execute Update_rows event on table bbs.cdb_myposts_21; Can't find record in 'myposts_21', Error_code: 1032; handler e... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(140) 评论(0) 推荐(0)
摘要: apache启动的时候,后面是空白,不会显示OK,将本文的内容替换覆盖就OK了注:文中的apache安装目录需要手动更换#!/bin/bash## Licensed to the Apache Software Foundation (ASF) under one or more# contribu... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(167) 评论(0) 推荐(0)
摘要: 由于公司需要把机房所有机器迁移到阿里云ESC上,顺便写个禅道迁移禅道版本:开源版8.2.4系统版本:cent os6.5 64bit一、停用禅道服务,把web服务停掉,或者把域名解析停掉,防止数据不一至二、同步禅道目录到新服务器上面(使用rsync)注意:不要只同步web访问目录,要把整个zenta... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(612) 评论(0) 推荐(0)
摘要: 由于公司需要把机房所有机器迁移到阿里云ESC上,顺便写个confluence迁移confluence版本是5.4破解版系统版本centos6.5 64bit一、首先确认在源服务器上confluence安装的路径,一共两个目录,如果你安装的时候是默认安装的,应该在/var/atlassian /opt... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(673) 评论(0) 推荐(0)
摘要: 编译安装php yar扩展时出现下面错误,网上找了找说要安装json扩展,可是不管用,看下/usr/local/src/yar-1.2.5/packagers/json.c文件发现里面会使用ext/json/php_json.h文件这个文件在安装好的php目录下,我的目录是/usr/local/ph... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(207) 评论(0) 推荐(0)
摘要: /etc/init.d/sshd 开启秘钥认证的UsePAM yes 选项,重启ssh服务会报下面的错误/etc/init.d/sshd restartStopping sshd: [ OK ]Startin... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(1388) 评论(0) 推荐(0)
摘要: 公司开发人员越来越多,每次合代码都会出现很多问题,而且代码的越来越多,占用很大空间,迁移和备份浪费人力和时间。有开发人员提出使用git来管理代码,个人在网上查看了一些关于git的资料。发现git的很多优点,具体大伙去网上搜索下。一、安装git服务yum -y install zlib-devel o... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(132) 评论(0) 推荐(0)
摘要: 源码安装的apache服务,启动不会显示OK,更换脚本就可以了#!/bin/bash## Licensed to the Apache Software Foundation (ASF) under one or more# contributor license agreements. See ... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(562) 评论(0) 推荐(0)
摘要: 俩台同网段的Cent os只能单向ping通问题解决1、查看防火墙和selinux2、查看/proc/sys/net/ipv4/icmp_echo_ignore_all文件的值是什么 1代表禁用ping,0代表开启echo 0 > /proc/sys/net/ipv4/icmp_echo_i... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(456) 评论(0) 推荐(0)
摘要: 个人习惯软件下载目录/usr/local/src1、下载需要的软件包cd /usr/local/srcyum -y install gcc gcc-c++ autoconf httpd mysql-server mysql-devel net-snmp-devel curl-devel unixOD... 阅读全文
posted @ 2017-10-24 19:02 G-Large 阅读(116) 评论(0) 推荐(0)