redis读取所有key和Value
1 | ./redis-cli -h 127.0.0.1 -p 6401 keys "*" | awk '{printf $0 ",";system("/data/redis/redis-cli -h 127.0.0.1 -p 6401 get " $0);}' |
测试磁盘是否能正常读写
for i in {1..12};do echo 'test' > /data${i}/test ; done;
发送配置简单脚本
for i in {1..9}; do scp /etc/hosts root@flink00${i}:/etc/ ; done;
while read line ; do if [[ $line == node* ]]; then scp /data/spark/spark-2.1.1-bin-hadoop2.7/conf/spark-env.sh root@$line:/data/spark/spark-2.1.1-bin-hadoop2.7/conf/; fi; done < slaves ;
根据 hosts 中 ip 建立免密
while read line ; do if [[ $line == 172* ]]; then host=
echo ${line} | cut -d ‘ ‘ -f 2; ssh-copy-id root@$host ; fi ; done < /etc/hosts ;
根据 hosts 中ip 分发 hosts
while read line ; do for var in $line ; do if [[ $var == 172* ]]; then scp /etc/hosts root@$var:/etc/ ; fi; done; done < /etc/hosts ;
openssl 升级指南
https://blog.csdn.net/lw545034502/article/details/102617250
下载:wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1-stable.zip
解压:unzip OpenSSL_1_1_1-stable.zip
编译:./config –prefix=/usr/local/openssl
安装:make && make install
备份:
- mv /usr/bin/openssl /usr/bin/openssl.old
- mv /usr/lib64/openssl /usr/lib64/openssl.old
- mv /usr/lib64/libssl.so /usr/lib64/libssl.so.old
新版:
- ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
- ln -s /usr/local/openssl/include/openssl /usr/include/openssl
- ln -s /usr/local/openssl/lib/libssl.so /usr/lib64/libssl.so
更新动态链接库数据:
echo “/usr/local/openssl/lib” >> /etc/ld.so.conf
ldconfig -v
python3.7 安装
https://blog.51cto.com/jinkcloud/2411644?source=dra
python3支持openssl版本最低为1.0.2,而系统比较老,自带的openssl版本为1.0.2
安装新版openssl
安装
1
2
3
4
5mkdir /usr/local/openssl
tar xf openssl-1.1.1c.tar.gz
cd openssl-1.1.1c/
./config --prefix=/usr/local/openssl shared zlib
make && make install配置共享库
1
2
3echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/openssl/lib' >> ~/.bash_profile
~/.bash_profile
安装python3
安装,指定刚刚安装的opensll
1
2
3
4
5
6
7tar xf Python-3.7.3.tar.xz
mkdir /usr/local/python3
cd Python-3.7.3/
./configure prefix=/usr/local/python3 --with-openssl=/usr/local/openssl
yum install zlib-devel
make && make install配置python3环境变量
1
2
3
4
5vi /etc/profile
#配置python
export PYTHON_HOME=/usr/local/python3
export PATH=$PYTHON_HOME/bin:$PATH
source /etc/profile编译的时候能看到ssl成功加载
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
验证ssl模块
导入模块试试