服务器搭建

375 阅读1分钟

背景: 一台空白服务器搭建常用服务

配置

  • 镜像版本: CentOs 7.6

安装JAVA

  1. 查看是否有java
    yum list installed |grep java
  2. 安装java
# 安装java 1.8
yum -y install java-1.8.0-openjdk*
# 验证
java -version

安装git

# 安装git
yum install -y git
# 验证
git -version

加入git ssh

ssh-keygen -C 'XXX@gmail.com' -t rsa

设置全局 git 账号密码

# http存储密码
git config --global credential.helper store

# ssh 存储密码
ssh-add ~/.ssh/id_rsa

安装maven

# 安装 repo源
wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
# 安装maven
yum -y install apache-maven

# 查找包路径
rpm -qa|grep apache-maven
# 查看安装路径
rpm -ql apache-maven-3.5.2-1.el7.noarch

安装mysql

yum -y install mariadb mariadb-server
#安装完成MariaDB,首先启动MariaDB
systemctl start mariadb
#设置开机启动
systemctl enable mariadb

安装redis

# 安装
yum install redis
yum install epel-release
systemctl start redis
systemctl enable redis

安装mongo

www.cnblogs.com/jiayoubobo/…

systemctl start mongod.service
systemctl enable mongod.service

安装 rabbitmq

安装nodeJS

curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -
yum install -y nodejs

安装jenkins

#配置yum源:
wget  -O  /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
#导入rpm密钥:
rpm  --import  https://jenkins-ci.org/redhat/jenkins-ci.org.key
#安装:
yum  -y  install  jenkins  java
# 更改端口
vim /etc/sysconfig/jenkins
#启动服务:
systemctl  start  jenkins
#访问网址:
xx.xx.xx.xx:8080

rabbitMQ 安装

www.jianshu.com/p/ee9f75942…

VUE服务部署

# https://segmentfault.com/a/1190000019549313?utm_source=tag-newest