Linux basic development (below)

Resource software sharing

  • mysql5.6 Linuxversion
  • Thunder:
    Client: https://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-client-5.6.49-1.el6.x86_64.rpm
    Server: https://cdn.mysql.com/ /Downloads/MySQL-5.6/MySQL-server-5.6.49-1.el6.x86_64.rpm
  • Baidu Cloud:
    Link: https://pan.baidu.com/s/1_n7AZuQaq1lxPNuQfi9I-w
    Extraction code: sang
  • apache+Tomcat+jdk8(Linux版)

Baidu Cloud:
Link: https://pan.baidu.com/s/1HRhTuab1U4j-RJooOBKW8g
Extraction code: sang

  • Xshell and Xftp

Baidu Cloud:
Link: https://pan.baidu.com/s/1rvjgjJJ9v9XnzXTRmcs0vg
Extraction code: sang

Package installation yum and rpm

  • rpm

It is a packaging installation tool for Linux operating systems, similar to setup.exe under windows and QQ.apk on Android phones. Although it is a Red Hat (RedHat) logo, the concept is the same, and centos was acquired by Red Hat ,

  • Fuzzy query to query the list of installed rpms:rpm -qa | grep xxx

Install and uninstall

  • Install rpm

rpm -ivh rpm包名
-i means installation install
-v means viewing information
-h means viewing progress bar

  • There is the initial system installation package under the image file.
    For example, install Firefox:
    Insert picture description here
  • Uninstall rpm

rpm -e rpm软件包名
For example, uninstall Firefox Firefox browser
Insert picture description here

yum download

Similar to Maven in Java learning, what he stores in the system is the cloud warehouse address, such as Aliyuan, Zhejiang University, etc., we download software from the warehouse.

  • yum list l grep xx 软件列表(Pipeline fuzzy query)
    Insert picture description here
  • yum install xxx Download and install
    Insert picture description here

Construction of development tools

Mysql is troublesome

  1. Because Centos6 comes with Mysql, you need to rpm -e mysqluninstall it first
    . Here is Centos7, which comes with mariadb,
    first query rpm -qa | grep mariadb, it shows that there is mariadb-libs
    Insert picture description here
  2. Uninstall mariadb-libs, due to dependency problems, ordinary -e cannot be uninstalled, you need to attach –nodeps to ignore dependencies
    Insert picture description here

3. Check the permissions of /temp, temp needs 777 permissions, if you don’t have all, then type in. I have displayed all permissions here . 4. Check whether there is a mysql file in the system, and delete if there is.
chmod -R 777 /temp

Insert picture description here

Here is the quote

5. Check whether the mysql user group and user exist, if not, create

Here is the quote

6. Install the client and server installation packages

rpm -vih MySQL-client-5.6.49-1.el7.rpm
rpm -vih MySQL-server-5.6.49-1.el7.rpm

The episode that appears: Installing MySQL-server-5.6.49-1.el7.rpm will cause the lack of dependencies, here we yum -y insatll autoconfcan install the dependencies

  1. Verify the installation: the results are as follows: the installation is successful, start the configuration below
    rpm -qa | grep -i mysql

    Insert picture description here
  2. Configure mysql:

(1) service mysql startStart the service: (retain the commands in centos6)
(2) Set the mysql user password:, mysqladmin -uroot password ‘密码’here you will find that the error message shows that no
Insert picture description here
matter how you set it, you can’t enter the mysql service. I boldly guessed the default administrator password and tried it. "root" and a blank password are wrong, and then I turned up the xshell window and found that this sentence Insert picture description heremeans that the password of a root administrator will be given by default in a hidden file, and then we use this SET PASSWORDSQL statement that must be used after logging in to mysql change Password. So I found this file and found such a password, as shown in the figure below.
Insert picture description here
So, we typed this password into it mysql -uroot -pBXIdH9dtF9nht6NEand successfully logged in! Then SET PASSWORDchange the password
Insert picture description here

  1. Chinese character set issues

Often comrades in the new database, especially under Linux, create a table to enter Chinese information, select query, appear? ? ? , This is the problem of Chinese garbled

  • We query the character set under mysql: ** show variables like 'character%';** Found that the displayed result is in the Latin character set.
    Then let's modify it!
  • We find the my-default.cnf file under /usr/share/mysql, we copy a copy to /etc and rename it to my.cnf
  • And add
    [client]
    default-character-set=utf8
    [mysql]
    default-character-set=utf8
    [mysqld]
    character-set-server=utf8
    character-set-client=utf8
    collation-server=utf8_general_ci

jdk is very simple

  1. Put the downloaded Linux version of jdk8 under /opt, because the opt directory is the folder where the user’s own software is placed, because the compressed version is provided, so we can unzip the tar directly
  2. Edit the /etc/profile file, CTRL+E to cut the cursor to the end of the text, the information is as follows

JAVA_HOME=/opt/jdk8
PATH= J A V A H O M E / b i n : JAVA_HOME/bin: JAVAHOME/bin:PATH
export JAVA_HOME PATH

  1. After exiting the text editor, typesource /etc/profile
  2. Check type java javac java -version

Tomcat is also very simple

We generally stipulate that the opt directory under Linux is our user's software directory. Okay, we will put the tomcat file under opt, we cd into /tomcat/bin and
type it ./startup.sh, after the startup is successful, we can visit 127.0.0.1:8080 to check.

Guess you like

Origin blog.csdn.net/BlackBtuWhite/article/details/107505381