


Debian 9.4 system installation and installation steps for Jdk and other tools
Installing Debian9.0.4 under Vmware
Create a new Vmware virtual machine
is relatively simple, skip this part
Install Debian9.0.4 in Vmware
Select the ISO image in the newly created virtual machine
Of course you can also refer to this article: https://www.jb51.net/os/619150.html
Start the virtual machine and see the following installation interface
These options are:
- Graphical interface installation
- Install
- advanced options
- help
- Speech synthesis installation
We choose intall (if you need to install a graphical interface, you can choose the first one), and you will enter the language selection interface
Select "Yes" for the next operation, and then continue to the next step.
If you need to enter a domain name, you can enter your own domain name. If not, you can use localhost or leave it empty.
Set root account password and user account password
Choose options according to your needs when dividing disks. For this installation, "Use the entire disk" is selected.
Next, you can choose to install it according to your needs. Such as whether to use network mirroring, etc.
After the installation is complete, restart the virtual machine and enter the login interface. At this time, the graphical interface is used by default. After entering the system, click "Activities" in the upper left corner
Enter terminal in the search bar and click Terminal to enter the terminal
After the installation is successful, the following prompt will appear when using the sudo command:
This error occurs because: the basic operating system does not come with sudo, so we need to solve it ourselves.
The solution is as follows:
Use $su root
command to enter administrator privileges
Use apt-get install sudo
Install sudo
Resolve "xxx is not in the sudoers file. This matter will be reported".
When an ordinary user enters sudo XXX on the command line, the following error will appear:
The meaning of the sudo command is to allow the current user to execute commands as root. In fact, not all users can execute sudo, because users with permissions are in /etc/sudoers. So we can add permissions to users by editing the /etc/sudoers file.
Because the file is 0440 and has read-only permission, use :wq!
to force save after modification.
Opening and closing the graphical interface
After successful installation, the graphical interface will be entered by default. Our next operation hopes to be performed on the command line interface. Therefore, if you need to close the graphical interface, please refer to
for the specific closing process.It really can’t be hurt to play a virtual machine under 32-bit XP. The memory occupied by Linux is also increasing by leaps and bounds these days. If you want to have gnome and kde... just open two virtual machine systems and you will need more than 2G of memory. It starts to crawl into the virtual memory and becomes stuck. Fortunately, when I first learned Linux, I started from the command line. If Debian boots up and enters the command line directly, the memory of about 128M will be more than enough.
Linux under the redhat system can be easily switched through init 3 and init 5. Today I found that init2~5 under the debian system seem to open gdm3 by default, so this method does not work.
The first thing that comes to mind is
/etc/init.d/gdm3 stop
, but this is still not streamlined 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 graphical menu after booting up
The final method is to change grub and modify /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet [b]text[/b]"
after that
update-grub2
In this way, ordinary user login is logged in in command mode
If you suddenly want to use a graphical interface, then
/etc/init.d/gdm3 start
Install SSH Server
In the debian command line, enter $ sudo apt-get install ssh openssh-server
to install SSH. After installing SSH, we can use putty or xshell to connect to debian in the virtual machine .
To connect to a virtual machine, you need to know the IP address of the virtual machine. You can use ifconfig under Linux to check the IP of the machine, but when you use it for the first time under Debian, the following error will occur:
This is because the Debian system does not come with its own network package, so you need to install it yourself. By using the following command:
$ sudo apt-get install net-tools
Complete input
Install JDK
Download JDK
You can first download using a physical machine and then upload using tools such as FileZilla
You can also use the wget command to download directly from the Internet. This tutorial uses the second method.
Install JDK
Unzip 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
- Edit system environment variables
$ vi /etc/profile
//Append the following information to the file (root permissions are 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 previous configuration
$ source /etc/profile
- Verify configuration results
$ java -version
Install GCC compilation environment
Download gcc source code
Download this tutorial and use 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
Unzip XXX.tar.xz
Because the downloaded package ends with .tar.xz, you can know that this compressed package has undergone two layers of compression, the outer layer is xz compression method, and the inner layer is tar compression method. So it needs to go through two layers of decompression.
//Decompress the first layer
$ xz -d gcc-8-20180504.tar.xz
//Decompress the second layer
$ tar -xvf gcc-8-20180504.tar.xz
At this point we will get the decompressed file
Compile and install
//1. Enter the directory
$ cd gcc-8-20180504/
//2. Compile and automatically generate makefile
$ ./configure --disable-multilib
//3. Run the following commands
$ make
//4. Wait for a while and then run
$ make install
//5. Restart and enter
$ gcc -version
In addition, there are many 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
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 usage 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
Unzip
$ tar -zxvf mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz
Add user combination user
//Add user group
$ groupadd mysql
//Add user mysql to user group mysql
$ useradd -g mysql mysql
Install
Create a new data folder in the mysql directory to store data
$ mkdir data
In some tutorials, mysql_install_db may be used for installation. 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/<br>
An error occurred during the installation process: /usr/local/mysql/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
Solution: $ apt-get -f install
- Modify directory permissions
$ chown -R root .
//Mysql user only needs to be the owner of all files in the mysql-5.7.20/data/ directory
$ chown -R mysql data
Copy startup files
$ cp support-files/mysql.server /etc/init.d/mysqld
$ chmod 755 /etc/init.d/mysqld
$ cp my_print_defaults /usr/bin
- Edit /etc/init.d/mysqld
//Modify the following content:
basedir=/usr/local/mysql-5.7.20/
datadir=/usr/local/mysql-5.7.20/data
port=3306
//You can use Nodepadd's ftp plug-in when modifying files, which is more convenient
Start service
$ service mysqld start
Log in
$mysql -u root -p
There is no password for the first login. You can use the following command to change the password later
mysql>use mysql;
>mysql>update user set authentication_string=password("new password") where user='root';
Summarize
Because Debian is a very simple system, many tools are not pre-installed, so you will encounter many pitfalls during the installation process. Many tutorials on the Internet may not apply to you, so you have to explore it yourself.
If you have any questions please contact me.
The above is the detailed content of Debian 9.4 system installation and installation steps for Jdk and other tools. For more information, please follow other related articles on the PHP Chinese website!

The Internet does not rely on a single operating system, but Linux plays an important role in it. Linux is widely used in servers and network devices and is popular for its stability, security and scalability.

The core of the Linux operating system is its command line interface, which can perform various operations through the command line. 1. File and directory operations use ls, cd, mkdir, rm and other commands to manage files and directories. 2. User and permission management ensures system security and resource allocation through useradd, passwd, chmod and other commands. 3. Process management uses ps, kill and other commands to monitor and control system processes. 4. Network operations include ping, ifconfig, ssh and other commands to configure and manage network connections. 5. System monitoring and maintenance use commands such as top, df, du to understand the system's operating status and resource usage.

Introduction Linux is a powerful operating system favored by developers, system administrators, and power users due to its flexibility and efficiency. However, frequently using long and complex commands can be tedious and er

Linux is suitable for servers, development environments, and embedded systems. 1. As a server operating system, Linux is stable and efficient, and is often used to deploy high-concurrency applications. 2. As a development environment, Linux provides efficient command line tools and package management systems to improve development efficiency. 3. In embedded systems, Linux is lightweight and customizable, suitable for environments with limited resources.

Introduction: Securing the Digital Frontier with Linux-Based Ethical Hacking In our increasingly interconnected world, cybersecurity is paramount. Ethical hacking and penetration testing are vital for proactively identifying and mitigating vulnerabi

The methods for basic Linux learning from scratch include: 1. Understand the file system and command line interface, 2. Master basic commands such as ls, cd, mkdir, 3. Learn file operations, such as creating and editing files, 4. Explore advanced usage such as pipelines and grep commands, 5. Master debugging skills and performance optimization, 6. Continuously improve skills through practice and exploration.

Linux is widely used in servers, embedded systems and desktop environments. 1) In the server field, Linux has become an ideal choice for hosting websites, databases and applications due to its stability and security. 2) In embedded systems, Linux is popular for its high customization and efficiency. 3) In the desktop environment, Linux provides a variety of desktop environments to meet the needs of different users.

The disadvantages of Linux include user experience, software compatibility, hardware support, and learning curve. 1. The user experience is not as friendly as Windows or macOS, and it relies on the command line interface. 2. The software compatibility is not as good as other systems and lacks native versions of many commercial software. 3. Hardware support is not as comprehensive as Windows, and drivers may be compiled manually. 4. The learning curve is steep, and mastering command line operations requires time and patience.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Zend Studio 13.0.1
Powerful PHP integrated development environment

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software