Linux environment Deployment (Nginx+mariadb+java)

Source: Internet
Author: User

1. Installing Nginx
    • Installation
Yum Install Nginx
    • Start
Yum Install Nginx
    • Power-on self-booting
sudo systemctl enable Nginx
2, Installation mariadb
    • Installation
sudo Yum Install mariadb101u-server-y
    • If the installation is experiencing problems, it may be because the system comes with MARIADB, first remove
sudo Yum Remove mariadb-libs-y
    • Start
sudo systemctl start mariadb
    • Boot from Boot
sudo systemctl enable mariadb
    • Security Configuration
Mysql_secure_installation

Enter current password to root (enter for none):
Explanation: Enter the current root user password, default is empty, enter directly.
Set root Password? [y/n] Y
Explanation: Do you want to set the root password? Enter Y to indicate willingness.
Remove anonymous users? [y/n] Y
Explanation: Do you want to remove anonymous users? Enter Y to indicate willingness.
Disallow Root login remotely? [y/n] Y
Explanation: Don't you want root to log on remotely? Enter Y to indicate willingness.
Remove test database and access to it? [y/n] Y
Explanation: Do you want to remove the test database? Enter Y to indicate willingness.
Reload privilege tables now? [y/n] Y
Explanation: Do you want to reload permissions? Enter Y to indicate willingness.

    • Add user
' username '@'localhost'password ' username '@'%'password' with GRANT OPTION; FLUSH privileges;
3. Java JDK RPM Installation
RPM-IVH jdk***.rpm
4. Tomcat Installation

Upload tomcat to the server/home directory

Enter the/hometomcat/bin directory, modify permissions, and be able to run *.sh

cd/home/tomcat/binchmod u+x. /* . SH

Configuring Environment variables

Modify the/etc/profile file

VI /etc/profile

Add the following code to it

#set Java environmentjava_home=/usr/java/jdk1. 8 . 0_141jre_home=/usr/java/jdk1. 8. 0_141/jrecatalina_home=/home/tomcatclass_path=.: $JAVA _home/lib/dt.jar: $JAVA _home/ Lib/tools.jar: $JRE _home/lib: $CATALINA _home/LibPATH= $PATH: $JAVA _home/bin: $JRE _home/binexportJava_ HOME jre_home catalina_home  

Make environment variable configuration effective

Source Profile

Improve Tomcat start-up efficiency

Open/usr/java/jdk1.8.0_141/jre/lib/security, replace the following

securerandom.source=file:/dev/random replaced with securerandom.source=file:/dev/./urandom

Linux environment Deployment (Nginx+mariadb+java)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.