環境:Amazon Elastic Compute Cloud (Amazon EC2)
工具:putty
- 使用yum安裝[root@ip-XXX-XXX-XXX-XXX ec2-user]# yum install httpd php mysql
- 開機自動啟動
- 設定開機自動啟動Apache:[root@ip-XXX-XXX-XXX-XXX ec2-user]# /sbin/chkconfig httpd on
- 新增MySQL服務至自動啟動設定:[root@ip-XXX-XXX-XXX-XXX ec2-user]# /sbin/chkconfig –add mysqld
- 設定開機自動啟動MySQL:[root@ip-XXX-XXX-XXX-XXX ec2-user]# /sbin/chkconfig mysqld on
- 設定開機自動啟動Apache:[root@ip-XXX-XXX-XXX-XXX ec2-user]# /sbin/chkconfig httpd on
- 啟動服務
- 啟動Apache:[root@ip-XXX-XXX-XXX-XXX ec2-user]# /sbin/service httpd start
- 啟動MySQL:[root@ip-XXX-XXX-XXX-XXX ec2-user]# /sbin/service mysqld start
- 啟動Apache:[root@ip-XXX-XXX-XXX-XXX ec2-user]# /sbin/service httpd start
- 設定MySQL管理者密碼:[root@ip-XXX-XXX-XXX-XXX ec2-user]# mysqladmin -u root password ‘NEWPASSWORD’
沒有留言:
張貼留言