Just got a CentOS 7 server, what Java programmers should do

1. Uninstall and install JDK

Uninstall the original OPENJDK of the server and install the JDK of ORELOC

  • Check if jdk is installed
rpm -qa | grep jdk
  • If so, uninstall and then install
rpm -e --nodeps  java-1.7.0-openjdk
  • Go to Oracle to download a JDK, upload it to the server, and then install it

2. Installation of maven

  • Download, decompress and configure PATH
// Download and install

// Configure path
export MAVEN_HOME=/usr/local/maven-3.3.9/apache-maven-3.3.9
export JAVA_HOME=
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$MAVEN_HOME/bin:$JAVA_HOME/bin

3.Docker installation

  • Check if there is a docker
rpm -qa | grep docker
  • If so, uninstall and then install
rpm -e --nodeps ${docker}
  • Update yum source
yum update
  • Install the necessary content
yum install -y yum-utils device-mapper-persistent-data lvm2
  • Configure yum source
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
  • View all the installed docker versions
yum list docker-ce --showduplicates | sort -r
  • Choose a satisfactory installation
yum install ${docker-version}
  • Verify whether docker is installed successfully and check the version of docker
Guess what the order is?

4.MySQL installation

wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

yum -y localinstall mysql57-community-release-el7-11.noarch.rpm 

yum -y install mysql-community-server

systemctl start mysqld

systemctl enable mysqld

systemctl daemon-reload

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

mysql -u root -p

mysql>  ALTER USER 'root'@'localhost' IDENTIFIED BY 'Root@_123';

 #Remote login
 mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Root@_123' WITH GRANT OPTION;

 # Create ambari user and authorize
 mysql> CREATE USER 'ambari'@'%' IDENTIFIED BY 'Ambari-123';

 mysql> GRANT all privilege ON *.* TO 'ambari'@'%';

 mysql> flush privileges;

5.Redis installation

  • Download redis
http://download.redis.io/releases/redis-5.0.8.tar.gz
  • Installing the c + + Environment
yum install -y gcc 
  • install
make && make install PREFIX=/usr/local/redis
  • To configure

Tags: Docker yum MySQL RPM

Posted on Sun, 05 Apr 2020 07:59:16 -0700 by abhic