手机版
你好,游客 登录 注册
背景:
阅读新闻

CentOS下SVN服务器测试版安装记录

[日期:2013-03-17] 来源:oschina.net  作者:曾建凯 [字体:大 中 小]

移除welcome.conf

mv /etc/httpd/conf.d/welcome.conf
/etc/httpd/conf.d/welcome.conf.backup

subversion.conf

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

#
# Example configuration to enable HTTP access for a directory
# containing Subversion repositories, "/var/www/svn".  Each repository
# must be both:
#
#   a) readable and writable by the 'apache' user, and
#
#   b) labelled with the 'httpd_sys_content_t' context if using
#   SELinux
#

#
# To create a new repository "http://localhost/repos/stuff" using
# this configuration, run as root:
#
#   # cd /var/www/svn
#   # svnadmin create stuff   
#   # chown -R apache.apache stuff
#   # chcon -R -t httpd_sys_content_t stuff
#Allow from all

	DAV svn
	SVNParentPath /srv/svn
	AuthType Basic
	AuthName "svn.agimvc.com"
	AuthUserFile /srv/svn_conf/httpd_passwd
	AuthzSVNAccessFile /srv/svn_conf/authz
	Require valid-user

安装SVN

yum install subversion.x86_64 mod_dav_svn.x86_64

编译安装Nginx

wget http://nginx.org/download/nginx-1.2.7.tar.gz
tar zvxf nginx-1.2.7.tar.gz
yum install -y kernel-headers.x86_64 kernel.x86_64 kernel-devel.x86_64 gcc.x86_64 gcc automake autoconf libtool make
yum install -y zlib-devel.x86_64 openssl-devel.x86_64 pcre-devel.x86_64 libaio-devel.x86_64 automake.noarch

编译Nginx指令

./configure --prefix=/usr/local/nginx --conf-path=/etc/nginx/nginx.conf --with-poll_module --with-file-aio --with-http_ssl_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_stub_status_module --with-pcre
make && make install

配置Nginx

mkdir /var/log/nginx
mkdir /etc/nginx/vhost
nano /etc/nginx/nginx.conf
user  www www;
worker_processes  2;

error_log  /var/log/nginx/error.log;

pid        /var/log/nginx/nginx.pid;

events {
        use epoll;
        worker_connections  4096;
}

http {
        include       mime.types;
        default_type  application/octet-stream;
        server_tokens off;

        sendfile        on;
        #tcp_nopush     on;

        keepalive_timeout  65;

        include gzip.conf;

	# All websites defined in here
        include /etc/nginx/vhost/*.conf;
}
nano /etc/nginx/gzip.conf
gzip                    on;
gzip_min_length         1000;
gzip_types              text/plain text/css application/x-javascript;
nano /etc/nginx/vhost/default.conf
server {

        # this port should be 80
        listen       80;
        server_name  localhost;

        location / {
                root   /srv/www;
                index  index.html index.htm;
        }

        location ~ \.php$ {
                root           /srv/www;
                fastcgi_pass   unix:/dev/shm/php-fpm.sock;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include        /etc/nginx/fastcgi_params;
        }

        location ~ /\.ht {
            deny  all;
        }
}
linux
相关资讯       svn  CentOS SVN  CentOS SVN服务器 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款