Skip to content

Instantly share code, notes, and snippets.

@murtaugh
Last active June 27, 2018 18:31
Show Gist options
  • Save murtaugh/2cda3d1e13cd3eb11d043ccd747352d3 to your computer and use it in GitHub Desktop.
Save murtaugh/2cda3d1e13cd3eb11d043ccd747352d3 to your computer and use it in GitHub Desktop.

(This is an updated version of my own tutorial for EE2.)

  1. Create your droplet. Name it, select your size and location, then hit the Applications tab and select (as of this writing) "LAMP on 14.04". Add your SSH key if you want, and submit.

  2. Make sure mod_rewrite is enabled, with a2enmod rewrite.

  3. If you like, increase PHP's upload_max_filesize and post_max_filesize values by editing the php.ini file, with this: nano /etc/php/7.0/apache2/php.ini

  4. Give Apache a restart: service apache2 restart

  5. Run mysql_secure_installation. It will ask for the initial mysql root password which is saved in /root/.digitalocean_password.

  6. Log in to MySQL: mysql -u root -p (It will prompt you for your password.)

  7. Create a new user, so we aren't using root all the time: CREATE USER [NEW USERNAME]@'%' IDENTIFIED BY '[NEW PASSWORD]';

  8. Grant the new user full access: GRANT ALL PRIVILEGES ON * . * TO '[NEW USERNAME]'@'%';

  9. FLUSH PRIVILEGES; and exit out of MySQL.

  10. Restart MySQL: service mysql restart

  11. Make sure .htaccess is enabled for rewrites. Open the Apache config file: sudo nano /etc/apache2/sites-available/000-default.conf (In my limited experience, this file name is subject to change as new versions of Ubuntu are realeased, so if Nano opens an empty file, that ain't it.)

  12. Add this directory statement and save:

    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
    
  13. Give Apache a restart: service apache2 restart

  14. Your web root is at /var/www/html, you can now upload EE's files via SFTP.

  15. Create the DB for EE. Log back in to MySQL: mysql -u [your new user's name] -p

  16. Enter CREATE DATABASE [new DB name];. Exit MySQL.

  17. You can now go to your droplet's IP address /admin.php and run EE's installer.

Et voila.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment