新聞中心
在Debian服務(wù)器上安裝PowerShell,首先更新軟件包列表,然后添加Microsoft的公鑰,最后使用apt-get命令安裝。
安裝前準(zhǔn)備
1、確保服務(wù)器已經(jīng)安裝了Debian操作系統(tǒng)。

創(chuàng)新互聯(lián)專(zhuān)注于企業(yè)全網(wǎng)營(yíng)銷(xiāo)推廣、網(wǎng)站重做改版、莊浪網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5響應(yīng)式網(wǎng)站、商城開(kāi)發(fā)、集團(tuán)公司官網(wǎng)建設(shè)、成都外貿(mào)網(wǎng)站建設(shè)公司、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁(yè)設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為莊浪等各大城市提供網(wǎng)站開(kāi)發(fā)制作服務(wù)。
2、連接到服務(wù)器,使用SSH工具(如PuTTY)登錄到服務(wù)器。
3、確保服務(wù)器具有足夠的磁盤(pán)空間和內(nèi)存資源。
更新系統(tǒng)軟件包
在安裝PowerShell之前,需要先更新系統(tǒng)軟件包,執(zhí)行以下命令:
sudo aptget update sudo aptget upgrade
安裝PowerShell
1、添加Microsoft PowerShell的官方倉(cāng)庫(kù):
wget https://packages.microsoft.com/config/debian/9/packagesmicrosoftprod.deb O packagesmicrosoftprod.deb sudo dpkg i packagesmicrosoftprod.deb
2、再次更新系統(tǒng)軟件包:
sudo aptget update
3、安裝PowerShell:
sudo aptget install powershell
配置PowerShell
1、運(yùn)行PowerShell:
pwsh
2、按照提示設(shè)置PowerShell的配置文件路徑:
$Home\Documents\WindowsPowerShellprofile.ps1
3、編輯配置文件,添加以下內(nèi)容:
導(dǎo)入模塊和別名設(shè)置等自定義內(nèi)容 ImportModule /usr/share/powershell/Modules/PoshGit/PoshGit.psm1 ImportModule /usr/share/powershell/Modules/PSReadLine/PSReadLine.psm1 SetPSReadLineOption PredictionSource History SetPSReadLineKeyHandler Key "Tab" Function MenuComplete SetPSReadLineKeyHandler Key "Ctrl+d" Function ReadLineDeleteCharOrExit SetPSReadLineKeyHandler Key "Ctrl+z" Function Undo SetPSReadLineKeyHandler Key "Ctrl+a" Function StartOfLine SetPSReadLineKeyHandler Key "Ctrl+e" Function EndOfLine SetPSReadLineKeyHandler Key "Ctrl+b" Function BackwardChar SetPSReadLineKeyHandler Key "Ctrl+f" Function ForwardChar SetPSReadLineKeyHandler Key "Alt+f7" Function MenuComplete SetPSReadLineOption HistoryNoDuplicates true SetPSReadLineOption BellStyle None SetPSReadLineOption PredictionSource UserInput, History, CommandKeywords, CommandAliases, FunctionKeywords, ScriptKeywords, Acronyms, HistoryLookupOrder, MatchingCommand, CompleteWord, AutoSuggestionSourceHistory, AutoSuggestionIgnoreCase, AutoSuggestionListView, AutoSuggestionTrimFilter, PotentialCompletionsToDismiss, VimMode, VimEscapeCharacter, VimInsertModeNormal, VimInsertModeVisualBlock, VimInsertModeReplace, VimMapLocalToRemote, VimMapRemoteToLocal, VimMovementCommands, VimNavigationCommands, VimSelectMode, VimSurround, VimVisualMode, VimEnterModeDefault, VimLeaveModeDefault, VimCloseCurrentTab, VimCloseOtherTabs, VimNextTab, VimPreviousTab, VimGoToLastEditLocation, VimRestoreCursorPositionAfterSearch, VimSaveCursorPositionBeforeSearch, VimSwitchToLastEditedFile, VimFindFileUnderCursor, VimFindNextFileUnderCursor, VimFindPrevFileUnderCursor, VimFindFileInProjectUnderCursor, VimFindNextFileInProjectUnderCursor, VimFindPrevFileInProjectUnderCursor, VimFindFileInDirectoryUnderCursor, VimFindNextFileInDirectoryUnderCursor, VimFindPrevFileInDirectoryUnderCursor, VimFindFileInVimPathUnderCursor, VimFindNextFileInVimPathUnderCursor, VimFindPrevFileInVimPathUnderCursor, VimFindFileInGrepPathUnderCursor, VimFindNextFileInGrepPathUnderCursor, VimFindPrevFileInGrepPathUnderCursor, VimFindFileInTagUnderCursor, VimFindNextFileInTagUnderCursor, VimFindPrevFileInTagUnderCursor, VimFindFileInBookmarkUnderCursor, VimFindNextFileInBookmarkUnderCursor, VimFindPrevFileInBookmarkUnderCursor, VimFindFileInRegisterUnderCursor, VimFindNextFileInRegisterUnderCursor, VimFindPrevFileInRegisterUnderCursor, VimUseSystemClipboardForCopyAndPasteEnabled, VimUseSystemClipboardForCutEnabled, VimUseSystemClipboardForPasteEnabled, VimUseSystemClipboardForUndoCutEnabled, VimUseSystemClipboardForUndoCopyEnabled, VimUseSystemClipboardForUndoPasteEnabled, VimUseSystemClipboardForDeleteEnabled, VimUseSystemClipboardForYankEnabled, VimUseSystemClipboardForUndoDeleteEnabled, VimUseSystemClipboardForUndoYankEnabled, VimUseSystemClipboardForChangeEnabled, VimUseSystemClipboardForReplaceEnabled, VimUseSystemClipboardForSubstituteEnabled, VimUseSystemClipboardForTransposeEnabled, VimUseSystemClipboardForUndoSubstituteEnabled, VimUseSystemClipboardForUndoTransposeEnabled, VimUseSystemClipboardForUndoChangeEnabled, VimUseSystemClipboardForUndoReplaceEnabled source $Profile # 加載配置文件中的自定義設(shè)置和模塊等
網(wǎng)頁(yè)題目:Debian服務(wù)器安裝PowerShell教程(debian服務(wù)器安裝)
網(wǎng)址分享:http://m.fisionsoft.com.cn/article/cochocs.html


咨詢
建站咨詢
