简体   繁体   English

如何在EC2上启动Apache

[英]How to start Apache on EC2

I'm an absolute newbie to EC2. 我是EC2的绝对新手。 My goal is to run a php-mysql-website on EC2. 我的目标是在EC2上运行一个php-mysql网站。

I've just setup a new instance based on this ami 我刚刚根据这个ami设置了一个新实例

It seems that apache isn't running? 看来apache没有运行? How do I start apache? 我该如何启动apache? Is there a general tutorial on how to start EC2 as a web server? 是否有关于如何将EC2作为Web服务器启动的一般教程?

Thanks! 谢谢!

It really depends on the distribution you have chosen. 这实际上取决于您选择的分布。 Typically, though, you can start Apache using the init scripts. 但是,通常,您可以使用init脚本启动Apache。 For example, on Ubuntu server it will be: 例如,在Ubuntu服务器上它将是:

sudo /etc/init.d/apache2 start

On CentOS or Redhat it might be: 在CentOS或Redhat上它可能是:

sudo /etc/init.d/httpd start

For Suse 11, try 对于Suse 11,试试吧

 rcapache2 status
 rcapache2 start

If it is not installed, you can install with 如果未安装,则可以安装

yast2 --install apache2

for a tutorial on LAMP with this server, check 有关使用此服务器的LAMP教程,请检查

http://www.susegeek.com/internet-browser/install-configure-lamp-apachemysqlphp-in-opensuse-110/ http://www.susegeek.com/internet-browser/install-configure-lamp-apachemysqlphp-in-opensuse-110/

sudo apt-get update sudo tasksel sudo apt-get update sudo tasksel

and enjoy. 享受。

If you are running bitnami's Drupal Stack, you can 如果你正在运行bitnami的Drupal Stack,你可以

1) cd /opt/bitnami 2) sudo bash (enter password) 3) sh ctlscript.sh restart 1)cd / opt / bitnami 2)sudo bash(输入密码)3)sh ctlscript.sh restart

this will restart the LAMP stack 这将重新启动LAMP堆栈

Well, you need to set up a LAMP server. 那么,你需要设置一个LAMP服务器。 To install LAMP server with one command, try the following: 要使用一个命令安装LAMP服务器,请尝试以下操作:

sudo apt-get install lamp-server^ 

Note that the last ^ is not a typo, it's included in the command. 请注意,最后的^不是拼写错误,它包含在命令中。 See this page for more information. 有关更多信息,请参阅页面。

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

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