- 建议先收藏再阅读!记得点个赞。
- 有其他想让我补充的请评论留言,在下好补充进来,本文将持续更新
例如:下载jdk13 放到 /usr/local/lib/jdk 目录下 jdk-13.0.2_linux-x64_bin.tar.gz
tar -zxvf jdk-13.0.2_linux-x64_bin.tar.gz
sudo vim ~/.bashrc
在文件末尾添加环境变量配置:
export JAVA_HOME=/usr/local/lib/jdk/jdk-13.0.2
export JRE_HOME=/${JAVA_HOME}
export CLASSPATH=.:${JAVA_HOME}/libss:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
source ~/.bashrc
java -version
java version "13.0.2" 2020-01-14
Java(TM) SE Runtime Environment (build 13.0.2+8)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)
例如:下载 tomcat 9 放到 /usr/local/lib/tomcat 目录下
apache-tomcat-9.0.30.tar.gz
tar -zxvf apache-tomcat-9.0.30.tar.gz
cd apache-tomcat-9.0.30/bin
sudo vim startup.sh
添加如下信息到下图位置:
#set java environment
export JAVA_HOME=/usr/local/lib/jdk/jdk-13.0.2
export JRE_HOME=/${JAVA_HOME}
export CLASSPATH=.:${JAVA_HOME}/libss:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
#tomcat
export TOMCAT_HOME=/usr/local/lib/tomcat/apache-tomcat-9.0.30
sudo ./startup.sh
浏览器访问:localhost:8080
如果需要shutdown,则如第3步一样位置设置 shutdown.sh 文件 ,执行 sudo ./shutdown.sh
wget https://www.rabbitmq.com/releases/erlang/erlang-19.0.4-1.el7.centos.x86_64.rpm
wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.15/rabbitmq-server-3.6.15-1.el7.noarch.rpm
# 安装socat的rpm包
yum install socat
rpm -ivh erlang-18.3-1.el6.x86_64.rpm
rpm -ivh rabbitmq-server-3.6.5-1.noarch.rpm
vim /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.15/ebin/rabbit.app
rabbitmq-plugins enable rabbitmq_management
cd /usr/lib/rabbitmq/bin/
./rabbitmq-server start
访问地址:http://192.168.136.136:15672 出现管理页面说明安装成功。
4369 -- erlang发现口
5672 --client端通信口
15672 -- 管理界面ui端口
25672 -- server间内部通信口
安装路径 : /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.15
启动服务:rabbitmq-server start 或 rabbitmq-server -detached
重启服务:rabbitmq-server restart
关闭服务:rabbitmqctl stop
查看状态:rabbitmqctl status
列出角色:rabbitmqctl list_users
开启某个插件:rabbitmq-plugins enable xxx
关闭某个插件:rabbitmq-plugins disable xxx
添加用户: rabbitmqctl add_user admin admin
添加权限: rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*"
修改用户角色: rabbitmqctl set_user_tags admin administrator
解决:
chown -R rabbitmq:rabbitmq /var/log/rabbitmq/
1.下载 https://zookeeper.apache.org/releases.html
2.解压文件
tar -zxvf apache-zookeeper-3.6.1-bin.tar.gz
cp -r apache-zookeeper-3.6.1-bin/conf/zoo_sample.cfg apache-zookeeper-3.6.1-bin/conf/zoo.cfg
vim apache-zookeeper-3.6.1-bin/conf/zoo.cfg
增加内容:
dataDir=/opt/zookeeper/apache-zookeeper-3.6.1-bin/data
dataLogDir=/opt/zookeeper/apache-zookeeper-3.6.1-bin/log
# 启动
./apache-zookeeper-3.6.1-bin/bin/zkServer.sh
#查看状态
./apache-zookeeper-3.6.1-bin/bin/zkServer.sh status
# 关闭
./apache-zookeeper-3.6.1-bin/bin/zkServer.sh stop
./apache-zookeeper-3.6.1-bin/bin/zkCli.sh -server 127.0.0.1:2181
与单机版类似,主要区别是在第四步时再增加配置(如果是同一机器安装集群的话需要修改端口)
1.下载 https://zookeeper.apache.org/releases.html
2.解压文件
tar -zxvf apache-zookeeper-3.6.1-bin.tar.gz
cp -r apache-zookeeper-3.6.1-bin/conf/zoo_sample.cfg apache-zookeeper-3.6.1-bin/conf/zoo.cfg
4.复制三个 apache-zookeeper-3.6.1-bin 文件分别到文件夹 zookeeper21811、zookeeper21812、zookeeper21813 下三个文件夹表示集群中三个节点 Zookeeper
5.分别编辑 zookeeper21811、zookeeper21812、zookeeper21813 文件夹下的 zoo.cfg 文件
配置文件中 server.N=YYYY:A:B 规则:
- N 表示服务器编号,通过配置文件中 dataDir 值的目录下增加文件 myid ,文件内容为集群编号
- YYYY 表示服务器的IP地址
- A 为LF通信端口,表示该服务器与集群中的leader交换的信息的端口
- B 为选举端口,表示选举新leader时服务器间相互通信的端口(当leader挂掉时,其余服务器会相互通信,选择出新的leader) 一般来说,集群中每个服务器的A端口都是一样,每个服务器的B端口也是一样。但是当所采用的为伪集群(同一机器)时,IP地址都一样,只能是A端口和B端口不一样
vim zookeeper21811/apache-zookeeper-3.6.1-bin/conf/zoo.cfg
修改 clientPort
值为 21821
增加内容:
dataDir=/opt/zookeeper/zookeeper21811/data
dataLogDir=/opt/zookeeper/zookeeper21811/log
server.1=127.0.0.1:20001:30001
server.2=127.0.0.1:20002:30002
server.3=127.0.0.1:20003:30003
vim zookeeper21812/apache-zookeeper-3.6.1-bin/conf/zoo.cfg
修改 clientPort
值为 21822
增加内容:
dataDir=/opt/zookeeper/zookeeper21812/data
dataLogDir=/opt/zookeeper/zookeeper21812/log
server.1=127.0.0.1:20001:30001
server.2=127.0.0.1:20002:30002
server.3=127.0.0.1:20003:30003
vim zookeeper21813/apache-zookeeper-3.6.1-bin/conf/zoo.cfg
修改 clientPort
值为 21823
增加内容:
dataDir=/opt/zookeeper/zookeeper21813/data
dataLogDir=/opt/zookeeper/zookeeper21813/log
server.1=127.0.0.1:20001:30001
server.2=127.0.0.1:20002:30002
server.3=127.0.0.1:20003:30003
mkdir zookeeper21811/data
mkdir zookeeper21812/data
mkdir zookeeper21813/data
echo '1' > zookeeper21811/data/myid
echo '2' > zookeeper21812/data/myid
echo '3' > zookeeper21813/data/myid
./zookeeper21811/apache-zookeeper-3.6.1-bin/bin/zkServer.sh start
./zookeeper21812/apache-zookeeper-3.6.1-bin/bin/zkServer.sh start
./zookeeper21813/apache-zookeeper-3.6.1-bin/bin/zkServer.sh start
启动成功!
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum install -y docker-ce
# 开机自启
sudo systemctl enable docker
# 启动docker服务
sudo systemctl start docker
# 重启docker
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo docker run hello-world
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 四 2020-05-28 17:05:26 CST; 15s ago
Docs: https://docs.docker.com
Process: 50903 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=205/LIMITS)
Main PID: 50903 (code=exited, status=205/LIMITS)
解决方案:
第一步:mkdir /etc/systemd/system/docker.service.d
第二步:vim /etc/systemd/system/docker.service.d/customexec.conf
增加内容:
[Service]
LimitNOFILE=1000000
第三步:systemctl daemon-reload
第四步:sysctl -w fs.nr_open=1048576
第五步:sudo systemctl start docker
参考文章 https://blog.csdn.net/qq_24598601/article/details/106737954
https://www.elastic.co/cn/downloads/past-releases#kibana
tar -zxvf kibana-6.1.3-linux-x86_64.tar.gz
vim kibana-6.1.3-linux-x86_64/config/kibana.yml
nohup sh kibana-6.1.3-linux-x86_64/bin/kibana &
访问: 127.0.0.1:15601/app/kibana
Docker 版本安装基本一致,镜像地址为 docker.elastic.co/kibana/kibana:版本号,docker 版的参数为 elasticsearch.hosts,而不是 elasticsearch.url
例如:docker pull docker.elastic.co/kibana/kibana:6.8.10
https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
unzip instantclient-basic-linux.x64-19.6.0.0.0dbru.zip
unzip instantclient-sqlplus-linux.x64-19.6.0.0.0dbru.zip
TEST=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.169.1.123)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)
# .bash_profile 增加
export ORACLE_HOME=/home/oy/instantclient_19_6
export PATH=$ORACLE_HOME:$PATH
export ORACLE_SID=orcl
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
export NLS_LANG='simplified chinese_china'.AL32UTF8
或 /etc/profile 增加
ORACLE_HOME=/home/oy/instantclient_19_6
ORACLE_SID=orcl
TNS_ADMIN=$ORACLE_HOME/network/admin
LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH
NLS_LANG='simplified chinese_china.AL32UTF8'
export PATH=$ORACLE_HOME:$ORACLE_SID:$TNS_ADMIN:$LD_LIBRARY_PATH:$NLS_LANG:$PATH
# 激活
source ~/.bash_profile
sqlplus scott/tiger@test