@toc
在安裝cdh前的環境配置介紹
使用ssh-keygen生成金鑰,然後使用ssh-copy-id分發到各個節點
先通過setenforce 0
關閉當前執行的selinux,永久關閉:
命令如下:vi /etc/selinux/config
將selinux=enforcing 改為 selinux=disabled
centos7之前使用ntpd,之後使用chronyd,cm會優先使用chronyd,沒有的話使用ntpdsystemctl disable firewalld
systemctl stop firewalld
#使用systemctl status firewalld檢視是否關閉成功
# allow ntp client access from local network.
#allow 192.168.0.0/16
allow ***/0 #允許指定網段的主機同步本機時間
# serve time even if not synchronized to a time source.
#local stratum 10
local stratum 10 #開啟時間同步
systemctl restart chronyd.service
所有的節點安裝jdk8#注釋掉server 0-3.centos.pool.ntp.org iburst
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
server iburst
安裝結束後配置環境變數,root使用者直接在/etc/profile.d配置環境變數
在這裡插入**片
yum -y update
yum -y install vim wget
zip unzip expect tree htop iotop nc telnet
wget
tar -zxvf redis-6.0.6.tar.gz
cd redis-6.0.6
yum -y install gcc #安裝gcc依賴
make malloc=libc
cd src &&
make
install
in file included from server.c:30:0:
server.h:1051:5: 錯誤:expected specifier-qualifier-list before 『_atomic』
_atomic unsigned int lruclock; /* clock for lru eviction */
^server.c: 在函式『serverlograw』中:
server.c:1032:31: 錯誤:『struct redisserver』沒有名為『logfile』的成員
int log_to_stdout = server.logfile[0]
=='\0'
; ^
server.c:1035:23: 錯誤:『struct redisserver』沒有名為『verbosity』的成員
if(level < server.verbosity)
return
; ^
server.c:1037:47: 錯誤:『struct redisserver』沒有名為『logfile』的成員
fp = log_to_stdout ? stdout : fopen(server.logfile,"a"
);
alternatives --install /usr/bin/redis-server \
redis-server /opt/redis-6.0.6/src/redis-server 1
alternatives --install /usr/bin/redis-cli \
redis-cli /opt/redis-6.0.6/src/redis-cli 1
cp /opt/redis-6.0.6/redis.conf /etc/
/etc/redis.conf
bind 0.0.0.0
#將protected-mode模式修改為no
protected-mode no
#requirepass foobared
requirepass
nohup redis-server /etc/redis.conf >> /var/log/redis.log 2>
&1 &
redis-cli -h *** -p 6379
#因為之前開啟了認證,所有登入後需要輸入密碼
***:6379> auth password
ok***:6379>
set hello hello-redis
ok***:6379> get hello
"hello-redis"
二 環境搭建
開啟cmd 輸入vagrant命令 測試是否安裝成功。c 通過vagrant安裝 centos7系統。docker 虛擬化技術。docker基於映象,可以秒級啟動各種容器,每一種容器都是乙個完整的執行環境,容器之間互相隔離。官方 docker 官方文件 切換linux使用者 su root dock...
樂優商城(二)環境配置
現在訪問頁面使用的是 http localhost 9001 但是在實際開發中,會有不同的環境 如果不同環境使用不同的ip去訪問,可能會出現一些問題。為了保證所有環境的一致,會在各種環境下都使用網域名稱來訪問。所以將使用以下網域名稱 但是最終,我們希望這些網域名稱指向的還是本機的某個埠。乙個網域名稱...
LINUX環境(二) 環境變數
環境變數 getenv,putenv,setenv,unsetenv environ 環境變數 getenv,putenv,setenv,unsetenv 環境變數 getenv 取得環境變數內容 相關函式 putenv setenv unsetenv 表頭檔案 include 定義函式 char ...