美文网首页我爱编程
java环境相关命令

java环境相关命令

作者: 群众里面有坏人呐 | 来源:发表于2018-02-09 10:12 被阅读0次

    curl -L "http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-i586.tar.gz" -H "Cookie: oraclelicense=accept-securebackup-cookie"  -H "Connection: keep-alive" -O

    wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-i586.tar.gz

    环境变量:

    export JAVA_HOME=/alidata/server/java/jdk1.8.0_161

    export JAVA_BIN=/alidata/server/java/jdk1.8.0_161/bin

    export PATH=$PATH:$JAVA_HOME/bin 

    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar 

    export JAVA_HOME JAVA_BIN PATH CLASSPATH

    export CATALINA_BASE=/alidata/server/tomcat8 

    export CATALINA_HOME=/alidata/server/tomcat8

    export CATALINA_TMPDIR=/alidata/server/tomcat8/temp 

    export JRE_HOME=$JAVA_HOME 

    export CLASSPATH=/alidata/server/tomcat7/bin/bootstrap.jar

    source /etc/profile

    MySQL安装:

    1.下载源:

    # wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

    2.安装包

    # sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm

    3.安装Mysql

    # sudo yum install mysql-server

    4.更改权限

    # sudo chown -R mysql:mysql /var/lib/mysql

    5.开始mysql服务

    # service mysqld start

    6.登陆MYSQL

    # mysql -u root

    7.切换到MYSQL数据库

    mysql > use mysql;

    8.添加远程链接用胡

    mysql > GRANT ALL PRIVILEGES ON *.* TO 'LoginName'@'%' IDENTIFIED BY 'LoginPwd' WITH GRANT OPTION;

    9.刷新权限

    mysql> flush privileges;

    相关文章

      网友评论

        本文标题:java环境相关命令

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