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

vue打包

curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -

yum install -y nodejs

node -v

npm -v

npm install

npm run build

jdk安装

yum -y install java-1.8.0-openjdk

java -version

然后安装elasticsearch:

rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

上传 elasticsearch.repo 文件到目录 /etc/yum.repos.d/

sudo yum install elasticsearch

添加开机自启

sudo chkconfig --add elasticsearch

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 yum install kibana

启动停止命令

sudo -i service kibana start

sudo -i service kibana stop

初始化

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安装

yum install -y supervisor

supervisord -c /etc/supervisord.conf

supervisorctl update && supervisorctl restart all

查看java和php的进程id

ps -ef |grep php

ps -ef |grep java

supervisorctl重启

supervisorctl restart all

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