linux组件部署

JDK安装,此处是:1.8
步骤
	1.上传下载好的jdk文件到服务器
	2.解压:tar -zxvf 文件
	3.配置环境变量: vim etc/profile  在末尾加上
		export JAVA_HOME=/usr/local/java/jdk1.8.0_161
		export PATH=$PATH:$JAVA_HOME/bin
		保存退出
	4.刷新文件:source etc/profile
	5.Java -version  查看版本  出现你安装的版本,证明是对的
	注意:如果,发现还是之前的版本  which java  看看jdk的执行文件在哪,找到之后,发现,有系统知道的openjdk的文件,这个时候,我们需要删掉这些openjdk的执行文件
	查询所有含java的文件:rpm -qa|grep java
	删除, ***注意注意注意,重要的事情说三遍:只删除带openjdk的文件以及tzdata-java开头的文件,否则,后果自负**		
tomcat
步骤:
	1.上传下载好的文件到服务器  下载地址:https://tomcat.apache.org/download-80.cgi
	2.解压:tar -zxvf 文件
	3.配置文件变量  vim etc/profile  在末尾加上
	export CATALINA_HOME=/usr/local/apache-tomcat-8.5.77
	export PATH=$path:$JAVA_HOME/bin:$CATALINA_HOME/bin
	4.启动:./bin/start.sh
	5.关闭:./bin/shutdown.sh
maven安装
下载文件:https://archive.apache.org/dist/maven/maven-3/3.6.3/source/
放到linux上
步骤1:解压: tar -zxf apache-maven-3.6.3-bin.tar.gz -C 指定目录
步骤2:配置maven仓库  在conf目录下,命令  vim settings.xml
		<localRepository>路径:到仓库的目录</localRepository>
		保存退出
步骤3:配置linux的环境变量:
	vim etc/profile
	export MAVEN_HOME=maven的路径
	export PATH:$PATH:$MAVEN_HOME/bin   //最终定位到bin
	保存退出
步骤4:重新加载配置文件:source /etc/profile
步骤5:查看是否安装好了 mvn -v  出现版本号,安装成功,否则,查看文件语法是不是不对
node环境
步骤:
	1.将下载好的文件放到服务器上    https://nodejs.org/en/download/
	2.解压: tar-xvf 文件
	3.配置环境变量
		vim etc/profile,在末尾加上
		export PATH:$PATH:/usr/local/node/bin  定位到bin目录,保存退出
	4.刷新配置文件:source etc/profile 
	5.检测  node -v 出现版本号,成功,否则失败  npm -v  查看npm的版本
hadoop(单机)
步骤:
	1.下载文件并传到服务器上,下载地址:https://archive.apache.org/dist/hadoop/common/hadoop-2.8.1/,注意下载:tar.gz 这个是编译之后,不要下载src-tar.gz,这个是原始文件,需要编译才能使用
	2.解压:tar -xvf 文件 -C 目录
	3.修改配置文件
		core-site.xml
			<!-- 指定NameNode的位置 -->
        <property>
                <name>fs.defaultFS</name>
                <value>hdfs://VM-20-14-centos:9000</value>
        </property>
        <!-- 指定hadoop数据的存储位置 -->
        <property>
                <name>hadoop.tmp.dir</name>
                <value>/data/module/hadoop-3.3.0/data</value>
        </property>
        <!-- 配置HDFS网页登录使用的静态用户为hadoop -->
        <property>
                <name>hadoop.http.staticuser.user</name>
                <value>hadoop</value>
        </property>
			
	#######################
			
			hadoop-env.sh
			
			export JAVA_HOME=java目录
			export HADOOP_SSH_OPTS="-p 指定端口"   //  如果机器对方开放的不是22端口,那么就是需要这个指定
			#################################
			hdfs-site.xml
			
			<property>
				<name>dfs.replication</name>
				<value>1</value>
			</property>
			<!-- 指定Hadoop辅助名称节点主机配置 -->
			<property>
				<name>dfs.namenode.secondary.http-address</name>
				<value>服务器IP:50090</value>
			</property>
			
			####################
			
			 yarn-env.sh
			 
			 export JAVA_HOME=java目录
			 
			 #######################
			 yarn-site.xml
			 
			<property>
				<name>yarn.nodemanager.aux-services</name>
				<value>mapreduce_shuffle</value>
			</property>
			<!-- 指定YARN的ResourceManager的地址 -->
			<property>
				<name>yarn.resourcemanager.hostname</name>
				<value>服务器IP</value>
			</property>
			<!-- 日志聚集功能使能 -->
			<property>
				<name>yarn.log-aggregation-enable</name>
				<value>true</value>
			</property>
			<!-- 日志保留时间设置7天 -->
			<property>
				<name>yarn.log-aggregation.retain-seconds</name>
				<value>604800</value>
			</property>
			
			########################
			mapred-env.sh
			
			export JAVA_HOME=/usr/local/component/jdk-1.8.0_161
			################################
			mapred-site.xml
			
			<!-- 指定MR运行在YARN上 -->
			<property>
				<name>mapreduce.framework.name</name>
				<value>yarn</value>
			</property>
			<!-- 历史服务器端地址 -->
			<property>
				<name>mapreduce.jobhistory.address</name>
				<value>服务器IP:10020</value>
			</property>
			<!-- 历史服务器web端地址 -->
			<property>
				<name>mapreduce.jobhistory.webapp.address</name>
				<value>服务器IP:19888</value>
			</property>		

	4.配置环境变量  在/etc/profile;
			export HADOOP_HOME=/opt/HADOOP-2.8.3   //hadoop
			export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
	4.启动
		 在hadoopde目录下执行命令:
		 	格式化(只有在第一次启动的时候需要做,否则多次执行,会造成问题,文件丢失):bin/hdfs namenode -format
		 	启动hds:sbin/start-dfs.sh   停止 sbin/stop-dfs.sh
		 	启动yarn:sbin/start-yarn.sh   停止 :sbin/start-yarn.sh
		 	启动历史任务(有需要启动,没有需要可以不起):/sbin/mr -jobhistory-daemon.sh start historyserver
	5.查看版本  hadoop version
Hbase
前提:需要有zookeeper ,Hadoop
下载:Hbase官网
2.解压:tar -xvf 文件 -C 目录
	3.修改配置文件
		a.vim /hbase/conf/hbase-env.sh
			加上:
				export JAVA_HOME=/opt/java/jdk1.8.0_121   //jdk路径
				export HBASE_MANAGES_ZK=false  //使用我们自己的zookeeper
		b.vim /hbase/conf/hbase-site.xml
			加上:
				<!-- 数据写入路径 -->
				<property>
					 <name>hbase.rootdir</name>
					 <value>hdfs://hserver1:9000/hbase</value>
				</property>
				<!-- 超时时间 -->
				<property>
					 <name>zookeeper.session.timeout</name>
					 <value>120000</value>
				</property>
				<!-- 集群节点,如果单节点,就一个,多个节点,就写多个节点,另外,需要在/hbase/conf/regionservers 文件里面写上节点 -->
				<property>
					 <name>hbase.zookeeper.quorum</name>
					 <value>hserver1,hserver2,hserver3</value>
				</property>
			    <!-- 是否是多节点,注意,我这里是单节点,但是没有这个,就报错,具体原因待寻找 -->
				<property>
					 <name>hbase.cluster.distributed</name>
					 <value>true</value>
				</property>
	4.配置环境变量  在/etc/profile;
		具体修改的配置文件,网上都有很详细的解释
		修改完成之后 source /etc/profile    //刷新配置文件
	4.启动
	cd opt/hbase/
		./bin/start-hbase.sh  启动
		./bin/stop-hbase.sh   停止
	5.操作hbase版本
	cd opt/hbase fhive
		./bin/hbase shell  //进入命令界面
		create “表名’,'键id' ,‘簇列1’,‘簇列2’,‘簇列....’  //创建表,以及簇列
		export:create 'student','id','info','desc'
 		put '表名',‘唯一标志’,‘簇列1:字段名’,‘簇列2:字段名’,....  //塞入值
 		export:put 'student','1','info:name','zhangsan','info:age','23','desc:sex','nan'
mongodb
1.下载,传到linux
2.解压  tar -xvf mongodb-3.6.3 -C 加压的路径
3.cd mongodb
4.创建需要的文件夹以及目录:
	mkdir  data  //数据存放地
	mkdir logs    //日志存放地
		cd logs
		touch mongodb.log   //日志文件
	cd ..
	mkdir etc   //配置文件的存放地
		cd etc 
		touch mongo.cfg
		vim mongo.cfg
			//在文档中添加:
				dbpath=/usr/local/mongoDB/mongodbserver/data   //数据路径
				logpath=/usr/local/mongoDB/mongodbserver/logs/mongodb.log  //日志路径
				logappend=true
				journal=true
				quiet=true
 				port=27017   //端口 
				fork=true   
				bind_ip:允许别的ip访问
				auth=true
				//保存退出
	5.启动:
		cd bin
		./mongod --config /mongodb/etc/mongo.cfg  
		显示 successfullty 就表示成功
		//如果权限不够,就执行 chmod 777 ./mongod  赋予权限
	6.操作:
	db.createUser( {user: "pfnieadmin",pwd: "123456",roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]}); //创建用户兵赋予权限
	use admin  切换到 admin表
	db.author("用户名",“密码”);
	show dbs  //查看所有的表
	db.admin,insert({name:'lisi',age:22})  //向admin表中插入一条数据 name:lisi  age:22
	db.admin.find(); //查看表
	db.createCollection("user");  //创建user表
	db.goods.insert({内容})  也是直接创建goods表并且塞入内容
	db.dropDatabase()  删除数据库
	//当前用户操作时候,比如关闭服务的时候,报没有权限的时候执行下列的命令
	db.updateUser(   //更新权限
		 "su",  //用户名
		        {
		           roles : [
		                     {"role" : "userAdminAnyDatabase","db" : "admin"}, 
		                     {"role" : "dbOwner","db" : "admin"},
		                     {"role" : "clusterAdmin", "db": "admin"}
		                   ]
		        }
		 )
	
Hive的下载和安装
下载地址:http://archive.apache.org/dist/hive/
上传/解压
步骤1:
	设置 Hive环境变量  vim /etc/profile
		# Hive environment
		export HIVE_HOME=/var/local/apache-hive-2.1.1-bin
		export PATH=$PATH:$HIVE_HOME/bin:$HIVE_HOME/conf
	使环境变量生效:
		source  /etc/profile
步骤2:cd conf/  进入hive下的conf文件夹下面
	复制出配置文件,重命名
	cp hive-default.xml.template hive-site.xml    
	cp hive-env.sh.template  hive-env.sh
	cp hive-log4j2.properties.template hive-log4j2.properties
步骤3:修改配置文件
	vi hive-env.sh
	增加如下内容:
		#设置hadoop环境变量根目录
		HADOOP_HOME=/usr/hadoop
		#设置hbase环境变量根目录(如果不需要配置hive与hbase互通则不需要配置此选项)
		#HBASE_HOME=/usr/hbase
		#设置hive的配置文件的路径
		export HIVE_CONF_DIR=/usr/hive/conf
		#设置hive需要加载的驱动的路径
		export HIVE_AUX_JARS_PATH=/usr/hive/lib
	vi hive-log4j2.properties
	#修改日志为路径
		property.hive.log.dir = /sur/hive/logs
	vi hive-site.xml    //这个文件修改的东西比较多
		//主要修改如下:自行替换  没有目录的,需要手动创建
		<property>
	<name>javax.jdo.option.ConnectionURL</name>
	<value>jdbc:mysql://MYSQL服务器IP:3306/HIVE的库名?createDatabaseIfNotExist=true</value>
	<description>mysql的连接方式</description>
</property>
<property>
    <name>javax.jdo.option.ConnectionDriverName</name>
    <value>com.mysql.jdbc.Driver</value>
    <description>mysql的驱动</description>
</property>
<property>
    <name>javax.jdo.option.ConnectionUserName</name>
    <value>root</value>
    <description>mysql的账号</description>
</property>
<property>
    <name>javax.jdo.option.ConnectionPassword</name>
    <value>MYSQL密码</value>
    <description>mysql的密码</description>
</property>
<property>
    <name>hive.cli.print.header</name>
    <value>true</value>
    <description>hive查询出现表头,打开</description>
</property>
<property>
    <name>hive.cli.print.current.db</name>
    <value>true</value>
    <description>hive查询出现字段名</description>
</property>
<property>
    <name>datanucleus.schema.autoCreateAll</name>
    <value>true</value>
    <description>启动模式开启</description>
</property>
<property>
    <name>hive.metastore.schema.verification</name>
    <value>false</value>
    <description>版本强制验证,关闭</description>
</property> 
步骤4:把mysql驱动拷贝到hive的lib下
步骤5:初始化数据库:schematool   -initSchema  -dbType  mysql
			成功之后会再配置的数据库的地方出现hive的数据库,自行测试,有问题自行查询,这里没有遇到这个问题
步骤5:启动hive  注意,配置环境变量之后,可以在任意地方启动,不然,需要在bin下启动
		直接启动:
			启动metastore:bin/hive --service metastore
			启动hiveserver2:hive --service hiveserver2
		后台启动:
			启动metastore:nohup bin/hive --service metastore & 
			启动hiveserver2:nohup bin/hive --service hiveserver2 &
		查看进程:ps -aux|grep hive
步骤 6:
	进入hive:在bin目录下 hive
	操作跟mysql一致: show databases;  show tables;
	退出: quit;(建议)   exit;(据说不建议,暂时不知道原因)
	创建表:
		方式1:create table student (id int ,name String);  //创建一个student表,有两个字段,id和name,id是int类型,name是String类型。
		方式2:  创建表,带字段注释
			CREATE TABLE test_user (
		    `id` STRING COMMENT '编码',
		    `user_name` STRING COMMENT '用户名',
		    `sex` STRING COMMENT '性别',
		    `area_code` INT COMMENT '地区编码'
		) COMMENT '测试用户表'
		ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t';  
	插入数据:
		方式1:类似mysql
		insert into table student (1,'zhangsan');
		方式2:文件加载  根据具体的文件加载,字段之间用 table 键隔开
		load data local inpath'文件路径'  into table student;
		方式3:上传文件
		在浏览器打开hadoop的页面,上方导航栏Utilities-Browse the file system ,在user/hive/warehouse下找到你创建的表,点击student,然后上传本地文件,字段之间用table键隔开
		方式4:用hdfs的路径put进去
		在浏览器打开hadoop的页面,上方导航栏Utilities-Browse the file system ,在。user/hive/warehouse下找到你创建的表,点击student,然后把路径拷贝,在命令上put:hadoop fs -put 文件名.txt 拷贝的路径
redis安装:
步骤1:
	下载:https://redis.io/download
步骤2:上传到服务器,解压  tar -zxvf redis.tgz -C /data/module
步骤3:编译
	cd /usr/local/redis/redis-6.2.5
	make  
步骤4:安装:完成之
	make
	// 完成之后 执行  make install 测试是否都安装完成
步骤5:安装完成之后的默认路径是  /usr/local/bin  下面  
	
步骤6:修改配置文件
	// 创建redis的配置文件目录
	cd /usr/local/bin
	mkdir redisConfig
	// 先复制配置文件到安装目录下  以后就使用这个配置文件启动
	cp /data/module/redis-6.2.5/redis.conf /usr/local/bin/redisConfig
	vi /usr/local/redis/etc/redis.conf
	主要修改:
		daemonize no  改为  daemonize  yes   //设置后台启动
		bind 127.0.0.1 -::1 改为 # bind 127.0.0.1 -::1  //允许远程连接
步骤7:启动
	cd /usr/local/bin
	redis-server redisConfig/redis.conf 
步骤8:自测:
	./redis-cli   //然后就是get和set值的操作了
步骤9:关闭自测
	exit
presto搭建
//=========这个是服务端的安装
步骤1:下载server压缩包,以及cli的压缩包,官网地址:https://prestodb.io/docs/current/installation/deployment.html,里面有下载地址
步骤2:解压,到指定的文件夹,tar -zxvf presto-server-0.265.1.tar.gz -C 指定目录,我这里是在presto
步骤3:进入到解压后的文件里面 cd prosto  ,创建存储数据的文件夹,data
			cd presto
			mkdir data
步骤4:再次进入到presto,创建配置文件的文件夹
			cd presto 
			mkdir etc
步骤5:在etc下,创建jvm.config的配置文件,主要是为了配置垃圾回收机制
		cd etc
		vim jvm.config  //插入如下的配置
		-server
		-Xmx16G
		-XX:+UseG1GC
		-XX:G1HeapRegionSize=32M
		-XX:+UseGCOverheadLimit
		-XX:+ExplicitGCInvokesConcurrent
		-XX:+HeapDumpOnOutOfMemoryError
		-XX:+ExitOnOutOfMemoryError
		//保存 退出 
步骤6:在etc下创建catalog  //以后每个兼容的数据库,都在这个下面配置相应为文件
		cd etc 
		mkdir catalog
步骤7:进入到catalog下,创建hive的配置文件,hive.properties
		cd catalog 
		vim hive.properties   //配置如下
		connector.name=hive-hadoop2   //这个一定要注意版本,现在一般情况下,就是hive-hadoop2,除非你的hive版本特别低
		hive.metastore.uri=thrift://localhost:9083   //这个配置hive的服务器地址,
步骤8:把当前已经创建好的presto文件夹,分发到不同的机器上,方便下面配置worker和coondirnet,
步骤9:在每台机器下的etc下,创建 node.properties
			vim node.properties   //输入如下的内容
			node.environment=production
			node.id=ffffffff-ffff-ffff-ffff-ffffffffffff   //这里不一定这么配,只需要让每台机器的上这个字段值不一样就可以了
			node.data-dir=/var/presto/data   //这个就是配置data的路径
步骤10:在etc下面配置config.properties文件,区分worker和coordinator
				cd etc
				vim config.properties    //输入如下
				//======这个是coordinator的配置 
				coordinator=true    //说明是coordinator,
				node-scheduler.include-coordinator=false
				http-server.http.port=8080     //这个是确定的coordinator服务器的端口,接下来的work,都需要配置coordinator服务器的端口,不然,会监听不到
				query.max-memory=50GB
				query.max-memory-per-node=1GB
				query.max-total-memory-per-node=2GB
				discovery-server.enabled=true      //presto的内置服务,监听每个work的状态
				discovery.uri=http://example.net:8080    //这个也是coordinator服务器的地址,方便监听
				// ================这个是worker的配置
				coordinator=false
				http-server.http.port=8080    //需要coordinator服务器的端口
				query.max-memory=50GB
				query.max-memory-per-node=1GB
				query.max-total-memory-per-node=2GB
				discovery.uri=http://example.net:8080    /这个也是coordinator服务器的地址,方便监听
	步骤11:启动
				方式1:前台启动,启动之后日志会打到控制台
					cd /presto/bin  
					./launcher run
				方式2:后台启动,启动之后,日志会达到presto/var/log下面
					cd /presto/bin
					./launche start
		步骤12:验证是否启动:
			jps  //每台机器出现prestoServer说明启动了
	//=================	这个是命令行client安装
	步骤1:把presto-cli-0.265.1-executable.jar放到presto下面,并且,改名叫presto-cl.jar
	步骤2:给presto-cl.jar授权
		chmod +x presto-cl.jar
	步骤3:./presto --server localhost:8080 --catalog hive --schema default  //启动hive的数据库
spark安装
步骤1:下载,解压  
	下载地址:http://spark.apache.org/downloads.html
	解压:tar -zxvf spark.tgz -C 解压的地址
步骤2:进入conf下配置文件
	cd conf
	把spark-env.sh.template 改名为spark-env.sh   mv spark-env.sh.template spark-env.sh
	编辑spark-env.sh  vi spark-env.sh
	加入如下内容:
	export JAVA_HOME=/java运行环境
	export SCALA_HOMR=/scala路径
	export SPARK_MASTER_IP=sprak地址IP
	export SPARK_WORKER_HEMORY=/分配内存
	export SPARK_CONF_DIR=/hadoop路径
	//保存退出
步骤3 进入bin目录,启动
  ./start-all.sh启动spark进程
 步骤4:查看   jps
	出现Master和Worker  就说明成功了
python安装
步骤1:下载,解压  下载地址 :https://www.python.org/ftp/python/3.10.1/
		tar -zxvf  Python-3.10.1.tgz -C /usr/local/python
步骤2:进入目录  cd python/Python-3-10-1
步骤3:指定安装地址:./configure prefix=/usr/local/python/python3.10.1   (这一步的前提,需要安装gcc等一系列的东西,yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel)
步骤4:make && make install  安装
步骤5:建立软连接:ln -s /usr/local/python/python3.10.1/bin/python3.10 /usr/bin/python3.10.1
			ln -s /usr/local/python/python3.10.1/bin/pip3.10 /usr/bin/pip3.10.1
步骤6:查看 python3.10.1 -V  出现  3.10.1 就算是成功
步骤7(附加):可以删除之前的系统自带的软连接,也可以不删除,还有一些是网上说是需要配饰/usr/bin/yum ,我这里没有用到
scala安装(集群master节点和worker节点都是一台机器,需要多台机器的话,需要每台机器在worker里面,把节点都配置上就可以啦)
步骤1:下载(),解压
步骤2:配置环境变量
	export SPARK_HOME=/usr/local/spark/spark-3.2.0-hadoop-2.7
	exprot $PATH:$SPARK_HOME/bin:$PATH
步骤3:
	配置文件1:  cd //usr/local/spark/spark-3.2.0-hadoop-2.7/conf
			cp spark-env.sh.template spark-env.sh
			JAVA_HOME=/usr/java/jdk1.8.0_171
			# hadoop配置
			HADOOP_HOME=/usr/local/hadoop/hadoop-2.7.3
			HADOOP_CONF_DIR=/usr/local/hadoop/hadoop-2.7.3/etc/hadoop
			YARN_CONF_DIR=/usr/local/hadoop/hadoop-2.7.3/etc/hadoop
			#配置master
			export SPARK_MASTER_HOST=node1(自己的主机名)
			export SPARK_MASTER_PORT=7000	(自己决定)
			# master的webui
			SPARK_MASTER_WEBUI_PORT=7080

			# worker配置
			#CPU可用的核数
			SPARK_WORKER_CORES=1(自己决定)
			# work可用的内存
			SPARK_WORKER_MEMORY=8g(自己决定)
			# work的地址
			SPARK_WORKER_PORT=7001(自己决定)
			#WORK的webui
			SPARK_WORKER_WEBUI_PORT=7081(自己决定)

			#日志
			SPARK_HISTORY_OPTS="-Dspark.history.fs.logDirectory=hdfs://node1:9000/sparklog/ -Dsaprk.history.fs.clearner.enabled=true"
			保存退出
					
	配置文件2:cp spark-defaults.conf.template spark-defaults.conf
			vi spark-defaults.conf  最后加上
			# 开始spark的日期记录功能
			spark.eventLog.enabled   true
			# 设置spark日记的记录功能
			spark.eventLog.dir  hdfs://ip:9000/sparklog/
			# 设置spark日志是否压缩
			spark.eventLog.compress  true
			保存退出
	配置文件3:cp workers.template workers 
		vi workers  在文件最后加上工作阶段的ip,这里master和worker是一台机器
		node1
		保存退出
	配置文件4:cp log4j.properties.template log4j.properties
		vi log4j.properties 
		把其中一行的日志级别从INFO改成WARN
		log4j.rootCategory=INFO,console
		改成:log4j.rootCategory=WARN,console
步骤4:创建目录,日志的目录
		hadoop fs -ls /    //查看
		//发现没有sparklog的路径
		hadoop fs -mkdir /sparklog
		//不报错就说明成功(我这里报了hadoop处在安全安全模式下,只能看,不能操作,关闭hadoop重启,创建成功)
		hadoop fs -chmod 777 /sparklog   //授权
步骤4;启动
	./sbin/start-all.sh     
	jps 有master 和work  说明启动成功

步骤5:spark-shell(测试)   
	测试:./sbin/spark shell --master spark://node1:7000  (spark-env.sh配置文件中的设置)		
		启动日志会显示当前连接的地址,webui也能看到变化				
		val rdd01 = sc.makeRDD(List(1,2,3,4,5,6))
		val r01 = rdd01.map { x => x * x }
		println(r01.collect().mkString(","))
		打印出来数据1,4,9,16,25,36,测试成功
		访问部署机器上的4040页面,可以看到spark的监控页面,比如http://IP:4040(在spark的启动时候都有提示)
		Ctrl+d  退出
solr安装
下载:http://archive.apache.org/dist/lucene/solr/5.2.1/
	解压:tar -zxvf solr-5.2.1.tgz -C /usr/local/solr
	进入bin: cd solr-5.2.1/bin
修改solr.in.sh  vi solr.in.sh
ZK_HOST="master.hadoop:2181"
SOLR_HOST="master.hadoop"
# 设置solr的端口,默认是 8983
#可修改端口号
SOLR_PORT=8983
保存退出
启动: bin/solr start 
  出现的问题:

*** [WARN] *** Your open file limit is currently 1024.  
 It should be set to 65000 to avoid operational disruption. 
 If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
*** [WARN] ***  Your Max Processes Limit is currently 3853. 
 It should be set to 65000 to avoid operational disruption. 
 If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
WARNING: Starting Solr as the root user is a security risk and not considered best practice. Exiting.
         Please consult the Reference Guide. To override this check, start with argument '-force'

这个是因为由于linux的限制行数,所以出现该问题
解决办法:打开 solr.in.sh  翻到最下面  修改
SOLR_ULIMIT_CHECKS=fasle
启动 cd bin  ./solr start -force   (这个是用root启动的)
启动完成之后,浏览器:http://10.0.0.7:8983  页面出现,启动成功
kafka安装
1.下载:https://kafka.apache.org/downloads
2.上传,解压:tar -zxvf kafka-2.12-0.11.0.2.tgz -C /usr/local
3.修改配置文件: cd usr/local/kafka_2.12-0.11.0.2/config/
vi server.properties
修改内容如下(找到改,找不到,就新加,其中涉及的路径,需要自己手动创建):
broker.id=0
port=9092 #端口号
host.name=172.30.0.9 #服务器IP地址,修改为自己的服务器IP
log.dirs=/usr/local/kafka_2.12-0.11.0.2/logs #日志存放路径,上面创建的目录
zookeeper.connect=localhost:2181 #zookeeper地址和端口,单机配置部署,localhost:2181
保存退出
vi zookeeper.properties
修改内容如下(找到改,找不到,就新加,其中涉及的路径,需要自己手动创建):
dataDir=/usr/local/kafka_2.12-0.11.0.2/zk_dataDir  #zookeeper数据目录  (可以修改可以不修改)
dataLogDir=/usr/local/kafka_2.12-0.11.0.2/zk_dataLogDir #zookeeper日志目录 (可以修改可以不修改)
clientPort=2181 
maxClientCnxns=100 
tickTime=2000 
initLimit=10
4.创建启动脚本
cd usr/local/kafka_2.12-0.11.0.2/bin
vi kafkastart.sh 
/usr/local/kafka_2.12-0.11.0.2/bin/kafka-server-start.sh -daemon  /usr/local/kafka_2.12-0.11.0.2/config/server.properties &
保存退出
chmod 777 kafkastop.sh
创建停止脚本
vi kafkastop.sh 
/usr/local/kafka_2.12-0.11.0.2/bin/kafka-server-stop.sh -daemon  /usr/local/kafka_2.12-0.11.0.2/config/server.properties &
保存退出
chmod 777 kafkastop.sh
// 测试:
	创建 topic : ./kafka-topics.sh --bootstrap-server localhost:9092 --create --topic test --partitions 2 --replication-factor 1
	启动生产者:./bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test
	启动消费者:./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning
	在生产者中输入消息,回车,应该是可以在消费者中看到发送的消息
	

5.启动
./kafkastart.sh 
6.测试
jps  出现  kafka  成功
7.消息测试
// 创建 topic
      ./kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test

      // 查看已经创建好的topic的iebiao
      ./kafka-topics.sh --list --zookeeper localhost:2181

	// 生产者生产消息
	./kafka-console-producer.sh --broker-list localhost:9092 --topic test
	
	// 消费者消费消息
	./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning
	// 删除tpoic
 	./kafka-topics.sh --delete --zookeeper localhost:2181 --topic topic名称
Atlas安装
1.下载,网址https://atlas.apache.org/#/Downloads  下载下来之后是apache-atlas-0.8.4-sources.tar.gz,但是这个是源码,是不能够在服务器直接运行的,需要编辑
2.编辑打包:需要在本地有网的机器上下载依赖,打包,这就需要用到maven来下载依赖
	下载略过,编译打包命令如下:
	使用外部Hbase和solr的打包命令如下:mvn clean -DskipTests package -Pdist
	使用Atlas内置的Hbase和Solr打包如下:mvn clean -DskipTests package -Pdist,embedded-hbase-solr
	打包完成之后的名称是:apache-atlas-0.8.4-bin.tar.gz   具体位置是在:apache-atlas-sources-2.2.0\distro\target
3.上传解压:tar -zxvf apache-atlas-2.2.0-bin.tar.gz -C atlas
4.修改配置文件:
	(1)修改配置文件  下面是需要修改的两个文件完整版
		配置文件1:atlas-env.sh
			vi  atlas-env.sh	
			export MANAGE_LOCAL_HBASE=false   // 使用外部的hbase
			export MANAGE_LOCAL_SOLR=false  //使用外部的solr
			export HBASE_CONF_DIR=/usr/local/atlas/conf/hbase/conf
		配置文件2:atlas-application.properties  这里给出全部的,包括hbase/hive/solr/kafka/,ip和端口向自己真实的靠齐
		vi atlas-application.properties
		> #
		# Licensed to the Apache Software Foundation (ASF) under one
		# or more contributor license agreements.  See the NOTICE file
		# distributed with this work for additional information
		# regarding copyright ownership.  The ASF licenses this file
		# to you under the Apache License, Version 2.0 (the
		# "License"); you may not use this file except in compliance
		# with the License.  You may obtain a copy of the License at
		#
		#     http://www.apache.org/licenses/LICENSE-2.0
		#
		# Unless required by applicable law or agreed to in writing, software
		# distributed under the License is distributed on an "AS IS" BASIS,
		# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
		# See the License for the specific language governing permissions and
		# limitations under the License.
		#
		
		#########  Graph Database Configs  #########
		
		# Graph Database
		
		#Configures the graph database to use.  Defaults to Titan 0.5.4.
		#atlas.graphdb.backend=org.apache.atlas.repository.graphdb.titan0.Titan0GraphDatabase
		
		# Graph Storage
		atlas.graph.storage.backend=hbase
		atlas.graph.storage.hbase.table=apache_atlas_titan
		
		#Hbase
		#For standalone mode , specify localhost
		#for distributed mode, specify zookeeper quorum here - For more information refer http://s3.thinkaurelius.com/docs/titan/current/hbase.html#_remote_server_mode_2
		atlas.graph.storage.hostname=127.0.0.1:2181
		atlas.graph.storage.hbase.regions-per-server=1
		atlas.graph.storage.lock.wait-time=10000
		
		# Gremlin Query Optimizer
		#
		# Enables rewriting gremlin queries to maximize performance. This flag is provided as
		# a possible way to work around any defects that are found in the optimizer until they
		# are resolved.
		#atlas.query.gremlinOptimizerEnabled=true
		
		# Delete handler
		#
		# This allows the default behavior of doing "soft" deletes to be changed.
		#
		# Allowed Values:
		# org.apache.atlas.repository.graph.SoftDeleteHandler - all deletes are "soft" deletes
		# org.apache.atlas.repository.graph.HardDeleteHandler - all deletes are "hard" deletes
		#
		#atlas.DeleteHandler.impl=org.apache.atlas.repository.graph.SoftDeleteHandler
		
		# Entity audit repository
		#
		# This allows the default behavior of logging entity changes to hbase to be changed.
		#
		# Allowed Values:
		# org.apache.atlas.repository.audit.HBaseBasedAuditRepository - log entity changes to hbase
		# org.apache.atlas.repository.audit.NoopEntityAuditRepository - disable the audit repository
		#
		atlas.EntityAuditRepository.impl=org.apache.atlas.repository.audit.HBaseBasedAuditRepository
		
		
		# Graph Search Index
		atlas.graph.index.search.backend=solr5
		
		#Solr
		#Solr cloud mode properties
		atlas.graph.index.search.solr.mode=cloud
		atlas.graph.index.search.solr.zookeeper-url=127.0.0.1:2181
		atlas.graph.index.search.solr.zookeeper-connect-timeout=60000
		atlas.graph.index.search.solr.zookeeper-session-timeout=60000
		
		#Solr http mode properties
		#atlas.graph.index.search.solr.mode=http
		#atlas.graph.index.search.solr.http-urls=http://localhost:8983/solr
		
		# Solr-specific configuration property
		atlas.graph.index.search.max-result-set-size=150
		
		#########  Notification Configs  #########
		atlas.notification.embedded=false
		atlas.kafka.data=${sys:atlas.home}/data/kafka
		atlas.kafka.zookeeper.connect=127.0.0.1:2181
		atlas.kafka.bootstrap.servers=127.0.0.1:9092
		atlas.kafka.zookeeper.session.timeout.ms=4000
		atlas.kafka.zookeeper.connection.timeout.ms=2000
		atlas.kafka.zookeeper.sync.time.ms=20
		atlas.kafka.auto.commit.interval.ms=1000
		atlas.kafka.hook.group.id=atlas
		
		atlas.kafka.enable.auto.commit=true
		atlas.kafka.auto.offset.reset=earliest
		atlas.kafka.session.timeout.ms=30000
		atlas.kafka.poll.timeout.ms=1000
		
		atlas.notification.create.topics=true
		atlas.notification.replicas=1
		atlas.notification.topics=ATLAS_HOOK,ATLAS_ENTITIES
		atlas.notification.log.failed.messages=true
		atlas.notification.consumer.retry.interval=500
		atlas.notification.hook.retry.interval=1000
		# Enable for Kerberized Kafka clusters
		#atlas.notification.kafka.service.principal=kafka/_HOST@EXAMPLE.COM
		#atlas.notification.kafka.keytab.location=/etc/security/keytabs/kafka.service.keytab
		
		#########  Hive Lineage Configs  #########
		## Schema
		atlas.lineage.schema.query.hive_table=hive_table where __guid='%s'\, columns
		atlas.lineage.schema.query.Table=Table where __guid='%s'\, columns
		
		## Server port configuration
		#atlas.server.http.port=21000
		#atlas.server.https.port=21443
		
		#########  Security Properties  #########
		
		# SSL config
		atlas.enableTLS=false
		
		#truststore.file=/path/to/truststore.jks
		#cert.stores.credential.provider.path=jceks://file/path/to/credentialstore.jceks
		
		#following only required for 2-way SSL
		#keystore.file=/path/to/keystore.jks
		
		# Authentication config
		
		atlas.authentication.method.kerberos=false
		atlas.authentication.method.file=true
		
		#### ldap.type= LDAP or AD
		atlas.authentication.method.ldap.type=none
		
		#### user credentials file
		atlas.authentication.method.file.filename=${sys:atlas.home}/conf/users-credentials.properties
		
		### groups from UGI
		#atlas.authentication.method.ldap.ugi-groups=true
		
		######## LDAP properties #########
		#atlas.authentication.method.ldap.url=ldap://<ldap server url>:389
		#atlas.authentication.method.ldap.userDNpattern=uid={0},ou=People,dc=example,dc=com
		#atlas.authentication.method.ldap.groupSearchBase=dc=example,dc=com
		#atlas.authentication.method.ldap.groupSearchFilter=(member=uid={0},ou=Users,dc=example,dc=com)
		#atlas.authentication.method.ldap.groupRoleAttribute=cn
		#atlas.authentication.method.ldap.base.dn=dc=example,dc=com
		#atlas.authentication.method.ldap.bind.dn=cn=Manager,dc=example,dc=com
		#atlas.authentication.method.ldap.bind.password=<password>
		#atlas.authentication.method.ldap.referral=ignore
		#atlas.authentication.method.ldap.user.searchfilter=(uid={0})
		#atlas.authentication.method.ldap.default.role=<default role>
		
		
		######### Active directory properties #######
		#atlas.authentication.method.ldap.ad.domain=example.com
		#atlas.authentication.method.ldap.ad.url=ldap://<AD server url>:389
		#atlas.authentication.method.ldap.ad.base.dn=(sAMAccountName={0})
		#atlas.authentication.method.ldap.ad.bind.dn=CN=team,CN=Users,DC=example,DC=com
		#atlas.authentication.method.ldap.ad.bind.password=<password>
		#atlas.authentication.method.ldap.ad.referral=ignore
		#atlas.authentication.method.ldap.ad.user.searchfilter=(sAMAccountName={0})
		#atlas.authentication.method.ldap.ad.default.role=<default role>
		
		#########  JAAS Configuration ########
		
		#atlas.jaas.KafkaClient.loginModuleName = com.sun.security.auth.module.Krb5LoginModule
		#atlas.jaas.KafkaClient.loginModuleControlFlag = required
		#atlas.jaas.KafkaClient.option.useKeyTab = true
		#atlas.jaas.KafkaClient.option.storeKey = true
		#atlas.jaas.KafkaClient.option.serviceName = kafka
		#atlas.jaas.KafkaClient.option.keyTab = /etc/security/keytabs/atlas.service.keytab
		#atlas.jaas.KafkaClient.option.principal = atlas/_HOST@EXAMPLE.COM
		
		#########  Server Properties  #########
		atlas.rest.address=http://127.0.0.1:21000
		# If enabled and set to true, this will run setup steps when the server starts
		atlas.server.run.setup.on.start=false
		
		#########  Entity Audit Configs  #########
		atlas.audit.hbase.tablename=apache_atlas_entity_audit
		atlas.audit.zookeeper.session.timeout.ms=1000
		atlas.audit.hbase.zookeeper.quorum=127.0.0.1:2181
		
		#########  High Availability Configuration ########
		atlas.server.ha.enabled=false
		#### Enabled the configs below as per need if HA is enabled #####
		#atlas.server.ids=id1
		#atlas.server.address.id1=localhost:21000
		#atlas.server.ha.zookeeper.connect=localhost:2181
		#atlas.server.ha.zookeeper.retry.sleeptime.ms=1000
		#atlas.server.ha.zookeeper.num.retries=3
		#atlas.server.ha.zookeeper.session.timeout.ms=20000
		## if ACLs need to be set on the created nodes, uncomment these lines and set the values ##
		#atlas.server.ha.zookeeper.acl=<scheme>:<id>
		#atlas.server.ha.zookeeper.auth=<scheme>:<authinfo>
		
		
		
		#########POLICY FILE PATH #########
		atlas.auth.policy.file=${sys:atlas.home}/conf/policy-store.txt
		
		#########  Type Cache Implementation ########
		# A type cache class which implements
		# org.apache.atlas.typesystem.types.cache.TypeCache.
		# The default implementation is org.apache.atlas.typesystem.types.cache.DefaultTypeCache which is a local in-memory type cache.
		#atlas.TypeCache.impl=
		
		#########authorizer impl class #########
		atlas.authorizer.impl=SIMPLE
		
		#########  Performance Configs  #########
		#atlas.graph.storage.lock.retries=10
		#atlas.graph.storage.cache.db-cache-time=120000
		
		#########  Business Catalog  #########
		atlas.taxonomy.default.name=Catalog
		
		#########  CSRF Configs  #########
		atlas.rest-csrf.enabled=true
		atlas.rest-csrf.browser-useragents-regex=^Mozilla.*,^Opera.*,^Chrome.*
		atlas.rest-csrf.methods-to-ignore=GET,OPTIONS,HEAD,TRACE
		atlas.rest-csrf.custom-header=X-XSRF-HEADER
		
		#########  Enable Taxonomy  #########
		atlas.feature.taxonomy.enable=false
		
		############ KNOX Configs ################
		#atlas.sso.knox.browser.useragent=Mozilla,Chrome,Opera
		#atlas.sso.knox.enabled=true
		#atlas.sso.knox.providerurl=https://<knox gateway ip>:8443/gateway/knoxsso/api/v1/websso
		#atlas.sso.knox.publicKey=
		
		############ Atlas Metric/Stats configs ################
		# Format: atlas.metric.query.<key>.<name>
		atlas.metric.query.cache.ttlInSecs=900
		#atlas.metric.query.general.typeCount=
		#atlas.metric.query.general.typeUnusedCount=
		#atlas.metric.query.general.entityCount=
		#atlas.metric.query.general.tagCount=
		#atlas.metric.query.general.entityDeleted=
		#
		#atlas.metric.query.entity.typeEntities=
		#atlas.metric.query.entity.entityTagged=
		#
		#atlas.metric.query.tags.entityTags=
		
		#########  Compiled Query Cache Configuration  #########
		
		# The size of the compiled query cache.  Older queries will be evicted from the cache
		# when we reach the capacity.
		
		#atlas.CompiledQueryCache.capacity=1000
		
		# Allows notifications when items are evicted from the compiled query
		# cache because it has become full.  A warning will be issued when
		# the specified number of evictions have occurred.  If the eviction
		# warning threshold <= 0, no eviction warnings will be issued.
		
		#atlas.CompiledQueryCache.evictionWarningThrottle=0
		
		
		#########  Full Text Search Configuration  #########
		
		#Set to false to disable full text search.
		#atlas.search.fulltext.enable=true
		
		#########  Gremlin Search Configuration  #########
		
		#Set to false to disable gremlin search.
		atlas.search.gremlin.enable=false
		
		
		########## Add http headers ###########
		
		#atlas.headers.Access-Control-Allow-Origin=*
		#atlas.headers.Access-Control-Allow-Methods=GET,OPTIONS,HEAD,PUT,POST
		#atlas.headers.<headerName>=<headerValue>
		
		# hive  config
		atlas.hook.hive.synchronous=false
		atlas.hook.hive.numRetries=3
		atlas.hook.hive.queueSize=10000
		atlas.cluster.name=primary



	(2)特别注意Hbase
	Atlas集成Hbase时:除了修改atlas-application.properties的文件之外,还需要把Atlas的中的Hbase与外面我们使用的Hbase做个映射,就是可以调到外边Hbase的配置文件
	具体命令如下:ln -s /usr/local/hbase/conf/ /usr/local/atlas/conf/hbase/
	
	(3)特别注意Solr
	Atlas中的solr要跟外面的solr做交互
	cp -r /usr/local/atlas/conf/solr/ /usr/local/solr/
	这样的话,外部应用的solr里面还有一个solr,改个名字
	cd /usr/local/solr
	mv solr atlas_conf
	然后启动solr,创建Atlas需要的检索3条命令
	bin/solr create -c vertex_index -d /usr/local/solr/atlas_conf -shards 3 -replicationFactor 2 
	bin/solr create -c edge_index -d /usr/local/solr/atlas_conf -shards 3 -replicationFactor 2 
	bin/solr create -c fulltext_index -d /usr/local/solr/atlas_conf -shards 3 -replicationFactor 2 
	解释:
	-shards 3  标识该集合有3个分片
	-replicationFactor 2 :表示每个分片都有两个副本
	vertex_index/edge_index/fulltext_index:表示集合的名称
	如果创建错误,可以删除:
	bin/solr delete -c vertex_index
	                 	创建成功之后,http://10.0.0.7:8983/solr/#/~cloud登录就能看到创建的集合
	(4)特别注意kafka
	需要创建kafka的topic
	cd /usr/local/kafka_2.12-0.11.0.2
	bin/kafka-topics.sh --zookeeper master.hadoopL2181 --create --replication-factor 1 --partitions 1 --topic _HOATLASOK
	bin/kafka-topics.sh --zookeeper master.hadoopL2181 --create --replication-factor 1 --partitions 1 --topic ATLAS_ENTITIES
	这里我启动的是单机,没有集群,所以,数字跟的都是1,这个主要是跟kafka的server.properties中的broker.id=0有关系,集群的话,每台机器这个字段都不一样
	(5)特别注意Hive,除了配置文件之外,还需要在hive的配置文件中加入其他的东西,如下:
	压缩文件:
	zip -u /usr/local/atlas/hook/hive/atlas-plugin-classloader-0.8.4.jar /usr/local/atlas/conf/atlas-application.properties
	把Atlas的配置文件拷到外部Hive中:
	cp /usr/local/atlas/conf/atlas-application.properties /usr/local/hive/conf/
	编辑外部hive的配置文件 hive-site.xml
	<property>
	      <name>hive.exec.post.hooks</name>
	      <value>org.apache.atlas.hive.hook.HiveHook</value>
	</property>
	cp -r /usr/local/atlas/hook/hive/所有的文件和目录 /usr/local/hive1.2.1/lib
	(6)启动Altas
	cd /usr/local/atlas/bin
	./atlas_start.py
	完成之后,jps出现Atlas,访问页面 http://master.hadoop:21000,页面正常显示,启动成功
	(7)第一次导入数据,把hive中的数据,导入到Atlas中
	cd /usr/local/atlas/bin
	./import-hive.sh 
安装git
步骤1:下载:https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.35.1.tar.gz(官网:https://git-scm.com/download/linux)
步骤2:上传 解压  tar -zxvf 压缩包 -C 解压位置
步骤3:安装依赖组件(内网的,就自定去下载安装):
	yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
步骤4 安装:
	cd git-2.35.1
	make prefix=/usr/local/git/git-2.35.1/setup all   (此处的setup是手动创建的)
	make prefix=/usr/local/git/git-2.35.1/setup install
步骤6 设置环境变量:
	vi  /etc/profile
	export GIT_HOME=/usr/local/git/git-2.35.1/setup
	export=PATH=$PATH:$GIT_HOME/bin
步骤7 测试:
	git --version 
	出现 2.35.1  成功
安装gitlab
步骤1:下载 ,上传 
	下载地址:https://packages.gitlab.com/gitlab/gitlab-ce  选择合适的版本,这里下载地址是https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-14.6.7-ce.0.el7.x86_64.rpm  点击右上角的下载
步骤2:解压安装
	rpm -ivh gitlab-ce-14.6.7-ce.0.el7.x86_64.rpm   
	注意:如果这里提示 Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY  这是缺少依赖组件的原因,执行下面的命令安装组件
	yum install -y curl policycoreutils-python openssh-server cronie
步骤3:修改配置文件
	 vi /etc/gitlab/gitlab.rb
	 external_url 'http://web页面的IP:web页面的端口'
	 保存退出
步骤4:初始化gitlab  
	gitlab-ctl reconfigure
	注意:如果这里出现下面这样的错误
		Error executing action `create` on resource 'account[GitLab user and group]'
		There was an error running gitlab-ctl reconfigure:

		account[GitLab user and group] (gitlab::users line 28) had an error: Mixlib::ShellOut::ShellCommandFailed: linux_user[GitLab user and group] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/account.rb line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0, 12], but received '8'
		---- Begin output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
		STDOUT: 
		STDERR: usermod: user git is currently used by process 11884
		---- End output of ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] ----
		Ran ["usermod", "-s", "/bin/sh", "-d", "/var/opt/gitlab", "git"] returned 8
		网上的解决办法如下:
			vi /etc/gitlab/gitlab.rb
			加上如下的配置:
			user['username'] = "gitlab"
			user['group'] = "gitlab"
			保存退出,重新gitlab-ctl reconfigure
步骤5:启动:
	gitlab-ctl start
步骤5:访问 访问gitlab.rb文件中 external_url的配置
	默认账号密码:
		默认账号root
		默认密码:/etc/gitlab/initial_root_password  文件里面的密码
安装Mariadb
步骤1:监测服务器上是否有Mariadb的残留文件,全部删除
	//查询  rpm -qa | grep -i mariadb 
	// 删除  rpm -e --nodeps mariadb-* 
步骤2:配置Mariadb文件,为了yum下载设置环境
	vi /etc/yum.repos.d/MariaDB.repo
	// 内容 
		# MariaDB 10.6.11 CentOS repository list - created 2017-05-05 16:13 UTC
		# http://downloads.mariadb.org/mariadb/repositories/
		[mariadb]
		name = MariaDB
		baseurl = http://yum.mariadb.org/10.6.11/centos7-amd64
		gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
		gpgcheck=1
步骤3:下载
	yum install mariadb-server -y
步骤4:操作
	// 启动 systemctl start mariadb
	// 设置开机启动  systemctl enable mariadb #设置开机启动
	// 重启 systemctl restart mariadb
	// 停止 systemctl stop mariadb.service
步骤4:登录mysql
  mysql -uroot -p  // 首次登录没有密码  ,直接回车
  // 设置密码   SET PASSWORD = PASSWORD('123456');
  // 设置全访问权限:grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
  // 刷新权限:flush privileges;
SSH认证配置
步骤1:配置hosts文件  ,增加节点配置,便于通信,通信几台,配置几台
	vim  /etc/hosts
	增加:
	ip:port 机器名
步骤2:生成密匙,在主节点,-t  是指定加密方式
	ssh-keygen -t rsa  
步骤3:查看是否生成密匙   cd .ssh
	出现id_rsa(私匙)和id_rsa.pub(共匙)  则说明成功
步骤4:把主机共匙拷贝到从机上
	ssh-copy-id 从机用户名@从机的IP
步骤5:测试,在主机上测试
	ssh 从机的机器名或者IP
	成功就说明成功了,否则,失败了,重新尝试
步骤6:从机上的执行上述的步骤
zookeeper 搭建
步骤1:下载安装包,解压
步骤2:进入解压好的文件夹中
	cd /data/module/apache-zookeeper-3.7.1 
	创建文件夹
	mkdir logs   //  日志文件存放地
	mkdir zkData  // 数据存放地
步骤3:修改配置文件
	cd /data/module/apache-zookeeper-3.7.1/conf
	cp zoo_sample.cfg zoo.cfg
	 vim  zoo.cfg
	 dataDir=/data/module/apache-zookeeper-3.7.1/zkData
	 保存退出
步骤4:启动
	cd 	/data/module/apache-zookeeper-3.7.1/bin
	./zkServer.sh start
步骤6:出现started   启动成功
docker搭建
步骤1: 卸载旧版本
 	sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engin
步骤2:需要的安装包:
	 yum install -y yum-utils
步骤3:设置镜像的仓库
	yum-config-manager \
	     --add-repo \
	     http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
步骤4:更新yum包的索引
	yum makecache fast
步骤5:安装docker
 	yum install docker-ce docker-ce-cli containerd.io
步骤6:启动
	systemctl start docker
步骤7:查看版本
	docker version
步骤8:测试:信息展示正常,说明安装成功了(出现 Hello from Docker!)
	docker run hello-world
步骤9:查看镜像
	docker images
步骤10:卸载
	1.卸载依赖:yum remove docker-ce  docker-ce-cli containerd.io
	2.删除资源:rm -rf /var/lib/docker(默认的工作路径)
 elasticsearch-8.7.1搭建(单点)
 步骤:
 	1.下载
 	2.上传解压  此处以结果为路径为  /data/elasticsearch-8.7.1 为例
 	3.创建ES用户,ES无法用root用户启动,因此需要创建用户
 		 adduser es
 		 passwd es用户的密码
	4.修改配置文件:
		cd config
		vim elasticsearch.yml
		
		cluster.name: my-application
		node.name: node-1    (当前节点,集群节点不能重复)
		path.data: /data/elasticsearch-8.7.1/data  (没有目录需要自行创建)
		path.logs: /data/elasticsearch-8.7.1/logs  (没有目录需要自行创建)
		network.host: 0.0.0.0   (配置0.0.0.0 是为了允许其他机器访问)
		http.port: 9200  
		cluster.initial_master_nodes: ["node-1"]  (单点就只留当前节点,集群需要都列)
		xpack.security.enabled: false 
		xpack.security.transport.ssl.enabled: false
	5.配置jvm
	vim jvm.options  (根据自己机器环境修改内存)
	
		-Xms1g
		-Xmx1g
	6.启动测试
		 ./data/elasticsearch-8.7.1/bin/elasticsearch
	7.页面测试:http://机器名:9200 出现ES信息为启动成功
	问题:
		1.max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
		这个是因为ES的文件个数过多,默认的配置满足不了需求
		解决办法:执行命令:sysctl -w vm.max_map_count=262144
			查看修改后的参数信息:sysctl -a|grep vm.max_map_count
	
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值