Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion 3 linux.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ echo "-----------------------------"
sleep 2
curl ifconfig.me

This is week 4 - project test
echo -e "\n===========================" && sleep 2
echo -e "This is week 4 - project test for \"$name\"\n Thank you"
38 changes: 38 additions & 0 deletions 38 template
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

# check and update system
sudo yum check-update
sudo yum -y update # -y bypass inquiry step and automatically execute update

# install Apache HTTP web server
sudo yum -y install httpd # install the Apache HTTP webserver

# start the web server
sudo systemctl start httpd # start the web server
sudo systemctl enable httpd # enable the server for start up upon (re)boot
sudo systemctl status httpd # check the server status


# change directory ownership so current user can write in webser directory
sudo chown -R $USER:$USER /var/www
# change webserver directory attribute for all users to access webpage content
sudo chmod -R 755 /var/www
cd /var/www/html/

# write index.html using echo statements below
echo "<!DOCTYPE html>" > index.html
echo "<html>" >> index.html
echo " <head>" >> index.html
echo " <title>Level It Up ~!!!</title>" >> index.html
echo " <meta charset=\"UTF-8\">" >> index.html
echo " </head>" >> index.html
echo " <body>" >> index.html
echo " <h2>Welcome to Level Up in Tech</h2>" >> index.html
echo " <h3>This web server is run on EC2 instance!!</h3>" >> index.html
echo " <h3>Date of creation: Feb. 10, 2023</h3>" >> index.html
echo " <h3>Date of correction: Feb. 11, 2023</h3>" >> index.html
curl ifconfig.me >> index.html
echo " <h4>Cheer Up, Gold Team!!</h4>" >> index.html
echo " </body>" >> index.html
echo "</html>" >> index.html
# cat /var/www/html/index.html
Morty Proxy This is a proxified and sanitized view of the page, visit original site.