Centos7.1 deploy a java environment Server

Source: Internet
Author: User

Centos7.1 deploy a java environment Server
1. change default password 2. log on to vi/etc/ssh/sshd_config with the password, and change PasswordAuthentication no to yes to save and restart the service. 3. install vsftp install yum-y install vsftpd start service vsftpd start new user # useradd-d/var/www-g ftp-s/sbin/nologin myftp description: -s/sbin/nologin makes it unable to log on to the system.-d specifies the user directory as/var/www, which can be replaced with any directory you need. -G ftp: add the user to the ftp group (vsftp has been created). myftp is the ftp user name. During configuration, replace this myftp with your ftp user name. If the error message "useradd: warning: the home directory already exists. not copying any file from skel directory into it. this indicates that the user's directory already exists (/var/www, which can be any directory you set). You cannot create a new directory, rather than adding a user. You can ignore it. Note: If the-s/sbin/nologin parameter is not added to the user created using useradd, the user created is a common system user and has the permission to log on to the centos server, in a virtual host environment, this is very dangerous. Therefore, add the parameter-s/sbin/nologin after the useradd command to add a dedicated ftp account (virtual account) that cannot log on to the system for the centos Server Virtual Host) set Password # passwd myftp restart vsftpd service # service vsftpd restart4. upload jdk1.8, mysql, tomcat85 install graphical interface (optional) 6. install jdk, tomcat, mysql6.1 install jdk [root @ localhost ckb] # rpm-ivhjdk-8u65-linux-x64.rpmJDK installed in/usr/java by default. Verify the installation and perform the following operations to check whether the information is normal: [root @ localhost bin] # java [root @ localhost bin] # javac [root @ localhost bin] # java-version6.2 install tomcat unzip tar-zxv -fapache-tomcat-8.0.30.tar.gz Mobile Directory mvapache-tomcat-8.0.30/usr/local /tomcat8 start tomcat/usr/local/tomcat8/bin/startup. sh // start tomcat and add port 8080 to the firewall configuration. perform the following operations: enable port 8080/sbin/iptables-I INPUT-p tcp -- dport 8080-j ACCEPT configuration to automatically start vim/etc/rc. d/rc. add tomcat path/usr/local/tomcat8/bin/st in local Artup. sh & 6.3 install mysql install rpm-ivhmysql57-community-release-el7-7.noarch.rpmyuminstallmysql-server set mysql password View password grep "password"/var/log/mysqld. the password entered by mysql_secure_installation is preferably: It has uppercase letters, lowercase letters, special characters, and the number of digits should not be less than 8 characters. Because it detects the password strength, it cannot be modified if it is not enough. Other settings Remove anonymous users? [Y/n] y ---- prohibit anonymous access to Disallow root login remotely? [Y/n] n ---- does root not allow remote access to Remove test database and access to it? [Y/n] n ---- Delete the test database testReload privilege tables now? [Y/n] y ---- reload authorization information and log on with a new password. Modify the MySQL table to support non-local connections: mysql> update user set host = '%' where user = 'root'; mysql> flush privileges; open Port 3306/sbin/iptables-I INPUT-p tcp -- dport 3306-j ACCEPT

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.