<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by RONGXIN LIU on Medium]]></title>
        <description><![CDATA[Stories by RONGXIN LIU on Medium]]></description>
        <link>https://medium.com/@rongxin-liu?source=rss-22698af5a087------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YHrhHhXYe8KBN11wU27qcg.jpeg</url>
            <title>Stories by RONGXIN LIU on Medium</title>
            <link>https://medium.com/@rongxin-liu?source=rss-22698af5a087------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 15:39:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rongxin-liu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Build LAMP Stack and Setup Wordpress on AWS EC2 (Ubuntu)]]></title>
            <link>https://medium.com/@rongxin-liu/build-lamp-stack-and-setup-wordpress-on-aws-ec2-ubuntu-f5b06fcc46f9?source=rss-22698af5a087------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5b06fcc46f9</guid>
            <category><![CDATA[amazon]]></category>
            <category><![CDATA[ec2-instance]]></category>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[RONGXIN LIU]]></dc:creator>
            <pubDate>Tue, 04 Jun 2019 11:21:03 GMT</pubDate>
            <atom:updated>2019-06-16T16:22:39.268Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building LAMP Stack and Setup Wordpress on Amazon EC2 (Ubuntu)</h3><p>This article will guide you through the process of building your own LAMP stack and install Wordpress on Amazon EC2 instance running Ubuntu. In theory, the methods depicted in this article should naturally support actual machine running Ubuntu as well (I have tested it with Ubuntu 18.04 LST in VM).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LyS5KnH5fH7SiHWa" /></figure><h3><strong>TL;DR</strong></h3><p>We will fly through the required steps to bring up an EC2 instance, configure LAMP stack, install and run Wordpress properly. The whole process should take about 10–15 minutes, depending on AWS instance configuration and packages installation, for detailed explanation on each steps, please see the “Explained” section.</p><h4>I. Launch a new EC2 instance on AWS</h4><ol><li>For AMI, select <strong>Ubuntu Server 18.04 LTS (HVM), SSD Volume Type </strong>or<strong> ami-09c81ecf1c2b2ef70</strong></li><li>Choose instance type as <strong>t2.micro (free tier eligible)</strong>, choosing other instance type should be fine (do aware of additional cost).</li><li>Configure instance details as needed, if not, just skip to <strong>review and launch</strong>.</li><li>A new EC2 instance should now be appeared in the console (<strong>wait for initialization to complete</strong>).</li></ol><h4>II. Install necessary packages</h4><p>To speed up our installation process, I have created two auto-configuration scripts, which essentially install all the required package and perform Wordpress post-installation configuration.</p><p>You can view the scripts on my GitHub repository:</p><p><a href="https://github.com/rongxin-liu/lamp_wordpress_setup">https://github.com/rongxin-liu/lamp_wordpress_setup</a></p><ol><li>SSH into the newly launched EC2 instance,<strong> run as root (sudo -i).</strong></li><li>Download the scripts:</li></ol><pre>curl https://io-rongxinliu-lamp-wordpress-autoconfig.s3-ap-northeast-1.amazonaws.com/autoConfig_LAMP_Wordpress.sh &gt; autoConfig_LAMP_Wordpress.sh</pre><pre>curl https://io-rongxinliu-lamp-wordpress-autoconfig.s3-ap-northeast-1.amazonaws.com/autoConfig_post_installation_config.sh &gt; autoConfig_post_installation_config.sh</pre><p>3. First execute the script — ‘autoConfig_LAMP_Wordpress.sh’</p><pre>sudo bash autoConfig_LAMP_Wordpress.sh</pre><p><em>CAUTION: When configuring ufw, make sure you allow ssh traffic, otherwise the instance could not be accessed via ssh, and you might need to terminate the instance and launch a new one.</em></p><p>4. Change directory to /etc/apache2, then modify the apache2.conf file:</p><pre><strong>BEFORE:</strong></pre><pre>&lt;Directory /var/www/&gt;<br>        Options Indexes FollowSymLinks<br>        AllowOverride <strong>None</strong><br>        Require all granted<br>&lt;/Directory&gt;</pre><pre><strong>AFTER:</strong></pre><pre>&lt;Directory /var/www/&gt;<br>        Options Indexes FollowSymLinks<br>        AllowOverride <strong>All</strong><br>        Require all granted<br>        <strong>Allow from All</strong><br>&lt;/Directory&gt;</pre><h4>III. Configure MySQL Database</h4><ol><li>Make sure you are still run as root in the terminal. Start the MySQL shell by executing: <strong>/usr/bin/mysql -u root -p</strong></li><li>Within the MySQL shell (mysql&gt; ), execute the following commands:</li></ol><pre>use mysql</pre><pre>UPDATE mysql.user SET authentication_string = PASSWORD(&#39;password&#39;) WHERE User = &#39;root&#39;;</pre><pre>ALTER USER &#39;root&#39;@&#39;localhost&#39; IDENTIFIED WITH mysql_native_password BY &#39;password&#39;;</pre><pre>FLUSH PRIVILEGES;</pre><pre>CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;</pre><pre>GRANT ALL ON wordpress.* TO &#39;wordpressadmin&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;password&#39;;</pre><pre>FLUSH PRIVILEGES;</pre><pre>SELECT User, Host, authentication_string FROM mysql.user;</pre><pre>EXIT</pre><p>In sum, it sets a password for MySQL, creates a database for Wordpress and an admin account for managing Wordpress database. You should substitute ‘password’ with your preferred combination as well as replacing ‘wordpressadmin’ with your desired account name.</p><h4>IV. Install WordPress</h4><ol><li>Obtain your instance’s public IP address in the AWS console and visit it via browser. You should be seeing the WordPress Installation page.</li><li>Configure Wordpress by providing necessary credentials, which is set previously.</li><li>Once configured, SSH into the instance again then execute the script — “<strong>autoConfig_post_installation_config.sh</strong>”.</li></ol><pre>sudo bash autoConfig_post_installation_config.sh</pre><p>4. Wordpress should now running properly.</p><h3>Explained</h3><p>Detailed procedure will be updated soon, meanwhile, please let me know if there is any problem with the tutorial and I’ll be happy to update it :)</p><h3>Reference</h3><ul><li><a href="https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-18-04-quickstart">How To Install the Apache Web Server on Ubuntu 18.04 [Quickstart] | DigitalOcean</a></li><li><a href="https://support.rackspace.com/how-to/installing-mysql-server-on-ubuntu/">Rackspace Support Documentation</a></li><li><a href="https://hostadvice.com/how-to/how-to-install-apache-mysql-php-on-an-ubuntu-18-04-vps/">How To Install Apache, MySQL &amp; PHP on an Ubuntu 18.04 VPS or Dedicated Server | HostAdvice</a></li><li><a href="https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lamp-on-ubuntu-18-04">How To Install WordPress with LAMP on Ubuntu 18.04 | DigitalOcean</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5b06fcc46f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>