-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
## Docker配置yum源,yum安装Docker 2017-03-13 | ||
## http://www.aqzt.com | ||
## email: [email protected] | ||
## robert yu | ||
## redhat 7 | ||
|
||
tee /etc/yum.repos.d/docker.repo <<-'EOF' | ||
[dockerrepo] | ||
name=Docker Repository | ||
baseurl=https://yum.dockerproject.org/repo/main/centos/7/ | ||
enabled=1 | ||
gpgcheck=1 | ||
gpgkey=https://yum.dockerproject.org/gpg | ||
EOF | ||
|
||
yum install -y docker-engine | ||
service docker start | ||
chkconfig docker on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
## redhat7.2配置yum源 2017-03-13 | ||
## http://www.aqzt.com | ||
## email: [email protected] | ||
## robert yu | ||
## redhat 7 | ||
|
||
yum update | ||
yum install -y wget | ||
rpm -aq|grep yum|xargs rpm -e --nodeps | ||
rpm -aq|grep python-iniparse|xargs rpm -e --nodeps | ||
wget http://mirrors.163.com/centos/7.3.1611/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpm | ||
wget http://mirrors.163.com/centos/7.3.1611/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm | ||
wget http://mirrors.163.com/centos/7.3.1611/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm | ||
wget http://mirrors.163.com/centos/7.3.1611/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm | ||
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo | ||
rpm -ivh *.rpm | ||
mkdir -p /tmp/repo | ||
mv /etc/yum.repos.d/*.repo /tmp/repo/ | ||
|
||
###7.3.1611这个版本需查看163源上的URL地址确定 | ||
sed -i 's/$releasever/7.3.1611/g' CentOS7-Base-163.repo | ||
cat CentOS7-Base-163.repo > /etc/yum.repos.d/rhel-debuginfo.repo | ||
yum clean all | ||
yum install -y epel-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
## python安装ZooKeeper模块 2017-03-14 | ||
## http://www.aqzt.com | ||
## email: [email protected] | ||
## robert yu | ||
## centos 6 | ||
## python安装ZooKeeper模块,连接ZooKeeper,显示kafka节点 | ||
|
||
yum install -y wget gcc gcc-c++ libffi-devel python-devel openssl-devel | ||
##yum -y install libxml2 libxml2-dev libxslt* zlib gcc openssl | ||
|
||
wget http://mirrors.hust.edu.cn/apache/zookeeper/stable/zookeeper-3.4.9.tar.gz | ||
wget https://pypi.python.org/packages/14/38/a761465ab0a154405c11f7e5d6e81edf6e84584e114e152fddd340f7d6d3/zkpython-0.4.2.tar.gz | ||
|
||
tar zxvf zookeeper-3.4.9.tar.gz | ||
cd zookeeper-3.4.9/src/c | ||
./configure && make && make install | ||
|
||
cd ../../../ | ||
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/lib | ||
tar xzvf zkpython-0.4.2.tar.gz | ||
cd zkpython-0.4.2 | ||
python setup.py install | ||
|
||
#注:这种安装方式可能遇到以下错误: | ||
#找不到zookeeper.h头文件 可以调整setup.py 中include_dirs 路径的指向】 | ||
#import zookeeper时 报 库文件缺失 可以 | ||
#export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/lib:(指定缺失库文件位置) 】 | ||
|
||
#另一种安装zkpython方式 | ||
#pip install zkpython | ||
#如果安装过程中报没有权限,则使用sudo pip install zkpython即可解决。 | ||
|
||
#测试python的zookeeper模块 | ||
#python | ||
#import zookeeper | ||
#如果报错,请在.bashrc文件中加入 | ||
#export LD_LIBRARY_PATH=/usr/local/lib/ | ||
|
||
#测试python的zookeeper模块 | ||
#python | ||
#import zookeeper as zoo | ||
# 初始化连接到集群 | ||
# zk = zoo.init("127.0.0.1:2181") | ||
# 获取所有节点 | ||
# zoo.get_children(zk, "/", None) | ||
|
||
##Python安装PIL出现command 'gcc' failed with exit status 1错误 | ||
##这个错误一般有两个原因导致: | ||
## 1. gcc python-devel 没装,或只上了一个,解决:yum install -y wget gcc gcc-c++ libffi-devel python-devel | ||
## 2. zookeeper-3.4.9/src/c里面没有编译,进到这个目录执行:./configure && make && make install | ||
|
||
|
||
|
||
|
||
|
||
|