First, install jdk
1, jdk package uploaded to the server, extract
tar -zxvf jdk-8u73-linux-x64.tar.gz
2, the configuration of global variables
mv jdk1.8.0_73 jdk8
vi /etc/profile
#添加以下至配置文件
export JAVA_HOME=/home/jdk8
export JAVA_BIN=/home/jdk8/bin
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
3, restart the configuration file to see whether the configuration jdk
#将配置文件立即生效
source /etc/profile
#查看jdk是否配置成
java -version
Second, the installation tomcat
1, upload the package to the server, extract
tar -zxvf apache-tomcat-8.0.33.tar.gz
mv apache-tomcat-8.0.33 tomcat
2, startup, shutdown tomat
cd /tomcat/bin
./startup.sh
./shutdown.sh
Third, install redis
1, upload the package to the server, extract
tar -zxvf redis-5.0.7.tar.gz
2, into the extracting installer, and executes the installation command
#进入redis目录
cd redis-5.0.7/
#执行make安装
make
3, into the src directory
#在redis安装目录中
cd /src
make install
./redis-server /home/redis-5.0.7/redis.conf
Fourth, install Nginx:
yum -y install nginx
# 查看 Nginx 版本
nginx -v
# 查看 Nginx 安装目录
rpm -ql nginx
# 启动 Nginx
service nginx start
Five, mysql installation
1, download and install mysql official repository
#下载安装用的Yum仓库
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
#安装Yum Repository
yum -y install mysql57-community-release-el7-10.noarch.rpm
#安装mysql服务器,耗时会比较久
yum -y install mysql-community-server
2, MySQL database settings
#启动MySQL
systemctl start mysqld.service
# 查看MySQL运行状态
systemctl status mysqld.service
#查看初始密码
grep "password" /var/log/mysqld.log
#进入数据库(输入初始密码)
mysql -uroot -p
#修改密码
ALTER USER 'root'@'localhost' IDENTIFIED BY '新密码';
#设置简单的密码会出现如下错误,设置复杂点的就可以了
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
Appears in the following figure illustrates the installation was successful and is already running
The following can be used as normal