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.

相关推荐
Ticnix23 分钟前
MCP 工具拿不到 user_id?用 contextvars 做请求级用户隔离
python·agent·mcp
gb421528723 分钟前
WPS 里的 Word快速合成照片
python
databook1 小时前
Python 常用统计图表实战指南
python·数据分析·数据可视化
wang_yb1 小时前
Python 常用统计图表实战指南
python·数据分析·databook
魔镜er2 小时前
11-循环神经网络
人工智能·pytorch·python·深度学习·神经网络
Patrick在香港2 小时前
Python 抓香港政府公报 RSS:中英两个 feed 的 guid 零重合,lastBuildDate 停在 2016 年
python·数据处理·数据抓取·香港·rss
宁渡AI大模型2 小时前
河南宁渡科技有限公司|宁渡课堂 AI 全栈面试分享,AI 应用开发高频考点汇总
java·c++·人工智能·python·深度学习·神经网络·rag
troy1283 小时前
Python 基础语法(六):函数与模块、文件操作、异常处理
开发语言·python