CentOS下如何安裝虛擬主機(jī)管理軟件DirectAdmin?
CentOS(CommunityENTerpriseOperatingSystem)是Linux發(fā)行版之一,它是來自于RedHatEnterpriseLinux依照開放源代碼規(guī)定釋出的源代碼所編譯而成。而DirectAdmin是一款付費(fèi)的虛擬主機(jī)管理軟件,通常簡稱為DA,DA比Cpanel功能上簡單,但是內(nèi)存占用也更少些,更重要的是價(jià)格也更便宜,一般自己用或者搞合租DA算是很合適的。下文介紹了在CentOS下安裝虛擬主機(jī)管理軟件DA(DirectAdmin)的方法。
安裝前首先確保已經(jīng)購買了DirectAdmin的授權(quán),購買授權(quán)后會有ClientID,LicenseID,也需要在DA官網(wǎng)上或者DA銷售商那里提交你的VPS或者服務(wù)器的IP和系統(tǒng)信息。
1、安裝CentOS的相關(guān)組件的命令如下:
- yumupdate-y
- yuminstallgcc-c++gccmakeautomakewgetflex-y
2、安裝DirectAdmin需要干凈的系統(tǒng),所以在裝之前要卸載掉httpd、php、mysql。
- yumremovehttpd*php*mysql*-y
3、下載DirectAdmin安裝腳本文件,執(zhí)行命令:
- wgethttp://directadmin.com/setup.sh
4、為DirectAdmin安裝腳本文件添加執(zhí)行權(quán)限,執(zhí)行命令:
- chmod+xsetup.sh
5、執(zhí)行DirectAdmin安裝腳本文件:
./setup.sh
運(yùn)行DirectAdmin安裝文件,然后在下面填入相關(guān)的信息。其中hostname最好最好使用如:linode.vpser.net之類的二級域名不要使用頂級域名。
- DirectAdmin’ssetuphasafewmorethingsyouneedtofill:
- PleaseenteryourClientID://輸入你的ClientID
- PleaseenteryourLicenseID://輸入你的LicenseID
- Pleaseenteryourhostname\(server.domain.com\)//輸入一個(gè)主機(jī)名,如:linode.vpser.net
- ItmustbeaFullyQualifiedDomainName
- Do*not*useadomainyouplanonusingforthehostname:
- eg.don’tusedomain.com.Useserver.domain.cominstead.
- Donotenterhttp://orwww
- Enteryourhostname(FQDN):
- Isthiscorrect?(y,n)://提示上面是否正確,正確請輸入y
- Iseth0yournetworkadaptorwiththelicenseIP?(y,n)://輸入y
- Isxx.xx.xx.xxtheIPinyourlicense?(y,n)://確認(rèn)IP是否是License上注冊的IP
- DirectAdminwillnowbeinstalledon:Enterprise5
- Isthiscorrect?(mustmatchlicense)(y,n)://輸入y
- Younowhave2optionsforyourapache/phpsetup.
- 1:customapache:older,moretested.IncludesApache1.3,php4andfrontpage.
- 2:custombuild1.1:newer,lesstested.IncludesanyApacheversion,php4,5,orbothincliand/orsuphp.FrontpagenotavailablewithApache2.x.
- Postanyissueswithcustombuildtotheforum:http://www.directadmin.com/forum/forumdisplay.php?f=61
- Enteryourchoice(1or2)://一般選擇2就行,使用php5
經(jīng)過這些步驟,DirectAdmin的安裝已經(jīng)完成了。
安裝完成后會提示:
DirectAdmin的用戶名密碼及DirectAdmin的管理后臺地址等。
一般基于OpenVZ的VPS需要在使用前打開/usr/local/directadmin/conf/directadmin.conf這個(gè)文件,確認(rèn)其中的ethernet_dev的值修改為:venet0:0,具體已ifconfig為準(zhǔn)。
執(zhí)行:servicedirectadminrestart重啟DirectAdmin,用http://IP:2222登錄DirectAdmin后臺。
總結(jié):
希望本文介紹的在CentOS下安裝虛擬主機(jī)管理軟件DirectAdmin的方法能夠?qū)ψx者有所幫助,更多有關(guān)linux系統(tǒng)的知識還有待于讀者去探索和學(xué)習(xí)。
【編輯推薦】