EC2 安裝 Apache PHP MySQL

使用EC2 像使用任何Linux主機一樣使用虛擬機。安裝軟件,我們用Yum安裝器來安裝Apache服務器,輸入下面的命令來安裝Apache:php

sudo yum install httpdmysql

下一步,用如下命令安裝PHP:sql

sudo yum install phpapache

通過下面的命令安裝php-mysql擴展:wordpress

sudo yum install php-mysql
sudo yum install mysql-serverrest

好了,安裝完成開始準備測試Apache。用下面的命令啟動Apache(你能夠用「stop」或「restart」來中止或重啟Apache):server

sudo /etc/init.d/httpd startstring

http://www.hkitmag.com/amazon-elastic-cloud-wordpressit

=====================================================================================
Programs can be easily installed with the yum command. So lets start by installing Apache with the command line:ast

yum install httpd

And then start apache with command:

service httpd start

Now we’ll install PHP and some needed libraries:

yum install php libmcrypt libmcrypt-devel php-mcrypt php-mbstring

yum install php-mcrypt
yum install php-mbstring

After which we’ll want to restart Apache:

service httpd restart

Install MySQL

yum install mysql
yum install –y mysql-server

Start MySQL Server

service mysqld start
/etc/init.d/mysqld start

Now we can assign a MySQL Server password

/usr/bin/mysqladmin -u root password ‘[PASSWORD]‘

相關文章
相關標籤/搜索