查看磁盘空间
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.