《linux下部署solr.docx》由会员分享,可在线阅读,更多相关《linux下部署solr.docx(10页珍藏版)》请在第一文库网上搜索。
1、1 ,Iinux下先部署环境(安装jdk),如果已安装有可跳过此步骤,跳到第五步(CeamoS64位b2 ,安装jdk,在usr1oca1目录下新建java:cdusr1oca1mkdirjavacdjava3 ,把jdk-7u79-1inux-x64.gz传输到该目录下4,解压并配置环境变量tar-zxvfjdk-7u79-1inux-x64.gz编辑系统文件,加入环境变量viZetcZprofiIe向该文件加入exportJAVAHOME=usr1oca1javajdk1.7.079exportJAVABIN=usrjdk1.8.077/binexportPATH=$PATH:$JAVA_
2、HOME/binexportC1ASSPATH=.:$JAVA_HOME/1ib/dt.jar:$JAVA_HOME/1ib/too1s.jarexportPATH=$JAVAJKwE/bin:$JREJiOME/bin:$PATH重新激活sourceetcprofi1e最后java-version查看是否安装成功。rootMyC1oudServerjdk1.7.0_79#java-versionjavaversion1.7.0_79Java(TM)SERuntimeEnvironment(bui1d1.7.0_79-b15)JavaHotSpot(TM)64-BitServerVM(bui1
3、d24.79-b02,mixedmode)5,在根目录下挂载data目录。cd/mkdirdata6,在data下挂载zookeeper目录cddatamkdirzookeeper7,先修改要传输过去的文件so1r-home数据库地址so1r-homenewscondata-config.xmI的数据库文件,用于查询文稿导入索引用(可在数据库建立一个只做查询权限的账号,或者只有tb_cms_context表查询的权限),修改ur1,user,password这三项IConfigcamXm?ZjmNQWasqmaAWuwr-10f1*WCnCotMf1rnsfon)*:*C1obTxansfoK
4、mre*ry-S1MCTid.tit1,kywrd,content.crtTimr*CM最后目录如下rootMyC1oudServerdata#Isso1r-homezookeeperrootaMyC1oudServerdata#8 ,安装ZOOkeeper,在usr1oca1挂载ZookeePer,把ZoOkeePer-3.4.8放入该目录下。cdusr1oca1mkdirzookeepercdzookeeperrootMyC1oudServerzookeeper#Iszookeeper-3.4.8root(aMyC1oudServerzookeeper#9 ,开启zookeeper服务,c
5、dusr1oca1zookeeperzookeeper-3.4.8bin.ZzkServershstart执行.sh文件提示permissiondenied的话,-bash:./skServer.sh:Nosuchfi1eordirectoryroot0MyC1oudServerbin#./ZkServer.shstart-bash:./zkServer.sh:Permissiondeniedroot(3MyC1oudServerbin#chmod777*.shroot(8MyC1oudServerbin#chmod777*.shroot0MyC1oudServerbin#./zkServer
6、.shstartZooKeeperJMXenab1edbydefau1tUsingconfig:usr/1oca1/zookeeper/zookeeper-3.4.8bin./conf/zoo.cfgStartingzookeeperSTARTEDroot(aMyC1oudServerbin#10,如果没有tomcat则把tomcat传输过去把dubboadmin.wa和dayooSo1rCms.war放到在tomcat下webapps安装so1r,在usr1oca1下挂载tomcat7,把apache-tomcat-7.0.69(已经集成So11j文件传输过去,默认已经修改端口号为.0cdu
7、sr1oca1mkdirtomcat71IUU1QJ1UCdC11Ub11UIII1d1/J#CSrootaioca1hosttomcat7#ISapache-tocat-7.69root01oca1hosttomcat7#备注:如果已经有tomcat,贝IJ只需把apache-tomcat-7.0.69webappsROOT和apache-tomcat-7.0.69coserver.xm1覆盖即可。以下是修改端口号步骤如需修改则按下面的提示修改成其他端口号(若修改端口号则需要修改WabaPP下的配置文件SystemConfig.properties,cdusr1oca1tomcat7apac
8、he-tomcat-7.0.69webappsROOTWEB-INFc1assesspringviapp1icatioContext-provider.xm1修改端口号!-使用mu1ticast广播注册中心暴露服务地址一如果需要在一台机子上启动多个TomCat服务器,在默认设置下肯定会发生端口冲突。为实现这个效果,只需修改COnf子目录中的SerVer.xm1文件即可。共需修改三处:(1) .修改http访问端口(默认为8080端口):(2) .修改Shutdown端口(默认为8005端口):ServerPOrt=8005ShUtdoWn=SHUTDOWN(3) .修改JVM启动端口(默认为8
9、009端口):a) cdusr1oca1tomcat7apache-tomcat-7.0.69binb) ./startup.sh执行.sh文件提示Pem1iSSiOndenied的话,c)访问(ip自己的)12,选择newsCI磔So1rDashboard施1ooging善CoreAdmin:JavaProperties刍ThreadDump目InstanceStartVersions噂soirspecso1r-imp11cene-specIuceneUmpi20minutesago5.1.05.1.01672403-Hmpotter2015-04-0910:37:545.1.05.1.01
10、672403-timpottr-201504-0910:30:49JVM:RuntimeProcessorsArsOrac1eCorporationJavaHotSpot(TM)64itServerVM(1.7.0.7924.79t02)2-Dcata1ina.base*usr1oca1tonc4t7pace-tomcat-7.0.6913,选择dataimportCurrent:VThreadDumpnews、OverviewTAna1ysis君DataimportQFi1es,ingAP1uginsQQUerySize68bytes.Rep1ication(Master)VersionGe
11、nMaster(Searching)01Master(Rep1icab1e)-QAdminExtraWefoundno,admin-extra.htm,fi1e.黑Rep1ication141导入数据/dataimportingAdminPropertiesadDumpCommandfu11-importVerboseC1ean口H回rEntiCommitOptimizeferviewStart.Rowsa1ysi;CustomParameterscument,RefreshStatus0Auto-RefreshStatusjgins/Statsery15,选择实时刷新,查看导入状态Start,RowsCustomParameters尹Indexingsin0Requests:1Started:15mirRawStatus-OutfSIConfiguration上Auto-RefreshStatusExecute,RefreshStatus17,如果出现下面情况,说明导入成功(数据量大的话可能需要久点).