Python-模块安装

摘要:Python模块常用的几种安装方式Python模块安装方法一、方法1:单文件模块直接把文件拷贝到 $python_dir/Lib二、方法2:多文件模块,带setup.py下载模块包,进行解压,进入模块文件夹,执行:python setup.py install三、方法3:easy_install 方式方法一:yum installpython-setuptools 方法二:先下载ez_setup.py,运行python ez_setup 进行easy_install工具的安装,之后就可

 Python入门教程

摘要:重要说明这不是给编程新手准备的教程,如果您入行编程不久,或者还没有使用过1到2门编程语言,请移步!这是有一定编程经验的人准备的.最好是熟知Java或C,懂得命令行,Shell等.总之,这是面向老鸟的,让老鸟快速上手Python教程.为什么总结这样的一个教程我虽不是老鸟,但已熟悉Java,C/C++, Shell和Perl,且对常见的数据结构和算法等都了解.最近因项目需要,要做一个小工具,评估后感觉用Pyt

 FastDFS安装配置-client.conf

摘要:# is this config file disabled# false for enabled# true for disableddisabled=false# bind an address of this host# empty for bind all addresses of this hostbind_addr=# the tracker server portport=22122# connect timeout in seconds# default value is 30sconnect_timeout=30# network timeout in seconds# default value is 30snetwork_timeout=60# the base pat

 FastDFS安装配置-storage.conf

摘要:# is this config file disabled# false for enabled# true for disableddisabled=false# the name of the group this storage server belongs to## comment or remove this item for fetching from tracker server,# in this case, use_storage_id must set to true in tracker.conf,# and storage_ids.conf must be configed correctly.group_name=group1# bind an address o

 FastDFS安装配置-mod_fastdfs.conf

摘要:# connect timeout in seconds# default value is 30sconnect_timeout=2# network recv and send timeout in seconds# default value is 30snetwork_timeout=30# the base path to store log filesbase_path=/tmp# if load FastDFS parameters from tracker server# since V1.12# default value is falseload_fdfs_parameters_from_tracker=true# storage sync file max delay

 FastDFS安装配置

摘要:http://github.com/happyfish100源码文件 所有的安装都是一个安装包,只是启动的服务不同而已 服务端安装配置:从github上下载lib库安装:https://github.com/happyfish100/libfastcommon.git安装依赖包:cd /usr/local/src/fastdfs# unzip libfastcommon-master.zip #./make.sh#./make.sh install 从gibhub上下载 安装包:(每台安装都一样)[root@node120

 Docker数据管理

摘要:数据卷: 在Docker容器内将里面的数据直接写到硬盘上-v /data[root@node121 data]# docker run -it --namevolume-test1 -h centos -v /docker/data centos        -i :让终端保持打开的状态        -t:启动一个tty        -h:指定主机名   &nb

 Docker FAQ FATA[0000] Error starting daemon: Error initializing network controller: Error creating d

摘要:FATA[0000] Error starting daemon: Error initializingnetwork controller: Error creating default "bridge" network: packagenot installed  解决方法: docker -d –bip=172.17.42.1/16 指定一个docker网段就可以成功启动了   网上有好多类似的解决方法,不过好麻烦,这里主要说下最方便的解决方法 先su到root 找一下doc

 Docker FAQ FATA[0000] Error mounting devices cgroup: mountpoint for devices not found

摘要:FATA[0000] Error mounting devices cgroup: mountpoint fordevices not found这个错误为cgroup在宿主机上没有挂载。我们编辑挂载上去            vi /etc/fstab#在结尾添加none       /sys/fs/cgroup        cgroup    &

 Docker --help

摘要:[root@node121 ~]# docker --helpUsage: docker [OPTIONS] COMMAND [arg...] A self-sufficient runtime for linux containers. Options:  --api-cors-header=                  Set CORS headers in the remote API  -b,--bridge=   &nb

 在宿主机查看docket容器的IP

摘要: 在宿主机查看docket容器的IP:docker inspect --format='{{.NetworkSettings.IPAddress}}' $CONTAINER_ID[root@node121 ~]# docker inspect --format='{{.NetworkSettings.IPAddress}}' 462442d61745 172.17.0.2

 Docker Nginx安装配置

摘要:启动一个容器运行nginx:[root@node121 ~]# docker search nginxNAME                     DESCRIPTION                         

 Docker 查看容器的IP地址和网络相关的参数

摘要:查看容器的IP地址,可以在主机上运行 sudo Docker ps查看正在运行的容器的id等信息”sudo docker inspect 容器id“可以查看到容器的相关信息“docker inspect --format '{{.NetworkSettings.IPAddress }}' 容器id”可以查看容器的具体IP地址,如果输出是空的说明没有配置IP地址 ifconfig查看主机上的网络cat /etc/hosts查看主机内部IP映射表cat /etc/resolv.conf查看

 Docker网络访问

摘要:docker会在本地安装一个网桥:[root@node121 ~]# brctl showbridge name   bridgeid         STP enabled   interfacesdocker0           8000.7ee2e924ad83       no         &

 Docker 进入容器脚本-in.sh

摘要:vim indocker.sh#Usage: indocker.sh  NAMES[root@node121 ~]# cat indocker.sh #!/bin/bashCNAME=$1CPID=$(docker inspect --format "{{.State.Pid}}" $CNAME)nsenter --target "$CPID" --mount --uts  --ipc --net --pid

 Docker 安装配置

摘要:安装:yum install -y docker-io 启动:/etc/init.d/docker start 诊断模式手动启动:[root@node110 ~]# /usr/bin/docker -dWARN[0000] You are running linux kernel version2.6.32-573.el6.x86_64, which might be unstable running docker. Please upgradeyour kernel to 3.10.0. INFO[0000] Listening for HTTP on unix(/var/run/docker.sock) INFO[0000] [graphd

 redis集群

摘要:redis集群三种方案:客户端分片代理Proxy(twemproxy)Redis Cluster(没有中心节点)Codis(比较好) 创建redis集群(自动分片,在集群中)参考:http://redisdoc.com/topic/cluster-tutorial.html#id2[root@node120 opt]# mkdir `seq 7001 7008`[root@node120 opt]# ls7001  7002  7003 7004  7005  7006 7007  7008  rh[root@node120 o

 redis主从

摘要:redis主从配置:原理(增量同步):从服务器-------发送sync到 ------>                        主服务器----BGSAVE--->                    

 redis持久化-AOF

摘要:AOF将所有的命令写入文件中,相关于MYSQL的BINLOG文件运行原理:从主进程中fork一个子进程,这个子进程来将执行过的命令写入一个文件中可以通过压缩算法来减少存储文件的大小 打开AOF功能:vim /etc/redis326/6379.confvim 6379.conf  596 appendonlyyes 597  598 # The nameof the append only file (default: "appendonly.aof") 599 &

  redis持久化-RDB默认

摘要:缺点:每次保存都要fork一个子进程,如果数据量大小,会有延时恢复数据的时间短 优点:备份方便 打开RDB功能:vim /etc/redis326/6379.confvim 6379.conf#以下三条是或的关系 204 save 900 1             #在900秒内有1个key发生变化,就做一次快照 205 save 300 10    &
分页:« 49 50 51 52 53 54 55 56 57 58 »
Powered by AKCMS