阿里云服務(wù)器加代碼 阿里云服務(wù)器教程

怎么將PHP代碼布到阿里云上

寫好的php代碼,直接使用ftp上傳到阿里云服務(wù)器就好了。

創(chuàng)新互聯(lián)公司專注于企業(yè)營銷型網(wǎng)站、網(wǎng)站重做改版、冷水江網(wǎng)站定制設(shè)計、自適應(yīng)品牌網(wǎng)站建設(shè)、HTML5建站成都做商城網(wǎng)站、集團(tuán)公司官網(wǎng)建設(shè)、成都外貿(mào)網(wǎng)站建設(shè)公司、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計等建站業(yè)務(wù),價格優(yōu)惠性價比高,為冷水江等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

ftp服務(wù)器,要看你是什么服務(wù)器系統(tǒng),windows的話,安裝iis的時候就有了。

linux的話,需要安裝vsftpd

阿里云服務(wù)器 怎么用git部署代碼

使用阿里云Ubuntu 12.0.4 64位操作系統(tǒng)做git服務(wù)器。

首先git服務(wù)器有兩種訪問方式可以選擇:http方式和ssh的方式,http方式更容易使用。

1、http方式的git服務(wù)器搭建以及使用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 ‘a(chǎn)pache2′, 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輸入的用戶名。

另外新建倉庫的時候,只需執(zhí)行:

cd /var/www

mkdir 項(xiàng)目名

cd 項(xiàng)目名

git --bare init

git update-server-info

chown -R www-data.www-data .

然后在/etc/apache2/conf.d/git.conf中對應(yīng)添加上面類似段即可。

其中:

AuthUserFile 密碼文件名

后面的文件就是你指定的密碼文件,你可以

htpasswd -c 密碼文件名 user

對應(yīng)指定該項(xiàng)目的用戶名和密碼即可。添加用戶是不要-c參數(shù):

htpasswd 密碼文件名 user

如何將源代碼部署到阿里云centos服務(wù)器上

小鳥云服務(wù)器niaoyun實(shí)例創(chuàng)建好之后,您可以使用以下任意一種方式登錄服務(wù)器:

遠(yuǎn)程桌面連接 (Microsoft Terminal Services Client, MSTSC):

采用這種方式登錄,請確保實(shí)例能訪問公網(wǎng)。如果在創(chuàng)建實(shí)例時沒有購買帶寬,則不能使用遠(yuǎn)程桌面連接。

管理終端 VNC:無論您在創(chuàng)建實(shí)例時是否購買了帶寬,只要您本地有網(wǎng)頁瀏覽器,都可以通過管理控制臺的管理終端登錄實(shí)例。

使用遠(yuǎn)程桌面連接 (MSTSC) 登錄實(shí)例

打開 開始菜單 遠(yuǎn)程桌面連接,或在 開始菜單 搜索 中輸入 mstsc。也可以使用快捷鍵 Win+R 來啟動運(yùn)行窗口,輸入

mstsc后回車啟動遠(yuǎn)程桌面連接。

在 遠(yuǎn)程桌面連接 對話框中,輸入實(shí)例的公網(wǎng) IP 地址。單擊 顯示選項(xiàng)。

輸入用戶名,如小鳥云默認(rèn)為 niaoyun。單擊 允許我保存憑據(jù),然后單擊 連接。這樣以后登錄就不需要手動輸入密碼了。

網(wǎng)站標(biāo)題:阿里云服務(wù)器加代碼 阿里云服務(wù)器教程
標(biāo)題鏈接:http://muchs.cn/article42/ddiehec.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供Google域名注冊、移動網(wǎng)站建設(shè)、微信公眾號、虛擬主機(jī)、網(wǎng)站設(shè)計

廣告

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

搜索引擎優(yōu)化