阿里云配置git服务器
A. 企业如何选择阿里云服务器配置
一般根据业务需要来选择不同的配置,像一些展示型的网站,对于配置要求低一些,选择低配置就可以;
如果要求高性能、高稳定性的输出服务,则需要选择高配置;
选择一个合适的阿里云服务商,让他们根据你的业务实际情况给出最合适的配置推荐以及价格方案。
B. 怎么用git把阿里云的数据备份下来
使用阿里云Ubuntu 12.0.4 64位操作系统做git服务器。 首先git服务器有两种访问方式可以选择:http方式和ssh的方式,http方式更容易使用。 1、http方式的git服务器搭建以及使用git命令行访问: On the Server 1) Install Ubuntu Server, this is the base of our git server obviously 2) Now we need to install a couple of packages, these being ‘git-core’ and ‘apache2′, we do this like so:- apt-get update apt-get install apache2 git-core 3) Now we need to create a new folder for your new repository and set some inital permissons, we do this like so:- cd /var/www mkdir test-repo.git cd test-repo.git git --bare init git update-server-info chown -R www-data.www-data . 4) We now need to enable WebDAV on Apache2 of which we will use to serve the repository:- a2enmod dav_fs 5) We now need to configure the access restrictions to our repository by creating the following file:- /etc/apache2/conf.d/git.conf Then fill it in with the following content:- <Location /test-repo.git> DAV on AuthType Basic AuthName "Git" AuthUserFile /etc/apache2/passwd.git Require valid-user </Location> Then save and close the file, lets move on to the next bit.. 6) Next we need to create a user account of which you will need to use to browse of commit to the repository.. htpasswd -c /etc/apache2/passwd.git <user> You could then be prompted to enter the password for the user too and confirm it! 7) Ok that’s it for the server side configuration… we just need to restart Apache2 like so and then we should be ready to move on to the client side stuff! /etc/init.d/apache2 restart …you can now move on to the client side stuff! On the client side Ok so now we need to create a local (on your desktop machine) repository and then we’ll initiate the new remote repository… So, if your using linux/MacOSX bring up the terminal and type the following commands:- mkdir ~/Desktop/test-project cd ~/Desktop/test-project git init git remote add origin <user>@<server name or IP address>/test-project.git touch README git add . git commit -a -m “Initial import” git push origin master Done! – Your intiial file named ‘README’ which currently is just blank has now been committed and you’ve pushed your code to your new git server which has now completed the Git reposity creation process, now in future you can ‘clone’ your resposity like so:- git clone <user>@<server name or IP address>/test-project.git 注意上面连接<user>@<server name or IP address>/test-project.git中的user就是你htpasswd -c /etc/apache2/passwd.git <user>输入的用户名。 另外新建仓库的时候,只需执行: cd /var/www mkdir 项目名 cd 项目名 git --bare init git update-server-info chown -R www-data.www-data . 然后在/etc/apache2/conf.d/git.conf中对应添加上面类似段即可。 其中: AuthUserFile 密码文件名 后面的文件就是你指定的密码文件,你可以 htpasswd -c 密码文件名 <user> 对应指定该项目的用户名和密码即可。添加用户是不要-c参数: htpasswd 密码文件名 <user>
C. 在阿里云ESC上搭建的gitlit只能配置127.0.0.1作为IP访问地址,请问如何配置可以让外网能访问
阿里云现在专有网络并不绑定IP。您选择全部未分配IP即可。然后使用公网IP访问。记得先在安全组开启对应的端口哦。
D. 如何在阿里云linux服务器安装git
Gentoo: emerge git Centos: yum install git Ubuntu: apt-get install git Debian: apt-get install git 其它:下载源代码包,然后编译安装,或者用其它的包管理制。
E. 阿里云服务器 怎么用git部署代码
使用阿里云Ubuntu 12.0.4 64位操作系统做git服务器。
首先git服务器有两种访问方式可以选择:http方式和ssh的方式,http方式更容易使用。
1、http方式的git服务器搭建以及使用git命令行访问:
On the Server
1) Install Ubuntu Server, this is the base of our git server obviously
2) Now we need to install a couple of packages, these being ‘git-core’ and ‘apache2′, we do this like so:-
apt-get update
apt-get install apache2 git-core
3) Now we need to create a new folder for your new repository and set some inital permissons, we do this like so:-
cd /var/www
mkdir test-repo.git
cd test-repo.git
git --bare init
git update-server-info
chown -R www-data.www-data .
4) We now need to enable WebDAV on Apache2 of which we will use to serve the repository:-
a2enmod dav_fs
5) We now need to configure the access restrictions to our repository by creating the following file:-
/etc/apache2/conf.d/git.conf
Then fill it in with the following content:-
<Location /test-repo.git>
DAV on
AuthType Basic
AuthName "Git"
AuthUserFile /etc/apache2/passwd.git
Require valid-user
</Location>
Then save and close the file, lets move on to the next bit..
6) Next we need to create a user account of which you will need to use to browse of commit to the repository..
htpasswd -c /etc/apache2/passwd.git <user>
You could then be prompted to enter the password for the user too and confirm it!
7) Ok that’s it for the server side configuration… we just need to restart Apache2 like so and then we should be ready to move on to the client side stuff!
/etc/init.d/apache2 restart
…you can now move on to the client side stuff!
On the client side
Ok so now we need to create a local (on your desktop machine) repository and then we’ll initiate the new remote repository… So, if your using Linux/MacOSX bring up the terminal and type the following commands:-
mkdir ~/Desktop/test-project
cd ~/Desktop/test-project
git init
git remote add origin http://<user>@<server name or IP address>/test-project.git
touch README
git add .
git commit -a -m “Initial import”
git push origin master
Done! – Your intiial file named ‘README’ which currently is just blank has now been committed and you’ve pushed your code to your new git server which has now completed the Git reposity creation process, now in future you can ‘clone’ your resposity like so:-
git clone <user>@<server name or IP address>/test-project.git
注意上面连接http://<user>@<server name or IP address>/test-project.git中的user就是你htpasswd -c /etc/apache2/passwd.git <user>输入的用户名。
另外新建仓库的时候,只需执行:
cd /var/www
mkdir 项目名
cd 项目名
git --bare init
git update-server-info
chown -R www-data.www-data .
然后在/etc/apache2/conf.d/git.conf中对应添加上面类似段即可。
其中:
AuthUserFile 密码文件名
后面的文件就是你指定的密码文件,你可以
htpasswd -c 密码文件名 <user>
对应指定该项目的用户名和密码即可。添加用户是不要-c参数:
htpasswd 密码文件名 <user>
F. 想买一个阿里云的服务器,要怎么配置
1、主要看你的网站每天大概多少流量。如果是一万PV访问量以下的话,用1核2g内存的阿里云服务器就可以了。
如果超过一万每天的访问量,就要考虑用 2核4g内存的服务器了,会更流畅。
2、可以在阿里云主机上面安装第三方一键php包的配置。好在国人也开发了这方面的面板,可以免费的使用。
3、至于网站搬家,可以手动搬家,也可以借助面板或者程序来实现半自动搬家。
4、借助这些 php面板,可以轻松配置php环境,mysql数据库,phpmyadmin、nginx等环境软件。
不管使用的是win服务器还是linux 服务器,都可以在三方面板的帮助下,成功配置出可视化操作界面,然后一键部署 worpdress环境。
因为这方面内容较多,这里也写不开那么多内容,所以你可以留言或到我的博客上搜索相关内容,老魏有写过教程,还不止一篇,都挺详细的内容,可以帮助你入门。
G. 小公司搭建gitlab,应该选择哪一种阿里云服务器
只跑gitlab一个应用的话至少保证双核4G以上的配置。如果还想跑一跑别的应用的话,那么4核8G以上开始考虑吧。
H. 怎么在阿里云服务器搭建gitlab
和本地搭建一样的,我之前也搭建过
虽然整个搭建过程无比之艰辛,几乎占用了我一天的时间,但是最后搭好了,还是很开心滴。最后,如果你买的是512M的乞丐版阿里云,建议一定要升级至1024M内存,同时创建sawpfile,大小1G就够了,否则跑不动就只能呵呵了。