linux various software functions and role - himself summed up what Mo laugh

LNMP environmental success:
and LAMP difference is LNMP the N refers to the Nginx (similar to an Apache web server software) other are the same. Also very much present in this environment applications. Nginx was originally designed to provide a fast and efficient multi-concurrent web service software. In dealing with static pages Apache Nginx indeed win a chip, but in dealing with dynamic page Nginx does not have much advantage over Apache. However, there are still many enthusiasts are more interested in Nginx, with Nginx technology matures, its position in the field of web services software is increasing.

When you install an important step in MySQL:
# extract the
tar -zxvf MySQL-5.6.33-Linux-glibc2.5-x86_64.tar.gz
# rename
mv mysql-5.6.33-linux-glibc2.5 -x86_64 mysql # change this and then copy over
after extracting # copy mysql directory
cp -r mysql / usr / local

Install php
first statement about here, Nginx installation of php and php installation for apache for there is a difference, because the Nginx fastcgi php is a way to combine nginx, it can be understood as a proxy nginx fastcgi php, and apache It is the php as their own modules to call.

/ usr / local / php / sbin / php-fpm -t as if the word "test is successful" appears, indicating that the configuration is no problem.
Install nginx

/usr/local/nginx/conf/nginx.conf a text document can be quickly emptied
Nginx official website ( http://nginx.org ), can be seen from the official website nginx updates quickly, it also reflects the fact that currently using nginx website run more and more companies or individuals. The latest version is 1.5, but does not recommend that you install Ah Ming so new, because it is so new, it is inevitable there will be some bug or vulnerability, so Ah Ming recommend that you install the 1.4 version of nginx.

LAMP environment success: Linux Apache MySQL PHP is an abbreviation, in fact, the Apache, MySQL and PHP installed on a Linux system, consisting of an environment to run the php scripting language.
Apache: WEB service is the most commonly used software. That http software. apache also need to go to the official website to download the appropriate version, currently using more version 2.0 or 2.2 Ah Ming recommend downloading version 2.2. apache official website Download: http://www.apache.org/dyn/closer.cgi You can also use the address provided Ah Ming download.
MySQL: the database software is relatively small. https://dev.mysql.com/downloads/ ; now more commonly used for the mysql-5.0 / mysql-5.1, 5.5 version has been released, although for some days, but on seemingly run by the online service or a minority.
--user belongs to the main database definition, --datadir define where to install the database, it is recommended put on the partition large space, this directory need to create your own.
wget http://apache.fayea.com/apr/apr-1.5.2.tar.bz2
wget http://apache.fayea.com/apr/apr-util-1.5.4.tar.bz2
echo $? results 0 correct installation instructions.
mysql simple basic understand! ! !
PHP: PHP scripting language, version 5.2 php very classic and very stable, because A-ming company had been using version 5.2, but considering the version is too old, there are some loopholes, it is recommended that you use version 5.3 or 5.4, the official php download link:http://www.php.net/downloads.php

NFS: Its main function is to allow the network can share files and directories between different machines each other systems. NFS NFS server can allow the client to the NFS server shared directory distal end mounted to a local NFS client. In local NFS client machine seems, NFS server shared directory if your disk partitions and directories. General client mount to a local directory name can be casually, but for the convenience of management, and server-side as we want to be better.
NFS is generally used to store shared video, pictures and other static data.

"What is the NFS"

It is a network shared directory, so that other servers on the network can access shared data within the mount directory. (Generally share videos, pictures and other static data). Beyond this simple point, which is equivalent to windows shared files, and then put the other hosts to share the file mapping has become a local disk to use the same.

NFS server configuration
on CentOS NFS service, need to install two packages (and nfs-utils rpcbind), but when used yum install nfs-utils rpcbind will install with:

[root @ localhost ~] # yum -y install nfs-utils
NFS configuration is still quite simple, just need to edit the configuration file / etc / exports can restart enable rpcbind and nfs service after editorial changes.
rw: read and write; sync: synchronization pattern, the data written to disk memory from time to time; root_squash: and corresponds to the option above, the root user is not high privilege shared directory, only the ordinary user privileges, i.e., limiting root; anonuid / anongid : to all_squash and root_squash and used together, for the uid specify user defined and GID NFS, provided that the machine's / etc / presence of the uid and gid passwd.
Before you start nfs service, you need to start the rpcbind service
using the exportfs command, after changing the / etc / exports configuration file without restarting the nfs exportfs can use this service directly.
-a: All mount and unmount; -r: remount; -u: Uninstall a directory; -v: display the shared directory;
[root @ localhost tmp] # exportfs -arv
umount.nfs: / mnt: Device is busy solving ---- withdraw from this directory and then executed.

Samba: Simply put, this software between Windows and UNIX series OS build a bridge, so that resources can be both exchanges.
yum install -y samba samba-client

Tomcat: Tomcat is used to resolve a software jsp program. Tomcat server is a free open source Web application server, run jsp and servlet, using HTTP client (usually a browser) to communicate. Tomcat is a small, lightweight application server, it is widely used in small and medium systems and concurrent user access is not a lot of occasions, is to develop and debug JSP program of choice, because Tomcat advanced technology, stable performance, become more popular Web application server. Tomcat is the application (java) server, it is just a servlet container, Apache is an extension, but it is run independently.
For a beginner, it can be that when configured Apache server on one machine, you can use it to respond to requests for access to HTML pages. Tomcat is actually part of an extension of the Apache server, but it is run independently, so when you run tomcat, it is in fact as a separate process with Apache running alone.
Tomcat installation in two steps: Installation and mounting JDK Tomcat.

JDK (Java Development Kit) is a Sun Microsystems product for Java developers is. Since the introduction of Java, JDK has become the most widely used Java SDK. JDK is the heart of Java, including Java runtime environment, Java based tools and Java class libraries. So, we need to run jsp program must have JDK support for granted the premise installed Tomcat is installed JDK.

the JDK
http://www.oracle.com/technetwork/java/javase/downloads/jdk6-jsp-136632.html
Tomcat official website ( download http://tomcat.apache.org/)

Nagios: Nagios is an open source computer system and network monitoring tool that can effectively monitor the state of the host Windows, Linux and Unix, sent messages when the system is abnormal or service or SMS alarm notification the first time the site operation and maintenance personnel in the state sent normal mail or SMS notification after recovery. Nagios is a monitoring service functions and the host, but does not include this part of his own functions, all of the monitoring, detection is accomplished through a variety of plug-ins.
keepalived: keepalived is the basis for highly available, single-point problem is to solve the core means. LVS Service availability is a program implemented based Keepalived VRRP protocol, which may be utilized to avoid a single point of failure. LVS services have two servers running Keepalived, a Taiwan-based server (MASTER), a backup server (BACKUP), but outside the performance of a virtual IP, the master server sends a specific message to the backup server, backup server when not receive this news, that is, when the primary server goes down, the backup server takes over the virtual IP, continue to provide services, thus ensuring high availability. Keepalived software was originally designed for LVS load balancing software designed to manage and monitor the status of each service node of LVS cluster system, and later joined the VRRP can achieve high availability features. Therefore, Keepalived addition to management LVS software, but also can be used as additional services (for example: Nginx, Haproxy, MySQL, etc.) high availability software solutions.
Memcached: Web services development, server-side caching is a way to improve the service performance of the service implementation is often used. Which is to try to calculate the results of a part of the record to avoid re-execute complex calculations to get the desired results, thereby improving the operating efficiency of the service.
  In addition to improving the efficiency and services outside the service-side cache often used to improve scalability and services. Therefore, some large-scale Web applications, such as Facebook, often to build a large server cache. And they are the most commonly used is Memcached.
memcached is a high-performance distributed memory caching server. The general purpose is: by caching database query results, reducing the number of database access, in order to increase the speed of dynamic web applications, and scalability.

Squid:
Squid reason to use a lot, because it's cache feature, Squid caches can not only save valuable bandwidth resources, but also can greatly reduce server I / O from an economic point of view, it is an integral part of many sites architecture. character of. It is mostly used as a cache server http services, caching pictures and other static files can accelerate client requests return rate.
Ah Ming teach you a particularly easy to distinguish: forward proxy, Squid is behind the client, the client connection to go through Squid; reverse proxy, Squid is behind the server, the server returns data to the user needs to go Squid Ah Ming. view is that forward proxy is used in the enterprise office environment, employees need access to the Internet through Squid proxy, it saves network bandwidth resources. The reverse proxy is used to build a static entry site (pictures, html, streaming media, js, css, etc.) cache server, which is used in site architecture.
-y install Squid yum
Squid -v
vim /etc/squid/squid.conf # reconfigure the profile
squid -kcheck test to see whether there is a syntax error
squid -z cache directory initialization
failure Starting squid: ........ ............ [failure], the final restart linux system to solve.
-kche squid
squid -krec represent reload the configuration file, if we changed the configuration file without restarting squid service directly use this command to reload the configuration.

Guess you like

Origin blog.51cto.com/13575513/2446972