{"_id":"5bb50de8f4c98f000355d570","project":"54cf411f9d09bb0d00a17a1c","version":{"_id":"54cf411f9d09bb0d00a17a1f","project":"54cf411f9d09bb0d00a17a1c","__v":16,"createdAt":"2015-02-02T09:19:27.656Z","releaseDate":"2015-02-02T09:19:27.656Z","categories":["54cf41209d09bb0d00a17a20","54cfb99bbba1a023008741af","54cfb9a65ff7e617002bbd7f","54cfba03bba1a023008741b6","54cfba0ebba1a023008741b8","54cfba19bba1a023008741b9","54cfba29bba1a023008741bb","54cfba345ff7e617002bbd87","54cfba3ebba1a023008741bc","54cfba473995cf0d0006f6f0","54e371b18ef7552300409bf2","54e37aa5e887c50d005ef629","555a4e9b147f91190092d137","56b0e91802f4bc0d006ce254","5bb4f4e01635b500032b94fd","5c05a785ceb5b80220cf0e93"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"5bb4f4e01635b500032b94fd","project":"54cf411f9d09bb0d00a17a1c","version":"54cf411f9d09bb0d00a17a1f","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2018-10-03T16:57:04.619Z","from_sync":false,"order":7,"slug":"migrating","title":"Migrating Your Workspace"},"user":"5bac0709475b5d000364fa42","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-10-03T18:43:52.754Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"There are several ways that you can install an app framework in your new AWS Cloud9 EC2 development environment. \n\n* [Install WordPress](installing-an-app-framework#section-to-install-wordpress)\n* [Install other app frameworks](installing-an-app-framework#section-to-install-other-app-frameworks)\n\n# To install WordPress\n\nFollow these instructions to install WordPress into your new AWS Cloud9 EC2 development environment that is connected to either an Ubuntu Server 18.04 LTS or Amazon Linux instance.\n\n* [Ubuntu Server 18.04 LTS](installing-an-app-framework#section-to-install-wordpress-on-ubuntu-server-18-04-lts)\n* [Amazon Linux](installing-an-app-framework#section-to-install-wordpress-on-amazon-linux)\n\n## To install WordPress on Ubuntu Server 18.04 LTS\n\nWith the AWS Cloud9 IDE already open for your new AWS Cloud9 EC2 development environment, do the following:\n\n1. Start MySQL. To do this, run the command `sudo service mysql start` in a terminal session in the IDE. (To display the terminal, on the main menu in the IDE, choose **Window, Terminal**.)  \n2. Configure MySQL. To do this, run the command `sudo mysql_secure_installation`. When prompted, enter the following:\n    1. **Would you like to setup VALIDATE PASSWORD plugin?** Type `y`, and press `Enter`.\n    2. **There are three levels of password validation policy:** Type `0`, `1`, or `2`, and press `Enter`.\n    3. **New password:** Type a password, and press `Enter`. \n    4. **Re-enter new password:** Re-type the password, and press `Enter`. (Be sure to save this password in a secure location.)\n    5. **Do you wish to continue with the password provided?** Type `y`, and press `Enter`.\n    6. **Remove anonymous users?** Type `y`, and press `Enter`.\n    7. **Disallow root login remotely?** Type `y`, and press `Enter`.\n    8. **Remove test database and access to it?** Type `y`, and press `Enter`.\n    9. **Reload privilege tables now?** Type `y`, and press `Enter`.\n3. Create a MySQL database for the WordPress site to use. To do this, run the command `sudo mysqladmin -uroot create <your_db_name>`, for example `sudo mysqladmin -uroot create mysite`. (Be sure to save this database name in a secure location.)\n4. Log in in to the MySQL console. To do this, run the command `sudo mysql -uroot -p`. When prompted, type the password that you specified earlier, and press `Enter`.\n5. Create a MySQL user for the WordPress site to use. To do this, run the command `GRANT ALL PRIVILEGES ON *.* TO '<username>':::at:::'localhost' IDENTIFIED BY '<password>';`, for example `GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' IDENTIFIED BY 'wordpress-password';`. (Be sure to save this user name and password in a secure location.)\n6. Exit the MySQL console. To do this, run the command `exit;`.\n7. If you have an existing MySQL database in your Cloud9 workspace that you used with your WordPress site and you want to bring it into your new AWS Cloud9 EC2 development environment, do the following:\n    1. In a separate web browser tab or window, open the Cloud9 workspace, and from a terminal session in the IDE for that workspace, run the command `mysqldump -u username -p <your_db_name> > dump.sql`, for example `mysqldump -u username -p mysite > dump.sql`.   \n    2. Right-click the `dump.sql` file in the **Workspace** window, and then choose **Download**. Follow the on-screen instructions to download this file to your local computer.\n    3. Back in the AWS Cloud9 IDE, on the main menu, choose **File, Upload Local Files**. Follow the on-screen instructions to upload this file to your **Environment** window.\n    4. Run the command `sudo mysql -u root -p <your_db_name> < dump.sql`, for sudo mysql -u root -p mysite < dump.sql`.\n8. Download WordPress. To do this, run the command `wget http://wordpress.org/latest.tar.gz`.\n9. Extract the WordPress files from the download. To do this, run the command `tar -xzvf latest.tar.gz`.\n10. Rename the `wp-config-sample.php` file in the `wordpress` folder that was extracted to `wp-config.php`. To do this, in the **Environment** window, expand the `wordpress` folder, right-click the `wp-config-sample.php` file, choose **Rename**, change the file name to `wp-config.php`, and then press `Enter`.\n11. Open the `wp-config.php` file, change the following, and then save the file:\n\n    ```\n    define( 'DB_NAME', 'your_db_name, for example mysite' );\n\n    /** MySQL database username */\n    define( 'DB_USER', 'username_here, for example wordpress' );\n\n    /** MySQL database password */\n    define( 'DB_PASSWORD', 'password_here, for example wordpress-password' );\n\n    /** MySQL hostname */\n    define( 'DB_HOST', 'localhost' );\n    ```\n\n12. Open the `index.php`, and then choose the **Run** button in the main menu bar. The **PHP (built-in web server)** runner starts.\n13. On the main menu, choose the **Preview, Preview Running Application**. A new window opens in the IDE. A **Not Found** page displays--this is expected.\n14. Click the **Pop Out Into New Window** icon button. A **Not Found** page displays--this is expected.\n15. In the new web browser window's address bar, add `/wordpress/` to the end of the URL, and then press `Enter`. This is  to make sure that the original URL matches the root of your environment.\n16. When the WordPress install wizard displays, complete the on-screen instructions to finish installing WordPress.\n\nAfter you finish installing WordPress, you can start working on your new WordPress site.\n\n## To install WordPress on Amazon Linux\n\nWith the AWS Cloud9 IDE already open for your new AWS Cloud9 EC2 development environment, do the following:\n\n1. Start MySQL. To do this, run the command `sudo service mysqld start` in a terminal session in the IDE. (To display the terminal, on the main menu in the IDE, choose **Window, Terminal**.) \n2. Create a MySQL database for the WordPress site to use. To do this, run the command `sudo mysqladmin -uroot create <your_db_name>`, for example `sudo mysqladmin -uroot create mysite`. (Be sure to save this database name in a secure location.)\n3. Configure MySQL. To do this, run the command `sudo mysql_secure_installation`. When prompted, enter the following:\n    1. **Enter current password for root (enter for none):** Press `Enter`.\n    2. **Set root password?** Type `Y`, and press `Enter`.\n    3. **New password:** Type a password, and press `Enter`. \n    4. **Re-enter new password:** Re-type the password, and press `Enter`. (Be sure to save this password in a secure location.)\n    5. **Remove anonymous users?** Type `Y`, and press `Enter`.\n    6. **Disallow root login remotely?** Type `Y`, and press `Enter`.\n    7. **Remove test database and access to it?** Type `Y`, and press `Enter`.\n    8. **Reload privilege tables now?** Type `Y`, and press `Enter`.\n4. Download WordPress. To do this, run the command `wget http://wordpress.org/latest.tar.gz`.\n5. Extract the WordPress files from the download. To do this, run the command `tar -xzvf latest.tar.gz`.\n6. Rename the `wp-config-sample.php` file in the `wordpress` folder that was extracted to `wp-config.php`. To do this, in the **Environment** window, expand the `wordpress` folder, right-click the `wp-config-sample.php` file, choose **Rename**, change the file name to `wp-config.php`, and then press `Enter`.\n7. Open the `wp-config.php` file, change the following, and then save the file:\n\n    ```\n    define( 'DB_NAME', 'your_db_name, for example mysite' );\n\n    /** MySQL database username */\n    define( 'DB_USER', 'username_here, for example wordpress' );\n\n    /** MySQL database password */\n    define( 'DB_PASSWORD', 'password_here, for example wordpress-password' );\n\n    /** MySQL hostname */\n    define( 'DB_HOST', 'localhost' );\n    ```\n\n8. Open the `index.php`, and then choose the **Run** button in the main menu bar. The **PHP (built-in web server)** runner starts.\n9. On the main menu, choose the **Preview, Preview Running Application**. A new window opens in the IDE. A **Not Found** page displays--this is expected.\n10. Click the **Pop Out Into New Window** icon button. A **Not Found** page displays--this is expected.\n11. In the new web browser window's address bar, add `/wordpress/` to the end of the URL, and then press `Enter`. This is  to make sure that the original URL matches the root of your environment.\n12. When the WordPress install wizard displays, complete the on-screen instructions to finish installing WordPress.\n\nAfter you finish installing WordPress, you can start working on your new WordPress site.\n\n# To install other app frameworks\n\nAWS Cloud9 EC2 development environments come preinstalled with various app frameworks such as Apache and Node.js. For a list of other preinstalled components, see [AMI Contents](https://docs.aws.amazon.com/cloud9/latest/user-guide/ami-contents.html) in the *AWS Cloud9 User Guide*.\n\nFor other app frameworks, then with your AWS Cloud9 environment [open](https://docs.aws.amazon.com/cloud9/latest/user-guide/open-environment.html), see the following web-provided content:\n\n* [Apache](http://httpd.apache.org/docs/current/install.html)\n* [Node.js](https://nodejs.org/en/download/package-manager/)\n* [Django](https://docs.djangoproject.com/en/2.1/topics/install/)\n* [Ruby on Rails](http://installrails.com/)","excerpt":"","slug":"installing-an-app-framework","type":"basic","title":"Installing an App Framework"}

Installing an App Framework


There are several ways that you can install an app framework in your new AWS Cloud9 EC2 development environment. * [Install WordPress](installing-an-app-framework#section-to-install-wordpress) * [Install other app frameworks](installing-an-app-framework#section-to-install-other-app-frameworks) # To install WordPress Follow these instructions to install WordPress into your new AWS Cloud9 EC2 development environment that is connected to either an Ubuntu Server 18.04 LTS or Amazon Linux instance. * [Ubuntu Server 18.04 LTS](installing-an-app-framework#section-to-install-wordpress-on-ubuntu-server-18-04-lts) * [Amazon Linux](installing-an-app-framework#section-to-install-wordpress-on-amazon-linux) ## To install WordPress on Ubuntu Server 18.04 LTS With the AWS Cloud9 IDE already open for your new AWS Cloud9 EC2 development environment, do the following: 1. Start MySQL. To do this, run the command `sudo service mysql start` in a terminal session in the IDE. (To display the terminal, on the main menu in the IDE, choose **Window, Terminal**.) 2. Configure MySQL. To do this, run the command `sudo mysql_secure_installation`. When prompted, enter the following: 1. **Would you like to setup VALIDATE PASSWORD plugin?** Type `y`, and press `Enter`. 2. **There are three levels of password validation policy:** Type `0`, `1`, or `2`, and press `Enter`. 3. **New password:** Type a password, and press `Enter`. 4. **Re-enter new password:** Re-type the password, and press `Enter`. (Be sure to save this password in a secure location.) 5. **Do you wish to continue with the password provided?** Type `y`, and press `Enter`. 6. **Remove anonymous users?** Type `y`, and press `Enter`. 7. **Disallow root login remotely?** Type `y`, and press `Enter`. 8. **Remove test database and access to it?** Type `y`, and press `Enter`. 9. **Reload privilege tables now?** Type `y`, and press `Enter`. 3. Create a MySQL database for the WordPress site to use. To do this, run the command `sudo mysqladmin -uroot create <your_db_name>`, for example `sudo mysqladmin -uroot create mysite`. (Be sure to save this database name in a secure location.) 4. Log in in to the MySQL console. To do this, run the command `sudo mysql -uroot -p`. When prompted, type the password that you specified earlier, and press `Enter`. 5. Create a MySQL user for the WordPress site to use. To do this, run the command `GRANT ALL PRIVILEGES ON *.* TO '<username>'@'localhost' IDENTIFIED BY '<password>';`, for example `GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost' IDENTIFIED BY 'wordpress-password';`. (Be sure to save this user name and password in a secure location.) 6. Exit the MySQL console. To do this, run the command `exit;`. 7. If you have an existing MySQL database in your Cloud9 workspace that you used with your WordPress site and you want to bring it into your new AWS Cloud9 EC2 development environment, do the following: 1. In a separate web browser tab or window, open the Cloud9 workspace, and from a terminal session in the IDE for that workspace, run the command `mysqldump -u username -p <your_db_name> > dump.sql`, for example `mysqldump -u username -p mysite > dump.sql`. 2. Right-click the `dump.sql` file in the **Workspace** window, and then choose **Download**. Follow the on-screen instructions to download this file to your local computer. 3. Back in the AWS Cloud9 IDE, on the main menu, choose **File, Upload Local Files**. Follow the on-screen instructions to upload this file to your **Environment** window. 4. Run the command `sudo mysql -u root -p <your_db_name> < dump.sql`, for sudo mysql -u root -p mysite < dump.sql`. 8. Download WordPress. To do this, run the command `wget http://wordpress.org/latest.tar.gz`. 9. Extract the WordPress files from the download. To do this, run the command `tar -xzvf latest.tar.gz`. 10. Rename the `wp-config-sample.php` file in the `wordpress` folder that was extracted to `wp-config.php`. To do this, in the **Environment** window, expand the `wordpress` folder, right-click the `wp-config-sample.php` file, choose **Rename**, change the file name to `wp-config.php`, and then press `Enter`. 11. Open the `wp-config.php` file, change the following, and then save the file: ``` define( 'DB_NAME', 'your_db_name, for example mysite' ); /** MySQL database username */ define( 'DB_USER', 'username_here, for example wordpress' ); /** MySQL database password */ define( 'DB_PASSWORD', 'password_here, for example wordpress-password' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' ); ``` 12. Open the `index.php`, and then choose the **Run** button in the main menu bar. The **PHP (built-in web server)** runner starts. 13. On the main menu, choose the **Preview, Preview Running Application**. A new window opens in the IDE. A **Not Found** page displays--this is expected. 14. Click the **Pop Out Into New Window** icon button. A **Not Found** page displays--this is expected. 15. In the new web browser window's address bar, add `/wordpress/` to the end of the URL, and then press `Enter`. This is to make sure that the original URL matches the root of your environment. 16. When the WordPress install wizard displays, complete the on-screen instructions to finish installing WordPress. After you finish installing WordPress, you can start working on your new WordPress site. ## To install WordPress on Amazon Linux With the AWS Cloud9 IDE already open for your new AWS Cloud9 EC2 development environment, do the following: 1. Start MySQL. To do this, run the command `sudo service mysqld start` in a terminal session in the IDE. (To display the terminal, on the main menu in the IDE, choose **Window, Terminal**.) 2. Create a MySQL database for the WordPress site to use. To do this, run the command `sudo mysqladmin -uroot create <your_db_name>`, for example `sudo mysqladmin -uroot create mysite`. (Be sure to save this database name in a secure location.) 3. Configure MySQL. To do this, run the command `sudo mysql_secure_installation`. When prompted, enter the following: 1. **Enter current password for root (enter for none):** Press `Enter`. 2. **Set root password?** Type `Y`, and press `Enter`. 3. **New password:** Type a password, and press `Enter`. 4. **Re-enter new password:** Re-type the password, and press `Enter`. (Be sure to save this password in a secure location.) 5. **Remove anonymous users?** Type `Y`, and press `Enter`. 6. **Disallow root login remotely?** Type `Y`, and press `Enter`. 7. **Remove test database and access to it?** Type `Y`, and press `Enter`. 8. **Reload privilege tables now?** Type `Y`, and press `Enter`. 4. Download WordPress. To do this, run the command `wget http://wordpress.org/latest.tar.gz`. 5. Extract the WordPress files from the download. To do this, run the command `tar -xzvf latest.tar.gz`. 6. Rename the `wp-config-sample.php` file in the `wordpress` folder that was extracted to `wp-config.php`. To do this, in the **Environment** window, expand the `wordpress` folder, right-click the `wp-config-sample.php` file, choose **Rename**, change the file name to `wp-config.php`, and then press `Enter`. 7. Open the `wp-config.php` file, change the following, and then save the file: ``` define( 'DB_NAME', 'your_db_name, for example mysite' ); /** MySQL database username */ define( 'DB_USER', 'username_here, for example wordpress' ); /** MySQL database password */ define( 'DB_PASSWORD', 'password_here, for example wordpress-password' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' ); ``` 8. Open the `index.php`, and then choose the **Run** button in the main menu bar. The **PHP (built-in web server)** runner starts. 9. On the main menu, choose the **Preview, Preview Running Application**. A new window opens in the IDE. A **Not Found** page displays--this is expected. 10. Click the **Pop Out Into New Window** icon button. A **Not Found** page displays--this is expected. 11. In the new web browser window's address bar, add `/wordpress/` to the end of the URL, and then press `Enter`. This is to make sure that the original URL matches the root of your environment. 12. When the WordPress install wizard displays, complete the on-screen instructions to finish installing WordPress. After you finish installing WordPress, you can start working on your new WordPress site. # To install other app frameworks AWS Cloud9 EC2 development environments come preinstalled with various app frameworks such as Apache and Node.js. For a list of other preinstalled components, see [AMI Contents](https://docs.aws.amazon.com/cloud9/latest/user-guide/ami-contents.html) in the *AWS Cloud9 User Guide*. For other app frameworks, then with your AWS Cloud9 environment [open](https://docs.aws.amazon.com/cloud9/latest/user-guide/open-environment.html), see the following web-provided content: * [Apache](http://httpd.apache.org/docs/current/install.html) * [Node.js](https://nodejs.org/en/download/package-manager/) * [Django](https://docs.djangoproject.com/en/2.1/topics/install/) * [Ruby on Rails](http://installrails.com/)