當控制元件被資料繫結時,無法以程式設計方式向 DataGridView 的行集合中新增行。
阿新 • • 發佈:2022-05-17
一、docker安裝
1、拉取映象
docker pull elasticsearch:7.14.1
2、建立外部目錄,用來掛載資料卷,並對資料夾授權
mkdir -p /usr/local/mydata/elasticsearch/config mkdir -p /usr/local/mydata/elasticsearch/data mkdir -p /usr/local/mydata/elasticsearch/plugins chmod -R 777 /usr/local/mydata/elasticsearch/config chmod -R 777 /usr/local/mydata/elasticsearch/data chmod-R 777 /usr/local/mydata/elasticsearch/plugins
3、在config目錄下建立elasticsearch.yml檔案,並配置 network.host: 0.0.0.0 表示所有外部網路都可以訪問該es
touch /usr/local/mydata/elasticsearch/config/elasticsearch.yml
echo "network.host: 0.0.0.0" >> /usr/local/mydata/elasticsearch/config/elasticsearch.yml
4、執行映象,並掛載資料卷
docker run --name elasticsearch -p 9200:9200 -p 9300:9300 \ -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms64m -Xmx128m" \ -v /usr/local/mydata/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \ -v /usr/local/mydata/elasticsearch/data/:/usr/share/elasticsearch/data \ -v /usr/local/mydata/elasticsearch/plugins:/usr/share/elasticsearch/plugins \-d elasticsearch:7.14.1