This chapter includes an overview of the Ubuntu Server environment configuration and new hard drive additions and settings.
1) Installation and configuration of Ubuntu server
Installation will not elaborate, only a point, in the process can select the server role, remember to tick OpenSSH server and Samba File server. Really forget, or already installed but do not remember whether to install the two items, it does not matter, according to the following two lines of instruction can be installed.
sudo apt-get install openssh-serversudo apt-get Install Samba
There is no need to configure the configuration at the rear. SSH is not really necessary, but it is not easy to operate (not remote, can not be used under Windows putty).
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/48/76/wKiom1QIhxriNd7sAAG-jp4wwNM063.jpg "title=" Ubuntu Server test.png "alt=" Wkiom1qihxrind7saag-jp4wwnm063.jpg "/>
When the above preparation is complete, the next step is to add the hard disk to the server.
2) Mount New drive
I tested the virtual machine configured as a 8GB system hard disk +20GB storage HDD. The reason to separate the storage hard disk, the advantage is that the future disassembly, replacement, expansion of what are convenient. Individuals strongly do not recommend a large hard drive to put the system, storage together.
After adding a new hard drive, the first thing we want to do is initialize it, format it, and mount it to the Ubuntu system (without the concept of a drive letter under Linux, so create a folder and then associate the folder with the hard drive).
Specific operation:
A) Execute the following directives
ls/dev/sd* This instruction will list all current system drive letter and detected hard disk, after executing the result is as follows:/dev/sda/dev/sda1/dev/sda2/dev/sda5/dev/sdb where/dev/sdb is the newly added hard disk, The front is the system default configuration for one hard drive. Here we remember the word "SDB".
b) Execute the following directives
sudo fdisk/dev/sdb Note that the above/dev/sdb is the new hard drive that corresponds to the previous one. After executing the instruction, a description will appear and the command code must be entered at the bottom: commands (M for help): We first enter the P command (m for help):p return to see some information about the new hard disk, such as capacity, etc., and asked to enter the instructions again, This time we enter N:command (M for help): N then ask for the partition type and the number of partitions, and so on, I use the default settings here, that is, directly press ENTER is good, the following:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/48/78/wKiom1QIkJnCf63iAAAgdVYBeYE827.png "title=" 1.PNG " alt= "Wkiom1qikjncf63iaaagdvybeye827.png"/>
The above parameter is to set the whole new hard disk to a large partition, but these settings are not yet in force, we also have to confirm the last
Command (M for help): The WW instruction writes the in-memory parameter settings to the hard disk. Enter W and return, and you will see the partition table has been altered! then the system command line returns to bash
c) Perform ls/dev/sd* inspection:
/dev/sda/dev/sda1/dev/sda2/dev/sda5/dev/sdb/dev/sdb1
More than one/DEV/SDB1, partition success!
d) next to format the new partition
sudo mkfs.ext3-l/storage/dev/sdb1
The/storage here can be changed, that is, a name for the partition, equivalent to the name of the Windows down letter.
The/DEV/SDB1 corresponds to the new partition, which we looked at earlier in the examination.
Depending on the size of the hard disk, the above instructions will be completed in different times. Large hard drives, especially TB levels, can take a while, please wait patiently.
When you're done, you'll see:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/48/78/wKiom1QIk4DzGXn1AAANDoN8ojk405.png "title=" Capture.png "alt=" Wkiom1qik4dzgxn1aaandon8ojk405.png "/>
e) And then we're going to mount the new formatted partition into the Ubuntu system.
Sudo Mkdir/storage said before, Linux does not have the concept of a drive letter, the partition corresponds to the system next folder, so I create a storage folder under the root directory. This hard drive is not a removable hard drive, it is required to automatically mount after each reboot, so we need to modify the contents of/etc/fstab sudo nano/etc/fstab at the bottom to add/dev/sdb1/storage auto Defaul TS 0 0 Save exits. After restarting the Mount command, you should see the last paragraph written:/dev/sdb1 On/storage type ext3 (rw)
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/48/78/wKiom1QIlY-TnqkgAABIsAloaJU692.png "title=" 2.PNG " alt= "Wkiom1qily-tnqkgaabisaloaju692.png"/>
This article is from the "www.DIYPCs.com" blog, make sure to keep this source http://cnbeta.blog.51cto.com/1234897/1548960
Setting up a standalone hard disk-based Windows file sharing and FTP server with Ubuntu server (two, configuration work)