rz上传jdk-8u181-linux-x64.tar.gz和apache-tomcat-8.5.32.tar.gz
或者FileZilla Client进行sftp链接上传

tar xzvf jdk-8u181-linux-x64.tar.gz -C /usr/local/
cd /usr/local/jdk1.8.0_181/bin
[[email protected] bin]# ./java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mix-ed mode)
- 配置环境变量
[[email protected] bin]# vim /etc/profile
export JAVA_HOME=/usr/local/jdk1.8.0_181
export CLASSPATH=.:JAVA_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin
[[email protected] ~]# source /etc/profile
[[email protected] ~]# java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b12)
OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)
- 安装Tomcat
[[email protected] software]# tar xzvf apache-tomcat-8.5.32.tar.gz
[[email protected] software]# cd apache-tomcat-8.5.32/
[[email protected] apache-tomcat-8.5.32]# ll
总用量 92
drwxr-x---. 2 root root 4096 8月 20 14:56 bin
drwx------. 2 root root 238 6月 21 03:53 conf
drwxr-x---. 2 root root 4096 8月 20 14:56 lib
-rw-r-----. 1 root root 57092 6月 21 03:53 LICENSE
drwxr-x---. 2 root root 6 6月 21 03:50 logs
-rw-r-----. 1 root root 1723 6月 21 03:53 NOTICE
-rw-r-----. 1 root root 7138 6月 21 03:53 RELEASE-NOTES
-rw-r-----. 1 root root 16246 6月 21 03:53 RUNNING.txt
drwxr-x---. 2 root root 30 8月 20 14:56 temp
drwxr-x---. 7 root root 81 6月 21 03:51 webapps
drwxr-x---. 2 root root 6 6月 21 03:50 work
[[email protected] apache-tomcat-8.5.32]# cd bin/
[[email protected] bin]# pwd
/root/software/apache-tomcat-8.5.32/bin
[[email protected] bin]# ./startup.sh
Using CATALINA_BASE: /root/software/apache-tomcat-8.5.32
Using CATALINA_HOME: /root/software/apache-tomcat-8.5.32
Using CATALINA_TMPDIR: /root/software/apache-tomcat-8.5.32/temp
Using JRE_HOME: /usr/local/jdk1.8.0_181
Using CLASSPATH: /root/software/apache-tomcat-8.5.32/bin/bootstrap.jar:/root/software/apache-tomcat-8.5.32/bin/tomcat-juli.jar
Tomcat started.
- 放行默认端口8080,关闭selinux
[[email protected] bin]# firewall-cmd --permanent --add-port=8080/tcp
success
[[email protected] bin]# firewall-cmd --reload
success
[[email protected] bin]# getenforce
Enforcing
[[email protected] bin]# setenforce 0
[[email protected] bin]# getenforce
Permissive

- 安装Mysql
[[email protected] bin]# yum repolist | grep mysql
[[email protected] bin]# rpm -ivh https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
获取https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
警告:/var/tmp/rpm-tmp.m7U7PD: 头V3 DSA/SHA1 Signature, ** ID 5072e1f5: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:mysql80-community-release-el7-1 ################################# [100%]
[[email protected] bin]# yum repolist | grep mysql
mysql-connectors-community/x86_64 MySQL Connectors Community 63
mysql-tools-community/x86_64 MySQL Tools Community 69
mysql80-community/x86_64 MySQL 8.0 Community Server 33
[[email protected] yum.repos.d]# pwd
/etc/yum.repos.d
[[email protected] yum.repos.d]# ll
总用量 40
-rw-r--r--. 1 root root 1503 8月 3 05:03 CentOS-Base.repo
-rw-r--r--. 1 root root 1664 8月 3 05:01 CentOS-Base.repo.bak
-rw-r--r--. 1 root root 1309 8月 30 2017 CentOS-CR.repo
-rw-r--r--. 1 root root 649 8月 30 2017 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 314 8月 30 2017 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 630 8月 30 2017 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 8月 30 2017 CentOS-Sources.repo
-rw-r--r--. 1 root root 3830 8月 30 2017 CentOS-Vault.repo
-rw-r--r--. 1 root root 1864 2月 22 16:49 mysql-community.repo
-rw-r--r--. 1 root root 1885 2月 22 16:49 mysql-community-source.repo
[[email protected] software]# yum install mysql-community-server
[[email protected] software]# yum install mysql-server
[[email protected] ~]# rpm -qa | grep mysql
mysql-community-server-8.0.12-1.el7.x86_64
mysql80-community-release-el7-1.noarch
mysql-community-libs-8.0.12-1.el7.x86_64
mysql-community-common-8.0.12-1.el7.x86_64
mysql-community-libs-compat-8.0.12-1.el7.x86_64
mysql-community-client-8.0.12-1.el7.x86_64
[[email protected] lib]# systemctl start mysqld
[[email protected] lib]# systemctl enable mysqld
[[email protected] lib]# cat /var/log/mysqld.log |grep password #查看初始密码
2018-08-20T11:54:48.607318Z 5 [Note] [MY-010454] [Server] A temporary password is generated for [email protected]: +goyZ3q8w?!z
[[email protected] lib]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.12
Copyright (c) 2000, 2018, 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> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. #提示需要先修改密码
mysql> alter user [email protected]'localhost' identified by '[email protected]'; #修改密码为[email protected]
Query OK, 0 rows affected (0.10 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.02 sec)
mysql>
- 安装FTP
- vsftpd:very secure ftp daemon
[[email protected] ~]# yum install vsftpd
[[email protected] ~]# systemctl restart vsftpd
[[email protected] ~]# netstat -ntpl | grep vsftp
tcp6 0 0 :::21 :::* LISTEN 65571/vsftd
- 使用FileZilla进行FTP连接时候报530错误

- 将/etc/vsftpd/目录下的ftpusers和user_list中的root用户删除即可
[[email protected] vsftpd]# pwd
/etc/vsftpd
[[email protected] vsftpd]# cp vsftpd.conf ./vsftpd.conf.bak
[[email protected] vsftpd]# grep -v '#' /etc/vsftpd/vsftpd.conf.bak > vsftpd.conf
[[email protected] vsftpd]# ll
总用量 24
-rw-------. 1 root root 125 8月 3 2017 ftpusers
-rw-------. 1 root root 361 8月 3 2017 user_list
-rw-------. 1 root root 249 8月 21 19:19 vsftpd.conf
-rw-------. 1 root root 5031 8月 21 19:19 vsftpd.conf.bak
-rwxr--r--. 1 root root 338 8月 3 2017 vsftpd_conf_migrate.sh
[[email protected] vsftpd]# cat vsftpd.conf
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[[email protected] vsftpd]# vim ftpusers #将root删除
[[email protected] vsftpd]# vim user_list #将root删除
[[email protected] vsftpd]# systemctl restart vsftpd

[[email protected] yum.repos.d]# vim nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
[[email protected] yum.repos.d]# yum install nginx
[[email protected] yum.repos.d]# systemctl start nginx
[[email protected] yum.repos.d]# systemctl enable nginx
