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

Pangolin 安装和使用示范

Pangolin 安装和使用示范 前提条件 为了跟随视频中的操作和配置教学,以下条件是可选的。 视频内容: https://www.bilibili.com/video/BV1cAJHz8EAj/ 一台有独立公网IP地址的云服务器 一个域名 一台在本地局域网中运行的Linux服务器 (博主的是Ubuntu 20.0.1) 一台运行Ollama / Deepseek 的Windows电脑 保持微笑 图: 简单的图示 简介 Project: https://docs.fossorial.io/overview Fossorial 系统以 Pangolin 为核心,是一个自托管的隧道反向代理,具有身份和访问管理功能,旨在通过运行在用户空间的加密 WireGuard 隧道安全地公开私有资源。想象一下自托管的 Cloudflare 隧道。 Pangolin 在底层使用 Traefik 进行实际的 HTTP 代理。Badger 插件提供了一种使用 Pangolin 验证每个请求的方法。第二个服务 Gerbil 提供了一个 WireGuard 管理服务器,Pangolin 可以使用它来创建对等体进行连接。最后,还有 Newt,这是一个 CLI 工具和 Docker 容器,它完全在用户空间通过 WireGuard 连接到 Newt 和 Gerbil,并代理您的本地资源。这意味着您无需运行特权进程或容器即可公开您的服务! 图: Fossorial system Diagram 开始 在腾讯云服务器下载 Pangolin 服务端 的安装脚本 # 下载并执行 wget -O installer "https://github.com/fosrl/pangolin/releases/download/1.2.0/installer_linux_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')" && chmod +x ./installer添加DNS 记录 注意:需要关闭Proxy ...

在 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 ...

Linux 常用命令笔记

Linux 真好用 与Windows 相比, Linux 的效率实在太好了。为了避免自己忘记用过的命令,避免手忙脚乱又到处去找,特意写一下笔记。 最近在忙别的~ 11月好快,就要过完了,所以及时来水一篇。 Vim 配置 以下命令可以对齐VIM编辑器,会高亮输入光标 sudo echo set nu ts=2 et sw=2 cuc autoindent > ~/.vimrc修改root 密码 sudo passwd root #之后根据提示输入2次密码即可网络配置 #显示网卡 nmcli con show #修改网卡IP地址 nmcli con mod "Wire connection 1" ipv4.method manual ipv4.address 172.25.250.100/24 ipv4.gateway 172.25.250.254 ipv4.dns 172.25.250.250 autoconnect yes #禁用和启用网卡 nmcli con down "Wire connection 1" nmcli con up "Wire connection 1" #修改 允许root 访问 ssh sudo echo "PermitRootLogin yes" >> /etc/ssh/sshd_config.d/01-permitrootlogin sudo systemd restart sshd 进程管理 #查找名为qcloud 的进程 ps aux | grep qcloud #根据进程ID 强制杀死进程 kill -9 1588

Setting Up SMB Service on Ubuntu 18.04

Setting Up SMB Service on Ubuntu 18.04 Table of Contents Install SMB and enable the SMB server and restart it. Add an SMB user. Edit the SMB configuration file. Permission configuration: Read (R) Read/Write (RW) Firewall configuration. Visit the SMB server on your local network. Install SMB server sudo apt update sudo apt install samba sudo systemctl enable smbd sudo systemctl restart smbdAdd an SMB user sudo smbpasswd -a usernameEdit the SMB configuration file sudo vim /etc/samb/smb.conf[WiKiFolder_for_Client] comment = Shared Folder path = /home/username/wiki browseable = yes valid users = @username[WiKiFolder_for_Client]: The name of the shared folder being defined. ...

Flash OpenIPC firmware onto SigmaStar SSC335 SoC and Sony IMX307 IPC module.

Flash OpenIPC firmware onto SigmaStar SSC335 SoC and Sony IMX307 IPC module. Requirements IPC module USB to TTL cable Windows laptop or computer Running a TFTP server on your Windows computer Results IPC module specifications Flash: GD25Q64CSIG: https://www.digikey.cn/zh/products/detail/gigadevice-semiconductor-hk-limited/GD25Q64CSIG/9484942 Soc: SigmaStar SSC335 https://linux-chenxing.org/infinity6/ssc335_pb_v03.pdf Sensor: 1/2.8" 2MP CMOS Sony IMX307 LAN Windows computer TFTP SERVER directory structure The “bin” directory serves as the current directory for the TFTP server, used to store firmware files. Disable the firewall on the Windows computer and run tftp64.exe. ...

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

Nssm在Windows操作系统中安装系统服务

因为Frp client 之前是使用批处理启动的,所以每次电脑重启之后,需要等到登录之后才能启动。 目的是要操作系统启动之后就直接启动Frp client。为了解决这个问题,所以使用nssm来将Frp client安装到windows的服务,使它作为服务启动。这样就可以实现当电脑启动之后就可以直接启动。 目录 先决条件 安装过程 验证和引用 先决条件 Frp 服务端 与客户端 https://github.com/fatedier/frp nssm 程序 https://nssm.cc/download 根据Frp服务端的信息配置好相对应的Frp客户端信息 安装过程 Step 1 在 Windows 操作系统下配置好 Frp 客户端信息之后,使用命令行进入 nssm 目录,如下图: 注:请根据实际情况进入相对应的目录。 Step 2 通过命令行安装服务: nssm install MyFirstServiceStep 3 输入 Step 2 的命令后,系统会打开 nssm GUI。填写服务的相关信息即可: 程序路径 程序工作目录 额外参数 顶部的 “Details” 是服务的详细描述和设置。填完以上信息后,服务就安装完成了。记得以管理员模式运行 nssm。 验证和应用 在windows 的命令行输入“services.msc” 打开windows 的服务管理窗口 通过上图就可以判断 服务已经添加成功。 另外你还可以在frp 根目录下查看frp运行的日志。 引用 Frp 服务端 与客户端 https://github.com/fatedier/frp nssm 程序 https://nssm.cc/download 这就是使用nssm 在windows下,快速的创建服务的简单使用笔记。

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/

搜尋文章

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

開始輸入以搜尋文章