ftp, back-up server and esxiwiki.netseclab.mu.edu.tr/images/c/c7/ftp_backup_server_and_esxi.pdf ·...
TRANSCRIPT
FTP, Back-Up Server and ESXI .
Tolga Kacur
340709006
Mugla Sitki Kocman University
Computer Engineering Department
Senior Design Project Report 2
17.01.2017
0
Tolga Kacur
Computer Engineering Department
Mugla Sitki Kocman University
17.01.2017
Summary
In this report, I describe the general installation and use of ESXI and FTP. What can be
done in the ESXI environment, what is the ease of use it brings us. What can be done with FTP
Server and how to transfer files.
1
Table of Contents
1. Introduction ............................................................................................................................. 2
2. Installation of ESXI and Simulation ....................................................................................... 2
ESXI – Customize Run ............................................................................................................... 3
Installation of ESXI ..................................................................................................................... 4
License .................................................................................................................................... 4
ESXI New Virtual Machine Creation ..................................................................................... 7
ESXI Data Storing ................................................................................................................ 12
ESXI User Assignment ......................................................................................................... 14
3. Setup of FTP Server .............................................................................................................. 17
4. Back-Up Server ..................................................................................................................... 23
5. Conclusions ........................................................................................................................... 28
6. References ............................................................................................................................. 29
2
1. Introduction
ESXI is a Linux-based operating system in its own right. ESXI product is free. For ESXI
installation, you have to be a member of the official site. You can also choose which version you
want to install later. I will tell you how to install version 2.7.2. After you become a member, you
will receive an e-mail with the language key. You can download and install the required ISO file
from the VMware homepage. The first step is to install it. In the second step, we choose the
VMware ESXI system on our computer. You can also do disk partitioning from this area. Then,
we call enter reboot. After VMware ESXI setup is finished, we need to set manual IP assignment,
password and username. You can see the phases of the setup and the virtualization on the
following.
FTP Server (File Transport Protocol) is an internet protocol developed to transfer files from
one computer to another (in both directions), and is the generic name given to application programs
that do this job. FTP is one of the first developed internet protocols.
2. Installation of ESXI and Simulation
First, we need to download the ESXI customizer v2.7.2. After that, we need ESXI ISO file to
install. At the same time, the system needs to learn the NIC (Network Information Server) brand
and model in detail. (Mother board can cause trouble if not supported). If you encounter such a
problem, follow this link; [1]
Figure 1: ESXI installation web page.
3
You need to call the network card from here [2]. There are VIB or Offline Bundle packages
in this site. You have to find the one that suits your model. It also needs version compatibility.
ESXI – Customize Run
In the first option, we choose the original ESXI ISO file. (Figure 1.1) The second option is
VIB or OFFLINE BUNDLE (Figure 1.2). In the third option, we choose the destination folder, ie
where it will appear.
Figure 1.1
When the program runs, it will compile the ISO. After that, we need to burn it as DVD or USB.
Figure 1.2
4
Installation of ESXI
Restart the PC and enter the BIOS. Normally default is off. For this reason, we need to
enable Intel virtualization technology "enable" from Advanced CPU configuration in BIOS. If it
is not already, it does not support it. After this step, we are going to set up the network according
to the connected network.
License
We are entering www.vmware.com. From the VMware account we go to Profile > Products
> My download history view Download and Licenses (Figure 1.3) and (Figure 1.4).
Figure 1.3
5
Figure 1.4
After this step, you can access the route from Vsphere Client and configure > Licensed
Features > Edit > Assign a new license key to this host > Enter key. We copy the password shown
in Figure 1.4 and end the process. (Figure 1.5, Figure 1.6, Figure 1.7, Figure 1.8)
Figure 1.5
6
Figure 1.6
Figure 1.7
7
Figure 1.8
ESXI New Virtual Machine Creation
First, we provide route access from the Vsphere Client. Then we call create virtual machine
(Figure 1.9)
Figure 1.9
8
Here we choose the custom > name: "Example" > Select a destination storage for the virtual
machine files "netseclab" > virtual machine version (Figure 2.1).
Figure 2.1
After saying "Next", the tab of the guest operating system will come up. We choose which
operating system to load here (Figure 2.2)
Figure 2.2
9
After we call ‘Next’, Select the number of virtual machines on the CPU's heap virtual
machine, configure the virtual machine's memory size (we call next after memory is set for you)
> Which network connectors will be used by the virtual machine > Select a Disk (Figure 2.3)
Figure 2.3
Next, we select the Browse > NetSeclab > open > NetSeclab folder > Netseclab.vmdk
(Figure 2.4).
Figure 2.4
10
In the Advanced options section, click persistent and say next. In the Ready to complete
section, select Edit and continue. (Figure 2.5)
Figure 2.5
Virtual machine properties tab is coming. You can choose the CentOS 6.5 folder > open >
select the centos6.5-x86 iso file > connect at power on and Finish. (Figure 2.6)
Figure 2.6
11
After doing this, we have created a virtual machine named “ornek”. We are running this
(Figure 2.7). Centos 6 opens after you run. We enter it as root (Figure 2.8)
Figure 2.7
Figure 2.8
12
ESXI Data Storing
We will see how to upload and download from the data store. We can change the Roundrobini.
First, we provide route access from the Vsphere Client. From 10.1.1.248 (update to 10.1.0.250) on
our ip, we click on summary. (Figure 2.9)
Figure 2.9
Here we come to the storage area and select "NetSeclab", and then right click on NetSeclab
and enter the properties. (Figure 3.1)
Figure 3.1
13
Select Manage paths> Path selection> Round robin> Refresh> Close (Figure 3.2)
Figure 3.2
Go back to storage again, right click and select browse data store. Real folders will come. We
call the new folder from the menu and specify the name. After doing this, we call the upload file.
You can upload anything you want from here. ESXI-customizer v.2.7.2 open. Installation begins.
Now you can download the ESXI-customizer v.2.7.2 exe whenever you want.
Download > Images > Ok. (Figure 3.3)
Figure 3.3
14
Later, we upload Ubuntu 14.04.1 by following the same procedure. We go back to the main
screen. Netseclab > CD / DVD drive 1 > Connect to ISO image on a datastore > windowsx (if
you use which name you choose that folder) > ubuntu 14.04.1 > OK. When we do these
operations, you can now install Ubuntu. (Figure 3.4)
Figure 3.4
ESXI User Assignment
First, we provide route access from the vSphere Client. In 10.1.1.248 (newly updated state
10.1.0.250) we call users > right click > Add respectively. (Figure 3.5)
Figure 3.5
15
Login = Ubuntu, User name = "You can enter whatever you want. Depending on the user ",
Password = "The part you will specify", confirm: "The part you will specify", Ok.
(Figure 3.6 and Figure 3.7)
Figure 3.6
Figure 3.7
Go to the main screen and call Ubuntu > permission > right click > Add permission > add >
Ubuntu > add > OK. (Figure 3.8 and Figure 3.9)
16
Figure 3.8
Figure 3.9
On the screen that comes up, select Assigned role, Administrator and click on the Ok button.
Role is becoming an administrator. (Figure 4.1)
Figure 4.1
We are closing the Vsphere Client. We're running again. This time we are logging in the
"user name" part and the "ubuntu" password part. We can only see Ubuntu. Netseclab and geolab
do not appear. Now we can use it like we want here. (Figure 4.2)
Figure 4.2
17
3. Setup of FTP Server
I have already told you about ESXI virtualization. In the same way we implemented FTP
Server in a virtual environment. First, we provide route access to the 10.1.0.250 IP. (Figure 4.3)
Figure 4.3
We created a user named "Netseclab-ftp" and we run it. (Figure 4.4)
Figure 4.4
18
We install CentOS 6.8 (you can install another operating system if you want) into the
"Netseclab-ftp" user we have created. (Figure 4.5)
Figure 4.5
After doing these things, we need to install CentOS Web Panel (CWP). For this, there are some
commands that we need to load from the terminal. After entering root as root:
cd / usr / local / src
wget http://dl1.centos-webpanel.com/files/cwp-latest.sh
chmod u + x cwp-latest.sh
sh cwp-latest.sh
After we download the installation file to the relevant directory, we can start the installation
process now. We have 2 options for the installation process. One of them is the installation file
that comes with MySQL 5.1 and the other is the installation file that comes with Maria-DB 10.1.10.
If you want to use the database system, you need to use one of the following 2 commands and start
the installation process.
For MySQL ; sh cwp-latest
For Maria-DB : sh cwp-latest -d mariadb
19
The installation will start automatically after you start the installation process. After the installation
is complete, the server needs to be restarted. Pressing the ENTER key restarts the server. After
restarting the server, you can access CentOS Web Panel from http://localhost:2030 from any
network browser. First, we will create a business user account. Then enter the username and
password. (Figure 4.6)
Figure 4.6
After connecting http://localhost: 2030, we are entering Ftp-account from File management and
script installers. (Figure 4.7)
Figure 4.7
20
Here, we can create a new domain and user account and grant permissions. (Figure 4.8)
Figure 4.8
We create an anonymous file under the SRV file in the file system of our computer. We create a
folder named Ftp in it (see links and notes of last day.) We created an area under the name
Anonymous which users can use and download data only. (Figure 4.9)
Figure 4.9
There are many ways to do data transfer over ftp after creating them. The best practice is either
ftp: // "can write IP address" or the most practical method is remote server connection protocol.
You can use the FileZilla program for this.
21
What is FileZilla?
FileZilla is the remote server connection protocol. The simple interface allows you to
connect to many different types of fragmented server types that might come to mind, such as
hosting, reseller, VPS or such. As an extremely fast and sophisticated system, it has attracted
attention and at the same time has been completely free to use. For this reason, it is also in the
first place among the FTP connection programs that our country's systemists most prefer.
Thanks to this system, there is no process left on the server, and even if it is halfway, the internet
can continue to recover from the place where it was formerly collected. This, in fact, provides
very serious benefits to the practitioner. To download FileZilla [3]
After completing the installation of FileZilla 10.1.0.202 to the host part username:
Anonymous, then we call QuickConnect. (Figure 4.9)
Figure 4.9
22
In this section, we have successfully made a connection. If it was not successful, either the
host address or the username would have been entered incorrectly. (Figure 5.1)
Figure 5.1
As you can see in the photo below, I tried not to install FTPS, but the upload did not
work because it was only allowed to download. But when we connect as admin, all permissions
are open. We can change the name of the file, delete it, upload it. (Figure 5.2)
Figure 5.2
23
Here you can see that we can download files as anonymous. The download was successful
only because the download permission was granted. (Figure 5.3)
Figure 5.3
4. Back-Up Server
I've told you about ESXi virtualization before. In the same way we have set up a Backup
server in a virtual environment. First, we provide route access to the 10.1.0.250 ip. We have
installed the operating system "CentOS 6.8" (you can install another operating system if you want)
into the "Backup" user we have created. After doing these things, we install Amanda which is
necessary to install Backup server. For this we connect to the terminal as root. Then we apply the
following commands respectively.
Setup Server (gamma)
1. Install Amanda with yum:
yum -y install amanda
2. Edit Amanda conf in xinetd.d:
vi /etc/xinetd.d/amanda
vi /etc/xinetd.d/amandaidx
vi /etc/xinetd.d/amidxtape
Change Disable = yes to Disable = no
3. Copy Amanda conf files:
cp -r /etc/amanda/DailySet1 /etc/amanda/intra
24
4. Edit amanda.conf:
vi /etc/amanda/intra/amanda.conf
org "Configuration name"
mailto "email"
netusage 600 Kbps
dumpcycle 2 weeks
runspercycle 10
tapecycle 15 tapes
#tpchanger "chg-manual"
tpchanger "chg-disk"
changerfile "/etc/amanda/intra/changer"
#tapedev "null:"
tapedev "file:/backup/intra/slots"
#tapetype HP-DAT
#labelstr "^DailySet1-[0-9][0-9]*$"
tapetype HARDDISK
define tapetype HARDDISK {
comment “Backup to Virtual Tape”
length 3072 mbytes # each tape is 3 Gigs
# amrecover_changer "null:"
amrecover_changer "changer"
#infofile "/etc/amanda/DailySet1/curinfo" # database DIRECTORY
#logdir "/etc/amanda/ DailySet1" # log directory
#indexdir "/etc/amanda/ DailySet1/index" # index directory
infofile "/var/log/amanda/intra/curinfo" # database DIRECTORY
logdir "/var/log/amanda/intra" # log directory
indexdir "/var/log/amanda/intra/index" # index directory
25
In this part, with this configuration, Amanda will do a full back-up every 2 weeks, and an
incremental backup every week day. The backup will be stored and rotated on 15 virtual tapes.
5. Edit disklist (tell Amanda which servers, directory to backup, what dumptype to
use). Remove every lines including “localhost /etc comp-root-tar” at the end of the file. And
add:
alpha /home/kulathep comp-user-tar
beta /data comp-user-tar
beta /var comp-user-tar
6. Edit hosts file:
vi /etc/hosts
Add:
10.1.0.205 alpha
10.1.0.206 beta
7. Create backup directory (we will store the backup here):
chown -R amanda:disk /backup
8. Create tape list:
touch /etc/amanda/intra/tapelist
chown –R amanda:disk /etc/amanda/intra
9. Create slots (virtual tapes):
su - amanda
cd /backup/intra/slots
for ((i=1; $i<=15; i++)); do mkdir slot$i; done
ln -s slot1 data
10. Test virtual tapes:
/usr/sbin/ammt -f file:/backup/intra/slots status
11. Label the virtual tapes:
for ((i=1; $i<=15; i++)); do /usr/sbin/amlabel intra intra-$i slot $i; done
12. Reset the tape:
/usr/sbin/amtape intra reset
26
13. Edit amandahosts to allow communications from clients:
vi /var/lib/amanda/.amandahosts
alpha amanda
beta amanda
gamma amanda
14. Start xinetd service:
su –
service xinetd start
15. Check amanda process:
lsof | grep Amanda
Set Up Client
1. Install amanda client with yum:
yum -y install amanda-client
2. Edit file .amandahosts to allow communications from server:
vi /var/lib/amanda/.amandahosts
gamma amanda
3. Edit xinetd.d:
vi /etc/xinetd.d/amanda
disable = no
4. Start xinetd:
service xinetd start
5. Check Amanda service:
lsof | grep Amanda
27
Back-Up Data
1. Check tapes and clients on server:
su - amanda
/usr/sbin/amcheck intra
2. Dump manually:
/usr/sbin/amdump intra
3. Add amdump to cron:
crontab –e
0 16 * * 1-5 /usr/sbin/amcheck -m intra
45 0 * * 2-6 /usr/sbin/amdump intra
In this part, The first line checks the tape/clients and sends an email if it found something
wrong (no email if everything is okay) at 4pm. The second line dumps at 12.45am on weekdays.
Restore Data
1. Prepare tapes:
cd /tmp
/usr/sbin/amtape intra slot 1 # select slot1 (tape1)
/usr/sbin/ammt -t file:/backup/intra/slots rewind # rewind
2. Restore everything from every server
/usr/sbin/amrestore file:/backup/intra/slots
3. Restore only a server and a directory:
/usr/sbin/amrestore file:/backup/intra/slots beta /var
4. Extract:
tar xvf <Restored files>
Once you have done this, it will now be available for use on our backup server.
28
5. Conclusions
At the end of these operations, we now have a lot of server machines thanks to
virtualization. We know what ESXI is, how it is set up and how it is used. Likewise, we know
what is on the FTP Server, how it is set up and how to use it.
29
6. References
[1] Download link for ESXI customizer;
https://www.v-front.de/p/esxi-customizer.html#download
[2] Finding compatible network card;
https://vibsdepot.v-front.de/wiki/index.php/Welcome
[3] To download FileZilla
https://filezilla-project.org/download.php