欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

腾讯云java环境搭建完整流程

程序员文章站 2022-04-26 22:32:19
...
  1. 注册登录腾讯云,下载putty连接。

  2. jdk安装

    输入
    yum search jdk
    小贴士:yum可以理解为一个联网的软件管家,详见

    Loaded plugins: fastestmirror, security
    Loading mirror speeds from cached hostfile
    =============================== N/S Matched: jdk ===============================
    copy-jdk-configs.noarch : JDKs configuration files copier
    java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment
    java-1.6.0-openjdk-demo.x86_64 : OpenJDK Demos
    java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment
    java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation
    java-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundle
    java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment
    java-1.7.0-openjdk-demo.x86_64 : OpenJDK Demos
    java-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environment
    java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
    java-1.7.0-openjdk-src.x86_64 : OpenJDK Source Bundle
    java-1.8.0-openjdk-debug.x86_64 : OpenJDK Runtime Environment with full debug on
    java-1.8.0-openjdk-demo.x86_64 : OpenJDK Demos
    java-1.8.0-openjdk-demo-debug.x86_64 : OpenJDK Demos with full debug on
    java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment
    java-1.8.0-openjdk-devel-debug.x86_64 : OpenJDK Development Environment with
                                          : full debug on
    java-1.8.0-openjdk-headless.x86_64 : OpenJDK Runtime Environment
    java-1.8.0-openjdk-headless-debug.x86_64 : OpenJDK Runtime Environment with full
                                             : debug on
    java-1.8.0-openjdk-javadoc.noarch : OpenJDK API Documentation
    java-1.8.0-openjdk-javadoc-debug.noarch : OpenJDK API Documentation for packages
                                            : with debug on
    java-1.8.0-openjdk-src.x86_64 : OpenJDK Source Bundle
    java-1.8.0-openjdk-src-debug.x86_64 : OpenJDK Source Bundle for packages with
                                        : debug on
    ldapjdk-javadoc.x86_64 : Javadoc for ldapjdk
    icedtea-web.x86_64 : Additional Java components for OpenJDK - Java browser
                       : plug-in and Web Start implementation
    ldapjdk.x86_64 : The Mozilla LDAP Java SDK
    
      Name and summary matches only, use "search all" for everything.
    
    这样就会显示出所有包括jdk的文件
    输入
  3. yum install -y java-1.8.0-openjdk*
    小贴士:-y意思是所有都选择yes
    这样就会安装所有jdk1.8相关的应用。
    安装完成之后
    javac -version
    查看jdk版本
  4. 安装mysql

    大雾~~~之前的方法安装的mysql是5.1的。。。。。现在说一下5.7的安装方法

    https://repo.mysql.com//mysql57-community-release-el6-11.noarch.rpm
    先去下载rpm文件,传到服务器上,然后
    rpm -Uvh mysql57-community-release-el6-11.noarch.rpm
    
    yum install -y mysql-community-server
    完成之后,启动mysql
    service mysqld start
    首次登陆密码在
    /var/log/mysqld.log
    搜一下password
    A temporary password is generated for aaa@qq.com: A<0Igo=wc8kk
    A<0Igo=wc8kk就是密码
    登陆mysql
    mysql -u root -p
    再输入密码就能登陆mysql了,然后需要修改密码,

    如果密码设置太简单出现以下的提示

    腾讯云java环境搭建完整流程
     

    如何解决ERROR 1819 (HY000): Your password does not satisfy the current policy requirements呢? 这里直接提供解决方案文末有详细的说明

    必须修改两个全局参数:
    首先,修改validate_password_policy参数的值

    mysql> set global validate_password_policy=0;

    再修改密码的长度

    set global validate_password_length=1;

    执行修改密码就可以了

    ALTER USER 'root'@'localhost' IDENTIFIED BY 'root123';(ALTER等可以写成小写)

    授权其他机器登陆

    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;

    附卸载mysql












  5. 同样使用yum
    yum -y install mysql mysql-deve mysql-server
    mysql-devel 开发用到的库以及包含文件
    mysql mysql 客户端
    mysql-server 数据库服务器
    安装完成之后,启动mysql
    service mysqld start
    然后设置密码
    /usr/bin/mysqladmin -u root password'111111'
    最后一步,允许别的计算机登陆mysql
    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
    这样你在本地就能用Navicat登陆mysql了





相关标签: 腾讯云