日期:2014-05-16  浏览次数:21030 次

[AmazonEC2] 在instance上安装apache+php+mysql+phpmyadmin

1.用putty链接instance,以root身份运行并进入root根目录下


2.更新amazon linux,输入yum update 回车,如有更新要求你输入y/n,输入y回车,就回自动更新系统。

3.更新完毕后开始安装apache php myadmin(amazon linux 自带上述软件,所以可以直接下载更新),粘贴以下内容并回车
yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql
登上15秒左右就回安装完毕


4.启动apache和mysql
service httpd start??
service mysqld start(此步会自动安装数据库)

[root@ip-10-117-55-165 ~]# service mysqld start
Initializing MySQL database:? Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h ip-10-117-55-165 password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.? This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL da