Installing apache2 and subversion in ubuntu

Installing apache2 and subversion in ubuntu

 

Installing apache2
 $ sudo apt-get install apache2

Installing subversion
 $ sudo apt-get install subversion

Installing libapache2-svn
 $ sudo apt-get install libapache2-svn

Creating SVN directory
 $ sudo mkdir /home/svn
 $ cd /home/svn
 $ sudo mkdir project

 $ sudo svnadmin create /home/svn/project

 $ cd /home/svn
 $ sudo chown -R www-data:subversion project
 $ sudo chmod -R g+rws project

 $ sudo gedit /etc/apache2/mods-available/dav_svn.conf

<Location /svn>
     DAV svn
     SVNParentPath /home/svn
     SVNListParentPath On
     AuthType Basic
     AuthName "Subversion Repository"
     AuthUserFile /etc/subversion/passwd

   # To enable authorization via mod_authz_svn
     AuthzSVNAccessFile /etc/apache2/svn_access_control

   # <LimitExcept GET PROPFIND OPTIONS REPORT>
        Require valid-user
   # </LimitExcept>
</Location>

 $ sudo /etc/init.d/apache2 restart
 
 if it's first time use this:
 $ sudo htpasswd -c /etc/subversion/passwd user_name
 else
 $ sudo htpasswd /etc/subversion/passwd second_user_name

 $ cat /etc/subversion/passwd

 $ sudo touch /etc/apache2/svn_access_control
 $ sudo gedit /etc/apache2/svn_access_control

 

Editing:


[groups]
admin = bob, bill
developers = bob, barry, brett

[/]
@admin = r
bob = rw

[/wowapp/trunk]
@admin = r
@developers = rw
brenda = rw

 $ sudo /etc/init.d/apache2 restart

Add ssl :

sudo mkdir /etc/apache2/ssl
sudo openssl req -new -x509 -days 365 -nodes -out /etc/apache2/ssl/apache.pem -keyout /etc/apache2/ssl/apache.pe

It prompts you to enter the some informations

 $ sudo a2enmod ssl
 $ sudo gedit /etc/apache2/ports.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    # SSL name based virtual hosts are not yet supported, therefore no
    # NameVirtualHost statement here
    Listen 443
</IfModule>

 $ sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/myown-ssl
 $ sudo gedit /etc/apache2/sites-available/myown-ssl

change to
<VirtualHost *:443>

Add before </VirtualHost>:
Code:

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem
SSLProtocol all
SSLCipherSuite HIGH:MEDIUM

 $ sudo a2ensite myown-ssl
 $ sudo /etc/init.d/apache2 restart

When I tried to do a re-start from Terminal, I got:

$ sudo /etc/init.d/apache2 restart
* Forcing reload of web server (apache2)...
apache2: Could not reliably determine the server's fully qualified domain name, using
127.0.0.1 for ServerName
httpd (no pid file) not running
apache2: Could not reliably determine the server's fully qualified
domain name, using 127.0.0.1 for ServerName

To fix it up:
 $ sudo netstat -anp | grep '^tcp.*LISTEN'
 $ sudo /etc/init.d/apache2 restart

https://127.0.0.1:443/svn/project/
http://127.0.0.1/svn/project/

 

Installing SVN client:

sudo apt-get install rapidsvn

Done with it!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值