美文网首页
服务器配置全部流程

服务器配置全部流程

作者: 伐木累_bb17 | 来源:发表于2018-04-28 10:15 被阅读0次

实用软件:putty&WinScp

1.安装JDK 文件为:jdk-8u161-linux-x64.rpm

        1.第一步就是把文件上传到服务器

        2.rpm -ivh jdk-8u161-linux-x64.rpm 安装JDK,一般在安装以后,环境变量已经配置完成

安装完成后

2.安装数据库

        1、配置YUM源

                   1.下载mysql源安装包  wgethttp://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm

                    2. 安装mysql源shell> yum localinstall mysql57-community-release-el7-8.noarch.rpm

                    3.检查mysql源是否安装成    yum repolist enabled| grep "mysql.*-community.*"


检查源是否安装完成

           2、安装MySQL

                        yum install mysql-community-server

           3、启动MySQL服务

                         systemctl start mysqld

                        查看MySQL的启动状态

                         systemctl status mysqld


查看启动状态

        4、开机启动

                 systemctl enable mysqld

                 systemctl daemon-reload

        5、修改root本地登录密码

                    在/var/log/mysqld.log文件中给root生成了一个默认密码。通过下面的方式找到root默认密码,然后登录mysql进行修改:

                    grep'temporary password'/var/log/mysqld.log

                   

获取的默认密码

                    登录:mysql -u root -p

                    修改密码:set password for 'root'@'localhost'=password('****');

                    注意:mysql5.7默认安装了密码安全检查插件(validate_password),默认密码检查策略要求密码必须包含:大小写字母、数字和特殊符号,并且长度不能少于8位。否则会提示ERROR 1819 (HY000): Your password does not satisfy the current policy requirements错误,如下图所示: 

                    通过msyql环境变量可以查看密码策略的相关信息:

                    show variables like'%password%';

        6、添加远程登录用户

                GRANT ALL PRIVILEGES ON *.* TO 'sjd'@'%' IDENTIFIED BY 'Sjd#199313' WITH GRANT  OPTION;

3.安装redis

        1.下载redis安装包

                wget http://download.redis.io/releases/redis-4.0.6.tar.gz

        2:解压压缩包

                    tar -zxvf redis-4.0.6.tar.gz

       3:yum安装gcc依赖

                    yum install gcc

       4:跳转到redis解压目录下

                   cd redis-4.0.6

       5:编译安装

                    make MALLOC=libc 

                    将/usr/local/redis-4.0.6/src目录下的文件加到/usr/local/bin目录

                    cd src && make install

       6、以后台进程方式启动redis

                1修改redis.conf文件将

                    daemonize no  修改为       daemonize yes

.                

4.安装zookeeper,作用为搭建dubbo的时候必须的,文件为:zookeeper-3.4.10.tar.gz

        1、创建 /usr/local/services/zookeeper 文件夹:

                        mkdir -p /usr/local/services/zookeeper

           2、进入到 /usr/local/services/zookeeper 目录中:

                        cd /usr/local/services/zookeeper

          3、下载 zookeeper-3.4.9.tar.gz:

                        wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz

            4、解压缩 zookeeper-3.4.9.tar.gz:

                        tar -zxvf zookeeper-3.4.9.tar.gz

           5、进入到 /usr/local/services/zookeeper/zookeeper-3.4.9/conf 目录中:

                                cd zookeeper-3.4.9/conf/

           6、复制 zoo_sample.cfg 文件的并命名为为 zoo.cfg:

                            cp zoo_sample.cfg zoo.cfg

            7、用 vim 打开 zoo.cfg 文件并修改其内容为如下:

                                    # The number of milliseconds of each tick

                                    # zookeeper 定义的基准时间间隔,单位:毫秒

                                     tickTime=2000

                                    # The number of ticks that the initial 

                                    # synchronization phase can take

                                        initLimit=10

                                    # The number of ticks that can pass between 

                                    # sending a request and getting an acknowledgement

                                        syncLimit=5

                                   # the directory where the snapshot is stored.

                                    # do not use /tmp for storage, /tmp here is just 

                                    # example sakes.

                                    # dataDir=/tmp/zookeeper

                                    # 数据文件夹

                                    dataDir=/usr/local/services/zookeeper/zookeeper-3.4.9/data

                                    # 日志文件夹

                                    dataLogDir=/usr/local/services/zookeeper/zookeeper-3.4.9/logs

                                    # the port at which the clients will connect

                                    # 客户端访问 zookeeper 的端口号

                                      clientPort=2181

                                    # the maximum number of client connections.

                                   # increase this if you need to handle more clients

                                    #maxClientCnxns=60

                                    # Be sure to read the maintenance section of the 

                                    # administrator guide before turning on autopurge.

                                      # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance

                                        # The number of snapshots to retain in dataDir

                                        #autopurge.snapRetainCount=3

                   8、保存并关闭 zoo.cfg 文件:

                    9、进入到 /usr/local/services/zookeeper/zookeeper-3.4.9/bin 目录中:

                                        cd ../bin/

                    10、用 vim 打开 /etc/ 目录下的配置文件 profile:

                                          vim /etc/profile

                                        并在其尾部追加如下内容:

                                        # idea - zookeeper-3.4.9 config start - 2016-09-08

                                        export ZOOKEEPER_HOME=/usr/local/services/zookeeper/zookeeper-3.4.9/

                                        export PATH=$ZOOKEEPER_HOME/bin:$PATH

                                        export PATH

                   11、使 /etc/ 目录下的 profile 文件即可生效:

                                            source /etc/profile

                   12、启动 zookeeper 服务:

                                            zkServer.sh start

5.neo4j安装

            wgethttp://debian.neo4j.org/neotechnology.gpg.key

            rpm --import neotechnology.gpg.key

            然后创建 /etc/yum.repos.d/neo4j.repo 文件:

            cat <  /etc/yum.repos.d/neo4j.repo

            [neo4j]

            name=Neo4j Yum Repo

            baseurl=http://yum.neo4j.org/stable

            enabled=1

            gpgcheck=1

            EOF

            最后使用yum安装

            yum install neo4j


        

相关文章

  • 服务器配置全部流程

    实用软件:putty&WinScp 1.安装JDK 文件为:jdk-8u161-linux-x64.rpm 1.第...

  • 服务器 | 又双买了一个服务器

    第一个服务器:2016.10 第二个服务器:2018.12 配置流程及问题: 从服务器联系购买,配置,到网络搭建(...

  • 云服务器(ubuntu)配置docker

    本文以华为云(Ubuntu 18.04)为例,介绍一下云服务器配置docker的流程。其他云服务器的流程也很类似,...

  • 码云ssh方式管理代码

    目录 概述 本地(代码管理者)电脑配置ssh到码云 流程 服务器(单位或者客户电脑)配置ssh到码云 流程 一些问...

  • Day28硬件

    一.常见服务器 服务器分类 物理服务器结构:* 远程控制卡* raid* 使用物理服务器流程 机房知识机柜价格配置...

  • Nginx + Varnish 配置说明

    Nginx + Varnish 配置说明 需求: 降低服务器压力。 同时在服务器宕机情况下提供运维时间。 流程: ...

  • 2018-11-30

    Springboot maven项目打包发布到远程服务器流程: 1.配置pom环境 dev ...

  • 域名 https配置

    https配置流程 1.阿里云里申请域名 2.腾讯云 申请https 的 ssl证书 3.服务器 ngnix 配置...

  • 自动部署的配置

    常用快捷键 linux 自动部署配置文件流程 1、修改配置信息 2、配置服务器开启服务的命令 3、创建码云仓库【放...

  • 【笔记2-环境配置及初始化】从0开始 独立完成企业级Java电商

    准备工作 Linux系统安装 云服务器部署 概要 申请和配置 域名的购买、解析、配置、绑定流程 用户创建实操 环境...

网友评论

      本文标题:服务器配置全部流程

      本文链接:https://www.haomeiwen.com/subject/avbwlftx.html