Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The first day of Linux study

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Purpose of study:

Master Linux installation

Set static ip address

Modify the yum source (refer to https://blog.csdn.net/zhaluo_dehezi/article/details/86689322)

Install jdk1.8 and configuration

Install mysql and configuration (please refer to https://blog.csdn.net/pengjunlee/article/details/81212250)

Set up unsecret login

Use the tool:

Oracle VM VirtualBox

2.CentOS-7

3.Xshell6 (remote connection to virtual machine) and Xftp6 (upload files to virtual machine)

First, install Linux

Start after setting up

Open the dual network card

Set root password (highest privileged user)

Second, set a static ip address

Turn off the firewall systemctl stop firewalld permanently turn off systemctl disable firewalld

Modify static ip address vi / etc/sysconfig/network-scripts/ifcfg-enp0s3

IP is the same network segment of host network manager in software management.

Restart the network systemctl restart network to view ip ip a

See the following figure to show that the IP address has been obtained

Check to see if you can access the public network ping www.baidu.com.

The following instructions can go out to the public network, and then use Xshell software to connect the virtual machine.

The password is the password set twice when the virtual machine is installed.

3. Modify the yum source (download from foreign websites by default, which affects the download speed. The following will be changed to domestic source)

Download and install wget software yum install-y wget view existing yum source yum repolist enter directory cd / etc/yum.repos.d backup old configuration file mv CentOS-Base.repo CentOS-Base.repo.bak download Ali cloud source file wget-O / etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/Centos-7.repo clean cache yum clean all regenerate cache yum makecache modify host name hostnamectl set-hostname XXX bundle Specify ip address and hostname vi/etc/hosts to add ip and hostname on the last line Save exit Esc: wq

4. Installation and configuration of jdk1.8

Open the software and upload the jdk file to the opt directory of the virtual machine

Go to the opt directory cd / optls to view the incoming file tar-zxvf jdk-8u111-linux-x64.tar.gz extract and move jdk to inst mv jdk1.8.0_111/. / inst/jdk181 configuration environment export JAVA_HOME=/opt/inst/jdk181export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport PATH=$PATH:$JAVA_HOME/bin update configuration file source / etc/profile to see if java jdk has successfully installed java-version

Indicates success

Installation and configuration of mysql

Check whether to install the database rpm-qa | grep-I mariadb delete database rpm-e-- nodeps mariadb-libs-5.5.52-1.el7.x86_64 download mysql installation package wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm install mysql-community-release-el7-5.noarch.rpm package rpm-ivh mysql-community-release-el7-5.noarch.rpm after installation is complete Two new yum source files, mysql-community.repo and mysql-community-source.repo, will be added in the / etc/yum.repos.d/ directory to execute yum repolist all | grep mysql command to check the available mysql installation files install mysql yum install mysql-server to check whether rpm-qa is installed successfully | grep mysql restart mysql systemctl start mysqld.service Settings mysql boot boot systemctl enable mysqld.service

Set password

Mysql-u rootmysql > use mysql;mysql > update user set password=PASSWORD ("enter root user password here") where User='root';mysql > flush privileges; delete extra blank users delete from user where password=''; setup remote host login GRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' your password'; use database software connection test on windows

VI. Set up unsecret login

Generate public key: ssh-keygen-t rsa-P''View Public and Private key: cd / root/.ssh/ View Authorization File: cat id_rsa.pub > > after authorized_keys enter, ls authorizes chmod 600 authorized_keys to test ssh hostname or IP without entering a password

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report