Install Jupyter notebook on Ubuntu 24.04 and allow remote access.

References: Vultr How to Install Jupyter Notebook on Ubuntu 24.04 https://docs.vultr.com/how-to-install-jupyter-notebook-on-ubuntu-24-04 Prerequisites Ubuntu 24.04 Internet access Install Jupyter Notebook with pip Update the APT package index: sudo apt update Install the virtualenv package: sudo apt install python3-virtualenv -y Create a virtual environment: virtualenv jupyter_env Activate the virtual environment: source jupyter_env/bin/activate Install Jupyter Notebook: pip install jupyter Verify the installed version: jupyter-notebook --version You can deactivate the virtual environment at any time by running deactivate. ...

Ubuntu Server 笔记

这篇笔记记录了日常使用ubuntu时需要设置的笔记 systemd-networkd-wait-online.service systemd-networkd-wait-online.service 是 Systemd 的一个服务单元,主要用于在系统启动时等待网络连接就绪。 作用:该服务会等待 systemd-networkd 完成网络配置,并确认至少有一个网络接口在线后,才会标记为 ready,从而允许其他依赖网络的服务启动。默认情况下,它会监视所有由 systemd-networkd 管理的网络接口,直到连线成功或超时。 常见问题:如果 DHCP 获取 IP 耗时较长,可能导致系统启动卡在该服务;没有网络连接时,也可能会一直等待到超时。 优化方法:可以调整超时时间、禁用服务,或者检查网络配置。 调整超时时间 将 TimeoutStartSec 设置为 2sec: sudo vim /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service在 [Service] 部分添加: TimeoutStartSec=2sec保存后重新加载配置: sudo systemctl daemon-reload禁用服务 如果不需要严格等待网络就绪,可以禁用并屏蔽服务: sudo systemctl disable systemd-networkd-wait-online.service sudo systemctl mask systemd-networkd-wait-online.service优化网络配置 检查 /etc/netplan/50-cloud-init.yaml 或类似文件,确保 DHCP 配置正确。例如: ethernets: eth0: dhcp4: true对于固定 IP 环境,改用静态 IP 可避免 DHCP 延迟‌。 timedatectl 设置时区 sudo timedatectl set-timezone Asia/Shanghai timedatectl status #验证 开启时间同步并设置 NTP 服务器 apt-get install chrony -y cd /etc/chrony vim chrony.conf server time.google.com iburst server time2.google.com iburst server time3.google.com iburst systemctl enable chronyd systemctl restart chronyd # 检查服务状态、同步源及同步状态 sudo systemctl status chronyd chronyc sources -v chronyc trackingusermod usermod -aG lpadmin username # 将用户名添加到 lpadmin cat /etc/group

ikuai安裝腳本

在vps中安裝ikuai的操作步驟如下 命令操作部分 查看當前vps的ip地址和網關地址 ip route default via 10.0.0.1 dev eth0 proto dhcp src 10.0.0.14 metric 100 10.0.0.0/22 dev eth0 proto kernel scope link src 10.0.0.14新增腳本 #!/bin/bash # 檢查是否以 root 用戶運行 if [ "$EUID" -ne 0 ]; then echo "請以 root 用戶運行此腳本" exit 1 fi # 詢問用戶下載 32 位或 64 位版本 read -p "請選擇要下載的 iKuai8 版本 (32/64): " arch # 根據用戶選擇下載對應的 ISO 鏡像 if [ "$arch" == "32" ]; then url="https://www.ikuai8.com/download.php?n=/3.x/iso/iKuai8_x32_3.7.20_Build202506041743.iso" filename="ikuai8_x32.iso" elif [ "$arch" == "64" ]; then url="https://www.ikuai8.com/download.php?n=/3.x/iso/iKuai8_x64_3.7.20_Build202506041743.iso" filename="ikuai8_x64.iso" else echo "無效的選擇,請重試" exit 1 fi # 下載 ISO 鏡像 echo "正在下載 $filename..." wget "$url" -O "$filename" echo "下載完成" # 掛載 ISO 鏡像 echo "正在掛載 $filename..." sudo mount -o loop "$filename" /mnt if [ $? -ne 0 ]; then echo "掛載 $filename 失敗,請手動檢查" exit 1 fi echo "掛載成功" # 複製啟動文件 echo "正在複製啟動文件..." sudo cp -rpf /mnt/boot / # 檢查操作結果 echo "檢查操作結果:" if [ -f "$filename" ]; then echo "- $filename 存在" else echo "- $filename 不存在" fi if mountpoint -q /mnt; then echo "- 掛載成功" else echo "- 掛載失敗" fi if [ -d "/boot" ]; then echo "- 啟動文件已複製" else echo "- 啟動文件複製失敗" fi # 檢查主機 IP 地址和網關地址 ip_address=$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1) gateway=$(ip route show | grep default | awk '{print $3}') echo "- IP 地址: $ip_address" echo "- 網關地址: $gateway" echo "所有操作完成,請執行 reboot 重啟 VPS,並通過 VNC 連接控制台"執行腳本 chmod +x install_ikuai.sh bash install_ikuai.sh根據提示重啟vps 並通過vns 控制台連結vps ...

在 Ubuntu 24.04 LTS 中的安装ERPNext 笔记 Step by Step

文章目录 | Table of Contents ERPnext 简介 先决条件 安装步骤 总结 & 引用 先决条件 | Prerequisites 系统环境要求 Ubuntu 24.04 A user with sudo privileges Python 3.11+ pip 20+ MariaDB 10.3.x Node.js 18 Yarn 1.12+ 硬件要求 2 Process 2 Core 4GB ram 40GB Storage Intenet 安装步骤 | Installtion Steps 包升级和创建新用户 Update and Upgrade Packages sudo apt-get update -y && sudo apt-get upgrade -y Create a New user sudo adduser **Your-user-name** #Fill in the information as prompted sudo usemod -aG sudo **Your-user-name** su **Your-user-name** #Enter your password cd ~ 安装环境需要的包 Install Git ...

Share an Old Printer on Your Local Network - CUPS

In this article, I will share with you about my second time installing CUPS on Ubuntu. Requriement Ubuntu 18.04 LTS Install on an Old Computer Canon E410 Series Printer Internet CUPS Installation and Configuration Step by Step Install CUPS on your system #install cups sudo apt-get install cups cups-pdf cups-bsd Back up the configuration file #copy configuration file sudo cp /etc/cups/cupsd.conf cupsd.conf.bak Editing the CUPS configuration file #add user simith to lpadmin group sudo usermod -aG lpadmin simith #edit cupsd.conf sudo vim cupsd.conf Edited cupsd.conf contents. (Configuration options not mentioned should be left as default.) #allow access port Port 63100 LogLevel warn PageLogFormat MaxLogSize 200 # Show shared printers on the local network. Browsing on BrowseLocalProtocols dnssd # Web interface setting... WebInterface Yes # Restrict access to the server... <Location /> Order Allow,deny Allow @LOCAL Allow From 127.0.0.1 Allow From 192.168.0.0/16 </Location> # Restrict access to the admin pages... <Location /admin> #access user simith can visit admin page Require user simith Order Allow,deny Allow @LOCAL Allow 127.0.0.1 Allow From 192.168.0.0/16 </Location> # Restrict access to configuration files... <Location /admin/conf> AuthType Default Require user simith Order allow,deny Allow @LOCAL Allow 127.0.0.1 Allow From 192.168.0.0/16 </Location> # Restrict access to log files... <Location /admin/log> AuthType Default Require user simith Order allow,deny Allow @LOCAL Allow 192.168.0.0/16 </Location> Restart CUPS service and add to starup sudo systemctl restart cups sudp systemctl enable cupsEnd Finally, you can visit the Ubuntu IP address and configuration ...

SoftEther VPN Server Ubuntu 安装笔记

SoftEther 是一个由日本筑波大学开发的开源VPN 项目, 你可以自由的使用它为你的家庭或者公司组建虚拟局域网。 它拥有多平台服务端和客户端,方便简易的操作界面,得到了很多人的喜爱。接下来就跟着我的操作一起来学习一下吧。 SoftEther 简介 https://www.softether.org/9-about SoftEher下载 https://www.softether.org/5-download 服务端环境 Ubuntu 16.4.1 & Centos 7.6 操作步骤 通过SSH 客户端连接到Linux服务器,更新下载gcc工具 sudo apt-get update sudo apt-get install build-essential 将SoftEther服务端下载到Linux服务器(需要科学上网环境,根据你的系统版本下载相对应版本) wget https://www.softether-download.com/files/softether/v4.34-9745-rtm-2020.04.05-tree/Linux/SoftEther_VPN_Server/64bit_-_Intel_x64_or_AMD64/softether-vpnserver-v4.34-9745-rtm-2020.04.05-linux-x64-64bit.tar.gz 解压SoftEther服务端 tar -zxvf softether-vpnserver-v4.34-9745-rtm-2020.04.05-linux-x64-64bit.tar.gz 进入VPNserver 目录 进行make(make后会有3个问题询问。一直同意按1回车即可) cd vpnserver make 在vpnserver目录启动VPNServer ./vpnserver start #启动服务 ./vpnserver stop #停止服务启动服务之后可以直接通过Softher管理工具进行连接管理和初始化配置了。 这里就不一一介绍了。此笔记只记录服务端配置。 ubuntu 设置开机启动(编辑rc.local 目录把vpnserver 启动添加进去即可) vi /etc/rc.local /home/ubuntu/vpnserver/vpnserver start #exit 0 之前写入 Centos 7.6设置开机启动 请参阅此文章 https://www.itiohub.com/log/centos6run.html 这样一来服务端就配置完成。 接下来就可以根据自己需求来通过SoftEther 管理工具进行配置和管理了。 参考文章: https://dmesg.app/softether-vpnserver.html https://www.softether.org/

搜尋文章

輸入標題、分類或文章內容

開始輸入以搜尋文章