Aliyun server CentOS configuration process record

Source: Internet
Author: User
Tags ssh centos git clone aliyun

Step1. System Mount Data disk

Df-h, the data disk is not visible.

Fdisk-l, you can see the data disk
Execute the "fdisk-s 56/dev/xvdb" command to partition the data disk;
According to the prompts, enter "n", "P" "1", two times carriage return, "Wq", the partition begins, will soon complete.

Using the "fdisk-l" command, you can see that the new partition XVDB1 has been built.

To format a new partition using the "MKFS.EXT3/DEV/XVDB1" command

Write new partition information using the "Echo '/dev/xvdb1/mnt ext3 defaults 0 0 ' >>/etc/fstab" (without quotes) command.
Then use the "cat/etc/fstab" command to view.

Use the "mount-a" command to mount a new partition, and then use the "df-h" command to view it, with the following information stating that the mount is successful and you can start using the new partition.



STEP2 Installation Node

Verify that the server has Nodejs compiled and dependent software, and if not, install it by running the following command.
[root@bobserverstation local]# yum-y install gcc gcc-c++ openssl-devel
Download the Nodejs source package and unzip it.

[Root@bobserverstation local]# wget http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
[Root@bobserverstation local]# tar zxvf node-v0.10.24.tar.gz
[Root@bobserverstation local]# CD node-v0.10.24

Configuration, compilation, installation.

[Root@bobserverstation node-v0.10.24]#./configure--prefix=/usr/local/node
[Root@bobserverstation node-v0.10.24]# make && make install

Next Configure the node environment

[Root@bobserverstation node-v0.10.24]# Vim/etc/profile


#set Nodejs Env
Export Node_home=/usr/local/node
Export path= $NODE _home/bin: $PATH
Export node_path= $NODE _home/lib/node_modules: $PATH

[Root@bobserverstation node-v0.10.24]# Source/etc/profile--reboot effective

Test whether the installation was successful

[Root@bobserverstation node-v0.10.24]# Node-v

v0.10.24


step3 build git server

Install git:
#yum Install git
Install the Python setuptool
#yum Install Python Python-setuptools
Install Gitosis
#git Clone Git://github.com/res0nat0r/gitosis.git

#cd gitosis/

#python setup.py Install

The client produces the key and uploads it to the server side:

#ssh-keygen-t RSA

#scp ~/.ssh/id_rsa.pub root@ Server ip:~/

To build the management library on the server side:

#sudo-H-u git gitosis-init < ~/id_rsa.pub

Initialized empty git repository in/home/git//repositories/gitosis-admin.git/reinitialized existing git repository in/ home/git/repositories/gitosis-admin.git/

Annotations:

1. Generated gitosis-admin for GIT user access Rights Management library, gitosis through this git library to manage all Git library access rights.
2. By performing initialization, the owner of the public key can modify the special Git repository that is used to configure Gitosis.

Modify Upload permission:

#chmod 755/home/git/repositories/gitosis-admin.git/hooks/post-update

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.