NCNU-OpenSource
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners 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

      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.
      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
    • Transfer ownership
    • Delete this note
    • 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 Help
Menu
Options
Engagement control 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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners 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

    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.
    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
    [toc] # Week 13 (2024/12/05) 檢討 + Rasperry Pi - Book mode https://hackmd.io/@ncnu-opensource/book ## 檔案傳輸 ### TA講義: https://hackmd.io/@KaiWhat/rkMrS5371l 1. 請問下列哪個選項不是能達成這件事的工具: (2%) - sl - scp - rsync - sftp ![image](https://hackmd.io/_uploads/BJpbSkkEJl.png) 2. ![image](https://hackmd.io/_uploads/SJpUSy1Vkg.png) ![image](https://hackmd.io/_uploads/S1pwSky4yg.png) ![image](https://hackmd.io/_uploads/rJzUL11V1l.png) ![image](https://hackmd.io/_uploads/HJrsUJyNyg.png) ![image](https://hackmd.io/_uploads/H1ja81y4kg.png) ![image](https://hackmd.io/_uploads/SyAgvJkN1l.png) ![image](https://hackmd.io/_uploads/B1Iwwy14yl.png) ![image](https://hackmd.io/_uploads/Bke6w1JEyg.png) ![image](https://hackmd.io/_uploads/r1SkOyJ4yl.png) ![image](https://hackmd.io/_uploads/ByJ7u1kEkg.png) ![image](https://hackmd.io/_uploads/r10XOy141e.png) ![image](https://hackmd.io/_uploads/S1fOdJ14ke.png) ![image](https://hackmd.io/_uploads/r1WjtJkV1e.png) ![image](https://hackmd.io/_uploads/Hky1c1kNJx.png) ![image](https://hackmd.io/_uploads/S1MLqkJVke.png) ![image](https://hackmd.io/_uploads/S1ZqcJyEkl.png) ![image](https://hackmd.io/_uploads/B1i3q114ye.png) ![image](https://hackmd.io/_uploads/rkkfo1yNJl.png) # 上機考檢討 ## 一、web server ### proxy 1.apache2 sudo vim /etc/apache2/ports.conf :::info Listen 改 8080: ![image](https://hackmd.io/_uploads/BkVbpkk41l.png) ::: sudo vim /etc/apache2/sites-available/000-default.conf ![image](https://hackmd.io/_uploads/r19ma1k41x.png) 得知apache2的default index file 該改哪裡: ![image](https://hackmd.io/_uploads/rkfJRJJVkl.png) 2.lighttpd ![image](https://hackmd.io/_uploads/HJ5LAJJNke.png) 改: server.document-root = "/var/www/lighttpd/bt.html" server.port=8081 index-file.names = ( "bt.html", "index.php", "index.html" ) 重啟服務:sudo service lighttpd restart 3. nginx ## SSH ### SSH 1.產生一對金鑰 - cd .ssh/ssh-keygen 2.把正確的金鑰放到以下伺服器,並用金鑰連進去 - ls .ssh - ssh-copy-id -i ~/.ssh/id_rsa.pub lsa@44.211.137.141 3.找助教 demo 時,給助教看連進去的過程 - ssh lsa@44.211.137.141 ### SSH Tunnel 1.把 SSH server 上的 port 8080 變成自己 localhost:12345。(當瀏覽器連到 http://localhost:12345 時,實際上顯示的是那台 SSH server 回傳的內容。) 指令: - ssh -L 12345:localhost:8080 lsa@44.211.137.141 畫面: ![image](https://hackmd.io/_uploads/r139UeJVyl.png) 2.把跟 SSH server 同個內網裡的 172.31.87.217:8080 變成自己 localhost:12346 (5%) 指令: - ssh -L 12346:172.31.87.217:8080 lsa@44.211.137.141 畫面: ![image](https://hackmd.io/_uploads/SJXNDgyNJe.png) 3.把自己 localhost:8080 變成 SSH server 上的 port <學號後 5 碼> (5%) 指令: ssh -R 0.0.0.0:13017:localhost:8080 lsa@44.211.137.141 畫面: ![image](https://hackmd.io/_uploads/ByeoYgy4Jl.png) # raspberrypi ## 灌OS 1.Google查raspberrypi 2.點Software 3.點See all download options ## 如何拆解? - step1:先把上殼拔掉 - step2:把右側白色殼拔掉後,可以看到一個紅色向上按鈕 - step3:看到紅色按鈕,往上推拔掉紅色大殼 - step4:另一邊白色也可以拔掉了 - step5:可以裝回去了(不要裝回去,直接裝晶片然後開機也可以) - 順序不唯一,可以自由發想 ## 啟用 1. 電源線 2. 黃色的燈在閃表示有在讀晶片 >1.要用 HDMI 線的話要先插HDMI線再插電源 >2.TTL 線: >黑色插在6號,白色插8號,綠色插10號(USB 接頭朝下,由上往下、左往右數) >3.SSH 到 pi ![connect-serial-to-raspberry-pi-model-b-plus](https://hackmd.io/_uploads/SynK_-JVyl.png) - Windows 裝驅動操作 >搜尋"裝置管理員" >![image](https://hackmd.io/_uploads/B1F5DbJ4yl.png) >要記得 COM (上面的是 COM3 ) 下載PuttY ![image](https://hackmd.io/_uploads/SyKptbJE1l.png) ![image](https://hackmd.io/_uploads/BkAZqWyNJx.png) ![image](https://hackmd.io/_uploads/B1vN9Z1VJl.png) 選Serial Serial line 填自己的 COM , Speed 那欄填入 115200 Saved Sessions填入想要的名稱 按Save,下次就可以按Load直接讀取設定檔 進去按一下Enter 全黑是有問題 - Scan WiFi / 蒐集WiFi資訊 帳號:LSA 密碼:123456

    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

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    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