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.

相关推荐
羲云网络6 小时前
GPT Image 2.6 海报改横竖版:文字安全区、排版分离与交付验收
图像处理·人工智能·python·aigc
曲径海盗7 小时前
【Python 学习第 65 天】字典基础
python·学习笔记·编程入门
Wellijohn8 小时前
Docker 瘦身、手写 MCP、异步并发:被问得最多的 12 个问题,一次答完
python·docker·mcp
VW_40411 小时前
csdn-2026-11-23-第一站踩坑
爬虫·python
yiangL_11 小时前
课后作业4:基于 Python 的古诗词词云可视化(P205)
开发语言·python
Dmz丶11 小时前
前端转 AI 100 天 Day 52:RAG 项目实战(一)——从零搭建企业知识库
python
卷无止境15 小时前
用 SimPy 做离散事件仿真:时钟不走步,事件自己排队
后端·python
撸码猿16 小时前
数据采集场景的语序点选验证码:90.2% 整词准确率的本地 OCR 实践
python·ocr
用户03321266636716 小时前
使用 Python 在 Excel 中创建折线图和条形图
python·excel
木子欢儿17 小时前
Ubuntu 26.04 LTS 安装Python 3.12
linux·运维·服务器·python·ubuntu