“This is the 31st day of my participation in the August Gwen Challenge.

The vast sea of millions, thank you for this second you see here. Hope my article is helpful to you!

May you keep your love and go to the mountains and seas in the coming days!

Linux deployment environment

Yesterday we have installed some software for Linux deployment environment and some necessary commands to install and update successfully, now let’s install more applications! Let ‘s GO!

Deployment environment – mysql setup – Startup – Remote Authorization

1. Installation steps:

  1. Unzip the installation file (create an unzipped directory and unzipped it again) and upload mysql as before

    CD /soft mkdir -p /usr/local/mysql tar -xvf mysql-community-5.6.45.tar.gz -c /usr/local/mysqlCopy the code

  2. View the list of decompressed files

    cd /usr/local/mysql
    ll
    Copy the code

  3. Executing installation Commands

    rpm -ivhU * --nodeps --force
    Copy the code

2. Log in to the mysql VM

  1. Start the mysql service

    systemctl start mysqld
    Copy the code

    Add mysql to system service and set mysql to boot

    systemctl enable mysqld

  2. By default, the root user does not have a password when logging in to the mysql database

    mysql -uroot -p
    Copy the code

  3. You can also change the password of user root to root in mysql

    set password = password('root'); 
    Copy the code

3. Use mysql remote login

  1. Enable the remote login permission for mysql. By default, mysql does not support remote login to mysql for security purposes. Therefore, you need to enable the remote login permission and refresh the permission cache.

    Remotely log in to mysql and run the following command

    grant all privileges on *.* to 'root'@'%' identified by 'root';
    ​
    flush privileges;
    Copy the code

  2. Open Linux external access port 3306

    Note: you cannot operate firewall open ports in mysql, you must operate firewall open ports in mysql

    Firewall-cmd --zone=public --add-port=3306/ TCP --permanent Systemctl stop firewalldCopy the code

  3. Windows host mysql client can be connected to!

Deployment environment – Tomcat installation and startup

1. Installation procedure

  1. Decompress the installation file to /usr/local, and upload Tomcat as before

    CD /soft tar -xvf apache-tomcat-8.5.27.tar.gz -c /usr/local/Copy the code

  2. Go to the /usr/local/apache-tomcat-8.5.27/bin directory and start the Tomcat server

    CD/usr/local/apache tomcat - 8.5.27 / bin/startup. ShCopy the code

  3. The Linux firewall port 8080 needs to be enabled

    It is invalid for us to access the MySQL database at this time.

    firewall-cmd --zone=public --add-port=8080/tcp --permanent
    ​
    systemctl restart firewalld
    Copy the code
  4. Windows clients use browsers to access Tomcat on Port 8080 of Linux

  5. Let’s try creating an HTML interface access:

    cd ..
    cd webapps/ROOT/
    vim fish.html
    Copy the code

    Finally, let’s visit the web page to see:

  6. Go to the bin directory and shut down the server. After shutting down the server, the browser is no longer accessible

    ./shutdown.sh
    Copy the code

conclusion

I believe that you are on the deployment environment of Linux system some basic software have been installed successfully, if you need more tutorials, you can push me out, or you can query online! Look forward to our next post! Thank you for watching!

Let’s refuel together, too! I am not just, if there is any missing, wrong place, also welcome you to criticize in the comments of talent leaders! Of course, if this article is sure to help you a little, please kindly and lovely talent leaders to give a thumb-up, favorites, one key three even, thank you very much!

Here, the world is closed for today, good night! Although this article is over, I am still here, never finished. I will try to keep writing articles. The coming days are long, why fear the car yao ma slow!

Thank you all for seeing this! May you live up to your youth and have no regrets!