CentOS 8使用笔记

查看磁盘空间

bash 复制代码
df -h

查看python版本

bash 复制代码
python3 --version

查看某个端口是否打开

bash 复制代码
nc -zv localhost 9200

或者

bash 复制代码
curl http://localhost:9200

添加端口并刷新

bash 复制代码
firewall-cmd --zone=public --add-port=9200/tcp --permanent
firewall-cmd --reload

启动Elasic Search服务,进入ES对应的bin目录,执行:

bash 复制代码
./elasticsearch

linux操作系统不能识别在windows操作系统中用Pycharm构建的venv

Linux operating systems cannot directly recognize a Python virtual environment (venv) created in Windows due to differences in file paths and executable formats between the two operating systems. When moving a project from Windows to Linux, you would typically need to recreate the virtual environment on the Linux system. This involves copying your project files (excluding the venv directory) to the Linux system, and then running python -m venv venv and pip install -r requirements.txt commands in your project directory on the Linux system to recreate the environment and install all required dependencies.

相关推荐
暴力袋鼠哥4 小时前
基于YOLO11的车牌识别分析系统
python
满怀10156 小时前
【Python进阶】列表:全面解析与实战指南
python·算法
小小菜鸟,可笑可笑7 小时前
Python 注释进阶之Google风格
开发语言·python
upp7 小时前
[bug]langchain agent报错Invalid Format: Missing ‘Action Input:‘ after ‘Action:‘
javascript·python·langchain·bug
小技与小术7 小时前
代码随想录算法训练营day4(链表)
数据结构·python·算法·链表
前端开发张小七7 小时前
每日一练:4.有效的括号
前端·python
gongzairen8 小时前
Ngrok 内网穿透实现Django+Vue部署
后端·python·django
小小毛桃8 小时前
在PyTorch中,使用不同模型的参数进行模型预热
人工智能·pytorch·python
cliffordl8 小时前
ReportLab 导出 PDF(图文表格)
python·pdf
杰瑞学AI8 小时前
LeetCode详解之如何一步步优化到最佳解法:27. 移除元素
数据结构·python·算法·leetcode·面试·职场和发展