Adding a non-root user for yourself
adduser jay
usermod -aG sudo jay
exit
Now that you have a user set up for yourself, be sure to log out and log in as that user before continuing.
Updating the hostname
Edit the following files in order to add your hostname or domain name to your instance.
sudo nano /etc/hostname
sudo nano /etc/hosts
Install updates
Before continuing, we should make sure we have everything up to date to benefit from all current security patches for Ubuntu.
sudo apt update
sudo apt dist-upgrade
Reboot the instance
sudo reboot
Install Apache
sudo apt install apache2
systemctl status apache2
Set up MariaDB
sudo apt install mariadb-server
sudo mariadb
CREATE DATABASE wordpress_db DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
SHOW DATABASES;
GRANT ALL PRIVILEGES ON wordpress_db.* TO wordpress_user@localhost IDENTIFIED BY 'secret_password';
FLUSH PRIVILEGES;
EXIT;
Download and Extract WordPress
wget https://wordpress.org/latest.zip
sudo apt install unzip
unzip latest.zip
sudo -R chown www-data:www-data wordpress
mv wordpress /var/www
Add a configuration file for WordPress to Apache
sudo nano /etc/apache2/sites-available/wordpress.conf
<virtualhost>
DocumentRoot /var/www/wordpress
<directory var="" wordpress="" www="">
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Require all granted
</directory>
<directory var="" wordpress="" wp-content="" www="">
Options FollowSymLinks
Require all granted
</directory>
</virtualhost>
sudo a2dissite 000-default.conf
sudo a2ensite wordpress.conf
Install additional required packages
sudo apt install libapache2-mod-php php-curl php-gd php-intl php-mbstring php-mysql php-soap php-xml php-xmlrpc php-zip
sudo a2enmod rewrite
sudo systemctl restart apache2
After all of that, access your site and then fill out form in the web browser. Then, you’re all set!
----------------
1. Point your domain to your VPS
You need to make sure eglomyanmar.com points to your VPS public IP.
-
Log in to your domain registrar (where you bought
eglomyanmar.com). -
Go to DNS settings or Manage DNS.
-
Add or edit the following A records:
| Type | Name | Value (IP) | TTL |
|---|---|---|---|
| A | @ | Your VPS IP | 3600 |
| A | www | Your VPS IP | 3600 |
-
Wait for DNS propagation. This can take up to 24 hours, but usually works within a few hours.
You can check DNS propagation with:
Post a Comment