In this post I'm going to explain how to install Apache and PHP without using the WAMP or XAMPP distributions, I'm using this approach because I think you can have. This article will walk you through the process of installing and compiling PHP 7 from source code along with Apache and MariaDB on CentOS 7/Debian 8 Jessie. Install Word. Press on WEMP (Windows, nginx, My. SQL and PHP)Nowadays, even desktop computers are powerful enough to run server software. For blog theme designers and plugin developers, this really benefits them because they finally can install an experimental server to play with. WAMP system by far is the most popular blogging server for desktop computers. It takes advantage of Windows, Apache, My. SQL and PHP which are also used in production environment, but more commonly run in Linux and UNIX setup. While Apache is able to adopt to almost every situation, it is not ideal for servers with lower memory. Desktop computers which are going to be used as weblog server could make use of extra memory because the owners still run various applications on top of those workstations. The idea behind this tutorial is to produce efficient blog server setup. Not only can you claim back your precious computer memory, but it also results in a faster and more responsive windows blog server. The whole setup takes advantage of open source blog server software. Nginx itself is licensed under BSD- like license, which basically means you can do whatever you want with it as long as you keep the copyright notice intact. I am not a lawyer, so don’t take my words in the previous paragraph for legal decision. WEMP in Summary. Nginx (pronounced Engine X) is a HTTP server and mail proxy. It happened. Bright, white light flashed before your eyes, the power of the sun licked your skin, and you felt a shock wave of dust and debris plow through the city. Kloxo-MR is another alternative of free web hosting / server control panel that can be solution for you who don’t want to manually install webserver, MySQL and PHP. As of this writing, the stable version is version 0. Despite its version number, it actually is very stable even for production server with a few thousands of requests per second. Word. Press. com uses a few instances of nginx to serve about 1. Gbit/sec or around 8,0. Does that sound good enough? By the way, add to the fact that the CPU usage is also very efficient compare to other web server software especially Apache. Through several tests, I was sold. Currently, I’ve been using nginx for most of my Virtual Private Server (VPS) with no problems at all. If it is good enough for production server, it should be for desktop computer. And yes, you can install it quite easily.(The other components are just like the usual WAMP setup with My. SQL and PHP under Windows.)System Requirements. My experimental machine is run on Windows Vista. The WEMP setup doesn’t requires anything specific. If you are want to try this under Windows XP, the process should be exactly the same and it should also work flawlessly there. As to memory requirements, it is hard to predict. When starting the server software for the first time, they may consume less memory but as you run it for a while and it has quite some data in the database, they will need more memory. MB when started the first time (no database but the internal data). MB at first. However, after running Word. Press for some time…nginx still occupies a bit more than 2. MB. You’re going to like this, aren’t you? ![]() ![]() PHP running in Fast. CGI is about 6. 5. MB. My. SQLd takes around 1. MB. The total memory consumption is ~ 2. MB. Of course, that depends on how you optimize My. SQL or how much data do you have in the database. The point is, you probably have known about PHP and My. SQL, but isn’t the figure for nginx encouraging? Compare this to Apache. Memory consumption of 5. MB per process is not unheard of, and in fact it is quite common. Note that I’m not comparing apple to apple, but you don’t need all the additional features in Apache. Another thing worth considering is CPU load. Nginx is currently my favorite setup, although because of portability issue for Fast. CGI, it is not able to run Movable Type. Getting Started with WEMP Installation. I presume that the “W” part, which is Windows, is already done. Unless you are viewing this page through another computer, chances are you have already had a Windows installation on your desktop computer or laptop. So let’s go ahead and proceed with nginx. This web server software is so stable that you can run the latest development version without any problem, but just to be on the safe side, you should download the latest stable version of nginx. Installation of nginx is very simple. Just launch the installation program after download and proceed through the wizard. You don’t have a lot of options to choose, just standard options to create icons on your desktop and quick launch taskbar. Nothing can be simpler. Note: During the installation, you will be given basic information on how to start and stop the nginx service. You will test it out in the next section. The standard location for nginx installation under Win. C: \nginx. Configuring and Running nginx. Right off the bat after the installation, you will find two batch scripts to start and stop nginx. They are located in C: \nginx\conf. These two batch files are also linked from C: \nginx. Later you will edit these two batch files to start and stop My. SQL and PHP from one place. Note these are the same scripts that you use when you run the Start nginx or Stop nginx commands from Start Menu. If you are ready to get started, run the Start nginx from Start → All Programs → nginx. A dialog box asking if you want to make exception on Windows Firewall shows up. If you want to access nginx from computers outside of the machine it is installed on, you should choose Unblock. Otherwise, selecting Keep blocking still allows you to access the web server via your own machine — through the loopback interface. This may not appear if you don’t turn the Windows Firewall option on though. You can change this by going to Windows Firewall and locate nginx under the Exceptions tab. Now try to load the test page up in the browser by typing: http: //localhostin the address bar of your browser. A screen similar to the following should appear right before you. If you see it, your installation is successful. You can now change the configuration file, which full path is C: \nginx\conf\nginx. The other files in the same directory are used by the configuration file as necessary (if activated within the configuration). You should put the web documents in C: \nginx\html. Later when installing Word. Press, you will load Word. Press files in this directory. Stopping nginx is as easy. Just run Stop nginx program from the Start Menu, or run the batch file directly. Configure nginx to Interact with PHPAs of now, you have not yet installed PHP, but because both nginx and PHP run independently in this setup, you can configure the web server first. PHP will be running in Fast. CGI mode, so all you need is to ask nginx to send request to process PHP files to PHP listening on a TCP port on localhost. Unlike Light. TPD, nginx doesn’t support CGI directly so Fast. CGI is the only option. There is nothing to lose though as this setup is more flexible. For instance, if I happen to have a desktop and laptop on the same local network, I could install the PHP running in Fast. CGI mode on my laptop. The nginx and My. SQL could just reside on the desktop. It certainly make it even lighter…In order to do this, you need to edit the configuration file in C: \nginx\conf\nginx. Open the file in Word. Pad. The configuration file is in UNIX text file format, so you will have a problem with it in Notepad. Once you save it in Word. Pad, you may open the file in Notepad because the process converts the file format to native Windows. Just make sure you open and save the file as text instead of Rich Text Format (RTF). Scroll down to the location that says pass the PHP scripts to Fast. CGI server listening on …. Remove the hash signs (‘#’) for that block and modify it to read as follow before saving. SCRIPT_FILENAME /nginx/html$fastcgi_script_name. You also have to tell nginx to look for index. Look for the root location block and add index. This is important to avoid having to enter full path to a PHP file or getting the 4. You also need to modify root to full path, but omitting the drive letter. Running and Stopping nginx, My. SQL and PHP Fast. CGI with Batch File. In previous section, you have tested Engine X, and if that works you are now ready for this step. The WEMP system consists of three main server components. To start and stop them can be a problem if you are constantly testing for different configuration. By editing the batch file used to start nginx so it starts and stops all the servers as well, you save some time. It is also flexible enough that you may stop it immediately as you finish with your work and need to free more memory for other things. While it is possible to run My. SQL as Windows server, I prefer the batch script executable approach for the above reason. Here is the content of start- nginx.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |