kevinsky
    • 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

      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
    • 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

    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
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # EDA Lab 伺服器管理 ##### tags: `EDA Lab`, `Tutorial` ## 主要工作 確保服務器的網路和運作維持在最佳狀態 1. 遵循TSRI的規則來更新軟體;確保實驗室可以使用相同規格性能的EDA軟體(需要寄實體申請書至新竹TSRI) 2. 裝置系統的持續優化,確保實驗室的設備都能夠以最佳性能運作 3. 移除、大換舊有過時的設備,與實驗室助理更新設備清單(確認經費情況) ## 建議 1. 網路架構與實驗室伺服器設定可以查 `EDA Lab Server.zip` 2. `Google` 會是你的好朋友 3. 伺服器專業問題可以問廠商,目前是 `阿孟` ## Todo - [ ] EDA tools更新 (innovus + icc2 安裝) - [ ] 遠端管理器(網路攝影機 + 冷氣遠端開關) - [ ] UPS自動開機 ## 定期事項 1. 遠端管理 209機房狀況 (負載、室溫、停電) 2. 確認備份情況 (有事才處理) 3. 確認防火牆運行狀況 (有事才處理) 4. 確認UPS電池狀況(是否亮橘燈) 5. 停電時要提早關設備、並寄信告知實驗室成員 ## 現行架構 1. 使用: **EDA-xx** 透過 `/home` 和 `/work` 掛載到 **EDA-100 (EDA-NAS)** 的 `/data/home` 和 `/data/work (NFS)` 2. 網路: **WAN** -> **BL-ZyXEL** -> **EE2-ZyXEL** -> **EDA-xx** 3. 登入: 由 **EDA-100** 管理遠端登入 (NIS) 4. 備份: **EDA-100** 由asyn備份到 **EE2-NAS1**,再由 **EE2-NAS1** 中的 Hybrid Backup Sync 同步到 **BL-NAS2** ![image](https://hackmd.io/_uploads/BJ0CCzdBp.png) *LAB 網路架構 - 2023版* **簡而言之,兩邊防火牆互連,由 EDA-100管理NIS與NAS系統 (在上面不可跑程式)** ## 遠端設備 - EE2-209:140.112.20.242(192.168.20.xx) 1. EDA-xx(500xx):工作站(xx<=39) 2. EDA-29(50029):實驗室網頁的後端機器,此機器的sudoer會有網路管理員(記得提醒他們不要動到NIS和NFS) 3. EDA-10(50010):前 `/home` 和 `/work` 存放器,前帳號登入驗證機器 4. EDA-100(50100):目前帳號登入驗證機器,以及 `/home` 和 `/work` 存放器,備份系統(9877)中主要的被備份機器,目前名稱為 **EDA-NAS**,不確定改名會不會有很多問題 5. EE2-ZyXEL(1):防火牆,控制 BL-ZyXEL 和vpn方式連接,只接受 EE2-209 ip連接 6. EE2-NAS1(101:8080):主要備份 **EDA-100** 的 `/home` 以及`/work`,並且同步到 **BL-NAS2** 7. EE2-Dellemc n3224t-on(254):網路交換器,分配 EE2-209 內網ip為192.168.20.xx 8. UPS:提供 EE2-209 遠端管理的電源,目前還沒有自動開關機 9. NTUH-Project(137~141):台大醫院合作計畫伺服器(DGX),137對應外部port 40137,其他沒有開對外port - BL-406 : 140.112.48.61(192.168.232.xx) 1. BL-ZyXEL(1:37558) : 防火牆,管理WAN到 BL-406 以及 BL-406 到 EE2-209 的網路連線 2. BL-Cisco2960X(254) : 網路交換器,分配 BL-406 內網ip,pc-xx對應到192.168.232.xx 3. BL-Nas2(7:8080) : 由Nas系統軟體自動從 EE-Nas1 同步檔案 4. pc-xx : 實驗室個人電腦,xx為座位編號,若要開啟遠端,對應到 port 200xx 5. UPS : 提供 BL-406 機器在跳電時的電源,目前還沒有自動開關機 ## CAD軟體 - 每年需重新申請license(設計服務->軟體申請) - 安裝軟體至 `/work/cad/<vendor>` - 安裝和source啟動指令 `$ tch` 切換到 tch shell - 可以參考TSRI網頁上的 `installation_guide_cadence` ### 安裝教程(innovus example) 1. 下載軟體,解壓縮到 `/work/cad/cadence` - `$ tar xfva <Your_Path>/INNOVUS_20.10.000_linux_3of3.tgz -C .` - cur 為捷徑而已,指向現在使用的版本,可自行切換 2. 下載vendor共用檔 CIC.tar,並解壓縮到 `/work/cad/cadence`下 - `$ tar xvf <Your_Path>/CIC.tar` - 移動 `/work/cad/cadence/CIC` 底下的 `.cshrc` 檔,將使用路徑 `/usr/cad` 改為 `/work/cad` - `$ cd /work/cad/cadence/CIC` - `$ sed -i 's|/usr/cad/|/work/cad/|g' *.cshrc` 3. 重新確認路徑是否修改正確,若沒有可手動修改 - `$ grep /usr/cad/ *` 4. license設定 1. 編輯host檔,新增TSRI的license server - `$ vim /etc/hosts`![image](https://hackmd.io/_uploads/H1LlNXdHp.png) 2. 修改`/work/cad/<vendor>/CIC/license.cshrc`裡的LIC_SERVER環境變數 $ vim `/work/cad/<vendor>/CIC/license.cshrc` 舊的為lsntu,新的為lshc(參考EDA軟體license移轉公告的信件) ![image](https://hackmd.io/_uploads/H1-rN7OBT.png) 5. 使用方式 1. source檔案 `$ tcsh` `$ source /work/cad/<vendor>/CIC/<tool>.cshrc` (tool為要使用的工具) 開啟軟體,檢查是否能正確執行 `$ <tool>` 6. 缺少套件 1. source完執行`checkSysConf`,列出目前能找到的軟體名稱 2. `$ checkSysConf -r` 對軟體檢查dependency package - `$ checkSysConf <release name>` - 新機台檢查`x86_64`架構下的package是否有缺 - 舊機台檢查`i686`架構下的package是否有缺 ## NFS 設定 ### 1. Server端設定 `$ vim /etc/exports` # 編輯共用的檔案與資料夾 `$ sudo firewall-cmd --zone=public --permanent --add-service={rpc-bind,mountd,nfs}` # 開啟防火牆相關服務 `$ systemctl restart nfs-server` # 重開nfs ### 2. Client端設定 `$ vim /etc/hosts` # 加入host-name對應 `$ vim /etc/fstab` # 固定掛載host name ## NIS 設定 ### 創建帳號 參考 `/root/create_account.sh` ### Client端設定 `$ vim /etc/yp.conf` # 設定**EDA10**改成 **EDA-NAS**即可 ## 遠端桌面 - EE2-209(**EDA-xx**) - 設定: 1. 在**EDA-xx**安裝遠端桌面環境(gnome, xfce4...) 2. 在**EDA-xx**安裝xrdp 3. 在**EDA-xx**開啟xrdp的port(預設3389) 4. 設定**EE2-ZyXEL** port forwarding(NAT),將140.112.20.242:300xx對應到192.168.20.38:3389 5. 設定**BL-ZyXEL**,將開放的ip新增到Xrdp_EE-209中,同時設定140.112.48.61:300xx對應到140.112.20.242:300xx - 使用: 遠端連線到**EDA-xx**,使用windows遠端桌面,ip 140.112.48.61,port 300xx - BL406(**pc-xx**) - 設定: 1. 在**pc-xx**設定定向網ip 2. 設定**BL-ZyXEL**設定,若WAN1->BL406開啟**pc-xx**即可 - 使用: - 使用windows遠端桌面,ip 140.112.48.61,port 200xx ## 安裝軟件 1. `$ yum install <pkgname>` # centOS安裝軟件 2. `$rpm <pkgname>.rpm` # 手動安裝,確保檔案是32 bit支援的,可以參考網站4.找尋軟體 ## 其他細節 1. `$ vim /etc/motd` # 更改 **EDA-xx** 中的登入訊息 2. `$ nc -v <ip> <port>` # 檢查對應port的連線 3. `firewalld` 本機防火牆設定 4. `sudo su` 目前root無法使用ssh登入,sudoer可以使用此指令進入root(若要開啟可以到`/etc/ssh/sshd_config`更改) 5. `wall<enter> <<message><enter>> ... <ctrl-d>` 廣播訊息給所有正在連線的使用者 ## Docker rootless 安裝 :::info 修改自[NTU NASALab 工作站 Docker 使用方式](https://wslab.csie.ntu.edu.tw/workstation/docker_tutorial.html) ::: ### Step 0. 修改 `/etc/nvidia-container-runtime/config.toml` :::warning 這會導致 root 版 docker 無法使用 GPU ::: 改變內容如下: ``` [nvidia-container-cli] no-cgroups = true ``` ### Step 1. 啟用 systemd 的 linger 功能與註冊 subuid / subgid range: :::warning 需要詢問 NASALab script,目前暫時由 server 管理者代為設定: 1. 查看現有 mapping ```shell! $ cat /etc/subuid $ cat /etc/subgid ``` 2. 新增 mapping ```shell! $ echo "yjchen:100000:65536" >> /etc/subuid $ echo "yjchen:100000:65536" >> /etc/subgid ``` `<user name>:X00000` 要隨檔案遞增 ::: ### Step 2. 安裝 rootless docker 並設定安裝路徑 ```shell! $ cd ~ $ mkdir -p .local/docker $ curl -fsSL https://get.docker.com/rootless | DOCKER_BIN=~/.local/docker/bin FORCE_ROOTLESS_INSTALL=1 sh ``` ### Step 3. 設定 DOCKER_HOST 與 PATH 環境變數: `$ export PATH=$HOME/bin:$PATH` `$ export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock` 此兩行設定可以在上一步指令輸出的最後面找到: ``` # Docker binaries are installed in [...] which: no dockerd in ([PATH...]) # WARN: dockerd is not in your current PATH or pointing to [...]/dockerd # Make sure the following environment variables are set (or add them to ~/.bashrc):\n export PATH=[...]:$PATH export DOCKER_HOST=unix:///run/user/[uid]/docker.sock ``` 若輸出是如此代表 PATH 已有設定,只需在設定 DOCKER_HOST 即可: ``` # Docker binaries are installed in [...] # Make sure the following environment variables are set (or add them to ~/.bashrc):\n export DOCKER_HOST=unix:///run/user/[uid]/docker.sock ``` 亦可將此設定放入慣用的 shell 設定檔(例如 ~/.bashrc)當中。 ### Step 4 :::warning 由於尚未購買 Docker 用磁碟 /tmp2,因此暫時用 EDA38 的系統碟代替。 首先建立 docker 用的資料夾 ```shell! $ cd /docker_data $ mkdir -p <user-name>/docker ``` ::: 由於 docker 的資料可能會占用較大空間,建議將 docker 的資料路徑放到 /tmp2 下:可以透過設定 `~/.config/docker/daemon.json`,來達成切換資料存放路徑,例如以下的設定會將資料擺放至 `/docker_data/<user-name>/docker` 裡。 ```json! { "data-root": "/docker_data/<user-name>/docker" } ``` 詳細可參考 docker 官方 文件1 與 文件2。 設定完畢後,重新啟動 docker daemon 來載入正確設定: ```shell! $ systemctl --user daemon-reload $ systemctl --user restart docker ``` ### Step 5 安裝完畢,可使用 docker 相關指令,並可使用 `systemctl --user start docker`、`systemctl --user stop docker` 開始/停止 docker daemon。 ### Step 6 檢查安裝,用 `which docker` 和 `docker info` 確認 docker 安裝在家目錄下、資料路徑被設為 `/docker_data/<user-name>/docker` ## Docker rootless 移除 ### Step 1. 停止並移除相關檔案 ```shell! $ systemctl --user stop docker $ ~/.local/docker/bin/dockerd-rootless-setuptool.sh uninstall --force $ ~/.local/docker/bin/rootlesskit rm -rf /docker_data/<user name>/docker/ $ rm -rf ~/.local/docker/ ``` ### Step 2 移除 `~/.bashrc` 中 docker 相關的環境變數設定,並重新登入 ### 參考資源 1. [docker rootless - centos stream 8](https://www.jianshu.com/p/327a8da9577b) 2. [docker rootless 安裝](https://blog.csdn.net/networken/article/details/128414276) 3. [Docker Rootless 在非特权模式下运行 Docker](https://cloud.tencent.com/developer/article/1927619) ## 其他軟體 1. 後門偵測 rkhunter 2. 防毒軟體 clamav 3. 流量監控 iftop 4. 防止暴力破解 denyhosts ## 參考資源 1. [鳥哥的Linux私房菜](https://linux.vbird.org/) 2. [Server World](https://www.server-world.info/en/) 3. [Packages for Linux and Unix](https://pkgs.org/) 4. [RPM package search](https://rpmfind.net/linux/rpm2html/search.php) 5. [Previous Tutorial(2022)](https://hackmd.io/@mhchung/B1l3KFl5q?fbclid=IwAR3VKcMVR5VpHyrds78yGlJkVUMzw_uqj80tOu8uFMpCexiqwx-NmSyW1do#EDA-Lab-%E4%BC%BA%E6%9C%8D%E5%99%A8%E7%AE%A1%E7%90%86) ## 配電流程 1. 確認電力需求 2. 聯絡電機系系辦,取得後續配電評估窗口 3. 與窗口前往評估所需電力 4. 等待窗口繪製電力變更圖 5. 將新增電力需求與電力變更圖交給實驗室助理,請他幫忙送電力變遷申請 6. 實際施工

    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