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:
View maximum connections under MySQL
1 |
show variables like 'max_connections' ; |
To modify the maximum number of connections
Found max_connections=100
(if not added), instead:
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:
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
Double-tap 3 to enter, and then cd .ssh/
you can see that
Create a public key to hold the free login host generation.authorized_keys
Change his authority to 600.
1 |
chmod 600 ~/. 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 |
mv jdk-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 |
` chmod 777 jdk-8u65-linux-x64.rpm` |
Installation
1 |
rpm -ivh jdk-8u65-linux-x64.rpm |
View
Configuring Environment variables
Modify the System environment variable file
Append the following content to the file:
12345 |
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 |
Make the modification effective immediately:
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:
Installation:
Start Nignx:
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 ...