Install LAMP + SVN in ubuntu

Source: Internet
Author: User
Install LAMP + SVN in ubuntu-Linux Enterprise Application-Linux server application information. For more information, see. The default root directory of apache in ubuntu is/var/www.

Sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql

Sudo apt-get install php5-common php5-cli php5-dev

Sudo apt-get install php5-mysqli php5-sqlite php5-gd php5-curl php5-mhash php5-mcrypt

Sudo apt-get install php5-xsl php5-snmp php5-uuid php5-xmlrpc

Sudo apt-get install php5-pdo php5-pdo-mysql php5-pdo-sqlite

Sudo apt-get install php5-imagick

If an error occurs, skip this step (installation is not affected)

# Control
Sudo/usr/sbin/apache2-k start | stop | restart
OR
Sudo/etc/init. d/apache2 start | stop | restart


Install SVN
Sudo apt-get install subversion libapache2-svn

# Add groups and settings
Sudo addgroup subversion
Sudo gpasswd-a jacky subversion
Sudo gpasswd-a www-data subversion
# Check whether the operation is successful
Sudo vi/etc/group
Cat/etc/group | grep subversion
# You need to log out and then log on so that you can become a member of the subversion group, and then you can perform the Check in (also called file submission) operation.

# Create an SVN Repository
Sudo mkdir/home/. svn/
Cd/home/. svn
Sudo mkdir gsse
Sudo chown-R root: subversion gsse
Sudo chmod-R g + rws gsse

# Create an SVN File Repository
Sudo svnadmin create/home/. svn/gsse

# Set WebDAV protocol access (http ://)

To access the SVN File Repository through the WebDAV protocol, you must configure your Apache 2 Web server. You must add the following code snippet to your/etc/apache2/mod-available/dav_svn.conf file:

Sudo vi/etc/apache2/mod-available/dav_svn.conf

DAV svn
SVNPath/home/. svn/gsse
AuthType Basic
AuthName "gsse subversion repository"
AuthUserFile/etc/subversion/passwd

#
Require valid-user
#

If you need to verify the user password every time you log on And Comment out the two lines.
When you add the preceding content, you must restart the Apache 2 Web server. Enter the following command:

Sudo/etc/init. d/apache2 restart

Next, you need to create the/etc/subversion/passwd file, which contains the details of user authorization. To add a user, run the following command:

Sudo htpasswd2-c/etc/subversion/passwd user_name

It will prompt you to enter the password. When you enter the password, the user will be created. You can use the following command to access the File Repository:

Svn co http: // hostname/svn/gsse -- username user_name

It prompts you to enter the password. You must enter the password you set using htpasswd2. After verification, the project file is checked out.

OVER.
Related Article

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.