JasonVerse
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
      • Create new note
      • Create a note from template
        • Sharing URL Link copied
        • /edit
        • View mode
          • Edit mode
          • View mode
          • Book mode
          • Slide mode
          Edit mode View mode Book mode Slide mode
        • Customize slides
        • Note Permission
        • Read
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Write
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invite by email
        Invitee

        This note has no invitees

      • Publish Note

        Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

        Your note will be visible on your profile and discoverable by anyone.
        Your note is now live.
        This note is visible on your profile and discoverable online.
        Everyone on the web can find and read all notes of this public team.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        See published notes
        Unpublish note
        Please check the box to agree to the Community Guidelines.
        View profile
      • Commenting
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Suggest edit
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
      • Emoji Reply
      • Enable
      • Versions and GitHub Sync
      • Note settings
      • Note Insights New
      • Engagement control
      • Make a copy
      • Transfer ownership
      • Delete this note
      • Save as template
      • Insert from template
      • Import from
        • Dropbox
        • Google Drive
        • Gist
        • Clipboard
      • Export to
        • Dropbox
        • Google Drive
        • Gist
      • Download
        • Markdown
        • HTML
        • Raw HTML
    Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Engagement control Make a copy Transfer ownership Delete this note
    Import from
    Dropbox Google Drive Gist Clipboard
    Export to
    Dropbox Google Drive Gist
    Download
    Markdown HTML Raw HTML
    Back
    Sharing URL Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Customize slides
    Note Permission
    Read
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Write
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- tags: 自學筆記系列 --- # 學校工作站 使用筆記(公開版) ## 登入方式 ### 使用PuTTY登入 1.找到PuTTY並打開 ![](https://i.imgur.com/2nZ1MNZ.png) 2.點擊兩下 ![](https://i.imgur.com/a3ZFKYw.png) 3.輸入密碼(不能用複製的) ### 使用cmd登入 1.打開cmd ![](https://i.imgur.com/IumvXpX.jpg) 2.輸入 :::info ssh 工作站帳號名@tux.cs.ccu.edu.tw ::: ![](https://i.imgur.com/rBPVRJx.jpg) 3.輸入密碼(複製密碼後點右鍵貼上) ![](https://i.imgur.com/flFz3nO.jpg) 4.登入成功畫面 ![](https://i.imgur.com/aFTqKPu.jpg) ## 存取伺服器內的資料夾 FTP是一種檔案傳輸協定,要將檔案上傳至伺服器便需要透過此種協定 注意:需先透過VPN連到學校網路才能操作 1.打開檔案總管,在檔案路徑那行打上 :::info ftp://daemon.cs.ccu.edu.tw ::: ![](https://i.imgur.com/Xo567B2.png) 2.在跳出的視窗中輸入自己的工作站帳密,接著按登入 3.若有出現檔案資料夾,即為登入成功 ![](https://i.imgur.com/5P9hQg7.png) ## 建立他人連的到的網頁(靜態) 可以將網頁(html)放到工作站上,使用者只要輸入特定url即可連線 例如我將我的網站(index.html)放到 :::info ftp://daemon.cs.ccu.edu.tw/WWW/Homepage/ 此目錄下 ::: ![](https://i.imgur.com/RtGIoOO.png) 則使用者的url為 :::info https://www2.cs.ccu.edu.tw/~wyk110u/Homepage/index.html (wyk110u為自己的工作站帳號名) ::: 若網站名剛好是index.html,使用者輸入url時便可省略為 :::info https://www2.cs.ccu.edu.tw/~wyk110u/Homepage (wyk110u為自己的工作站帳號名) ::: ## 在工作站上安裝所需模組 伺服器上只能執行python,所以所有的安裝都必須以python語法進行。在用cmd登入伺服器後的介面下執行 :::info (python2) curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py (python3) curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py ::: 接著執行 :::info (python2) python get-pip.py (python3) python3 get-pip.py 註:如上所示,伺服器上預設是使用python2,若想使用python3,則像上面一樣多打一個3即可 ::: 如此一來,便能夠使用 :::info python3 -m pip install 模組名 ::: 來安裝模組 ### 特別補充 若安裝的模組是欲在伺服器上使用的功能,因為模組是安裝在特殊地方,故使用該模組的功能時必須打上該模組的路徑 例如我的gunicorn是安裝在以下路徑上的 :::info gunicorn in ./.local/lib/python2.7/site-packages ::: 則我在cmd中使用該功能時,前面要加上路徑 :::info /cshome/under/u110/wyk110u/.local/bin/gunicorn myProject.wsgi:application ::: 而不能只打上 :::info gunicorn myProject.wsgi:application ::: ## 使用gunicorn在工作站上部屬django網站 1.安裝gunicorn模組,用cmd登入伺服器後的介面下執行 :::info python3 -m pip install gunicorn ::: 2.將操作目錄移至manage.py所在的資料夾下 3.使用gunicorn部屬網站,打上 :::info /cshome/under/u110/wyk110u/.local/bin/gunicorn myProject.wsgi:application -b 127.0.0.1:3000 myProject是Django專案名(也就是與manage.py同層的自己設定的資料夾名) 127.0.0.1:3000 是部屬的位置 ::: 4.可以使用以下指令查看gunicorn的運行狀況 :::info ps aux | grep gunicorn ::: ## 使用tmux在伺服器上永久運行python程式碼 這邊舉discord bot的例子 1.開啟cmd登入工作站,並移到欲執行的python檔所在資料夾中 ![](https://i.imgur.com/a4AQEsX.jpg) 2.創建一個多會話終端管理 :::info tmux new -s Discord_Bot (tmux new -s 會話名稱) ::: ![](https://i.imgur.com/0mjYWdu.jpg) 看到底下綠綠的就是成功了 3.在這個會話下執行python程式碼,關掉ssh連線後程式也不會結束了 :::info python3 Discord_Bot.py ::: ![](https://i.imgur.com/pquxdUE.jpg) 4.想要離開的話先按下ctrl+b,再按下d,即可順利離開 ![](https://i.imgur.com/fhoBTwc.jpg) 5.想要回到上一個開啟過的會話,則輸入 :::info tmux attach ::: 6.若是有多個運行中的會話,並想指定進入其中一個的話,則先查看目前運行中的會話 :::info tmux ls ::: ![](https://i.imgur.com/LRrsCvu.jpg) 接著輸入 :::info tmux attach -t Discord_Bot (tmux attach -t 會話名) ::: 即可成功進入指定會話 7.想要刪除指定會話,則輸入 :::info tmux kill-session -t Discord_Bot (tmux kill-session -t 會話名) ::: ![](https://i.imgur.com/HYl0JjA.jpg) 即可成功刪除 8.想要刪除全部會話,則輸入 :::info tmux kill-server ::: 註:本文沒特別註明的話,指令皆不是在已進入會話的狀態下運行,須特別留意

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully