简体   繁体   English

使用apache,java,tomcat,mysql设置AMI linux微型实例

[英]Setting up a AMI linux micro instance with apache, java, tomcat, mysql

I'm trying to setup my first Linux environment on the amazon cloud but seem to be missing something. 我正在尝试在亚马逊云上设置我的第一个Linux环境,但是似乎缺少了一些东西。 I have zero experience with Linux, so a complete newbie. 我对Linux零经验,所以是一个完整的新手。

What I've done thus far. 到目前为止,我所做的。

 1. I've created the Linux instance. 2. I was able to SSH in with putty. 3. installed jdk 7 using yum install java-1.7.0-openjdk 4. installed tomcat using yum install tomcat7 5. installed mysql using yum install mysql55 6. I started tomcat using /etc/init.d/tomcat7 start 

When I open a new page in my browser and go to my ip, I do not see the tomcat page? 当我在浏览器中打开新页面并转到ip时,看不到tomcat页面?

Do I need to install apache2? 我需要安装apache2吗? If so, how do I go about doing that? 如果是这样,我该怎么做?

Lastly, what else would I need to do in order to deploy my first a jar to tomcat? 最后,为了将第一个jar部署到tomcat,我还需要做什么?

If anybody knows of a step by step tutorial, that would be helpful too. 如果有人知道分步教程,那也将有所帮助。

I am writing this answer based on my previous experience, upload your application to the linux server using scp, syntax (scp -i your_ssh_key.pem user_name@ip_address.com:/home/) and move that app to your tomcat7 webapp folder, mostly in etc/tomcat7/webapp/ (I am not sure though) and rename your app to ROOT first so that when ever you hit the URL it will load your app. 我根据以前的经验编写此答案,使用scp,语法(scp -i your_ssh_key.pem user_name@ip_address.com:/ home /)将您的应用程序上载到linux服务器,并将该应用程序移动到您的tomcat7 webapp文件夹中,在etc / tomcat7 / webapp /中(虽然我不确定),然后将您的应用程序重命名为ROOT,这样,当您点击URL时,它将加载您的应用程序。 You can also see the ROOT folder which already exists. 您还可以看到已经存在的ROOT文件夹。 You have to replace with your application and restart the tomcat7 server. 您必须替换为您的应用程序,然后重新启动tomcat7服务器。 Hope it should work. 希望它能工作。 BTW can u mention which flavor of linux are u running, like ubuntu, centos or amazon linux etc? 顺便说一句,您能提到您正在运行哪种Linux操作系统,例如ubuntu,centos或Amazon Linux等吗?

考虑将其移至https://serverfault.com/https://unix.stackexchange.com/,因为在部署Tomcat,MySQL和任何其他依赖项时可能会获得更好的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM