1
00:00:00,212 --> 00:00:04,212
<b>《<u><font color="#00F0F5">Configuring a remote server with FTP credentials</font></u>》</b>
<b><u><font color="#F9DF08">【本字幕由ACELY 整理&转码】</font></u></b>
Once you've completed and tested your PHP-based site on your local computer, you

2
00:00:04,212 --> 00:00:07,212
<i><font color="#F5A300">【如果喜欢该教程，请购买正版！】</font></i>
can deploy it to your remote site.

3
00:00:07,212 --> 00:00:11,212
<b>【----<font color="#FF0500">ACELY STUDIO</font>----】</b>
<i>【作品只能交流学习，不得用于任何盈利用途！】</i>
I'll start by showing you how to configure the remote site, and how to set it up

4
00:00:11,212 --> 00:00:15,212
to work with the remote site over FTP, or File Transfer Protocol.

5
00:00:15,212 --> 00:00:20,212
For the purpose of this demonstration, I'm using an FTP server called FileZilla.

6
00:00:20,212 --> 00:00:25,212
It's a Windows-based, free FTP server which you can get from the web, and it's

7
00:00:25,212 --> 00:00:28,212
very easy to set up and install.

8
00:00:28,212 --> 00:00:31,212
I've configured a single user on the server.

9
00:00:31,212 --> 00:00:37,212
The name of the user is ftpuser, and I'll show you that under Shared folders,

10
00:00:37,212 --> 00:00:41,212
it's pointing to a folder named remote, under my web root.

11
00:00:41,212 --> 00:00:44,212
So for demonstration purposes, I'm working with the same installation of

12
00:00:44,212 --> 00:00:50,212
Apache, MySQL, and PHP, as I am for my local server, but I'm pointing to a

13
00:00:50,212 --> 00:00:52,212
different directory.

14
00:00:52,212 --> 00:00:56,212
I'll close the User configurationscreen in FileZilla and then minimize it

15
00:00:56,212 --> 00:00:58,212
to keep it running.

16
00:00:58,212 --> 00:01:02,212
Now, if you're working on Mac OS X, you can instead use the FTP capability

17
00:01:02,212 --> 00:01:05,212
that's built into that operating system.

18
00:01:05,212 --> 00:01:10,212
Go into your System Preferences, to Sharing, to File Sharing, and then under

19
00:01:10,212 --> 00:01:13,212
Options, you'll be able to turn on the FTP capability.

20
00:01:13,212 --> 00:01:18,212
Or if you'd like to apply these skills to an actual remote site, just get

21
00:01:18,212 --> 00:01:24,212
the FTP credentials from your Internet Service Provider, or your web server administrator.

22
00:01:24,212 --> 00:01:29,212
I'm working with a site named 09_deployremote.

23
00:01:29,212 --> 00:01:35,212
I'll go to the menu and choose Site > Manage Sites, and then click Edit to look

24
00:01:35,212 --> 00:01:38,212
at the Site preferences.

25
00:01:38,212 --> 00:01:41,212
I'll go to the Servers category on the left.

26
00:01:41,212 --> 00:01:46,212
When I first configured the site, I created a local server definition.

27
00:01:46,212 --> 00:01:50,212
Now I'm going to add a new server definition for the remote server.

28
00:01:50,212 --> 00:01:54,212
I'll click plus, and I'll name this Remote Server.

29
00:01:54,212 --> 00:01:58,212
You can connect using a variety of protocols, but almost all the time you're

30
00:01:58,212 --> 00:02:02,212
going to use FTP, or File Transfer Protocol.

31
00:02:02,212 --> 00:02:08,212
The FTP Address can either be the DNS name or the IP address of your remote server.

32
00:02:08,212 --> 00:02:14,212
I'm going to use the IP address, 127.0.0.1.

33
00:02:14,212 --> 00:02:21,212
Then I'll type in my username, ftpuser, and the password that I created with it. Then I'll test.

34
00:02:21,212 --> 00:02:27,212
If your FTP server is running, you should connect to your server automatically.

35
00:02:27,212 --> 00:02:31,212
If you have any troubles, the first thing to try is to go into More Options and

36
00:02:31,212 --> 00:02:36,212
try selecting Use Passive FTP, and then click Test again.

37
00:02:36,212 --> 00:02:41,212
If you're still having trouble, check Adobe's web site. Go to the Dreamweaver

38
00:02:41,212 --> 00:02:46,212
Support site, and type in connecting with FTP, and you'll find a knowledge-based

39
00:02:46,212 --> 00:02:48,212
article that should help.

40
00:02:48,212 --> 00:02:52,212
My username is already connected to the correct directory, so I don't need to

41
00:02:52,212 --> 00:02:55,212
put any information here under Root Directory.

42
00:02:55,212 --> 00:03:01,212
I'm also setting the web URL to point to the remote folder under the localhost.

43
00:03:01,212 --> 00:03:05,212
For a remote FTP server, you won't use this value, but it's a good idea to

44
00:03:05,212 --> 00:03:06,212
have it be accurate.

45
00:03:06,212 --> 00:03:11,212
Then I'll click Advanced, and I'll check to make sure that I have this option,

46
00:03:11,212 --> 00:03:14,212
Maintain synchronization information, selected.

47
00:03:14,212 --> 00:03:20,212
This will allow me to easily synchronize my files between the client and the remote site.

48
00:03:20,212 --> 00:03:27,212
And as with the testing server, I'll set the Server model to PHP MySQL.

49
00:03:27,212 --> 00:03:29,212
I'm not going to turn on the other options.

50
00:03:29,212 --> 00:03:34,212
This one, Automatically upload files to server on Save, will cause all changes

51
00:03:34,212 --> 00:03:37,212
to be uploaded immediately upon saving them.

52
00:03:37,212 --> 00:03:39,212
I typically don't like to do that.

53
00:03:39,212 --> 00:03:42,212
You can, if you like, use the file checkout capability.

54
00:03:42,212 --> 00:03:47,212
This results in placing file locks on files on your remote server, so that only

55
00:03:47,212 --> 00:03:51,212
one user can check them out at a time.

56
00:03:51,212 --> 00:03:55,212
I'll click Save, and then I'll check to make sure that my new server is marked as

57
00:03:55,212 --> 00:04:00,212
the remote server and not as the resting server, and I'll click Save.

58
00:04:00,212 --> 00:04:05,212
Then I'll click Done, and I'll go to my Files panel.

59
00:04:05,212 --> 00:04:08,212
Right now, I'm looking at the Local View,

60
00:04:08,212 --> 00:04:12,212
that is the set of files that I've been managing through Dreamweaver already.

61
00:04:12,212 --> 00:04:17,212
I'll switch to the remote server and show you that that folder is empty, and

62
00:04:17,212 --> 00:04:21,212
I'll show you the physical folder on the server, which on Windows is

63
00:04:21,212 --> 00:04:29,212
wamp/www/remote, and show that it's starting off as an empty file also.

64
00:04:29,212 --> 00:04:33,212
If this folder doesn't already exist on your local computer, you should create

65
00:04:33,212 --> 00:04:37,212
<i><font color="#00F0F5">【本字幕由 ACELY.CN 独家制作发布】</font></i>
<b><i><u><font color="#F563B7">-----欢迎加入群号：214645753-----</font></u></i></b>
it now, and then you'll be ready to upload files to your server and synchronize

66
00:04:37,212 --> 00:56:01,212
<i><font color="#00F0F5">【更多字幕，请访问唯一发布站ACELY.CN】</font></i>
the files between the client and the remote server whenever you need to.


