Linux installation and development environment (JDK11, nginx, redis, mysql)

Linux installation basic development environment

1. Install jdk11

yum install -y java-11-openjdk.x86_64

Check if jdk is installed

java -version

2. Install nginx

//一键安装上面四个依赖
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel

Download the nginx installation package and decompress it

wget http://nginx.org/download/nginx-1.13.7.tar.gz


tar -xvf nginx-1.13.7.tar.gz

//进入nginx目录
cd /usr/local/nginx
//进入目录
cd nginx-1.13.7
//执行命令 考虑到后续安装ssl证书 添加两个模块
./configure --with-http_stub_status_module --with-http_ssl_module
//执行make命令
make
//执行make install命令
make install

start up

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

3. Install redis

Download redis installation package

wget http://download.redis.io/releases/redis-6.2.6.tar.gz

unzip the file

tar xzf redis-6.2.6.tar.gz

Enter the unzipped directory

cd redis-6.2.6

Compile and install redis:

make
sudo make install

edit configuration file

vim redis.conf

Find the following two lines, remove the comment (#), and change the password to your own password

# requirepass foobared
requirepass yourpassword

Specify the configuration file to start the redis service

sudo redis-server redis.conf &

4. Install mysql

download rpm package

wget https://repo.mysql.com//mysql80-community-release-el7-7.noarch.rpm

yum way to install

yum -y install mysql80-community-release-el7-7.noarch.rpm

Install mysql service

yum install -y install mysql-community-server

start mysql

systemctl start mysqld.service

View the running status of mysql

systemctl status mysqld.service

View the temporary password generated by mysql

grep "password" /var/log/mysqld.log

insert image description here

Log in to mysql locally

mysql -uroot -p

Change root user password

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';

Guess you like

Origin blog.csdn.net/languageStudent/article/details/131120307