×ðÁú¿­Ê±¹ÙÍøµÇ¼

Ôõô´î½¨github£¨½Ì³Ì·ÖÏí£©

Ëæ×Å¿ªÔ´Èí¼þµÄÐËÆðºÍgithub±»Î¢ÈíÊÕ¹º£¬Ô½À´Ô½¶àµÄ¿ª·¢Õߣ¬ÓÈÆäÊÇѧÉúºÍ³õѧÕßÃÇÓÐÒâÔ¸´î½¨×Ô¼ºµÄСÎÒ˽ÈËgithub£¬ÓÃÒÔ±¸·Ý×Ô¼ºµÄ´úÂëºÍ¿ªÔ´ÏîÄ¿£¬ÖÎÀí×Ô¼ºµÄ¿ª·¢Àú³ÌºÍ³É¼¨£¬²¢×·Çó־ͬ־ºÏµÄÊÖÒÕϲ»¶ÕߵĽ»Á÷¡£±¾ÎĽ«Ìṩһ·Ý¼òÆÓµÄgithub´î½¨½Ì³Ì£¬ÈçÏ£º

×¢²áÓòÃû

Ê×ÏÈÄãÐèÒªÉêÇëÒ»¸öÓòÃû£¬½¨ÒéÑ¡Ôñ×î³£ÓõÄ.ComÓòÃû£¬×¢²áÓöÈÔ¼ÔÚ100-200ÔªÖ®¼ä£¬ÉêÇëÓòÃûʱÐèÒªÌîдÕæʵµÄÐÅÏ¢£¬½¨ÒéʹÓÃ×Ô¼ºµÄÇ×ÓÑÃû×Ö¡£

ÉêÇëÔÆЧÀÍÆ÷

´î½¨GithubÐèҪһ̨×Ô¼ºµÄÔÆЧÀÍÆ÷£¬¿ÉÒÔÑ¡ÔñÌÚѶÔÆ¡¢°¢ÀïÔÆ»òAWSµÈ£¬½¨ÒéÑ¡Ôñ×î×ÔÖƵĻù´¡ÐÍÉèÖü´¿É¡£

×°ÖÃGitºÍNginx

ÔÚÖÕ¶ËÊäÈëÒÔÏÂÏÂÁװÖÃGitºÍNginx£º

sudo apt-get update

sudo apt-get install git

sudo apt-get install nginx

ÌìÉúSSH Key

ÔÚÖÕ¶ËÊäÈëÒÔÏÂÏÂÁ²¢ÊäÈë×Ô¼ºµÄGithubÓÊÏäµØµã£º

ssh-keygen -t rsa -b 4096 -C “your_email@example.com”

»Ø³µºó»áÌáÐÑÊäÈëÎļþÃûºÍÃÜÂ룬¿É²»ÌîÖ±½Ó»Ø³µ¡£ÌìÉúºó»áÔÚÓû§Ö÷Ŀ¼ÏÂ.sshÎļþ¼ÐÖп´µ½Á½¸öÎļþ£¬id_rsaºÍid_rsa.pub¡£

¸´ÖÆSSH Keyµ½Github

ÔÚÖÕ¶ËÊäÈëÒÔÏÂÏÂÁ½«SSH Key¸´ÖƵ½¼ôÌù°å£º

sudo apt-get install xclip

xclip -sel clip

µÇ¼Github£¬½øÈëСÎÒ˽ÈËÉèÖã¬Ñ¡ÔñSSH keys£¬ÔÚNew SSH keyÀ¸ÖУ¬ÊäÈëTitleºÍKey£¬½«¸Õ¸Õ¸´ÖƵÄSSH KeyÕ³Ìùµ½KeyÖУ¬µã»÷Add SSH key¼´¿É¡£

ÉèÖÃNginx

ÔÚÖÕ¶ËÊäÈëÒÔÏÂÏÂÁ·­¿ªNginxÉèÖÃÎļþ£º

sudo vim /etc/nginx/sites-available/default

ÔÚÎļþÖÐÕÒµ½server {}£¬É¾³ýÕû¸ö{}ÄÚµÄÄÚÈÝ£¬½«ÒÔÏ´úÂ븴ÖƽøÈ¥£º

server {

listen 80 default_server;
listen [::]:80 default_server;
server_name example.com www.example.com;  #Ìæ»»³É×Ô¼ºµÄÓòÃû
root /var/www/html;  #¸ùĿ¼
index index.html index.htm index.nginx-debian.html;
location / {
    proxy_pass https://github.com;  #ת·¢µ½github
}

µÇ¼ºó¸´ÖÆ

}

ÉúÑIJ¢Í˳ö¡£

ÖØÆôNginx

ÔÚÖÕ¶ËÊäÈëÒÔÏÂÏÂÁÖØÆôNginxЧÀÍÆ÷£º

sudo systemctl restart nginx

²âÊÔGithub´î½¨

ÔÚä¯ÀÀÆ÷ÖÐÊäÈë×Ô¼ºµÄÓòÃû£¬ÀýÈ磺http://example.com£¬ÈôÊÇÌøתµ½githubµÄÒ³Ã棬Ôò˵Ã÷Github´î½¨Àֳɡ£

½áÓ

ͨ¹ý±¾ÎÄËùÊöGithub´î½¨½Ì³Ì£¬Äã¿ÉÒÔÇáËɴһ¸öÊôÓÚ×Ô¼ºµÄGithub£¬²¢ÔÚÉÏÃæÖÎÀí×Ô¼ºµÄ´úÂëºÍ¿ªÔ´ÏîÄ¿£¬¼Í¼×Ô¼ºµÄÊÖÒÕÉú³¤Àú³Ì£¬²¢ºÍ־ͬ־ºÏµÄÊÖÒÕϲ»¶ÕßÃÇÏ໥½»Á÷ºÍ·ÖÏí¡£Ï£ÍûÄܶÔÄãµÄѧϰºÍÊÂÇé´øÀ´×ÊÖú£¡

ÒÔÉϾÍÊÇÔõô´î½¨github£¨½Ì³Ì·ÖÏí£©µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ