本文源碼:GitHub·點(diǎn)這里 || GitEE·點(diǎn)這里
創(chuàng)新互聯(lián)服務(wù)項(xiàng)目包括吉安網(wǎng)站建設(shè)、吉安網(wǎng)站制作、吉安網(wǎng)頁(yè)制作以及吉安網(wǎng)絡(luò)營(yíng)銷策劃等。多年來(lái),我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢(shì)、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,吉安網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到吉安省份的部分城市,未來(lái)相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!
[root@localhost mysoft]# tar -zxvf jdk-8u161-linux-x64.tar.gz
[root@localhost mysoft]# pwd
/usr/local/mysoft
[root@localhost mysoft]# mv jdk1.8.0_161 jdk1.8
[root@localhost mysoft]# ps -aux|grep java
[root@localhost mysoft]# rpm -e --nodeps rpm -qa | grep java
[root@localhost /]# vim /etc/profile
# 文件末尾追加 下面內(nèi)容 shit+g 跳到文件末尾
# JAVA_HOME
export JAVA_HOME=/usr/local/mysoft/jdk1.8
export PATH=$PATH:$JAVA_HOME/bin
[root@localhost /]# java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
[root@localhost mysoft]# tar -zxvf apache-tomcat-8.5.40.tar.gz
[root@localhost mysoft]# mv apache-tomcat-8.5.40 tomcat8.5
[root@localhost bin]# pwd
/usr/local/mysoft/tomcat8.5/bin
[root@localhost bin]# ./startup.sh
Tomcat started.
http://127.0.0.1:8080/ OK了
[root@localhost /]# rpm -qa|grep mariadb
mariadb-libs-5.5.56-2.el7.x86_64
[root@localhost /]# rpm -e --nodeps mariadb-libs
[root@localhost /]# rpm -qa|grep mariadb
地址:https://dev.mysql.com/downloads/repo/yum/
https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
[root@localhost /]# rpm -ivh mysql80-community-release-el7-3.noarch.rpm
[root@localhost /]# yum repolist all|grep mysql
mysql57-community/x86_64 MySQL 5.7 Community Server disabled
mysql80-community/x86_64 MySQL 8.0 Community Server enabled: 113
mysql80-community-source MySQL 8.0 Community Server - disabled
……..
yum源中默認(rèn)啟用的安裝包版本為MySQL8.0,這里切換為5.7,執(zhí)行以下命令;
[root@localhost /]# yum-config-manager --disable mysql80-community
[root@localhost /]# yum-config-manager --enable mysql57-community
[root@localhost /]# yum install mysql-community-server
# 需要安裝依賴提示,選擇y
Total download size: 192 M
Installed size: 865 M
Is this ok [y/d/N]: y
查看版本
[root@localhost /]# mysql -V
mysql Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using EditLine wrapper
啟動(dòng)查看狀態(tài)
[root@localhost /]# systemctl start mysqld.service
[root@localhost /]# systemctl status mysqld.service
mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2019-05-14 17:26:32 CST; 31s ago
為root賬戶生成臨時(shí)密碼
[root@localhost /]# grep 'temporary password' /var/log/mysqld.log
2019-05-14T09:26:28.657250Z 1 [Note] A temporary password is generated for root@localhost: !Bh(GT.od9L;
設(shè)置root用戶密碼
# 這里防止出現(xiàn)密碼策略,強(qiáng)度不夠的問(wèn)題
mysql> set global validate_password_policy=LOW;
mysql> alter user 'root'@'localhost' identified by 'husky123456';
這樣,Java的基礎(chǔ)環(huán)境就搭建完畢了!
GitHub·地址
https://github.com/cicadasmile/linux-system-base
GitEE·地址
https://gitee.com/cicadasmile/linux-system-base