LINUX production environment Build recommended tutorials _linux shell

Source: Internet
Author: User
Tags chmod ssh

Because the Linux production environment to build a lot of steps, it is cumbersome and necessary steps. Although it has been done many times, but because of the cumbersome steps, it is easy to forget, the following small set up a time to build the Linux production environment to record the steps to share in the cloud-dwelling community platform, so that when needed to use

Log on to remote MySQL

Mysql-h 192.168.1.100-u Root-p

Assign permissions to MySQL non-root account

Give the account User1 password 123456 users testdb the Select,insert,update,delete permissions for all tables in the database:

Grant Select,insert,update,delete on testdb.* to user1@ '% ' of ' identified by ' 123456 ';

Refresh permissions:

Flush privileges;

View the maximum number of connections under MySQL

Show variables like ' max_connections ';

To modify the maximum number of connections

Vi/etc/my.cnf

Find max_connections=100 (added if not), and change to:

max_connections=1500

Password-free login to Linux server

Log on to the Linux server using your own computer password (Windows system)

On Windows

Execute with cmd command:

SSH-KEYGEN-T RSA

Even knock 3 to enter, you can in the C disk user directory under the. SSH folder to see,

Id_rsa is the private key, Id_rsa.pub is the public key.

On Linux

Perform

SSH-KEYGEN-T RSA

Even knock 3 down to enter and then CD. ssh/can see that

Id_rsa id_rsa.pub

Create a public key to save a login-free host generation, Authorized_keys

Touch Authorized_keys

Change his authority to 600.

chmod ~/.ssh/authorized_keys

Finally, the Windows computer's Id_rsa.pub public key is written to the Authorized_keys and saved.

File renaming

Download a good JDK filename in this way jdk-8u65-linux-x64.rpm\? Authparam\=1445848743_f162eddc392f630f3b14bcded3bc3f19 change it to jdk-8u65-linux-x64.rpm. The order is as follows:

MV Jdk-8u65-linux-x64.rpm\? Authparam\=1445848743_f162eddc392f630f3b14bcded3bc3f19 jdk-8u65-linux-x64.rpm

Installing JDK

Download JDK

wget http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-x64.rpm? Auth param=1445848743_f162eddc392f630f3b14bcded3bc3f19

Download good rename into: jdk-8u65-linux-x64.rpm, give 777 permissions

' Chmod 777 jdk-8u65-linux-x64.rpm '

Installation

RPM-IVH jdk-8u65-linux-x64.rpm

View

Java-version

Configure Environment variables

modifying system environment variable files

VI +/etc/profile

Append the following content to the file:

java_home=/usr/java/jdk1.8.0_65
jre_home=/usr/java/jdk1.8.0_65
path= $PATH: $JAVA _home/bin: $JRE _home/bin
classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib
export java_home jre_home PATH CLASSPATH

To make the modification take effect immediately:

Source/etc/profile

CentOS Direct Yum Installation Nginx

Processing Source:

RPM-IVH http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm

To view Yum Nginx information:

Yum Info nginx

Installation:

Yum Install Nginx

Start Nignx:

Service Nginx Start

Enter host address view:

Http://192.168.1.100/

See

Welcome to nginx!
If you are here page, the Nginx Web server is successfully installed and working. Further configuration is required.
For online documentation and support the refer to nginx.org.
Commercial support is available at nginx.com.
Thank for using Nginx.

The above content is small set for everyone to share the Linux production environment to build a recommended tutorial, I hope you like.

Related Article

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.