Help FTP server trên ubuntu 12.04

quocmysecret

New member
** Cách thiết lập máy chủ FTP trên Ubuntu 12.04 với hai ổ cứng **

## Bước 1: Cài đặt Ubuntu 12.04 trên một ổ cứng

1. Tải xuống hình ảnh ISO Ubuntu 12.04 từ [trang web Ubuntu] (https://www.ubuntu.com/doad/desktop).
2. Tạo ổ USB có thể khởi động bằng hình ảnh ISO.
3. Khởi động máy tính của bạn từ ổ USB.
4. Thực hiện theo các hướng dẫn trên màn hình để cài đặt Ubuntu 12.04.

## Bước 2: Thiết lập máy chủ FTP

1. Mở một cửa sổ thiết bị đầu cuối.
2. Nhập lệnh sau để cài đặt máy chủ FTP:

`` `
sudo apt-get install vsftpd
`` `

3. Nhập lệnh sau để khởi động máy chủ FTP:

`` `
Dịch vụ sudo vsftpd bắt đầu
`` `

4. Nhập lệnh sau để bật máy chủ FTP tự động khởi động khi khởi động:

`` `
Sudo Update-rc.d VSFTPD mặc định
`` `

## Bước 3: Gắn ổ cứng thứ hai

1. Mở một cửa sổ thiết bị đầu cuối.
2. Nhập lệnh sau để tạo thư mục cho ổ cứng thứ hai:

`` `
sudo mkdir /mnt /second_drive
`` `

3. Nhập lệnh sau để gắn ổ cứng thứ hai:

`` `
sudo mount /dev /sdb1 /mnt /second_drive
`` `

## Bước 4: Thiết lập quyền cho máy chủ FTP

1. Mở trình chỉnh sửa văn bản.
2. Tạo một tệp được gọi là `/etc/vsftpd.conf`.
3. Dán mã sau vào tệp:

`` `
Anonymous_enable = Không
local_enable = Có
write_enable = Có
CHROOT_LOCAL_USER = CÓ
allow_writeable_chroot = Có
DIR_MODE = 0777
File_Mode = 0666
`` `

4. Lưu tệp.

## Bước 5: Kiểm tra máy chủ FTP

1. Mở trình duyệt web.
2. Nhập địa chỉ sau vào thanh địa chỉ: `ftp: // localhost`

Bạn sẽ có thể đăng nhập vào máy chủ FTP bằng tên người dùng `Ẩn danh 'và mật khẩu` Ẩn danh'.

## Bước 6: Định cấu hình máy chủ FTP

Bây giờ bạn có thể định cấu hình máy chủ FTP để đáp ứng nhu cầu của bạn.Ví dụ: bạn có thể thay đổi số cổng, tên người dùng và mật khẩu và thư mục mà máy chủ FTP đang phục vụ.

Để biết thêm thông tin, vui lòng xem [Tài liệu VSFTPD] (https://www.vsftpd.org/docs.html).
=======================================
**How to set up an FTP server on Ubuntu 12.04 with two hard drives**

## Step 1: Install Ubuntu 12.04 on one hard drive

1. Download the Ubuntu 12.04 ISO image from the [Ubuntu website](https://www.ubuntu.com/download/desktop).
2. Create a bootable USB drive using the ISO image.
3. Boot your computer from the USB drive.
4. Follow the on-screen instructions to install Ubuntu 12.04.

## Step 2: Set up the FTP server

1. Open a terminal window.
2. Type the following command to install the FTP server:

```
sudo apt-get install vsftpd
```

3. Type the following command to start the FTP server:

```
sudo service vsftpd start
```

4. Type the following command to enable the FTP server to start automatically at boot:

```
sudo update-rc.d vsftpd defaults
```

## Step 3: Mount the second hard drive

1. Open a terminal window.
2. Type the following command to create a directory for the second hard drive:

```
sudo mkdir /mnt/second_drive
```

3. Type the following command to mount the second hard drive:

```
sudo mount /dev/sdb1 /mnt/second_drive
```

## Step 4: Set up permissions for the FTP server

1. Open a text editor.
2. Create a file called `/etc/vsftpd.conf`.
3. Paste the following code into the file:

```
anonymous_enable=NO
local_enable=YES
write_enable=YES
chroot_local_user=YES
allow_writeable_chroot=YES
dir_mode=0777
file_mode=0666
```

4. Save the file.

## Step 5: Test the FTP server

1. Open a web browser.
2. Enter the following address in the address bar: `ftp://localhost`

You should be able to log in to the FTP server using the username `anonymous` and the password `anonymous`.

## Step 6: Configure the FTP server

You can now configure the FTP server to meet your needs. For example, you can change the port number, the username and password, and the directory that the FTP server is serving.

For more information, please see the [vsftpd documentation](https://www.vsftpd.org/docs.html).
 
Join Telegram ToolsKiemTrieuDoGroup
Back
Top