In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
On the 80.100 virtual machine: systemctl stop firewalld / / turn off firewall setenforce 0 / / turn off monitoring yum install lrz*-y / / install upload software
Tar xf haproxy-1.5.15.tar.gz-C / opt/ extract the package cd / opt/haproxy-1.5.15/yum install-y\ pcre-devel\ bzip2-devel\ gcc\ gcc-c++\ makeuname-r / / kernel version
Make TARGET=linux26 PREFIX=/usr/local/haproxy / / Mark 64 create a directory for the system make install PREFIX=/usr/local/haproxymkdir / etc/haproxy / / useradd-s / sbin/nologin-M haproxy / / create user id haproxy / / View user information
Cd / usr/local/haproxy/cd / opt/haproxy-1.5.15/cd examples/cp haproxy.cfg / etc/haproxy/cd / etc/haproxy/vi haproxy.cfgchroot / usr/share/haproxy is preceded by # uid 1000gid 1000... srvtimeout 50000 is deleted. Add the following-Statistics page configuration-listen admin_stats # configuration for haproxy access status monitoring page Layer 7 mode named admin_stats bind 0.0.0.0mode http 8089 / / listening port stats enable / / enabling listening port log global # http inherits the log definition stats uri / stats # url access path of the monitoring page in global That is, http://ip/stats accesses the monitoring page stats realm Haproxy\ Statistics # password box prompt information of the monitoring page stats auth admin:admin # user and password admin of the monitoring page You can set multiple usernames # stats hide-version / / hide the version information of HAProxy on the statistics page stats admin if TRUE / / manage stats refresh 30s / / page automatic refresh time 30s:wq / / Save exit when authenticated
Cd-
Cp haproxy.init / etc/init.d/haproxyll / etc/init.d/haproxychmod + x / etc/init.d/haproxy / / set permissions ll / etc/init.d/haproxy to this file
Chkconfig-- add haproxyln-s / usr/local/haproxy/sbin/haproxy / usr/sbin/haproxy / / soft link service haproxy startnetstat-anp | grep haproxy enter http://192.168.80.100:8089/stats on the web page
The last line of vi / etc/haproxy/haproxy.cfg adds the following content listen www bind *: 80 maxconn 5000 mode httplog global option httplog option httpclose option forwardfor log global default_backend default # sets the default access page # defines when the requested content is static Acl rule that transfers the request to static server # static acl url_static path_beg-I / static / images / img / javascript / stylesheets acl url_static path_end-I .jpg .gif .png .css .js .html # php content acl url_php path_end-I .php # jsp content acl url_jsp path_end-I .jsp .do # references the acl matching specification Then use_backend static_pool if url_static or host_static use_backend php_pool if url_php use_backend tomcat_pool if url_jsp # defines the backend backend serverbackend static_pool option httpchk GET / index.html server static1 192.168.80.101 rise 80 cookie id1 check inter 2000 rise 2 fall 3backend php_pool option httpchk GET / index.php server php1 192.168.80.102 index.html server static1 80 cookie id1 check Inter 2000 rise 2 fall 3backend tomcat_pool option httpchk GET / index.jsp server tomcat1 192.168.80.103 fall 3backend tomcat_pool option httpchk GET 8080 cookie id2 check inter 2000 rise 2 fall 3backend default mode http option httpchk GET / index.html server default 192.168.80.104 fall 3backend tomcat_pool option httpchk GET 80 cookie id1 check inter 2000 rise 2 fall 3 maxconn 5000: wq / / Save exit service haproxy stop / / close haproxy Service service haproxy start / / start the haproxy service and enter http://192.168.80.100:8089/stats on the web page
-
On the 80.101 virtual machine: install httpvi / etc/httpd/conf/httpd.conf on the static website systemctl stop firewalld setenforce 0yum install httpd-y / remove cd / var/www/html/yum install lrz*-y from the front of ServerName www.example.com:80 and put a picture in it called aa.jpgsystemctl start httpd. Enter 192.168.80.101/aa.jpg on the web page.
Mkdir img/ / add a path directory mv aa.jpg img/ enter 192.168.80.106/img/aa.jpg on the web page
-
On the 80.102 virtual machine: index and php language systemctl stop firewalld setenforce 0yum install httpd-y / / install httpdvi / etc/httpd/conf/httpd.conf to remove DirectoryIndex index.php index.html from the front # of ServerName www.example.com:80
Yum install php- yphp installs yum install-y\ php-mysql\ php-gd\ libjpeg*\ php-ldap\ php-odbc\ php-pear\ php-xml\ php-xmlrpc\ php-mbstring\ php-bcmath\ php-mhash to view the php version php--version
Vi / etc/php.inidate.timezone = PRC date time zone = × × cd / var/www/html/vi index.phpsystemctl start httpd enter http://192.168.80.102 on the web page
-
On the 80.103 virtual machine: Tomcatsystemctl stop firewalld setenforce 0yum install lrz*-y pulls the tomcat and jdk packages into the unzipped package tar xf apache-tomcat-8.5.23.tar.gz-C / opt/tar xf jdk-8u144-linux-x64.tar.gz-C / opt/cd / opt/cp-rf jdk1.8.0_144/ / usr/local/javavi / etc/profile / / adds export JAVA_HOME=/usr/local/javaexport JRE_ at the end of the file HOME=/usr/local/java/jreexport PATH=$PATH:/usr/local/java/binexport CLASSPATH=./:/usr/local/java/lib:/usr/local/java/jre/libsource / etc/profilejava-version / / check whether it works cp-rf apache-tomcat-8.5.23/ / usr/local/tomcat8ln-s / usr/local/tomcat8/bin/startup.sh / usr/bin/tomcatup / / soft link ln-s / usr/local/tomcat8/bin/ Shutdown.sh / usr/bin/tomcatdown / / soft link tomcatup visits http://192.168.80.103:8080 on a web page
Cd / usr/local/tomcat8/cd conf/vi server.xml mkdir-p / webapp/web01vi / webapp/web01/index.jsp / / add the following JSP test page tomcatdown / / close tomcattomcatup / / enable tomcat
-
Finally, enter it on the web page
Http://192.168.80.100/index.php
Http://192.168.80.100/index.jsp
This picture is a static resource. It's not here.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.