Linux notes -- install SVN and FTP

Source: Internet
Author: User
After three years, I installed a Linux instance on a virtual machine and started my research. Every time I wrote a Blog, I lamented the time, just like Xiao Min. I would like to say to me at night: I am in a bad mood. S: Why? M: It's another day old.

Okay. This time, I complained about the deployment of SVN and FTP in Linux. If it is wrong, it is recorded.

Linux gave me the greatest feeling that it was too unfriendly. For so many years, M $ and Apple have realized the importance of user experience, but Linux is just a good tool for IBM, perhaps it is to improve the operating efficiency of the entire system and give up the graphical interface (what? Linux Gui? It may be a waste of time.) Maybe it is a deliberate increase in the management threshold of Linux systems to give birth to a career similar to the title of "niu B's Linux System Administrator". Who knows, anyway, Linux can be summarized in one sentence, that is, who is using and who is suffering. PS: more people use Linux as their computers for daily use, office work, and surfing the Internet. This is the problem. Then they will come to the Forum to show off the lower limit, more NB! I would like to praise Win8 here. I installed a WDP version for B. I found that M $ is a good tool. Although it is WDP, it is stable and compatible, even in terms of resource occupation and resource management, it is better than Win7. I tested the Game Performance in my notebook. WOW is more efficient than Win7, and I look forward to the official version of Win8. (What? What is Metro? Chicken ribs ). Well, Xu Shu's words are too many to lose and he will return to the subject.

SVN installation:
Subversion: Apache's source code management tool. Originally, it didn't want to use SVN. In fact, TFS in Windows is quite useful. It integrates source code management and project management (including Bug Track ). However, TFS is too bloated and secure. The last time Windows crashed, I backed up TFS and recovered it on another computer, as a result, the client uses the same user name and cannot continue to use the original workspace. As a result, the source code that is not checked in must be overwritten. Only the benzene method is used to ensure that the source code is not lost, it's too bad. SVN is much more Light, and it is much more convenient to migrate the environment.

The installation is very simple. The official website provides instructions and you can run the following three commands (SLES11, the same below ):
Zypper addrepo http://download.opensuse.org/repositories/devel:tools:scm:svn/SLE_11/devel:tools:scm:svn.repo
Zypper refresh
Zypper install subversion

Add source, refresh, and install. Are you familiar with this step?

SVN Configuration:
It is not complex. Create a directory first:
Mkdir/home/svn/efreda
This directory serves as the repository for SVN.

Create the SVN configuration file:
Svnadmin create/home/svn/efreda
After running, you can navigate to this directory and generate several configuration files.

For svnserve. conf is configured and opened with the classic VI (I still remember that Li taught us to use the VI in Linux four years ago. I have never understood what the last line mode is, haha.
You need to modify them in several places:
Anon-access = none # Set whether anonymous access is allowed. Anonymous access is not allowed for internal use.
Auth-access = write # Set logon user permissions, writable

Passwd-db = passwd # This configuration is not worthy. Because we adopt an encrypted authentication method, this configuration is not configured and remains shielded.
Authz-db = authz # If you need to grant group-based permissions by directory, You need to configure it.

Realm = Efreda Repository # obtain a unique name for the Repository, which must be used for subsequent encryption authentication.

Use-sasl = true # whether to use SASL encryption authentication. This is enabled. If you do not log on and save the plain text, this is available by default in SLES11, and related dependencies have been installed.

Min-encryption = 128 # The encryption configuration is set to 0, 1, and> 1 respectively.
Max-encryption = 256
Save the changes.

Configure SASL:
Navigate to/etc/sasl2 or use VI to create a svn. conf file. The content is as follows:
Pwcheck_method: auxprop
Auxprop_plugin: sasldb
Sasldb_path:/home/svn/efreda/sasldb
Mech_list: DIGEST-MD5

Create a SVN User:
Saslpasswd2-c-f/home/svn/efreda/sasldb-u "Efreda Repository" sweet-p
Enter the password.

To delete a user, change-c to-d.

Another command is run: sasldblistusers2-f [path] to list all users.

Start SVN:
Svnserve-d-r/home/svn/efreda
Stop SVN:
Killall svnserve

Create FTP:
In fact, after SLES11 is installed, the FTP server has been installed. pure-ftpd, start it in YaST. The graphic configuration is not changed, that is, the anonymous user is rejected, then change the directory.

The main configuration changes are still in the file, navigate to:/etc/pure-ftpd/pure-ftpd.conf (VI ),
The main changes are as follows:
PureDB removes this gaze to allow virtual accounts to access FTP.
Umask 0000:027 # the original file is 177: 077. This is the permission mask. If it is not changed, files created through the Administrator account cannot be downloaded by default by other normal users. During configuration today, I just got stuck here. After half a day, no one else can download anything I uploaded.
AutoRename no
CreateHomeDir no # If you only want to share resources, you do not need to create a personal directory.
NoRename no # This must be changed; otherwise, the file name cannot be modified during Administrator Account logon.

By default.

Create one group and two Linxu accounts. The group name is ftpgrp. The two accounts are ftpuser and ftpadmin respectively. Then grant the FTP directory permission to ftpadmin. The directory I use is/home/ftp with the command: chown ftpadmin: ftpgrp/home/ftp.

Then create a virtual account:
Pure-pw useradd sweet-u ftpadmin-d/home/ftp # Here I add myself as an administrator, that is, I have RW permissions.

Pure-pw useradd fred-u ftpuser-d/home/ftp # normal permission, only download.

Finally, remember to use the command pure-pw mkdb to make the virtual account take effect.

Some command pure-pw show sweet shows user information, pure-pw passwd sweet-m Change Password, pure-pw userdel sweet-m delete user. PS: The following-m enables the virtual account information to take effect immediately, which is equivalent to using pure-pw mkdb.

Finally, restart FTP: rcpure-ftpd restart.

Finished!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.