####Create a web server in EVE-NG ######
# Go to Eve web page
# Add a New Node "Linux-TinyCore"
# Edit Change RAM-512 MB
# Change Server Name
# Connect to "Management Cloud0" This is for connecting the box to internet
# Start the box and change the network settings to dhcp to get an ip
# change root password "open a terminal and Enter below command"
sudo su
passwd
# Install and start ssh
# open a new terminal and Enter below command
tce-load -w -i openssh
#start ssh service
sudo su "this command is for root terminal access"
cd /usr/local/etc/init.d/
./openssh start
#Close the terminal
#Install Web-server
# open a new terminal and Enter below command
tce-load -wi busybox-httpd.tcz
#Create a directory for index.html file
sudo mkdir /mnt/sda1/wwwsite
# Copy Index File
# From Local PC sftp to local ip of the box "if config (to get the local IP of the box)" using root credential - Use Winscp for this
# Copy index.html file to /mnt/sda1/wwwsite
#Edit bootloader to load everything whenever you boot the box
sudo vi /opt/bootlocal.sh
# press Esc, i To Edit
# Copy index file to webserver directory
cp /mnt/sda1/wwwsite/index.html /usr/local/httpd/bin/index.html
cd usr/local/httpd/bin
./busybox httpd -p 80 -h /usr/local/httpd/bin/
cd /usr/local/etc/init.d/
./openssh start
cd /etc/init.d/services/
./tftpd start
# press Esc, :, w, q, Enter "to save the change"
filetool.sh -b
sudo reboot
#Completed. Now go to browser Eg: http://192.168.88.136 "You should be able to see the index.html page which you created.
Works great, thanks!
ReplyDelete