当前位置:网站首页>CentOS installs JDK1.8 and mysql5 and 8 (the same command 58 in the second installation mode is common, opening access rights and changing passwords)
CentOS installs JDK1.8 and mysql5 and 8 (the same command 58 in the second installation mode is common, opening access rights and changing passwords)
2022-07-07 09:45:00 【qq_ thirty-six million nine hundred and sixty-seven thousand an】
jdk And mysql Both contain tar Package and yum Two installation methods
The first one is jdk
Download good tar package
tar zxvf jdk-8u181-linux-x64.tar.gz /usr/local/java
Configure environment variables
vim /etc/profile
Add at the bottom
export JAVA_HOME=/usr/local/java/jdk1.8.0_181
export PATH= J A V A H O M E / b i n : JAVA_HOME/bin: JAVAHOME/bin:PATH
wq preservation
Input java -version、javac、 java Come and check 8481bc1aa61953d.png)
Whether the certificate is installed
The second kind jdk use yum install
yum -y remove java*
After uninstalling, restart
yum -y install java-1.8.0-openjdk-devel.x86_64
mysql Installation mode
The first one is mysql use yum install
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server
Download dependent installation services ,8 As the corresponding 8 Of rpm that will do
start-up :systemctl start mysqld.service
View service :systemctl status mysqld.service
Check the password :grep “password” /var/log/mysqld.log
The last is mysql The opening of password and access rights is put in tar Package installed together
The second kind mysqltar Package installation method
tar -zxvf /root/mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz -C
/usr/local/
mv mysql-5.7.30-linux-glibc2.12-x86_64 mysql
groupadd mysql
useradd -g mysql mysql
mkdir /usr/local/mysql/data
chown -R mysql:mysql ./
vim /etc/my.cnf
[mysql]
Set up mysql Client default character set
default-character-set=utf8
socket=/var/lib/mysql/mysql.sock
[mysqld]
skip-name-resolve
# Set up 3306 End ⼝
port = 3306
socket=/var/lib/mysql/mysql.sock
Set up mysql Installation ⽬ record
basedir=/usr/local/mysql
Set up mysql The storage of data in the database ⽬ record
datadir=/usr/local/mysql/data
Allow the most ⼤ The number of connections
max_connections=200
The server makes ⽤ The default character set is 8⽐ Special coded latin1 Character set
character-set-server=utf8
Creating a new table will make ⽤ The default storage engine for
default-storage-engine=INNODB
lower_case_table_names=1
max_allowed_packet=16M
mkdir /var/lib/mysql
chmod 777 /var/lib/mysql
cd /usr/local/mysql
./bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql –
datadir=/usr/local/mysql/data
cp ./support-files/mysql.server /etc/init.d/mysqld
vim /etc/init.d/mysqld
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
chmod +x /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig --list mysqld
service mysqld start
vim ~/.bash_profile
export PATH=$PATH:/usr/local/mysql/bin
source ~/.bash_profile
mysql -u root -p
alter user user() identified by “root”;
flush privileges;
use mysql;
update user set user.Host=’%’ where user.User=‘root’;
flush privileges;
All installed , The second kind mysql The installation method is applicable to 5 And 8 Fine , Just copy it , Copy in large sections
Every time you install this
边栏推荐
- H5网页播放器EasyPlayer.js如何实现直播视频实时录像?
- 细说Mysql MVCC多版本控制
- How will fashion brands enter the meta universe?
- 2020CCPC威海 J - Steins;Game (sg函数、线性基)
- Information Security Experiment 1: implementation of DES encryption algorithm
- Unity3d interface is embedded in WPF interface (mouse and keyboard can respond normally)
- The difference between viewpager2 and viewpager and the implementation of viewpager2 in the rotation chart
- 剑指 Offer II 107. 矩阵中的距离
- 面试被问到了解哪些开发模型?看这一篇就够了
- 4、 Fundamentals of machine learning
猜你喜欢
随机推荐
数据库多表关联查询问题
【frida实战】“一行”代码教你获取WeGame平台中所有的lua脚本
sql 里面使用中文字符判断有问题,哪位遇到过?比如value<>`无`
大佬们,请问 MySQL-CDC 有什么办法将 upsert 消息转换为 append only 消
C# Socke 服务器,客户端,UDP
liunx命令
js逆向教程第二发-猿人学第一题
小程序弹出半角遮罩层
[Frida practice] "one line" code teaches you to obtain all Lua scripts in wegame platform
第一讲:鸡蛋的硬度
C# XML的应用
How to become a senior digital IC Design Engineer (1-6) Verilog coding Grammar: Classic Digital IC Design
小程序滑动、点击切换简洁UI
flinkcdc采集oracle在snapshot阶段一直失败,这个得怎么调整啊?
First issue of JS reverse tutorial
Windows starts redis service
**grafana安装**
PostgreSQL reports an error when creating a trigger,
CMD startup software passes in parameters with spaces
H5网页播放器EasyPlayer.js如何实现直播视频实时录像?