In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How do I install Jdk tools on a Debian 9.4 system? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
Create a new Vmware virtual machine
It's relatively simple. Skip this one.
Install Debian9.0.4 in Vmware
Select ISO image in the newly created virtual machine
Of course, you can refer to this article: https://www.yisu.com/os/619150.html
Start the virtual machine and see the following installation interface
The options are:
Graphical interface installation
Installation
Advanced option
Help
Speech synthesis installation
We choose intall (if you need to install the graphical interface, you can choose the first one), we will enter the language selection interface.
Select "Yes" for the next operation, and then go on to the next step.
If you need to enter a domain name, you can enter your own domain name, if it is not available, you can use localhost or it is empty.
Set root account password and user account password
When dividing the disk, choose the option according to your own needs, this installation is to choose "use the whole disk".
Next, you can choose to install according to your own needs. Such as whether to use network mirroring or not.
After the installation is completed, restart the virtual machine to enter the login interface. At this time, the default is the graphical interface. Click "activity" in the upper left corner after entering the system.
Enter terminal in the search bar and click the terminal to enter the terminal.
After the installation is successful, you will be prompted to use the sudo command:
This error occurs because the basic operating system does not have its own sudo, so we need to solve it ourselves.
The solution is as follows:
Use the $su root command to enter administrator privileges
Install sudo using apt-get install sudo
Resolve "xxx is not in the sudoers file. The matter will be reported".
When a normal user enters sudo XXX at the command line, the following error occurs:
The meaning of the sudo command is to enable the current user to execute the command as root, but not all users can execute sudo, because all authorized users are in / etc/sudoers. So we can add permissions to the user by editing the / etc/sudoers file.
Because the file is 0440 and permissions are read-only, use: wq! Force save.
Opening and closing of graphical interface
After the installation is successful, the default entry is the graphical interface, and we hope that the next operation will be done in the command line interface. Therefore, you need to close the graphical interface and refer to the specific closing process.
I can't afford to play with a virtual machine under 32-bit xp. Linux takes up memory by leaps and bounds these days, if you want to have gnome,kde. If you open two virtual machines at random, you will have more than 2 gigabytes of memory, and you will start to climb virtual memory and get stuck. Fortunately, the first time to learn linux is from the command line, if the debian boot directly into the command line, then about 128m of memory will be more than enough.
Linux under redhat system can be easily cut back and forth through init 3 init2~5 5. Today, it seems that all init2~5 under debian system will open gdm3 by default, so this trick doesn't work.
The first thing that comes to mind is
/ etc/init.d/gdm3 stop
But this is still not concise enough.
The second idea is to turn off the gdm3 service and use the command
Update-rc.d gdm3-f remove
Delete all gdm3 related scripts in the rcX.d folder, so that there will be no graphics menu after boot.
The final method is to change grub, modify / etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT= "quiet [b] text[ / b]"
And then
Update-grub2
In this way, an ordinary user logs in in command mode.
If you suddenly want to use a graphical interface, then
/ etc/init.d/gdm3 start
Install SSH Server
At the debian command line, type $sudo apt-get install ssh openssh-server to install SSH, and after installing SSH, we can use putty or xshell to connect to the debian in the virtual machine.
To connect to a virtual machine, you need to know the Ip address of the virtual machine. You can view the local IP using ifconfig under linux, but the following error occurs when you use it for the first time under debian:
This is because the debian system does not have its own network package, so you need to install it yourself. By using the following command:
$sudo apt-get install net-tools
After entering the above command, you can use it normally:
Install JDK
Download JDK
You can use the physical machine to download and then upload using tools such as FileZilla.
You can also use the wget command to download directly from the network, and this tutorial uses the second method.
Install JDK
Decompress jdk
Configure environment variables
The path to the bin directory of jdk is: / home/xuda/jdk8/jdk1.8.0_171/bin. Next, you need to add environment variables.
-Editing system environment variables
$vi / etc/profile
/ / append the following information to the file (root permission is required)
Export JAVA_HOME=/home/xuda/jdk8/jdk1.8.0_171/
Export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Export PATH=$JAVA_HOME/bin:$PATH
-load the configuration just now
$source / etc/profile
-verify the configuration result
$java-version
Install the GCC compilation environment
Download the gcc source code
This tutorial downloads using the following source code
Http://ftp.tsukuba.wide.ad.jp/software/gcc/snapshots/8-20180504/
You can download it to the physical machine first, and then upload it to the virtual machine using tools such as FileZilla.
Install dependent libraries
$apt install build-essential libgmp-dev libmpfr-dev libmpc-dev
Compile GCC
Decompress XXX.tar.xz
Because the downloaded package ends with .tar.xz, you can know that the package has been compressed in two layers, with xz compression on the outside and tar compression on the inside. So it needs to go through two layers of decompression.
/ / decompress the first layer
$xz-d gcc-8-20180504.tar.xz
/ / decompress layer 2
$tar-xvf gcc-8-20180504.tar.xz
That's when we get the decompressed file.
Compilation and installation
/ / 1. Enter the directory
$cd gcc-8-20180504 /
/ / 2. Compile, automatically generate makefile files
$. / configure-disable-multilib
/ / 3. Run the following command
$make
/ / 4. Wait for a period of time before running
$make install
/ / 5. Restart, enter
$gcc-version
In addition, there are several ways to install
1.apt-get install gcc
2.apt-get install make
3.apt-get install gdb
4.apt-get install build-essential
-installation reference address
Install MySQL
Referenc
In fact, this step can be installed directly using the apt-get toolkit. The purpose of the apt-get toolkit is to simplify the operation of Linux, and the effect is the same.
Download the installation package
This tutorial is to install Mysql
download
$wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.11-linux-glibc2.12-x86_64.tar.gz
Decompression
$tar-zxvf mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz
Add user combination user
/ / add a user group
$groupadd mysql
/ / add user mysql to user group mysql
$useradd-g mysql mysql
Installation
Create a new data folder under the mysql directory to store data
$mkdir data
Some tutorials may be installed using mysql_install_db. After 5.7, mysql_install_db was abandoned and replaced by mysqld-- initialize.
$mysqld-initialize-basedir=/home/xuda/mysql/mysql-5.7-datadir=/home/xuda/mysql/mysql-5.7/data/
/ usr/local/mysql/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory error occurred during installation
Solution: $apt-get-f install
-modify directory permissions
$chown-R root.
/ / mysql users only need to be the owners of all files in the mysql-5.7.20/data/ directory
$chown-R mysql data
Copy startup file
$cp support-files/mysql.server / etc/init.d/mysqld
$chmod 755 / etc/init.d/mysqld
$cp my_print_defaults / usr/bin
-Editor / etc/init.d/mysqld
/ / modify the following:
Basedir=/usr/local/mysql-5.7.20/
Datadir=/usr/local/mysql-5.7.20/data
Port=3306
/ / you can use the ftp plug-in of Nodepadd++ when modifying files, which is more convenient.
Start the service
$service mysqld start
Log in
$mysql-u root-p
You don't have a password to log in for the first time. You can change the password later using the following command
Mysql > use mysql
> mysql > update user set authentication_string=password (New password) where user='root'
This is the answer to the question about how to install Jdk tools in the Debian 9.4 system. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.