Configuring Ubuntu AWS EC2 server instance to support PHP and MySQL with Faizan Nabi

Updated by Faizan Nabi on July 05, 2018

Share it on :


Configuring Ubuntu AWS EC2 server instance to support PHP and MySQL with Faizan Nabi

In order to make your server support PHP and Mysql, you need to go through following steps: Connect to your Ubuntu EC2 instance via SSH through following command, only after opening the terminal in the directory where you have your downloaded key: sudo ssh -i "key_file_name.pem" ubuntu@hostname (You may be asked for your local machine admin password) 2. Once logged in type the following commands step by step: sudo apt-get install apache2 -> for installing Apache server, sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/apache2/apache2.conf -> for disabling directory listing from browser, sudo apt-get update && sudo apt-get upgrade -> for updating and upgrading your server, sudo apt-get install php7.0-common php7.0-gd php7.0-mcrypt php7.0-curl php7.0-intl php7.0-xsl php7.0-mbstring php7.0-zip php7.0-iconv mysql-client -> for installing PHP 7.0 along with its extensions, (Extensions required for Magento only taken into consideration here. Other applications may require more or less than these extensions) 3. Next, run the commands below to stop, start and enable Apache2 service to always start up with the server boots : sudo systemctl stop apache2.service, sudo systemctl start apache2.service, sudo systemctl enable apache2.service, 4. Confirm you’re using Apache version 2.4: apache2 -v If this shows version 2.2 or another version, upgrade Apache before proceeding 5. Next, change directory to html by typing the following command in console : cd /var/www/html/ 6. Create a file named “info.php” by using following commands : sudo nano info.php Editor gets opened in your console. Type <?php phpinfo(); ?> Now Press Ctrl + X and then Enter 7. Hola! Your server is ready. Logon to your domain or IP and you’ll find a page displaying your server configuration.


Key Features to Look for in a Salesforce Cisco Integration
Learn Amazon Web Services (AWS) basics with Faizan Nabi
This app will tell you how long airport security wait times will be
IoT becomes BIoT
Machine learning is helping computers spot arguments online before they happen
AWS analytics tools help make sense of big data
Are ‘you’ just inside your skin or is your smartphone part of you
Machine Learning and AI trends for 2018: What to Expect
4th Gen Core i7 vs 8th Gen Core i7: Is It Worth the Upgrade for PC Gamers
Google's new browser experiment lets you learn about basic AI



@hash_peers