1. Added the shell script vi/etc/rc. d/init. d/nginx. The code is as follows:Copy code #! /Bin/bash# Chkconfig: 35 85 15# Description: Nginx is an HTTP (S) server, HTTP (S) reverseSet-ePATH
Heartbeat realization of the principle of hot preparation:Unlike the Keepalived application VRRP protocol, Heartbeat uses the serial port and the IP to realize the heartbeat monitoring, the node checks the network connectivity in the configuration
Configure the Lnmp environment with the source code in ubuntu16 and ubuntu16lnmp
Recently, the system was upgraded to the long-term support version of ubuntu16 and the lnmp environment was redeployed.
Specify the directory source code
Because you always need to reinstall the system, you need to reset the http Service Startup Script again. This time, the script is backed up.
Httpd for Ubuntu
System: nginx + php-fpm
#! /Bin/sh ### begin init info # Provides: httpd # Required-Start:
Heartbeat implements nginx Hot Backup
How heartbeat implements Hot Standby:
Unlike keepalived's vrrp protocol, heartbeat uses the serial port and ip address for heartbeat monitoring. The Node checks the network connectivity in the configuration file.
Nginx start, close, and reload the script, and nginx start and load the script
#! /bin/sh# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: starts the nginx web
Nginx installation tutorial for Centos7 server, centos7nginx1. Download and install gcc
Because Nginx is developed in C language, the source code downloaded from the official website needs to be compiled. compilation depends on the gcc environment.
Nginx manual startStop operationThe stop operation is performed by sending a signal to the nginx process (for more information about the signal, see The linux chapter).Step 1: query the nginx master process numberPs-ef | grep nginxFind the master
Nginx automatic startup scriptSave the following script as an nginx file and put it in/etc/init. d/nginxThen you can use/Etc/init. d/nginx start command to start nginx/Etc/init. d/nginx stop command to stop nginx/Etc/init. d/nginx restart command
II set MySQL boot up1. Copy the Mysql.server file under the Support-files directory under the MySQL installation directory to the/etc/init.d/directory and rename it to Mysqld, and change the permissionschmod 775/etc/init.d/mysqld2. Set Boot
In order to simplify the deployment complexity of Tomcat, the previously individually configured script was presented as a parameter that can be used for multi-tomcat instance management in a stand-alone environment.Where the Deploy feature will
Write a script/root/bin/yesorno.sh, prompt the user to enter Yes or no, and determine whether the user entered Yes or no, or other information
#!/bin/bashread-p "Put your answer (yes or no):" Answercase $Answer iny| y| [YY] [EE]
Read Catalogue
First, Base64 code
Second, MD5, SHA1, SHA256, SHA512, HMAC implementation
GitHub Code
It is said that today 520 is a good day, why I think of 502, 500, 404 these? Fortunately the server is OK!First, Base64
Install Redis
(1) Download Redis
wget http://redis.googlecode.com/files/redis-2.2.11.tar.gz
tar xzvf redis-2.2.11.tar.gz
(2) Compile and install Redis
Make && make install
(3) Copy and modify the configuration file
1. Preparatory workChoose to install the software first: Gcc,pcre (Perl Compatible Regular Expression), Zlib,openssl.Nginx is written in C, need to compile with GCC, Nginx rewrite and HTTP module will use the Pcre;nginx in the gzip used to zlib;Use
Lnamp environment installation record will be used by Open source software: Apache [must, Web dynamic scripting server, do nginx reverse proxy 8080 Port]tengine [must, Web static file server 80 port]mysql [must be]php [must]1. Apache Install a.apr
# set the PHP-FPM as a service and enable the boot to start automatically# Description: The author has tested only on CentOS7.0 and has not been tested for reliability and stability!Vi/etc/rc.d/init.d/fpmchmod +x/etc/rc.d/init.d/fpmchkconfig--add
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.