Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm in the process of setting up 2 Debian servers that are linked on a LAN and both have public and private IPs. Both servers will need to share some files for use within their web applications that they serve. They may need to write as well as read files.
I am using PHP as the scripting, and I see 2 possible solutions for accessing files on one server from another - NFS and FTP. Files will mainly be images of 0.5 - 1.5 Mb. I've done some research, and the advice out there is confusing. Some say NFS is faster, some say FTP. So I wonder if you can help with my quandary? To mount an NFS drive on the other server, or to setup FTP an call directly from within my PHP scripts?
From how you describe it NFS is definitely the way to go, but while there are alternatives I don't think FTP is an appropriate one. sshfs for example would be one way to go - but either way it's still a local mount of a share on a remote server; nfs is probably best if both servers have the same user database.
Thanks for your reply Zordrak. I was thinking NFS as well, but some sites are saying FTP is better. I can see FTP being better where the servers are accessed via the internet. I will take a look at sshfs as well.
FTP should only be used for traffic that will not exit your local network or VPN environment. IT is not suitable for general internet use, as it passes security information (logon and password) in the clear (unencrypted). If your traffic may hit the internet, try sftp or rsync over ssh: these encrypt ALL of the traffic.
NFS, while very useful, is an old insecure protocol that suffers several reliability problems. Again, that should not rule it out if all of the NFS traffic will be local or VPN secured. NFS over 1000BT dedicated links performs nicely.
It depends upon HOW you want to use it.
sftp is easier to automate than ftp, but neither is rocket science.
I have had NFS (and some ftp transfers) kinda 'bork' on very large files.
There are performance issues, but on recent machines on a local LAN they are unimportant.
If the files are all under a gig, use what you find easiest.
If you decide to use an ftp server, check into lftp as the client. It has some powerful options for scripting and automation, and does more than the simple ftp protocol.