CentOS 6.5部署Apache+SVN

來源:互聯網
上載者:User

標籤:http   使用   os   io   檔案   資料   問題   ar   

說明:營運朋友都知道,常常會配合開發人員搭建一些他們需要的環境,來提高開發工作效率,他們每天面對的無非就是代碼,所以代碼的可用性和管理性對 開發至關重要的,開發公司每接到一個項目就是一個團隊來開發,這樣多人同時對一些代碼進行修改,會面臨一些問題,比如:誤刪除,對同一檔案修改發生衝突, 對某些人不讓有所有許可權,都會造成工作效率降低,要想解決這些問題就需要有一個專業的版本管理系統來集中管理這些代碼,這樣的版本管理系統很多,我們這次 使用的是SVN(subversion),是cvs接班人,是現在開源軟體使用最多的版本管理軟體,不多說了,開始搭建一個屬於自己的版本控制系統吧。

SVN伺服器有2種運行方式:獨立伺服器和藉助apache運行(Web/DAV)。

1、安裝依賴包


[root@localhost ~]# yum install gcc gcc-++ make pcre-develzlib-devel -y

[root@localhost ~]# tar zxvf apr-1.4.6.tar.gz
[root@localhost ~]# cd apr-1.4.6
[root@localhost apr-1.4.6]# ./configure --prefix=/usr/local/apr
[root@localhost ~]# make && make install


[[email protected] ~]# tar zxvf apr-util-1.4.1.tar.gz
[[email protected] ~]# cd apr-util-1.4.1
[[email protected]]# ./configure --prefix=/usr/local/apr-util--with-apr=/usr/local/apr
[[email protected] ~]# make && make install

2、安裝Apache
下載:http://mirrors.cnnic.cn/apache/httpd/
[[email protected] ~]# tar zxvf httpd-2.4.7.tar.gz
[[email protected] ~]# cd httpd-2.4.7
[[email protected] httpd-2.4.7]#./configure --prefix=/usr/local/apache --enable-dav --enable-so--enable-rewrite --enable-maintainer-mode --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/
[[email protected] ~]# cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
[[email protected] ~]# sed -i‘s/#ServerName.*/ServerName localhost/‘ /usr/local/apache/conf/httpd.conf

3、安裝SVN
SVN需要需要SQLite資料庫支援,我們先安裝SQLite
下載:http://www.sqlite.org/download.html
1234 [[email protected] ~]# tar zxvf sqlite-autoconf-3080200.tar.gz
[[email protected] ~]# cd sqlite-autoconf-3080200
[[email protected]]# ./configure
[[email protected]]# make && make install

 #安裝SVN
下載:http://subversion.apache.org/download
[[email protected] ~]# tar zxvf subversion-1.8.5.tar.gz
[[email protected] ~]# cd subversion-1.8.5
[[email protected]]# ./configure --prefix=/usr/local/subversion--with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util/
[[email protected]]# make && make install

./confiure報錯:這是因為apsx檔案沒有指定perl執行程式位置
apache/bin/apxs:/usr/local/perl: bad interpreter: No such file or directory
configure: error: no - APXSrefers to an old version of Apache
解決:[[email protected] ~]# vi /usr/local/apache/bin/apxs
#!/replace/with/path/to/perl/interpreter–w  #將第一行修改為#!/usr/bin/perl –w即可
  #添加環境變數

[[email protected] ~]# echo "PATH=$PATH/:/usr/local/subversion/bin" >> /etc/profile
[[email protected] ~]# source /etc/profile
[[email protected] ~]# svnserve –version  #顯示版本資訊表示正常

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.