Uyifaka njani iTomcat 8 kwi-Ubuntu 15.10 Server

Ubuntu apache

I-Apache Tomcat, okanye ngokulula iTomcat njengoko yaziwa ngakumbi, sisiqulatho somthombo wewebhu ovulekileyo kunye neeseva kunye nenkxaso yePhepha leJavaServer Isicelo (iJSPs) esenziwe yiApache Software Foundation. Injini yeTomcat servlet ihlala iboniswa ngokudibeneyo neseva ye-Apache yewebhu, njengoko ibonisa ikhowudi yeJava eyimfuneko ukuyiphumeza kwindalo esingqongileyo.

Ngeyona ndlela ilula, uTomcat uqhuba umsebenzi omnye ngaphakathi kwinkqubo ngenkqubo kuMatshini oSebenzayo weJava. Isicelo ngasinye esilandelayo se-HTTP kwisikhangeli ukuya kwi-Tomcat senziwa ngentambo eyahlukileyo, kuba iTomcat inezixhobo eziyimfuneko kunye noqwalaselo lokuzilawula. Ukucwangciswa kukaTomcat kugcinwa kwiifayile ezilula zeXML ezinokuphononongwa kwaye zihlelwe ngobuninzi bezixhobo. Kwisifundo esilandelayo Siza kukufundisa indlela yokufaka esi sixhobo siluncedo kwinkqubo yakho ye-Ubuntu 15.10 Server, yona ngoku efikelela kuguqulelo 8.

Ukufakwa kweTomcat 8

Ukufaka iTomcat 8, ukuba awuyifakanga ngokungagqibekanga kwinkqubo yakho yokufaka, kulula njengokufaka le miyalelo ilandelayo kwi-terminal:

sudo apt-get install tomcat8 tomcat8-docs tomcat8-admin tomcat8-examples

Phendula ngokuqinisekileyo kumbuzo ukuba ufuna ukufaka Tomcat. Oku kuyakubandakanya ukuxhomekeka okukuyo kwiiphakheji zeJava kwaye kuyakwenza ukuba kube ngumsebenzisi we-tomcat8 kwinkqubo yakho. Ukongeza, usetyenziso luya kuqala ngeparameter yalo emiselweyo.

Ukuba ufuna ukuzama usetyenziso fikelela kwindawo yakho okanye idilesi ye-IP kumatshini olandelwa lizibuko 8080 kuso nasiphi na isikhangeli.

http://your_ip_address:8080

Uya kuthi emva koko ubone isicatshulwa esithi "Iyasebenza!", Kunye nolunye ulwazi olongezelelweyo.

UTomcat 8 uzibophelele

Uqwalaselo lweTomcat 8 lunokuguqulwa kulungelelwaniso lwewebhu uqobo. Ukukuvumela kunye nakho konke ukusebenza kwayo kuya kufuneka uhlele ifayile ebekwe ngaphakathi /etc/tomcat8/tomcat-users.xml

sudo vi /etc/tomcat8/tomcat-users.xml

Yongeza le migca ilandelayo:

<role rolename="manager"/>
<role rolename="admin"/>
<user name="admin" password="secret_password" roles="manager,admin"/>

Gcina kwaye uyeke ukuhlela ifayile. Ngoku kuya kufuneka ukwazi ukubona nokulawula iserver kwidilesi http://tu_dirección_ip:8080/manager/html. Ungafikelela ngegama kunye negama lokugqitha elimiselweyo /etc/tomcat8/tomcat-users.xml.

En / var / lib / tomcat8 zizikhombisi conf, iinkuni, iiwebhu y msebenzi. En Iiwebhu kulapho ii-servlets ziya kubanjelwa khona (okanye ubuncinci ifayile yoqwalaselo yeXML ekhomba kubo).

Njengendlela yokuvavanya iserver, unokukhuphela ezi zinto zilandelayo ifayile yesicelo kwaye uyihambise kwiphepha lolawulo (ngaphakathi kwecandelo le- ukuhambisa ungabona iqhosha lokufaka ifayile kwiserver yakho). Ngokukhetha ungenza lo myalelo ulandelayo kulawulo Iiwebhu de Tomcat y umncedisi uya kuyamkela ngokuzenzekelayo ifayile yesicelo sewebhu kwaye ayandise ngaphandle kongenelelo olungaphaya kwicala lakho:

wget http://simple.souther.us/SimpleServlet.war

Ngoku, faka le ndlela ilandelayo kwisikhangeli sakho: http: //eyakho_ip_adress:I-8080 / i-SimpleServlet /

Uyicwangcisa kanjani iTomcat ukumamela kwizibuko 80

Ukuba uyafuna Guqula ichweba lokumamela likaTomcat liye kwi-80 kufuneka ulandele le nkqubo ilandelayo. Kuqala hlela ifayile ebekwe kwi /etc/tomcat8/server.xml.

sudo vi /etc/tomcat8/server.xml

Emva koko khangela isicatshulwa apho sithi Isinxibelelanisi port = »8080 ″ kwaye ubeke elinye ixabiso nge Isinxibelelanisi port = »80 ″. Gcina kwaye uphume kwimowudi yokuhlela ifayile.

Ngoku kufuneka uqalise kwakhona iseva yeTomcat ngalo myalelo ulandelayo:

sudo /etc/init.d/tomcat8 restart

Umxholo wenqaku uyabambelela kwimigaqo yethu imigaqo yokuziphatha yokuhlela. Ukuxela impazamo cofa apha.

Yiba ngowokuqala ukuphawula

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa.

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.