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.

相关推荐
0566463 小时前
agent学习Day15——SQLAlchemy 查询过滤、分页与历史列表接口
python·学习·fastapi
程序员爱德华4 小时前
Python与C++:异同点对比
c++·python
hangyuekejiGEO5 小时前
GEO技术服务选型指南
大数据·人工智能·python
软萌萌的15 小时前
Java Spring Boot 修改yml配置&加载顺序规则
java·spring boot·python
Dxy12393102166 小时前
Linux 编译安装 Python 3.12.10(多版本共存,不破坏系统Python)
linux·运维·python
持敬chijing7 小时前
Python概述
开发语言·python
赤羽尾风9 小时前
NumPy快速入门
python·numpy
倒流时光三十年9 小时前
第三阶段 26 · highlight 高亮(返回命中片段)
后端·python·django
久久学姐11 小时前
Python+Playwright+Pytest+BDD,用FSM打造高效测试框架
python·pytest·bdd·playwright·fsm