You are on page 1of 7

Optimizing the Server Environment for

TechSolutions Inc.
Enhancing File Management, Backup, and Automation
File System Organization
 Findings:
◦ Created a directory structure with
dedicated folders for Documents,
Backups, and Applications.
 Challenges Faced:
◦ Ensuring the correct permissions for
each directory.
◦ Deciding on an appropriate location for
the server files.
 Solutions Implemented:
◦ Utilized the mkdir command with the -p
option for creating nested directories.
◦ Chose /srv/TechSolutions as the root
directory.
Effective Data Analysis with VIM
 vim filename.sh => to create a new shell script
 vim /opt/TechSolutions/filesearch.sh
 Add the following content to filesearch.sh:
 #!/bin/bash
 if [ $# -eq 0 ]; then
 echo "Usage: $0 <keyword>"
 exit 1
 fi
 keyword="$1"
 grep -rn "$keyword" /opt/TechSolutions/Documents
◦ Make the script executable : chmod +x filesearch.sh
 ./filesearch.sh memo or bash filesearch.sh
◦ usuage : filesearch.sh "TechSolutions"
◦ chmod +x create_techsolutions_structure.sh
◦ ./create_techsolutions_structure.sh
Using Nginx Web Server
 Discuss the importance of setting up a trusted web server and
selecting Nginx for it.
 Installation: Describe the steps taken to install Nginx using

apt or yum package managers.


 Configuration: Describe in detail the Nginx framework for

serving basic HTML pages, emphasizing its initial framework


for serving web content.
code:

 Update package list:sudo apt update


 Install Nginx:sudo apt install nginx
 Create a simple HTML page:
 echo "<html><body><h1>Welcome to TechSolutions

Inc.</h1></body></html>" | sudo tee


/var/www/html/index.html
 Restart Nginx to apply changes:sudo systemctl restart nginx
Managing File Backups
 Discuss the importance of automatic backups for data
protection and recovery.
 Backup Script: Explain the 'backup_script.sh' function,

emphasizing its role in downloading and saving the


Documents directory.
 Schedule: To ensure regular backups and automated backups,

detail the cron tasks you will use to run backup scripts at 2
am each night.
Improved Server Performance
 Summarize progress and improvements in the overall
environment.
 Summary: Review implemented solutions for file management,

information search, server configuration, and automatic


backup.
 Future steps: Discuss possible future improvements or

expansions while promoting continuous improvement of the


server environment.

You might also like