Installing apache2 and subversion in ubuntu
编程技术  /  houtizong 发布于 3年前   73
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!
请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!
技术博客集 - 网站简介:
前后端技术:
后端基于Hyperf2.1框架开发,前端使用Bootstrap可视化布局系统生成
网站主要作用:
1.编程技术分享及讨论交流,内置聊天系统;
2.测试交流框架问题,比如:Hyperf、Laravel、TP、beego;
3.本站数据是基于大数据采集等爬虫技术为基础助力分享知识,如有侵权请发邮件到站长邮箱,站长会尽快处理;
4.站长邮箱:[email protected];
文章归档
文章标签
友情链接