bl双性强迫侵犯h_国产在线观看人成激情视频_蜜芽188_被诱拐的少孩全彩啪啪漫画

gitbush連接阿里云服務器 git連接遠程服務器

怎么用gitbash登錄服務器

1、前期準備 服務器上配置好的git git客戶端 1.1 在服務器上安裝git (本機所使用的linux是ubuntu) 在服務器輸入命令:sudo apt-get install git即可 然后創建名字為git的用戶組和用戶 1.2 下載客戶端 在瀏覽器地址欄輸入

創新互聯專注于四川企業網站建設,響應式網站,商城建設。四川網站建設公司,為四川等地區提供建站服務。全流程按需求定制設計,專業設計,全程項目跟蹤,創新互聯專業和態度為您提供的服務

阿里云服務器 怎么用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

windows 下遠程連接kafka服務器并創建topic 部署服務

一.打包項目鏡像:

利用Dockerfile 來打包項目的鏡像

本次項目共依賴兩個鏡像(一個基礎系統環境和一個項目鏡像)

本次直接將Dockerfile寫好后,用shell腳本build.sh啟動打包:

然后切換到項目的目錄下找到build.sh,運行即可打包項目鏡像

報錯:"failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: permission denied

"

就用

出現以下說明打包成功,接下來可以開始部署:

注意:如果遇到只讀權限不能修改時,將host文件復制一份到桌面,修改后在替換原來的host文件

在hosts文件末尾加上kafka服務器 !外網! 39. 0.25...地址,修改后的格式如下:

1.1注意: 修改阿里云服務器的hosts 文件來配置 kafka的服務器地址:

在hosts 文件最后加入:

添加的 kafka-server 就是以下創建topic命令中的 kafka-server別名,

監聽遠程kafka:新建消費者:

遠程創建topic的實例:

查看遠程已創建的topc:

本地:

遠程修改后的kafka topic:

2.通過git Bash 切換到kafka客戶端的bin目錄:

桌面打開 gitBash,切換到本地kafka軟件目錄:

這里一定要切換為windows

3.查看已經有的topic

--topic 指定topic名字

--replication-factor 指定副本數,因為我的是集群環境,這里副本數就為3

--partitions 指定分區數,這個參數需要根據broker數和數據量決定,正常情況下,每個broker上兩個partition最好

注意:服務器部署時候一定要用內網172. .開頭的,外部訪問設為外網ip

不然會導致Kafka寫入數據的時候報錯 : TImeout

4.1本地docker創建topic:

4.2 本地windows 創建topic

進入本地軟件路徑KAFKA/BIN/WIONDOWS

創建topic

5.修改服務器的host:

一定要注意加sudo 不然會導致readonly 無法修改

在host 文件的末尾加上以下:

6.切換到工程部署的目錄

7.清理redis,不然數據有殘留:

7.1服務器上的redis掛載清除:

在 docker-compose.yml中注銷這幾行: 目的是每次啟動不必記錄上次沒有執行完的數據.

這個是用來記錄redis中假如上次指定的是1到100萬塊,沒有執行完.下次接著執行沒執行完的任務,測試時暫時關閉

7.2刪除volume:

7.3 如果volume文件被占用時,先刪除占用容器:

7.4 清除redis中的數據

進入redis容器中:

8.部署命令:

8.1開啟docker可視化web上監控docker:

然后訪問:

宿主機IP + 9000端口

8.2執行部署命令,啟動服務:

9.部署時報錯: yaml: line 46: did not find expected key

原因: docker-compose.yml文件中第46行 報錯

解決:將所有數據對齊,不要有多余的空格.

當前名稱:gitbush連接阿里云服務器 git連接遠程服務器
文章網址:http://vcdvsql.cn/article38/ddogjsp.html

成都網站建設公司_創新互聯,為您提供搜索引擎優化做網站標簽優化網站策劃微信小程序網站設計公司

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

外貿網站建設