版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
項(xiàng)目一:企業(yè)網(wǎng)絡(luò)構(gòu) 項(xiàng)目:Windows集群部署企業(yè)門戶項(xiàng)目概 【項(xiàng)目背景 【項(xiàng)目目標(biāo) 【項(xiàng)目知識(shí)點(diǎn) 【項(xiàng)目?jī)?nèi)容 任務(wù)一、環(huán)境準(zhǔn) 【任務(wù)目的 【任務(wù)描述 任務(wù)二、部署mysql5.6數(shù)據(jù) 【任務(wù)目的 【任務(wù)描述 【關(guān)鍵步驟 安裝mysql-5.6數(shù)據(jù)庫服 數(shù)據(jù)庫初始配 數(shù)據(jù)庫【詳細(xì)參考 安裝mysql-5.6數(shù)據(jù)庫服 數(shù)據(jù)庫初始配 數(shù)據(jù)庫任務(wù)三、部署web服務(wù)器(所有web主機(jī)配置相同 【任務(wù)目的 【任務(wù)描述 【關(guān)鍵步驟 安裝中間件 添加tomcat連接mysql驅(qū)動(dòng) 測(cè)試tomcat部署雙tomcat提供服 配置兩個(gè)tomcat的默認(rèn)路徑為 【詳細(xì)參考 安裝中間件 添加tomcat連接mysql驅(qū)動(dòng) 測(cè)試tomcat部署雙tomcat提供服 配置兩個(gè)tomcat的默認(rèn)路徑為 任務(wù)四、部署內(nèi)容發(fā)布服 【任務(wù)目的 【任務(wù)描述 【關(guān)鍵步驟 配置 配置 測(cè)試更新文件是否自動(dòng)同 部署 web部 查 默認(rèn)站點(diǎn)修 【詳細(xì)參考 配置 配置 測(cè)試更新文件是否同 部署 web部 查 默認(rèn)站點(diǎn)修 任務(wù)五、調(diào)整web1、web2的服 【任務(wù)目的 【任務(wù)描述 【關(guān)鍵步驟 查看文件同步狀 重啟tomcat服 測(cè)試【詳細(xì)參考 查看文件同步狀 重啟tomcat服 測(cè)試任務(wù)六、部署squid緩存服務(wù) 【任務(wù)目的 【任務(wù)描述 【關(guān)鍵步驟 部署squid緩存服務(wù) 配置squid緩存服 【詳細(xì)參考 部署squid緩存服務(wù) 配置squid緩存服 任務(wù)七、部署nginx服務(wù) 【任務(wù)目的 【任務(wù)描述 【關(guān)鍵步驟 部署nginx服 配置nginx測(cè) 【詳細(xì)參考 部署nginx服 配置nginx測(cè) 項(xiàng)目:Windows集群部署企業(yè)門戶架構(gòu),可以滿足web正常運(yùn)行,且易擴(kuò)展。LNMP+TomcatJava應(yīng)用站點(diǎn)squid1緩存服務(wù)器備份服務(wù)器用戶請(qǐng)求Mysql基于jsp代碼的 的部web調(diào)整web1、web2 服squid部署Nginx作為 服務(wù)7nginx服務(wù)器一臺(tái),squid2臺(tái),web2臺(tái),內(nèi)容發(fā)布服務(wù)器一臺(tái),數(shù)據(jù)庫一臺(tái)。nginx做前段實(shí)現(xiàn)后端服務(wù)器的負(fù)ip_hash的方式來保證同一用戶請(qǐng)求短時(shí)間內(nèi)鎖定到后端的某一臺(tái)服務(wù)器上,由于源碼是jsp的代碼編寫,那么這里選擇的中間件是tomcat來提供服務(wù),為了保證更新內(nèi)容可以同步到每一臺(tái)web服務(wù)上,搭建一臺(tái)內(nèi)容發(fā)布服務(wù)器,該服務(wù)器不對(duì)用戶提供web,對(duì)web編輯人員提供,編輯人員對(duì)的操作可以在內(nèi)任務(wù)二、部署mysql數(shù)據(jù)庫并且做允許其他web主機(jī)數(shù)據(jù)庫任務(wù)三、部署tomcat服務(wù)實(shí)現(xiàn)jsp代碼服務(wù)的提供任務(wù)四、部署內(nèi)容發(fā)布系統(tǒng),同步數(shù)據(jù)到web主機(jī),并且測(cè)試squid緩存服務(wù)器任務(wù)六、配置naginx服務(wù)器,將web請(qǐng)求跳轉(zhuǎn)到后端web服務(wù)查看各主機(jī)IP地址,DNS、主機(jī)名,測(cè)試性Nginx名測(cè)試11.測(cè)試性[root@mysql~]# -c1|grepicmp64bytesfrom:icmp_seq=1ttl=64time=0.021ms[root@mysql~]# -c10|grepicmp64bytesfrom0:icmp_seq=1ttl=64time=0.233ms[root@mysql~]# -c11|grepicmp64bytesfrom1:icmp_seq=1ttl=64time=0.587ms[root@mysql~]# -c12|grepicmp64bytesfrom2:icmpseq=1ttl=64time=0.232ms[root@mysql~]# -c15|grepicmp64bytesfrom5:icmp_seq=1ttl=64time=0.296ms[root@mysql~]# -c16|grepicmp64bytesfrom6:icmp_seq=1ttl=64time=0.180ms[root@mysql~]# -c10|grepicmp64bytesfrom0:icmp_seq=1ttl=64time=0.1312.拷貝項(xiàng)目軟件包到下軟件包拷貝到mysql5.6mysql-5.6數(shù)據(jù)庫服務(wù)器[root@mysql~]#tarxvfMySQL-5.6.15-1.el6.x8664.rpm-bundle.tarMySQL-shared-5.6.15-1.el6.x8664.rpmMySQL-devel-5.6.15-1.el6.x8664.rpm [root@mysql//mysql[root@mysql~]#rpm-UvhMySQL-*.rpm###################[###################[###################[##################[##################[##################[###################ARANDOMPASSWORDHASBEENSETFORTHEMySQLrootUSERYouwillfindthatpasswordinYoumustchangethatpasswordonyourfirstnootherstatementbut'SETPASSWORD'willbeSeethe forthesemanticsofthe'passwordexpired'flag.Also,theaccountfortheanonymoususerhasbeenremoved.Inaddition,youcanwhichwillalsogiveyoutheoptionofremovingthetestdatabase.Thisisstronglyrecommendedforproductionservers.See formorePleasereportanyproblemswiththe/usr/bin/mysqlbugscript!ThelatestinformationaboutMySQLisavailableonthewebSupportMySQLbybuyingsupport/licensesNewdefaultconfigfilewascreatedas/usr/fandwillbeusedbydefaultbytheserverwhenyoustartit.YoumayeditthisfiletochangeserversettingsWARNING:Defaultconfigfile/etc/fexistsonthesystemThisfilewillbereadbydefaultbytheMySQLserverIfyoudonotwanttousethis,eitherremoveit,oruse--defaults-fileargumenttomysqld_safewhenstartingthe[root@mysql[root@mysql~]#servicemysqlStartingMySQL[root@mysql~]#[確定[root@mysql~]#cat#TherandompasswordsetfortherootuseratThuFeb522:18:362015(localtime):NNH3iqo1[root@mysql//mysql[root@mysql~]#mysql-uroot-WelcometotheMySQLmonitor.Commandsendwith;or\g.YourMySQLconnectionidis1Serverversion:5.6.15Copyright(c)2000,2013,Oracleand/oritss..Oracleisa ofOracleCorporationand/oritsaffiliates.Othernamesmaybe softheirrespectiveType'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputmysql>setpassword=password("pwd@123");QueryOK,0rowsaffected(0.17sec)mysql>show || |informationschema| |performanceschema| 4rowsinset(0.11////mysql[root@mysql~]#mysql-urootWelcometotheMySQLmonitor.Commandsendwith;or\g.YourMySQLconnectionidis1Serverversion:5.6.15Copyright(c)2000,2013,Oracleand/orits.sOracleisa ofOracleCorporationand/oritsaffiliates.Othernamesmaybe softheirrespectiveType'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputwebmysql>grantallon*.*toweb @"172.30.1.%"identifiedbyQueryOK,0rowsaffected(0.07 mysql>exit[root@mysql[root@mysql~]#mysql-h-WelcometotheMySQLmonitor.Commandsendwith;or\g.YourMySQLconnectionidisServerversion:5.6.15MySQLCommunityServerCopyright(c)2000,2013,Oracleand/orits.sOracleisa ofOracleCorporationand/oritsaffiliates.Othernamesmaybe softheirrespectiveType'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputmysqlshowdatabases;+|++|+|information_schema| |performance_schema| 4rowsinset(0.00 mysqlexit[root@mysql任務(wù)三、部署web服務(wù)器(所有web主機(jī)配置相同學(xué)習(xí)提供webtomcat////jdk[root@web1~]#rpm-qa|grep[root@web1~]#[root@web1~]#tarxvfapache-tomcat-[root@web1~]#[root@web1~]#mvapache-tomcat-6.0.32/usr/local/tomcat[root@web1~]#解壓連接[root@web1~]#unzipmysql-connector-java-[root@web1//拷貝tomcat連接mysql的驅(qū)動(dòng)包到tomcat的插件[root@web1~]cdmysql-connector-java-5.1.25[root@web1mysql-connector-java-5.1.25]#[root@web1mysql-connector-java-5.1.25]#cpmysql-connector-java-5.1.25-bin.jar/usr/local/tomcat/lib/[root@web1mysql-connector-java-5.1.25]#ls/usr/local/tomcat/lib/m[root@web1mysql-connector-java-5.1.25]#[root@web1~]#/usr/local/tomcat/bin/startup.shUsingCATALINABASE:/usr/local/tomcatUsingCATALINAHOME:/usr/local/tomcatUsingCATALINATMPDIR:/usr/local/tomcat/tempUsingJREHOME: UsingCLASSPATH: [root@web1~]#[root@web1~]#ps-ef|grep 12322:58 00:00:03org.apache.catalina.startup.Bootstrapstart 21762054022:58pts/0 00:00:00greptomcat[root@web1~]# [root@web1~]#cptest.jsp/usr/local/tomcat/webapps/ROOT/[root@web1~]# [root@web1~]#cpcon_mysql.jsp/usr/local/tomcat/webapps/ROOT/[root@web1~]# [root@web1~]#cd[root@web1local]#cp-rftomcat/tomcat2[root@web1local]#[root@web1local]#vim//8005//22<Serverport="8005"22<Serverport="8006"http://8080 <Connectorport="8080" <Connectorport="8081"http://8009 //[root@web1local]#/usr/local/tomcat2/bin/startup.shUsingCATALINA_BASE:/usr/local/tomcat2UsingCATALINA_HOME:/usr/local/tomcat2UsingCATALINA_TMPDIR:/usr/local/tomcat2/tempUsingJRE_HOME: UsingCLASSPATH: [root@web1local]#[root@web1local]#ps-ef|grep 12623:44 00:00:03org.apache.catalina.startup.Bootstrapstart 23822054023:44pts/0 00:00:00greptomcat2[root@web1local]#的 //jsp//mysql配置兩個(gè)tomcat的默認(rèn)路徑為[root@web1~]#mkdir-p[root@web1~]#vim <Hostname="localhost" <Hostname="localhost"[root@web1~]#/usr/local/tomcat/bin/shutdown.shUsingCATALINABASE:/usr/local/tomcatUsingCATALINAHOME:/usr/local/tomcatUsingCATALINATMPDIR:/usr/local/tomcat/tempUsingJREHOME: Using [root@web1~]#/usr/local/tomcat/bin/startup.shUsingCATALINA_BASE:/usr/local/tomcatUsingCATALINA_HOME:/usr/local/tomcatUsingCATALINA_TMPDIR:/usr/local/tomcat/tempUsingJRE_HOME: UsingCLASSPATH: [root@web1~]#[root@web1~]#cptest.jsp/opt/www/ROOT/[root@web1~]#cpcon_mysql.jsp/opt/www/ROOT/[root@web1~]# 測(cè)試文件[root@web1~]#vim//1111<%for(inti=0;i<10;i++)out.println(" o,JSPWorld!dir=/opt/www/ROOT"+"<br>");%> [root@web1~]#vim <Hostname="localhost" <Hostname="localhost"[root@web1~]#/usr/local/tomcat2/bin/shutdown.shUsingCATALINA_BASE:/usr/local/tomcat2UsingCATALINAHOME:/usr/local/tomcat2UsingCATALINATMPDIR:/usr/local/tomcat2/tempUsingJREHOME: UsingCLASSPATH: [root@web1~]#[root@web1~]#/usr/local/tomcat2/bin/startup.shUsingCATALINA_BASE:/usr/local/tomcat2UsingCATALINA_HOME:/usr/local/tomcat2UsingCATALINA_TMPDIR:/usr/local/tomcat2/tempUsingJREHOME: UsingCLASSPATH: [root@web1~]# 學(xué)習(xí)rsync+inotifywait實(shí)現(xiàn)內(nèi)容實(shí)時(shí)同步學(xué)習(xí)expect實(shí)現(xiàn)自動(dòng)交互使用expect配置rsync實(shí)現(xiàn)執(zhí)行自動(dòng)同配置inotifywait和rsync結(jié)合實(shí)現(xiàn)文件更新即同步配置tomcat并且將web代碼進(jìn)行部署進(jìn)行查看,并且查看給用戶提供服務(wù)的web服務(wù)器是否可以////web[root@web1~]#useradd//rsync[root@web1~]#echopwd@123|passwd--stdinpasswd:所有 驗(yàn)證令牌已經(jīng)成功更新[root@web1[root@web2~]#useradd//rsync[root@web2~]#echopwd@123|passwd--stdinrsyncpasswd:所有的 [root@web2//修改 的屬主與權(quán)[root@web1~]#cd[root@web1www]#chown-Rrsync.rootROOT/[root@web1www]# od775ROOT///修改 的屬主與權(quán)[root@web2~]#cd[root@web2www]#chown-Rrsync.rootROOT/[root@web2www]# od775ROOT///rsync[root@nrfb~]#rsyncTheauthenticityofhost'1(1)'can'tbeRSAkeyfingerprintisAreyousureyouwanttocontinueconnecting(yes/no)?yesWarning:Permanentlyadded'1'(RSA)tothelistofknownrsync@1'spasswordrsync 40962015/02/0522:38:44 02015/02/0522:38:4402015/02/0522:38:44 02015/02/0522:38:55 40962011/09/2319:50:20 02015/02/05 40962015/02/0600:08:31 02015/02/0522:38:26 40962015/02/0600:19:32 122882014/08/2807:44:04 40962014/08/2807:19:53 40962011/09/2319:50:20 02015/02/0522:38:26 40962015/02/0522:58:31 40962014/08/2807:23:12 40962014/08/2807:42:58var[root@nrfb~]#[root@nrfb~]#rsyncTheauthenticityofhost'2(2)'can'tbeRSAkeyfingerprintisAreyousureyouwanttocontinueconnecting(yes/no)?yesWarning:Permanentlyadded'2'(RSA)tothelistofknownrsync@2'spasswordrsync 40962015/02/0522:38:42 02015/02/0522:38:42 02015/02/0522:38:40 40962014/08/2807:50:04 40962014/08/2807:44:04 10242014/08/2807:44:48 38002015/02/0522:38:58 122882015/02/0600:31:27 40962015/02/0600:31:23 40962014/08/2807:38:15 122882014/08/2807:38:15 163842014/08/2807:19:34 40962013/11/2920:09:53 02015/02/0522:38:54 40962011/09/2319:50:20 02015/02/05 40962015/02/0600:29:26 02015/02/0522:38:25 40962015/02/0600:31:06 122882014/08/2807:44:04 40962014/08/2807:19:53 40962011/09/2319:50:20 02015/02/0522:38:25 40962015/02/0600:27:07 40962014/08/2807:23:12 40962014/08/2807:42:58var[root@nrfb~]#安裝[root@nrfb~]#yum-yinstallexpect.x86_640:5-DependencyInstalled:tcl.x86641:8.5.7-6.el6[root@nrfb~]#[root@nrfb~]#mkdir-p/opt/www/ROOT[root@nrfb~]#//編寫rsync傳輸,需實(shí)現(xiàn)自動(dòng)交互[root@nrfb~]vim/opt/rsync.shspawnrsync-az/opt/www/ROOT/rsync@1:/opt/www/ROOT/expect"password:"send"pwd@123\n"expecteofspawnrsync-az/opt/www/ROOT/rsync@2:/opt/www/ROOT/expect"password:"send"pwd@123\n"expecteof//給予 可執(zhí)行權(quán)[root@nrfb~]# od+x/opt/rsync.sh[root@nrfb~]#[root@nrfb~]#ls/opt/www/ROOT/[root@nrfb~]#[root@web1~]#ls/opt/www/ROOT/con_mysql.jsptest.jsp[root@web1~]#[root@web2ROOT]#ls/opt/www/ROOT/con_mysql.jsptest.jsp[root@web2[root@nrfb~]#touch/opt/www/ROOT/rsynctest.txt[root@nrfb~]#[root@nrfb~]#ls/opt/www/ROOT/[root@nrfb [root@nrfb~]#/opt/rsync.shspawnrsync-az/opt/www/ROOT/rsync@1:/opt/www/ROOT/rsync@1'spassword:spawnrsync-az/opt/www/ROOT/rsync@2:/opt/www/ROOT/rsync@2'spassword:[root@nrfb[root@web1~]#lsconmysql.jsprsynctest.txttest.jsp[root@web1~]#[root@web2ROOT]#ls/opt/www/ROOT/con_mysql.jsprsync_test.txttest.jsp[root@web2ROOT]#[root@nrfb~]#yum-yinstall[root@nrfb~]#//[root@nrfb~]#tarxvfinotify-tools-[root@nrfb~]#[root@nrfb~]#cdinotify-tools-3.14[root@nrfbinotify-tools-3.14]#[root@nrfbinotify-tools-3.14]#./configure&&make&&makemake[2]:Nothingtobedonefor`install-data-am'.make[2]:Leavingdirectory`/root/inotify-tools-3.14'make[1]:Leavingdirectory`/root/inotify-tools-3.14'[root@nrfbinotify-tools-3.14]#[root@nrfbinotify-tools-3.14]#which[root@nrfbinotify-tools-//編寫inotfywait文件 [root@nrfb~]#vim/opt/inotifywait.sh/usr/local/bin/inotifywait-mrq-ewhilereaddir;/opt/rsync.sh&>/dev/null////[root@nrfb od+x//執(zhí)行inotifywait.sh同步[root@nrfb~]/opt/inotifywait.sh[root@nrfb~]# 是否執(zhí)[root@nrfb~]#ps-ef|grep 1022:52 /usr/local/bin/inotifywait-mrq-e 1022:52 00:00:00 45451643022:54pts/0 00:00:00grepinotify[root@nrfb~]# 的現(xiàn)有文[root@nrfb~]#ls/opt/www/ROOT/rsynctest.txt[root@nrfb[root@web1~]#lsconmysql.jsprsynctest.txttest.jsp[root@web1~]#[root@web2~]#ls/opt/www/ROOT/con_mysql.jsprsync_test.txttest.jsp[root@web2~]#[root@nrfb~]#touch/opt/www/ROOT/rsync2.txt[root@nrfb~]#[root@nrfb~]#ls/opt/www/ROOT/rsync2.txtrsynctest.txt[root@nrfb~]#[root@web1~]#lscon_mysql.jsprsync2.txtrsync_test.txttest.jsp[root@web1~]#[root@web2~]#lscon_mysql.jsprsync2.txtrsync_test.txttest.jsp[root@web2~]#con_mysql.jsprsync2.txtrsync_test.txttest.jsp[root@web2~]#tomcat//jdk[root@nrfb~]#rpm-qa|grepjava-1.7.0-openjdk-5-.el6.x8664[root@nrfb[root@nrfb~]#tarxvfapache-tomcat-[root@nrfb~]#[root@nrfb~]#mvapache-tomcat-6.0.32/usr/local/tomcat[root@nrfb~]#tomcatmysql解壓連接[root@nrfb~]#unzipmysql-connector-java-[root@nrfb//拷貝tomcat連接mysql的驅(qū)動(dòng)包到tomcat的插件[root@nrfb~]cdmysql-connector-java-5.1.25[root@nrfbmysql-connector-java-5.1.25]#[root@nrfbmysql-connector-java-5.1.25]#cpmysql-connector-java-5.1.25-bin.jar/usr/local/tomcat/lib/[root@nrfbmysql-connector-java-5.1.25]#[root@nrfbmysql-connector-java-5.1.25]#[root@nrfb~]#/usr/local/tomcat/bin/startup.shUsingCATALINA_BASE:/usr/local/tomcatUsingCATALINA_HOME:/usr/local/tomcatUsingCATALINA_TMPDIR:/usr/local/tomcat/tempUsingJRE_HOME: UsingCLASSPATH: [root@nrfb~]#[root@nrfb~]#ps-ef|grep 12322:58 00:00:03org.apache.catalina.startup.Bootstrapstart 21762054022:58pts/0 00:00:00greptomcat[root@nrfb~]# //jsp[root@nrfb~]#cptest.jsp/usr/local/tomcat/webapps/ROOT/[root@nrfb~]# [root@nrfb~]#cpconmysql.jsp/usr/local/tomcat/webapps/ROOT/[root@nrfb~]# 為//128webapps修改為 <Hostname="localhost"appBase="webapps"root@nrfb~]#vim/usr/local/tomcat/conf/server.xml <Hostname="localhost"appBase="/opt/www"root@nrfb~]#[root@nrfb~]#/usr/local/tomcat/bin/shutdown.shUsingCATALINABASE:/usr/local/tomcatUsingCATALINAHOME:/usr/local/tomcatUsingCATALINA_TMPDIR:/usr/local/tomcat/tempUsingJRE_HOME: Using [root@nrfb~]#cp/root/test.jsp/opt/www/ROOT/[root@nrfb~]#cp/root/con_mysql.jsp/opt/www/ROOT/[root@nrfb~]#[root@nrfb~]#vim//1111<%for(inti=0;i<10;i++)dir=/opt/www/ROOT"+"<br>");o,JSP[root@nrfb~]#/usr/local/tomcat/bin/startup.shUsingCATALINA_BASE:/usr/local/tomcatUsingCATALINA_HOME:/usr/local/tomcatUsingCATALINATMPDIR:/usr/local/tomcat/tempUsingJREHOME: UsingCLASSPATH: [root@nrfb~]# 軟件[root@mysql~]#tarxvfjavapms.tar.gz[root@mysql~]#cdjavapms[root@mysqljavapms]#lsjavapms.sqlREADMEROOT[root@mysqljavapms]# 數(shù)據(jù)庫文[root@mysqljavapms]#mysql-uroot-ppwd@123<./javapms.sql[root@mysqljavapms]#[root@mysqljavapms]#mysql-uroot-WelcometotheMySQLmonitor.Commandsendwith;or\g.YourMySQLconnectionidis17241Serverversion:5.6.15MySQLCommunityServerCopyright(c)2000,2013,Oracleand/orits .Oracleisa ofOracleCorporationand/oritsaffiliates.Othernamesmaybe softheirrespectiveType'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputmysql>show | |information_schema| | |performance_schema| 5rowsinset(0.00mysql>useReadingtableinformationforcompletionoftableandcolumnnamesYoucanturnoffthisfeaturetogetaquickerstartupwith-ADatabasechangedmysql>showtables;|tqwork |tqwork 116rowsinset(0.00//解壓 壓縮[root@nrfb~]#tarxvf[root@nrfb~]#cdjavapms[root@nrfbjavapms]#lsjavapms.sqlREADMEROOT[root@nrfbjavapms]# [root@nrfbjavapms]#cp-rfROOT/*/opt/www/ROOT/[root@nrfbjavapms]#//[root@nrfb~]#killall-9[root@nrfb~]#/usr/local/tomcat/bin/startup.shUsingCATALINA_BASE:/usr/local/tomcatUsingCATALINA_HOME:/usr/local/tomcatUsingCATALINA_TMPDIR:/usr/local/tomcat/tempUsingJREHOME: UsingCLASSPATH: [root@nrfb~]#測(cè)試(tomcat1-3分鐘,1-3慢7. 為為任務(wù)五、調(diào)整web1、web2的服配置web1、web2可以正常web頁查看web1,web2數(shù)據(jù)是否同步,重重新啟動(dòng)每臺(tái)機(jī)器上的2個(gè)tomcat服[root@web1~]#ls/opt/www/ROOT/con_mysql.jspindex.jsppluginrsync2.txt [root@web1[root@web2~]#lsconmysql.jspindex.jspplugin rsync[root@web2[root@web1~]#killall-9java[root@web1~]#ps-ef|grepjava 2920028289000:03pts/100:00:00grep[root@web1//[root@web1~]#/usr/local/tomcat/bin/startup.shUsingCATALINABASE:/usr/local/tomcatUsingCATALINA_HOME:/usr/local/tomcatUsingCATALINA_TMPDIR:/usr/local/tomcat/tempUsingJRE_HOME: Using //[root@web1~]#/usr/local/tomcat2/bin/startup.shUsingCATALINA_BASE:/usr/local/tomcat2UsingCATALINAHOME:/usr/local/tomcat2UsingCATALINATMPDIR:/usr/local/tomcat2/tempUsingJREHOME: UsingCLASSPATH: [root@web1~]#[root@web1~] stat-anptu|grep0 00[root@web1[root@web2~]#killall-9java[root@web2~]#[root@web2~]#ps-ef|grep 3196530511007:47pts/0 00:00:00grepjava[root@web2~]#//[root@web2~]#/usr/local/tomcat/bin/startup.shUsingCATALINA_BASE:/usr/local/tomcatUsingCATALINA_HOME:/usr/local/tomcatUsingCATALINA_TMPDIR:/usr/local/tomcat/tempUsingJRE_HOME: UsingCLASSPATH: [root@web2~]#//[root@web2~]#/usr/local/tomcat2/bin/startup.shUsingCATALINABASE:/usr/local/tomcat2UsingCATALINAHOME:/usr/local/tomcat2UsingCATALINA_TMPDIR:/usr/local/tomcat2/tempUsingJRE_HOME: UsingCLASSPATH: [root@web2~]#//Web1//Web18080//Web18081//web28080端口測(cè)//web2//web28081squidsquidweb//squid[root@squid1~]#rpm-qa|grepsquid[root@squid1~]#//yumsquid[root@squid1~]#yum-yinstallsquid.x86_647:3.1.10-Dependencyperl-DBI.x86640:1.609-[root@squid1~]#[root@squid2~]#rpm-qa|grepsquid[root@squid2~]#[root@squid2~]#yum-yinstallsquid.x86647:3.1.10-19.el6Dependencyperl-DBI.x86_640:1.609-[root@squid2~]#////squid[root@squid1squid]#vim[root@squid1squid]#vim[root@squid1squid]#vim//squid[root@squid1squid]#servicesquidinit_cache_dir/var/spool/squid...正在啟動(dòng)squid:. [root@squid1squid]#[root@squid2squid]#servicesquidinit_cache_dir/var/spool/squid...正在啟動(dòng)squid:. [root@squid2squid]# 學(xué)習(xí)nginx服務(wù)的搭建與配配置naginx后端web服務(wù)//gccgcc-c++[root@nginx~]#yum-yinstallgccgcc-gcc.x86_640:4.4.7- gcc-c++.x86_640:4.4.7-Dependencycloog-ppl.x86640:0.15.7-1.2.el6 cpp.x8664libstdc++-devel.x86640:4.4.7-4.el6 mpfr.x8664ppl.x86_640:0.10.2-[root@nginx~]#//httpd[root@nginx~]#rpm-qa|grephttpd-2.2.15-29.el6.centos.x8664[root@nginx~]#[root@nginx~]#yum-yerasehttpdhttpd.x86_640:2.2.15-Dependencygnome-user-share.x86_640:2.28.2-[root@nginx~]#[root@nginx~]#rpm-qa|grephttp[root@nginx~]#[root@nginx~yumygroupinstall"開發(fā)工具autoconf.noarch0:2.63-5.1.el6 bison.x86_640:2.4.1- cscope.x86_640:15.6-6.el6 diffstat.x86_640:1.51-2.el6 flex.x86_640:2.5.35-8.el6 gcc-c++.x86640:4.4.7-4.el6 gcc-gfortran.x8664git.x86640:1.7.1-3.el64.1 indent.x8664intltool.noarch0:0.41.0-1.1.el6 patchutils.x86_640:0.3.1-3.1.el6 redhat-rpm-config.noarch0:9.0.3-42.el6.centosrpm-build.x86_64subversion.x86640:1.6.11-9.el64 swig.x8664systemtap.x86_640:2.3-Dependencycloog-ppl.x86_640:0.15.7-1.2.el6cpp.x86_640:4.4.7-4.el6gettext-devel.x86_640:0.17-16.el6gettext-libs.x86640:0.17-16.el6kernel-devel.x86640:2.6.32-libgcj.x86640:4.4.7-libgfortran.x86640:4.4.7-4.el6libstdc++-devel.x86_640:4.4.7-4.el6mpfr.x86_640:2.4.1-6.el6perl-Compress-Raw-Zlib.x86_641:2.021-136.el6perl-Compress-Zlib.x86_640:2.021-136.el6perl-Error.noarch1:0.17015-4.el6perl-Git.noarch0:1.7.1-3.el6_4.1perl-HTML-Parser.x86640:3.64-2.el6perl-HTML-Tagset.noarch0:3.20-perl-IO-Compress-Ba86640:2.021-136.el6perl-IO-Compress-Zlib.x86_640:2.021-136.el6perl-URI.noarch0:1.40-2.el6perl-XML-Parser.x86_640:2.36-7.el6perl-libwww-perl.noarch0:5.833-2.el6ppl.x86_640:0.10.2-11.el6 .x86_640:2.3-3.el6systemtap-devel.x86_640:2.3-3.el6//pcre-developenssl-devel[root@nginx~]#yum-yinstallpcre-developenssl-openssl-devel.x86_640:1.0.1e-15.el6 Dependencykeyutils-libs-devel.x86640:1.4-4.el6 krb5-devel.x8664libcom_err-devel.x86_640:1.41.12-18.el6libselinux-devel.x86_64libsepol-devel.x86_640:2.0.41-4.el6 [root@nginx~]#[root@nginx~]#tarxvfnginx-[root@nginx~]#[root@nginx~]#cdnginx-1.0.5[root@nginxnginx-1.0.5]#//nginx[root@nginxnginx-1.0.5]#useradd-s/sbin/nologin- //nginx[root@nginxnginx-1.0.5]#./configure-- --group=www--with-httpstubstatus--with-httpsslConfiguration+usingsystemPCRE+usingsystemOpenSSL+md5:usingOpenSSL+sha1:usingOpenSSL+usingsystemzlibnginxpathprefix:nginxbinaryfile:"/usr/local/nginx/sbin/ngi
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年股權(quán)變更協(xié)議模板解析版
- 2024年股東股權(quán)繼承轉(zhuǎn)讓協(xié)議3篇
- 2025版鋁合金門窗安裝與智能化控制系統(tǒng)集成服務(wù)合同3篇
- 2024年軟件開發(fā)與購(gòu)買許可合同
- 2025年度河道保潔及水質(zhì)改善合同3篇
- 2024年指定分包合同模板:綠色建筑屋頂綠化合同3篇
- 二零二五年度企業(yè)園區(qū)食堂運(yùn)營(yíng)承包協(xié)議2篇
- 二零二五年定制化勞務(wù)派遣與大型企業(yè)全面合作協(xié)議6篇
- 2024年股權(quán)遠(yuǎn)期交易標(biāo)準(zhǔn)合同書樣本版B版
- 二零二五年度二手房交易安全保障合同12篇
- 2024年認(rèn)證行業(yè)法律法規(guī)及認(rèn)證基礎(chǔ)知識(shí)
- GB 18613-2020 電動(dòng)機(jī)能效限定值及能效等級(jí)
- 指導(dǎo)小學(xué)生課外閱讀案例
- 全國(guó)婦聯(lián)統(tǒng)計(jì)軟件
- 【高中化學(xué)校本課程】《生活中的化學(xué)》校本教材
- 水資源管理培訓(xùn)材料課件
- SCA自動(dòng)涂膠系統(tǒng)培訓(xùn)講義
- 促銷活動(dòng)方案(共29頁).ppt
- 農(nóng)民專業(yè)合作社財(cái)務(wù)報(bào)表(三張表)
- 培訓(xùn)準(zhǔn)備工作清單
- 沉井工程檢驗(yàn)批全套【精選文檔】
評(píng)論
0/150
提交評(píng)論