Simulating the real environment of building Web projects (II.)

Source: Internet
Author: User
Tags benchmark download redis install redis mstsc

The previous section has described how to deploy a test environment in a virtual machine, and then we'll show you how to deploy Redis under Ubuntu.   First, install XRDP + Vnc in Ubuntuin order to remotely manipulate Ubuntu later through the Windows system, here we first install a remote terminal First we'll do an experiment:1. Under Windows system, Win + R opens the input box, enter MSTSC to open the remote connection2. Enter the IP of your virtual machine Ubuntu systemNext will pop up an interface that prompts you to fail the remote connection Microsoft in the Windows system, to provide us with terminal remote Connection client program, that is, Mstsc.exe,However, in Ubuntu, we do not provide a default terminal remote Connection service, which requires us to install it manually. here is a way to implement terminal remote connection with XRDP+VNC.  The steps are as follows:① Enter sudo apt-get install XRDP in Ubuntu terminalwaiting for the installation of XRDP ... ② in terminal input sudo apt-get install vnc4server ③ in terminal input sudo service xrdp restart ④ Starting a remote connection in Windows (for example)  Next you will find that when you verify the user name and password successfully, the following interface is displayed, the background of the black and white dots this is due to compatibility issues between XRDP, GNOME, and unity, which is still not available in Ubuntu 14.04 to use XRDP to log on to gnome or unity's Remote Desktop .The phenomenon is that only black and white dots are background and no icons can be manipulated after logging in. As with resolution 13.10, you can only log in to Xfce Remote Desktop using XRDP. re-execute the steps:sudo apt-get install Xfce4sudo apt-get install xrdpsudo apt-get install xrdp vnc4serversudo service xrdp restart successful use of the Remote Desktop Connection graphical interface, such as: "We'll show you how to deploy and develop in CentOS."  Second, the Ubuntu installation process, the emergence of the unable to locate package solutionin Ubuntu, you often use the command "sudo apt-get install XXX" To install the software program,sometimes a hint of unable to locate package * * * appears,This problem usually occurs because your system's software source cannot find the package and needs to be replaced by a new source of software. The steps are as follows:① in Terminal input command: sudo gedit/etc/apt/sources.listin the open text, replace everything in the current text with the latest software source found online, and then save the close ② in Terminal input command: sudo apt-get updatewait for update ... after the update is successful, you can install the software with sudo apt-get install.  The following is attached to the domestic software source: NetEase, Sohu, OschinaNetEase 163 Source:deb Http://mirrors.163.com/ubuntu/trusty main restricted universe multiversedeb Http://mirrors.163.com/ubuntu/trusty-security main restricted universe multiversedeb Http://mirrors.163.com/ubuntu/trusty-updates main restricted universe multiversedeb http://mirrors.163.com/ubuntu/trusty-proposed main restricted universe multiversedeb Http://mirrors.163.com/ubuntu/trusty-backports main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/trusty main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/trusty-security main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/trusty-updates main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/trusty-proposed main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/trusty-backports main restricted universe multiverse Sohu Source: (Pro-Test available)deb Http://mirrors.sohu.com/ubuntu/trusty main restricted universe multiversedeb Http://mirrors.sohu.com/ubuntu/trusty-security main restricted universe multiversedeb Http://mirrors.sohu.com/ubuntu/trusty-updates main restricted universe multiversedeb http://mirrors.sohu.com/ubuntu/trusty-proposed main restricted universe multiversedeb Http://mirrors.sohu.com/ubuntu/trusty-backports main restricted universe multiversedeb-src http://mirrors.sohu.com/ubuntu/trusty main restricted universe multiversedeb-src http://mirrors.sohu.com/ubuntu/trusty-security main restricted universe multiversedeb-src http://mirrors.sohu.com/ubuntu/trusty-updates main restricted universe multiversedeb-src http://mirrors.sohu.com/ubuntu/trusty-proposed main restricted universe multiversedeb-src http://mirrors.sohu.com/ubuntu/trusty-backports main restricted universe multiverse Oschina Source:deb Http://mirrors.oschina.net/ubuntu/trusty main restricted universe multiversedeb Http://mirrors.oschina.net/ubuntu/trusty-backports main restricted universe multiversedeb http://mirrors.oschina.net/ubuntu/trusty-proposed main restricted universe multiversedeb Http://mirrors.oschina.net/ubuntu/trusty-security main restricted universe multiversedeb Http://mirrors.oschina.net/ubuntu/trusty-updates main restricted universe multiversedeb-src http://mirrors.oschina.net/ubuntu/trusty main restricted universe multiversedeb-src http://mirrors.oschina.net/ubuntu/trusty-backports main restricted universe multiversedeb-src http://mirrors.oschina.net/ubuntu/trusty-proposed main restricted universe multiversedeb-src http://mirrors.oschina.net/ubuntu/trusty-security main restricted universe multiversedeb-src http://mirrors.oschina.net/ubuntu/trusty-updates main restricted universe multiverse  Iii. deploying Redis in an Ubuntu environmentfinally came to the end of this article, how to deploy Redis under Ubuntu. There are two ways to install Redis, and the simplest way to do it first:method One:steps:① under Ubuntu, open the terminal and enter the command:$ sudo apt-get install redis-server after the ② installation is successful, enter the command in the terminal:$ sudo/etc/init.d/redis-server Start ③ Verify that the startup is successful, enter the command to start the client:$ redis-cli For example, demonstrate the success of Redis deployment.  ④ Turn off Redis service$ sudo/etc/init.d/redis-server Stop Method Two: (The following examples are used in this way of installation as an example)steps:① in Ubuntu, open the terminal, enter the following command line, download Redis (you can also login to the Redis official website manual download)$ wget http://download.redis.io/releases/redis-3.2.1.tar.gz ② Enter the following command in the terminal, unzip first, then compile$ tar xzf redis-3.2.1.tar.gz$ cd redis-3.2.1$ Make ③ Copy the three executable files generated in the SRC directory, redis-server, Redis-benchmark, REDIS-CLI, and redis.conf in the current directory to/usr/redis$ sudo mkdir/usr/redis$ sudo cp src/redis-server/usr/redis$ sudo cp src/redis-benchmark/usr/redis$ sudo cp src/redis-cli/usr/redis
$ sudo cp redis.conf/usr/redis$ Cd/usr/redis ④ start Redis service$./redis-server redis.conf ⑤ start Redis Client validation is successful$./redis-cli$ ping For example, the advent of Pong proves that Redis started successfully⑥ Turn off Redis service$./redis-cli Shutdown  Iv. Configuring the deployed Redisthe above picture can be seen, the installed redis default binding IP is your local ip:127.0.0.1,if you want to access Redis remotely, you need to modify the bound IP and set a login password.  ① Open terminal, such as Enter command, open redis.conf config file ② Find the location, the IP address 127.0.0.1 is commented out, add on is their own native Internet IP then save it and close it. ③ signing in to Redis by specifying IPStart the redis service first then open the new terminal, log on to the client, and ping to verify that the boot was successful, such as ④ Configuring a redis login passwordwe can use the command config to see the Redis configuration, as If you want to view a configuration, replace the asterisk *For example, to view IP, use bind172.27.35.4> CONFIG GET bind to view the configured login password, enter> CONFIG GET requirepass from the IP address that can know the binding to 172.25.35.4, the password is configured to be empty, we can set the password through config set, for example: then use the command above to query the configured password, the terminal will prompt:(Error) Noauth authentication required.This means that you do not log in to Redis with a password and enter it at the terminal:> AUTH 123456> CONFIG GET requirepass successfully query to the password you just configured, such as This article first introduced here, the next article will explain how to solve the Redis in use in the permissions problems encounteredand how to use the interface client to remotely access Redis in a Windows environment.

Simulating the real environment of building Web projects (II.)

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.