Linux几个常用安装命令(Ubuntu篇)

更新包

apt update

apt upgrade

vue打包

apt install npm

npm install

npm run build

如果错误就运行:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

sudo apt-get install -y nodejs

jdk安装

apt install openjdk-8-jdk

安装elasticsearch:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

sudo apt-get install apt-transport-https

echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list

sudo apt-get update && sudo apt-get install elasticsearch

添加开机自启

sudo update-rc.d elasticsearch defaults 95 10

sudo /bin/systemctl daemon-reload

sudo /bin/systemctl enable elasticsearch.service

启动停止命令

sudo -i service elasticsearch start

sudo -i service elasticsearch stop

sudo systemctl start elasticsearch.service

sudo systemctl stop elasticsearch.service

安装Kibana

sudo apt-get update && sudo apt-get install kibana

初始化

PUT market.kline/

POST market.kline/doc/_mapping

{

"doc": {

"properties": {

"amount": {

"type": "text",

"fields": {

"keyword": {

"type": "keyword",

"ignore_above": 256

}

}

},

"base-currency": {

"type": "text",

"fields": {

"keyword": {

"type": "keyword",

"ignore_above": 256

}

}

},

"close": {

"type": "text",

"fields": {

"keyword": {

"type": "keyword",

"ignore_above": 256

}

}

},

"high": {

"type": "text",

"fields": {

"keyword": {

"type": "keyword",

"ignore_above": 256

}

}

},

"id": {

"type": "long"

},

"low": {

"type": "text",

"fields": {

"keyword": {

"type": "keyword",

"ignore_above": 256

}

}

},

"match_id": {

"type": "long"

},

"open": {

"type": "text",

"fields": {

"keyword": {

"type": "keyword",

"ignore_above": 256

}

}

},

"period": {

"type": "text",

"fields": {

"keyword": {

"type": "keyword",

"ignore_above": 256

}

}

},

"quote-currency": {

"type": "text",

"fields": {

"keyword": {

"type": "keyword",

"ignore_above": 256

}

}

},

"vol": {

"type": "text",

"fields": {

"keyword": {

"type": "keyword",

"ignore_above": 256

}

}

}

}

}

}

supervisor安装

apt install supervisor

supervisorctl reread && supervisorctl update && supervisorctl restart all

查看java和php的进程id

ps -ef |grep php

ps -ef |grep java

supervisorctl重启

supervisorctl restart all

你可能感兴趣的:(LINUX,linux,ubuntu,elasticsearch)