1.安裝jdk1.8
官網(wǎng)下載地址:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
選擇操作系統(tǒng)和對應(yīng)的文件進(jìn)行下載
直接下載tar.gz版本,不用安裝组题,直接解壓就可以
[圖片上傳失敗...(image-8d24a5-1560867798014)]下載完以后欠拾,解壓到/usr/local目錄
[root@bogon hcb]# tar zxvf jdk-8u211-linux-x64.tar.gz -C /usr/local
2.安裝tomcat
官方網(wǎng)內(nèi)打不開了。 直接通過鏡像下載
https://mirrors.cnnic.cn/apache/tomcat/tomcat-8/v8.5.42/bin/
[圖片上傳失敗...(image-f77ea-1560867798014)]
同樣解壓安裝就可以
tar zxvf apache-tomcat-8.5.42.tar.gz -C /usr/local
- 建立一個(gè)tomcat的快捷方式
ln -s apache-tomcat-8.5.42 tomcat
- 啟動(dòng):
[root@bogon tomcat]# pwd
/usr/local/tomcat
[root@bogon tomcat]# ./bin/startup.sh
3.添加防火墻例外奶稠,并重啟
[root@bogon tomcat]# firewall-cmd --zone=public --add-port=8080/tcp --permanent
success
[root@bogon tomcat]# firewall-cmd --reload
4.物理機(jī)輸入ip地址測試
3.安裝Mysql
因?yàn)閏entos 7 默認(rèn)源mariadb替換了mysql
所以要把mysql先添加到源上
-
下載mysql源安裝包
如果 Centos 系統(tǒng)版本大于7糙箍,默認(rèn)源使用 mariadb 替換掉了 MySQL, 如果仍要安裝 MySQL讲仰,只能采取源碼安裝。
-
安裝mysql源
yum localinstall mysql57-community-release-el7-8.noarch.rpm
-
檢查mysql的源是否安裝成功
yum repolist enabled | grep “mysql.-community.”
-
安裝Mysql
yum install mysql-community-server
-
啟動(dòng)Mysql
systemctl start mysqld
-
查看默認(rèn)的root密碼
[root@bogon hcb]# grep 'temporary password' /var/log/mysqld.log 2019-06-18T05:11:11.189330Z 1 [Note] A temporary password is generated for root@localhost: k(VPiD:wg7lh
-
修改root密碼
提示;ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
這是表示 你的新密碼安全強(qiáng)度不夠漾峡。增強(qiáng)密碼強(qiáng)度就可以攻旦,注意區(qū)分大小寫
[root@bogon hcb]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.26 Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'xdafdafdsaf2123231';
-
如何關(guān)閉密碼策略
vi /etc/my.cnf 中最后添加 下面一行。表示 關(guān)閉密碼策略 validate_password=off
-
重啟mysql后生效
systemctl restart mysqld
-
mysql設(shè)定開機(jī)啟動(dòng)
[root@bogon hcb]# systemctl enable mysqld [root@bogon hcb]# systemctl daemon-reload
systemctl 是centos7中用于控制系統(tǒng)服務(wù)的生逸。以 前版本是service xxx start|stop
daemon 是linux的守護(hù)進(jìn)程 牢屋,用于后臺(tái)長期不間斷運(yùn)行的程序
參考:https://blog.csdn.net/yuanlaijike/article/details/78877830