腾讯云java环境搭建完整流程
程序员文章站
2022-04-26 22:32:19
...
- 注册登录腾讯云,下载putty连接。
- jdk安装
输入
小贴士:yum可以理解为一个联网的软件管家,详见yum search jdk
这样就会显示出所有包括jdk的文件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.
输入 -
小贴士:-y意思是所有都选择yesyum install -y java-1.8.0-openjdk*
这样就会安装所有jdk1.8相关的应用。
安装完成之后
查看jdk版本javac -version
- 安装mysql
大雾~~~之前的方法安装的mysql是5.1的。。。。。现在说一下5.7的安装方法
先去下载rpm文件,传到服务器上,然后https://repo.mysql.com//mysql57-community-release-el6-11.noarch.rpm
rpm -Uvh mysql57-community-release-el6-11.noarch.rpm
完成之后,启动mysqlyum install -y mysql-community-server
首次登陆密码在service mysqld start
搜一下password/var/log/mysqld.log
A temporary password is generated for aaa@qq.com: A<0Igo=wc8kk
登陆mysqlA<0Igo=wc8kk就是密码
再输入密码就能登陆mysql了,然后需要修改密码,mysql -u root -p
如果密码设置太简单出现以下的提示
如何解决
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
-
同样使用yum
mysql-devel 开发用到的库以及包含文件yum -y install mysql mysql-deve mysql-server
mysql mysql 客户端
mysql-server 数据库服务器
安装完成之后,启动mysql
然后设置密码service mysqld start
最后一步,允许别的计算机登陆mysql/usr/bin/mysqladmin -u root password'111111'
这样你在本地就能用Navicat登陆mysql了GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
-