参考博文:https://www.mtyun.com/library/how-to-install-kafka-on-centos7
一、安装准备
1、修改系统配置
#关闭selinux、firewall
#修改/etc/security/limits.conf添加以下内容:
- soft nofile 65536
- hard nofile 65536
- soft nproc 65536
- hard nproc 65536
#修改/etc/security/limits.d/20-nproc.conf - soft nproc 65536
3、创建账户、目录
groupadd -g 800 kafka
useradd -u 800 -g kafka kafka
二、安装步骤1、解压文件tar xvf kafka_2.12-1.0.0.tgz -C /usr/local/cd /usr/local/mv kafka_2.12-1.0.0/ kafkachown -R kafka.kafka /usr/local/kafka2、修改环境变量.bash_profile#su - kafka#vim .bash_profile JAVA_HOME=/usr/local/jdkCLASSPATH=$JAVA_HOME/libPATH=$JAVA_HOME/bin:$PATH:$HOME/bin:/usr/local/kafka/binexport PATH JAVA_HOME CLASSPATH#重新加载.bash_profile#. .bash_profile3、启动kafkazookeeper-server-start.sh -daemon /usr/local/kafka/config/zookeeper.properties nohup kafka-server-start.sh /usr/local/kafka/config/server.properties >/dev/null 2>&1 &
原文链接:https://www.f2er.com/centos/374860.html