]:~# sudo apt-get install python-software-properties[email protected]:~# sudo apt-get update[email protected]:~# sudo apt-get install PHP[email protected]:~# Php5-vAfter the installation of php, in the Nginx add docking php configuration, access to the. PHP file will error 502!This is because Nginx access to the. PHP file requests are given to the PHP-FPM program processing, PHP-FPM Monitoring 9000 portSo there is also the start php-fpm Program.Instal
Problem Description:Hadoop in the virtual machine under the Linux systemLocal files are uploaded to the specified directory on the Hadoop platform by writing code locally through eclipseThe code is as follows:@Test Public voidUpload ()throwsIOException {Configuration conf=NewConfiguration (); Conf.set ("Fs.defaultfs", "Hdfs://lujie01:9000/"); FileSystem FS=filesystem.get (conf); Path Path=NewPath ("Hdfs://lujie01:
scenarios
Two clusters running the same version of Hadoop
Make sure that the two cluster versions are the same, taking HADOOP1, hadoop2 clusters as an example, as shown below 1), transfer data between two HDFS clusters, by default distcp will skip files that already exist under the target path[Email protected] ~]$ Hadoop distcp/weather hdfs://hadoop2:9000/middleThe effect is as follows: This directive is executed in hadoop1, m
# 1. Enter a command with a shorter result, such as Dir # 2. Enter a command with a longer result arp-a #观察TCP黏包现象!!!
#server. PY Import Socket SK = Socket.socket () sk.bind ((' 127.0.0.1 ', 9000)) Sk.listen () conn,addr = Sk.accept () while True: cmd = input (' >>> ') conn.send (Cmd.encode (' Utf-8 ')) #1. Server-side input command, sent to client, if cmd = = ' Q ': BR Eak Ret1 = CONN.RECV (1024) #8. This step and the next can happen sticky bag,
Label:usage of the load and save methodsDataFrame usersdf = Sqlcontext.read (). Load ("Hdfs://spark1:9000/users.parquet");Usersdf.Select("name","Favorite_Color"). Write (). Save ("Hdfs://spark1:9000/namesandfavcolors.parquet"); Load, Save method ~ Specify file formatDataFrame PEOPLEDF = Sqlcontext.read (). Format ("JSON"). Load ("Hdfs://spark1:9000/people.json");
mirror provided by the teacher in Docker:
Command for docker run -it -p 9001:9000 cmusvsc/apachecmda:1.1 (need to download a period of time, and then extract a period of time), here 9001 is recorded as D c,9000.
It then connects directly to the virtual machine in the Docker, and you can see from the following figure that the contents of the front of the command line also change. Then we enter the command
/etc/php. ini# Mv/usr/local/php/etc/php-fpm.conf.default/usr/local/php/etc/php-fpm.conf // otherwise the following startup php-fpm will report an error and cannot find the php-fpm.conf File
Next we will start PHP-FPM#/Usr/local/php/sbin/php-fpm-c/usr/local/php/etc/php. ini // If the-c parameter is not added, specify its php. ini parameter (it must not be modified later. INI file) (lsof-I: 9000 can be used to view port
(conf); // the specified file system address URI uri = new URI ("hdfs: // hy: 9000 "); // return the specified file system // if the test is performed locally, you need to use this method to obtain the file system FileSystem fs = FileSystem. get (uri, conf); return fs;}/*** create a file directory * @ throws Exception */public static void mkdir () throws Exception {// obtain the file system FileSystem fs = getFileSystem (); // create a file directory
nginx. conf, and find
Location/{root html; # Here is the site's root directory index index.html index.htm ;}
Change root html; to root D:/wnmp/www; add index. php, that is:
Location/{root D:/wnmp/www; # Here is the index. php index.html index.htm ;}
Note that the path separator must be/instead of the \ in Windows to prevent ambiguity.Next, find
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000##location ~ \.php$ {# root html;#
index index.html index.htm ;}
Change root html; To root D:/wnmp/www;
Next, find
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000##location ~ \.php$ {# root html;# fastcgi_pass 127.0.0.1:9000;# fastcgi_index index.php;# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;# include fastcgi_params;#}
First remove "#" And change root html; To
43rd to 45th lineLocation/{ root html; Index index.html index.htm;}Modify the path to the Web site file, and add the default page for index.php.Location/{ root d:/wnmp/nginx-1.5.8/html; Index index.html index.htm inde.php; }2. Support for PHP settingsModified about the 第63-71 line.# Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { #
classes (with warnings).
Simple introduction and use of 1.Pickle• A brief description of the following:A. The data structure of the dictionary is stored in memory, saved as a file is not recognized, if you want to save, and in the next open can also be used, need to do pickle serialization storage;B. Need to deserialize when reading;C.pickle can save the progress of the execution of the program;• Give instance 1:pickle save only one StateA. Storage serialization#!/usr/bin/env Pythonimport
: This article describes how to install and configure PHP56 + Nginx18. For more information about PHP tutorials, see. PHP
Download PHP 5.6 (VC11 x86 Non Thread Safe), decompress it to any Directory, copy the file php. ini-development, and rename it php. ini.
I have not modified the content of the php. ini file, and the tests later passed. If you want to change it later, you can refer to the http://php.net/manual/zh/install.windows.manual.php
Nginx
Download Nginx 1.80 and decompress any director
/extensions/no-debug-non-zts-20131226/xdebug.soxdebug.remote_ Enable=1remote_handler=dbgpxdebug.remote_host=localhostxdebug.remote_port=9000xdebug.idekey=xdebug
Note: CLI environment PHP with FPM PHP whether to use different php.ini configuration files, need to configure FPM corresponding to the php.ini
Check that the configuration is correct
Map Remote (FPM host 10.99.1.185) port 9000 to local Port 9000:
Take TOMCAT7 as an example:1. Tomcat launched as a Windows service, double-click the Tomcat installation directory under Tomcat7w.exe, and under Java-java options, add configuration parameters:-dcom.sun.management.jmxremote-dcom.sun.management.jmxremote.port=9000-dcom.sun.management.jmxremote.ssl=false-dcom.sun.management.jmxremote.authenticate=falseTo start the Tomcat service, you can use the Jconsole.exe or Jvisualvm.exe in the Jdk/bin directory to
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.