Build a website

Zhiyuan Xu Lv1

The following steps would guide you on building a website

  1. Setup a server for your website
  • Go to oracle.com. Click the view account on the top right corner and select register an account
  • Type in the necessary information to register. drawing
  • Login to your account. Setup duo authentication if necessary
  • click the symbol on the top left, select compute, and select instancedrawing
  • click on Edit for image and shape, change the image to “Ubuntu 24.04”, the shape to drawing drawing drawing drawing
  • scroll down to the part where it says add ssh-key. save both public and private keydrawing
  • scroll down to the bottom of the page and click create instance. You should be guided to the page where it says provisioning. Wait until it says running. This means your server has been set updrawing
  1. Setup connection between your computer and your server
  • download and install VSCode depending on your system
  • install the SSH plugin in vscode. You should see three of themdrawing
  • click on the search bar, type >ssh, click on connect to host, and then click configure ssh, then click the first one on the listdrawing drawing
  • copy the following code to the file. Replace “your_ip” and “your_key” part with your instance’s public ip and ssh key
    1
    2
    3
    4
    Host your_ip
    HostName your_ip
    User ubuntu
    IdentityFile ~/Downloads/your_key
    drawing drawing
  • click on the search bar again, click on connect to host, then click the one with your ip addressdrawing
  • wait until the setup is complete. When the connection is set it would ask you which operating system you are using. Click on Linux. drawing
  1. setup your server
  • click on the triple dots on the top left and select terminal -> new terminal.drawing
  • paste the following code into your terminal line by line
    1
    2
    3
    4
    5
    6
    7
    8
    9
    sudo apt update && sudo apt upgrade -y
    sudo apt install apache2 -y
    sudo systemctl start apache2
    sudo systemctl enable apache2
    sudo apt install ufw -y
    sudo ufw allow OpenSSH
    sudo ufw allow 'Apache'
    sudo ufw enable
    sudo reboot
  • go to your oracle compute instance and click on the subnetdrawing
  • click on the default security listdrawing
  • click on the add ingress rule, and type in 0.0.0.0 for the CIDR field. Select all protocol in the IP protocol fielddrawing drawing
  • copy and paste your ip address to a new page. If it is not showing up, wait a few minutes before trying again. If everything works, you should be able to see a sample page in your server. This means all setup so far are correct.
  • Title: Build a website
  • Author: Zhiyuan Xu
  • Created at : 2025-03-25 09:02:35
  • Updated at : 2025-03-25 22:24:25
  • Link: https://redefine.ohevan.com/Build-a-website/
  • License: This work is licensed under CC BY-NC-SA 4.0.
Comments
On this page
Build a website