Linux production environment build, Linux environment build _php tutorial

Source: Internet
Author: User

Build Linux production environment, build Linux environment


Linux Basics Command Notes

Once again today to build a Linux production environment. This is a lot of steps, very cumbersome and have to do things. Although done many times, but there are many steps, orders do not remember, every time everywhere to find the information is very troublesome, so a few steps to write down, in order to find.

Log in to remote MySQL

1 mysql -h 192.168.1.100 -u root -p

Assigning permissions to a MySQL non-root account

Select,insert,update,delete permissions for all tables in the TestDB database for the user who user1 the account with a password of 123456:

1 grant select,insert,update,delete on testDB.* to user1@'%'identified by '123456';

Refresh permissions:

1 flush privileges;

View maximum connections under MySQL

1 show variables like 'max_connections';

To modify the maximum number of connections

1 vi/etc/my.cnf

Found max_connections=100 (if not added), instead:

1 max_connections=1500

Password-free login to Linux server

Password-free login to Linux server with your own computer (you are a Windows system)

On Windows

Execute with the cmd command:

1 ssh-keygen -t rsa

Double-tap 3 to enter, you can see in the folder under the C-drive user directory .ssh ,

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

On Linux

Perform

1 ssh-keygen -t rsa

Double-tap 3 to enter, and then cd .ssh/ you can see that

1 id_rsa id_rsa.pub

Create a public key to hold the free login host generation.authorized_keys

1 touchauthorized_keys

Change his authority to 600.

1 chmod600 ~/.ssh/authorized_keys

Finally, the id_rsa.pub public key of the Windows computer is written to Authorized_keys and saved.

File Rename

Download the JDK file name in this manner and jdk-8u65-linux-x64.rpm\?AuthParam\=1445848743_f162eddc392f630f3b14bcded3bc3f19 change it to jdk-8u65-linux-x64.rpm . The command is as follows:

1 mvjdk-8u65-linux-x64.rpm\?AuthParam\=1445848743_f162eddc392f630f3b14bcded3bc3f19 jdk-8u65-linux-x64.rpm

Installing the JDK

Download JDK

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

Download good rename to: jdk-8u65-linux-x64.rpm, give 777 permission

1 `chmod777 jdk-8u65-linux-x64.rpm`

Installation

1 rpm -ivh jdk-8u65-linux-x64.rpm

View

1 java -version

Configuring Environment variables

Modify the System environment variable file

1 vi+ /etc/profile

Append the following content to the file:

12345 JAVA_HOME=/usr/java/jdk1.8.0_65JRE_HOME=/usr/java/jdk1.8.0_65PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/binCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/libexportJAVA_HOME JRE_HOME PATH CLASSPATH

Make the modification effective immediately:

1 source/etc/profile

CentOS Direct Yum Install Nginx

Processing Source:

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

To view the Nginx information for Yum:

1 yum info nginx

Installation:

1 yum installnginx

Start Nignx:

1 service nginx start

Enter the host address to view:

Http://192.168.1.100/

See

12345678 Welcome to nginx!If you see this page, the nginx web server is successfully installed and working. Further configuration is required. For online documentation and support please refer to nginx.org.Commercial support is available at nginx.com.Thank you for using nginx.

Description succeeded.

http://www.bkjia.com/PHPjc/1064529.html www.bkjia.com true http://www.bkjia.com/PHPjc/1064529.html techarticle Linux production environment build, Linux Environment Build Linux Foundation command notes today again to build Linux production environment. This is a lot of steps, very cumbersome and have to do things. Although ...

  • 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.