Linux basic development (below)
Resource software sharing
- mysql5.6
Linux
version
- 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:
- Uninstall rpm
rpm -e rpm软件包名
For example, uninstall Firefox Firefox browser
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)
yum install xxx
Download and install
Construction of development tools
Mysql is troublesome
- Because Centos6 comes with Mysql, you need to
rpm -e mysql
uninstall it first
. Here is Centos7, which comes with mariadb,
first queryrpm -qa | grep mariadb
, it shows that there is mariadb-libs
- Uninstall mariadb-libs, due to dependency problems, ordinary -e cannot be uninstalled, you need to attach –nodeps to ignore dependencies
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
5. Check whether the mysql user group and user exist, if not, create
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 autoconf
can install the dependencies
- Verify the installation: the results are as follows: the installation is successful, start the configuration below
rpm -qa | grep -i mysql
- Configure mysql:
(1)
service mysql start
Start 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
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 means that the password of a root administrator will be given by default in a hidden file, and then we use thisSET PASSWORD
SQL 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.
So, we typed this password into itmysql -uroot -pBXIdH9dtF9nht6NE
and successfully logged in! ThenSET PASSWORD
change the password
- 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
- 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
- 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
- After exiting the text editor, type
source /etc/profile
- 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.