The path to opening Amazon AWS

Source: Internet
Author: User
Tags ldap pear php mysql

First, according to the official website to help files, new instances, download putty files and puttygen files according to the tutorial with the user name ec2-user login instance.

--------------- This is the premise -----------------

1. because the ec2-user does not have the permission to the operating system, you need to enter the root permission, and change the SSH Login mode for the familiar user name and password mode (although the feeling is not very safe, but then the security of the system will also have a vulnerability, the key is that hackers do not want to attack you );

# Sudo passwd Root

# Password1

# Password1

Set Root Password

# Su Root

# Password1

Enter root permission

Next, change the login method to password.

# Vim/etc/ssh/sshd_config

Enter the/number key to start searching for passwordauthentication No

Press the I key to enter the editing mode.

Set the line without the # sign before the segment,

Change No to Yes

Exit the editing mode with the ESC key.

Shift + ZZ save and exit by double-clicking Z

Command

# Sudo/sbin/service sshd restart

Restart sshd

# Passwd ec2-user

Change the password for the ec2-user

Two new passwords

In the future you can directly use ec2-user and root login AWS, without the key

If you can only use the ec2-user port password login, login # su root can also enter the root permission

Write this article first, to be continued, do not understand the post, and make progress together!

Thanks for the original address: http://www.kankanews.com/ICkengine/archives/108965.shtml to provide ideas, respect for the original author

 

 

-------------------- Stage 2 --------------------------------

2. Enable appache PHP MySQL ..

Direct command:

# 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

The installation will be completed later.

Set the password of the root account of the MySQL database.
Mysqladmin-u Root Password 'newpassword' [enter the password in quotation marks]

Make MySQL database more secure
Mysql-u root-P [This requires you to enter the password you just set, enter it and press Enter.

Mysql> drop database test; [Delete the test database]
Mysql> Delete from mysql. User where user = "; [deleting anonymous accounts]
Mysql> flush privileges; [reload permissions]

According to the above installation method, the default site directory configured is/var/www/html/to create a PHP script:
<? PHP
Phpinfo ();
?>

If the test fails, use the start command.

# Service httpd start

# Service mysqld start

 

2. Install phpMyAdmin
Go to phpMyAdmin official download (do not use the latest version, next phpMyAdmin 2.11.9.5 on the line, more than 3.1 on PHP 5.2), upload to your website directory, and then configure. You can do this in just a few steps.
I. config. sample. Inc. php changed its name to config. Inc. php;
Ii. Open the config. Inc. php file and make the following changes;
// $ Cfg ['servers'] [$ I] ['controluser'] = 'pma ';
// $ Cfg ['servers'] [$ I] ['controlpass'] = 'pmapass ';
// $ Cfg ['servers'] [$ I] ['pmadb'] = 'phpmyadmin ';
// $ Cfg ['servers'] [$ I] ['bookmarktable'] = 'pma _ bookmark ';
// $ Cfg ['servers'] [$ I] ['relation'] = 'pma _ relation ';
// $ Cfg ['servers'] [$ I] ['table _ info'] = 'pma _ table_info ';
// $ Cfg ['servers'] [$ I] ['table _ coords '] = 'pma _ table_coords ';
// $ Cfg ['servers'] [$ I] ['pdf _ page'] = 'pma _ pdf_pages ';
// $ Cfg ['servers'] [$ I] ['column _ info'] = 'pma _ column_info ';
// $ Cfg ['servers'] [$ I] ['History '] = 'pma _ history ';
// $ Cfg ['servers'] [$ I] ['designer _ coords '] = 'pma _ designer_coords ';

Remove the // before each line //;
Ii. $ cfg ['blowfish _ secret'] = "; | modified to | $ cfg ['blowfish _ secret'] = 'http ';
IV. $ cfg ['servers'] [$ I] ['controluser'] = 'pma '; | modify 'pma' to your account | $ cfg ['servers'] [$ I] ['controlpass'] = 'pmapass '; | set 'pmapass to your MySQL logon password |
V. $ cfg ['blowfish _ secret'] = "; | add a phrase password, for example, $ cfg ['blowfish _ secret'] = 'onohot ';



3. // install PHP Extension
Yum-y install PHP-Gd PHP-xml php-mbstring PHP-ldap php-pear PHP-XMLRPC



4. // install Apache Extension

Yum-y install httpd-manual mod_ssl mod_perl mod_auth_mysql


5. configure the firewall
Add HTTP and FTP ports

Iptables-I RH-Firewall-1-INPUT-M state -- state new-m tcp-p tcp -- dport 21-J acceptiptables-I RH-Firewall-1-INPUT-M state -- state new-M TCP-P TCP -- dport 80 -J accept
Restart iptables: Service iptables restart

 

The path to opening Amazon AWS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.