Installing and configuring a local server. About how to install and configure a local Bitnami server. Database addition





Attention!
It doesn’t matter whether you install the server only for testing scripts or as a working version, you should know that immediately after installing and starting the server, it will become accessible outside of your computer. Even if you do not have a white IP, other clients of your provider within the network will be able to access you.
Immediately after installation, the server does not have any protection, everything is open and everything is without passwords; in the best case, they will break your server, and in the worst case, they can erase all the files on the computer, including Windows itself.
For this reason, after installing the server, block access to the server using a firewall or other similar programs. After all the settings, you can open access.

In this article I will tell you how to install the Apache server and all the necessary components under Windows of all versions, including VISTA (32 and 64).
Most likely you will install the Apache server on Windows on your home computer, since in all other cases you are unlikely to have to install on Windows, so I will mention that the installation is carried out specifically on your home computer.
This installation and configuration option is suitable not only for testing scripts, but also for launching a production server.

If you decide to install a production server at home (not for testing), then you will need:

1. White IP(external or unique or dedicated). Of course, there are services that can direct traffic through their IP to your dynamic or even gray IP, but this will not work for a normal server.
White IP is purchased from your provider for additional money.

2. DNS server. To associate your domain names with your server you will need a DNS server. There is no point in maintaining a DNS at home, since there are free services for this.
If your domain registrar does not provide DNS services, then you can use the free service xname.org
. It is best to configure DNS after installing the server.

Let's start installing the server.
To install everything you need, we will take a ready-made set of all the necessary server components.
XAMPP very useful thing. This is a set consisting of apache, php, mysql, ftp server, sendmail, perl and much more. No changes have been made to all these components (or very minor ones), since XAMPP is only an installer, it is not a standalone server.
After installation, we will get a full-fledged server, the same as if we installed each component manually.

Another big plus XAMPP everything will be installed in one folder. All settings, all data, all files will be in one folder. Making a backup copy of such a server is very simple. We saved the entire folder and the entire server was saved, loaded this folder onto another computer and the entire server runs on another computer.

Comments

02/18/2010 Victor
I also have such a server at home.
I bought a netbook for 10 thousand, and stupidly stuck xampp into it, exactly as it is written here.
And it’s been here for three months now, it’s using almost no electricity (about 20 watts), the Internet channel is 5 megabits, the sites are just flying.
And why do you need to rent these dedicated servers or VDS.......

02/18/2010 Victor
I forgot to add, five sites are on this laptop, the total traffic is 3 thousand per day

06/07/2010 Kirill
Are Denver and HAMPP not fundamentally the same thing?

06/07/2010 Admin
Kirill, fundamentally almost the same thing.
Only in Denver many changes have been made to the server due to which the server in Denver does not work as it should. Everything in it is adapted for convenient work in Windows.
I tried several times to test large scripts in Denver, but I couldn’t fully debug it because it doesn’t work at all as expected.
XAMPP does not make any changes to the server, it only helps to install all the components.

08/06/2010 vlad
thanks for the information

02.09.2010 Victor
Thank you very much for the information, it was very helpful. Take note

09/12/2010 Andrey
Thank you very much. After all, there are sites where it is written normally, clearly and in Russian.

P.S. / Admin, don’t forget to correct that Apache does not turn on if port 80 is busy in Skype and Team WiFi./

09/12/2010 admin
Andrey, yes, he himself once stepped on this rake. I couldn’t understand why Apache doesn’t work on port 80.
If, during installation, xampp says that it did not pass the test on port 80, look in Skype in the settings, perhaps Skype has occupied this port.
There may also be glitches after installation.
I will add this information to the article later.

10/24/2010 Mikan
Good day. Good people, help me with this question. I have a large network, I want to make an internal web server, I tried xampp, everything works, now I have a different problem: how to prevent a client from the network from writing in the browser the IP address of the server to go to the site. And I entered a normal human address, for example, even something like www.primer.primer.ru.

10/25/2010 cherry
Mikan, since you ask such questions, does it mean that this large network was not created by you?
And since it was not created by you, then you need to contact the admins who run this network, since you can only register a domain with them, and then the domain will be visible within the network, unless of course the admins want it.
Well, then in the xampp virtual host settings you register this domain and that’s it....

And if you have a white IP, then it’s easier to buy a domain, it costs 200 rubles a year and it will be even better, it’s not a lot of money.

12/14/2010 Dmitry
I have one question: settings for a game server, for example for KS1.6
I just set a white ip and I need to configure it. So I turn on the server and it says local ip and not Internet, I need to somehow configure it so that it shows Internet ip and can go to it... how to do this???

12/14/2010 Victor
Dmitry, this is not a much different topic.
This is setting up a web server, not a game server.
If, of course, someone knows, maybe they can tell me, but I don’t think I can get away with it with a couple of phrases.

12/18/2010 Konstantin
Everything works for me, but how can I make my site work on the Internet?

12/21/2010 Alexey
XAMMP rules)))

12/23/2010 Victor
Tell me, is it possible to host your website using HAMMR??? the site is made on the Yukoza platform)) I want disk D to be used as hosting for my site!!

12/24/2010 admin
Victor, if you have the Yukoza script, you can host the site.

24.12.2010
Do you mean script????? I need to upload movies to my D drive and have people watch them through my website!! why a script?

12/28/2010 Alexander
Installed.
I did everything as you said.
When starting it says that the port is busy.
I checked everything, the port is free,
(used Windows Worms Doors Cleaner to check and search... also without results. Please help...
(screenshot: http://imagepost.ru/images/419/21552347.jpg)

12/28/2010 Vitaly
Alexander, what about Skype? Do you use it?
If yes, then it means it has occupied port 80. Check.
In Skype settings, disable the use of port 80.

01/19/2011 Andrey
Tell me, dear admin, is xamp sendmail only an emulator and they don’t send anything by email or is it not an emulator?:

Today we will look at installing MaxSite CMS on a local server. I understand perfectly well that not only professionals visit, but also beginners, so, first of all, I will answer the question:

- What is a local server?

- this is a program, even a whole complex of programs, by installing it on your computer, you can develop your websites directly on it, and this is “brutally” convenient, you know

Of course, if you limit yourself to developing pages + , then you don’t really need it - you can immediately view the results in the browser. But those who work with CMS () cannot do without a local server!

Because you simply won’t be able to run this “thing” on your computer. For it to work, you need a server, which is usually hosted. And even if you have your own website, developing the same one will be wildly inconvenient, since each time the changed file must be uploaded to the server in order to look at the changes and see if there are any mistakes somewhere. And usually it’s just the opposite.

Agree - this is terribly inconvenient.

It was for these purposes that it was invented local server. Install it on your computer, put a website there - and slowly develop new features / templates / and all sorts of other stupid crap. This is exactly how I develop new templates, lessons, etc. (including crap)

I think we've sorted this out. This means that now we will poke around in a different direction, namely:

- How to install a local server?

I'll give you some wise advice right away. local server- this is a program, which means first we need to “honestly pioneer” it somewhere. And in order to “pioneer”, you must first decide which server you want to work with.

Suspecting that those who already know how to work with a local server don’t need this article (oh woe is me), and those who don’t have no idea what they are, I will offer only one option - THE BEST(well, I so modestly called the server with which I work).

In general, all “web-starpers”, including me, are allowed to defend, even foaming at the mouth, their version in the comments, so you can leave your opinion about the local server. And we drove on.

I downloaded the standard version of the local server.

Have you downloaded it? Well, now the hardest part - the terribly difficult installation. Be well stocked with tea and cookies, as this thing will require 27 minutes of installation and 9 reboots of your computer. The only thing that saves you from boredom is that they show cartoons during installation. So tea won't hurt.

Installing a local server.

It starts with the fact that we need to decide in which folder we will extract it from the archive. I'm on my disk E, created a folder called open_server, and unzipped everything there.

I recommend doing exactly the same, or at least try not to use Russian characters on the path to your local network. Those. there is no need to place it in a folder with Russian letters and spaces. Otherwise harmful glitches may creep out.

Well? Extracted? Fuuuhh... Congratulations, the installation is complete! (don’t trust anyone all April)


Setting up a local server.


Now run the file in the folder OpenServer.exe, and a red flag will appear in the taskbar (usually located in the lower right corner of the desktop).

Click on it and a context menu with several items will appear:

It's time to start setting up a local server. We won’t configure much there, we’ll just configure everything to suit our needs.

And so, select the item " Settings", and a corresponding window will appear in front of us. Select the tab " Server"and there we indicate letter for the virtual disk, and database server name. However, you can leave everything as default. (that's exactly what I did)

If you have changed your parameters, do not forget to click on the " button Save".

That’s it, now click on the checkbox again and select “Run”. In a few seconds, our server should start, the checkbox will turn green and a new virtual disk with the letter you specified in the settings will appear on your computer.


Installing MaxSite on a local server.


Now, we’ve finally gotten to the most important thing, I immediately want to say thank you for enduring all my nonsense and bullying that I posted above.

Installing MaxSite on a local server is no different from installing on a regular one, you need to create a database, specify a password and user, and go through the same installation steps as when installing on a real one.

Here I decided to record a video tutorial for clarity. Since I would have to write even more than I already wrote, and it would be advisable not to mess up the database:



That's all. As you can see, it couldn’t be simpler.

Now you have your own working website on your computer, on which you can safely conduct your inhumane experiments.

Thank you for your attention.

PS: Don’t forget to share the article with your “friends” by clicking on various buttons on social networks.

PS: I'm willing to bet on the BEST local server in the comments. In general, it would be interesting to know what you use.

5 votes

Good day, dear readers of my blog. We are constantly discussing which hosting to choose, where to place the site, who provides the ideal conditions.

Or maybe turn your computer into a server? Lots of space that no one will have to pay for. Well, do you think it’s worth looking into this topic?

Today we will talk to you about how to create hosting on your computer. This opportunity is available to everyone.

Terms of Use

The option cannot be called ideal, but in some cases it may be suitable. First of all, you must have good Internet speed and free space. If you want to win fame, then this method is definitely not for you. The local computer is unlikely to cope. Although, who knows, miracles happen.

However, don't forget that you will have to share your speed with your site visitors. The more there are, the higher their needs.

On average, it takes about 50 kb/s per person. My tariff cannot be called the best, the upload speed is about 7 MB, that is, the maximum that I can do is provide about 140 people with normal downloads at a time. If there are more visitors, they will have to wait longer, which means the refusal rate will be impressive.

However, I understand that optical fiber works wonders, tariffs from providers are less and less of a burden on the wallet, which means this situation does not happen to everyone. In addition, if you need to show your website to one single customer or you only need to show it, then why pay for hosting if everything can be done for free.

Small, but you can forget about payment altogether.

What you will need

I have already said about good Internet speed. I mentioned hard disk memory. These are not serious problems, or certainly not fatal ones, that will hinder the whole endeavor.

In addition, you will need to obtain information about your static IP. With its help, you can not only organize your own server with a constant address, but also create remote access to your computer, as well as CCTV cameras. It will be easier and more reliable to find out information from the provider.

Well, the last point. Separate PC. This is not necessary, but keep in mind that if you are using your home computer as a server, you cannot turn it off.

Open Server

Everything else is simple. You will need Open Server . It's free. If you wish, you can make a donation; the developers will be happy with even 100 rubles. By the way, if you transfer money, you can download the package in a matter of seconds. If not, you'll have to wait a little.

What is an Open Server? A convenient server platform that was created specifically for webmasters. If not for it, you would have to manually install php, apache, MySql and a bunch of additional programs. In general, the mass of hemorrhoids.

Open Servere is a package that already has all the components. They will be needed for server installation. All that remains is to unpack all the contents and you can start developing a website or writing a script.

Just imagine, to use your computer as a virtual hosting you only need to press a couple of buttons. If it weren’t for the open server, you would have to download all the elements separately, move everything to the necessary folders, and configure it.

However, Open Server is not the only package. Denver was one of the first to appear, a little later xampp. But I wouldn't call them the best. They are updated quite rarely, and therefore lose their popularity. In addition, you can control individual parts. Add something of your own, delete or edit. Over time this may come in handy.

Open Server has many additional tools: log viewing, task scheduler and much more.

By the way, you can even install this program on a flash drive. This is very convenient if you are making a custom website and are not ready to show it on the Internet. Just copy the site to USB and you're done. You can insert a removable disk into any computer. The customer will see it in the same way as if the portal was already on the Internet.

But, enough foreplay. Let's look at the program in action. First you need to download it. Go to the section of the same name, select the appropriate version (basic, ultimate, premium), enter the number from the picture and proceed to download.

Downloading the most complete version does not always make sense. Are you sure that you will use CamStudio, which allows you to record videos, PixBuilder photo editor or Skype? For example, I already talked about. I am convinced that if you do not read my article about it, you will never open this program.

If desired, all this can be installed later. I recommend taking Premium.

If you make a donation, your download speed will increase. If not, you will be able to download the package completely only after a few hours.

After you download the program and double-click on the installation file, you will be prompted to unpack the archive. You need to install it in the root, and not in any folder.

After the process is completed, you will see the Open Server folder on drive C. It will contain several folders and 2 installation files. The domains folder will contain folders with your sites. Modul – additional installation programs: php, mysql and so on.

Two installation files are designed for 32 and 64-bit systems. You need to run one of them, but I advise you to disable your antivirus first. Otherwise, it may block the program's actions and it will not be able to operate correctly.

Immediately after launch, you will be prompted to install Microsoft Visual C++. It is likely that you have everything already installed, but to avoid problems and errors, you can download it again.

After loading, the Open Server panel will disappear in the lower right part of the screen, next to the clock. By clicking on the “Start” button you activate the server, the “Restart” button is needed after you make some changes in the folder and want them to take effect, and “Stop” stops its operation.

There are a lot of options in the settings. I won't talk about them now. Anyone who understands this will understand everything, but it will be completely incomprehensible to beginners. Don’t worry, over time you will master everything, but for now you can do without this information.

Well, that's basically all. Thanks to this program you can create hosting from your computer. In the video instructions you can see more information about creating websites and working with the program.

Video instruction

I really liked this video. This is a step-by-step instruction for working with the program. In 40 minutes you will learn absolutely everything you need to know in order to work about Open Server.

Well, for those who are interested in this topic, I can also recommend the course “ Selling information on the Internet from A to Z " I think this will be useful for many.


If you liked this article, subscribe to the newsletter and learn more about earnings and work. See you again and good luck in your work.

General information about the local server and the principle of its operation. Creating a local server based on the Denver assembly: preparation, installation and first launch.

Any programming is integral to the testing process - this is an axiom. Speaking about the development of web applications, the question inevitably arises of the presence of a certain “environment” that allows one to emulate the operation of an Internet server. In other words, we need local server.

Local server(English) local server) - a program or set of programs that perform service (maintenance) functions at the request of a client on a home (local) computer.

This “gentleman’s set” consists of Apache, PHP and MySQL - this is usually enough. On the other hand, this may include other components, depending on your needs. What is important for us here is the fact that we can use a ready-made assembly - Denver. Thus, we don’t have to understand the specifics of installing and configuring a local server - everything is done before us.

The only thing I want to draw your attention to in the operation of a local server is the need to reserve certain IP addresses for servers that will be available only on our computer. In the case of Windows, the file is responsible for reserving IP addresses hosts. Depending on the Windows version, the file hosts may be:

  • Windows 95/98/ME: WINDOWS\hosts
  • Windows NT/2000: WINNT\system32\drivers\etc\hosts
  • Windows XP/2003/Vista/7: WINDOWS\system32\drivers\etc\hosts

If you decide to use a local server based on the Denver distribution, you do not need to edit this file, everything will happen automatically, but it is useful to have a general understanding of the essence of the issue.

Preparing the local server for operation

From words to deeds. We assume that you have already downloaded the latest version of the Denver build and are ready to storm the citadel. Kidding. The main thing is not to rush and first of all check what is installed on your computer network protocols or not. How to do it? The easiest way:

Installing a local server

Now that we have made sure that our computer is ready to work with the network, we can begin installing the Denver distribution. Close all browser windows(es). Having launched the downloaded Denver installer, you will see a window in front of you:

Denver distribution installer window

Confirm your intentions by clicking the “Yes” button. The unpacking process will begin. After which a browser window will open with the message:

Message in browser window

Close the browser window and continue the installation in the installer window.

Following the instructions, we install the Denver distribution.

Note: You can interrupt the installation process at any time using a key combination Ctrl+Break. On most modern laptops, a key combination is used for this Ctrl+Fn+Pause.

  1. The directory where the distribution will be installed. I advise you to leave the default option, i.e. C:\WebServer - so press Enter.
  2. The name of the virtual disk that will be associated with the directory you just specified. I advise you to leave the default option, i.e. Z: . The main thing is that there is still a disc with that name did not have in the system - most often this happens with the Z: drive. So press Enter again.
  3. Starting and stopping Denver. We will be offered two options:
    1. Create a virtual disk when the machine boots (of course, the installer will make sure that this happens automatically), and do not disconnect it (the disk) when the servers are stopped.
    2. Create a virtual disk only by explicit command to start the complex (by clicking on the launch shortcut on the Desktop). And, accordingly, disconnect the disk from the system when the servers are stopped.

    I advise you to use the second option, because... running programs will constantly “hang” in the computer’s memory, which has a detrimental effect on its performance and can cause conflicts when working with other programs.

    Note: Some versions of Windows 98 may have a bug that prevents the virtual disk from disconnecting, at least the first time. This is not a distribution error, but an error in subst and there is nothing to be done about it.

That's all, the installation is finished.

First launch of local server

Finally, the installation is complete. Three icons should appear on the desktop: Start Denwer(start Denver), (stop Denver).

Denver management icons

Click the icon Start Denwer and wait until all the console windows that pop up during loading disappear. We open the browser and type in the address: http://localhost/, or rather http://localhost/denwer/ - but this is not essential. It is not necessary to leave the Internet. The main thing is that the following page should appear in front of us:

Test page when accessing localhost

If the test page does not load, check:

  • Is your proxy server disabled in your browser settings?
  • Is Denver running? If so, are there any errors when clicking on the pen icon (see bottom right corner)?
  • Are you running some other web server that could conflict with Denver? If yes, disable it.

Other options are possible, but this is no longer within the scope of this note.

Some time ago, the idea came up to test the prospects of developing a site on ASP.Net, oriented to work in a Linux environment. However, it was decided immediately that the site would work in an environment on a Linux host; all that remained was to decide on the programming language: ASP.NET 2 in conjunction with the power of Mono, or PHP. Options for testing various VPS, even if provided free of charge for a short period of time by hosting providers, disappeared immediately, because If the experiment was successful, sooner or later a local VPS server would be required in any case.

The virtual machine for creating a home virtual server was the VirtualBox program - for the reasons that a virtual machine may be needed only once, commercial options were not immediately considered, and among free programs, only this one is simple enough to configure and can fully support guest operating systems of the family Linux. Also, as a result of an analysis of VPS offers on the Internet, several of the most common and Mono-compatible operating systems pre-installed by hosting providers were identified.

So, the tools used:

Install VirtualBox, launch and create a virtual machine of the required configuration. When creating the virtual machine, I left all the recommended settings except for the available memory amount - it was reduced to 128 MB, and the virtual hard disk size - increased to 4 GB. We launch the virtual machine and mount the image with the Debian 5 operating system.

After downloading, select from the installation menu Install, because We don't need a graphical installation. Select the installation language, I recommend English (if you are not comfortable with English at all, then Russian), then select the location => other => Europe Russian Federation

, and the keyboard layout for input, here I strongly advise you to select English for the USA. During installation, you are prompted to enter the machine name for the network, I entered MyVPS, and the name of the domain in which this computer belongs (you don’t have to enter anything here). Next, we suggest choosing a time zone and a method for partitioning the hard drive. I chose the default method; in general, it was not particularly important for me. We agree with the proposal to write changes to the disk and confirm its layout. We are waiting for the system installation to complete... During the installation process, you are asked for a password for the administrator account, a user login and a password. Next, you are asked to select the address of the nearest repository and proxy server settings for Internet access. If you are not using a proxy server, you do not need to enter anything. The installer will now connect to the repository you selected, ask for information about available software, and download the packages needed to proceed with the installation. After this, the system kernel will be configured and a menu for selecting installed software will appear. Uncheck the item Desktop environment (a desktop is not needed on the VPS), be sure to leave a checkmark on the item, select the remaining items as desired. Upon completion of the installation, the question will be asked: is it possible to install the GRUB operating system boot loader as the main one, select Yes. After this, you will be prompted to remove the disk and reboot. Unmount the disk image and click Continue

to reboot the virtual machine. Congratulations! This completes the OS installation.

So, the virtual machine is rebooted. You are prompted to enter your login. Enter root, then you will be asked for a password, enter that too.

Now you need to install SSH. To do this, enter the command Apt-get install ssh The program will analyze the dependencies and ask for confirmation to download and install the package

ssh

and the packages it depends on.

    After installation, turn off the virtual machine. Since the operating system is used by a single user, to do this, enter the command Now we need to configure our virtual machine for access via SSH, and also configure access to the future web server on port 80. This can be done in two ways. Close all VirtualBox windows. Go to folder C:\Users\%username%\.VirtualBox\Machines on Windows 7 and Vista or to a folder

    C:\Documents and Settings\%username%\.VirtualBox\Machines , if you have Windows XP. Open the folder of the virtual machine you created, find in it the file with the name of your virtual machine. In my case it's MyVPS.xml open it and add it to the section






    following lines TCP Close VirtualBox. Open the console. If you have Windows go to the folder

    C:\Program Files\Sun\VirtualBox
    .
    Enter the following commands in the console
    VBoxManage setextradata "%mashine_name%" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/GuestPort" 80
    VBoxManage setextradata "%mashine_name%" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/HostPort" 80
    VBoxManage setextradata "%mashine_name%" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/Protocol" TCP

    VBoxManage setextradata "%mashine_name%" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22

Launch VirtualBox and turn on the virtual machine. If now you get an error about the impossibility of turning on, close everything and configure the virtual machine again. You probably made a mistake when entering commands. If you changed the settings in the xml file, check the added entries for errors; if in the console, enter the commands again.

After starting the virtual machine, run the Putty program, if you are on Windows, write in the Host field localhost, in the Port field we set the value 2222 . Click Open, we agree to accept the SSL key. If you are on Linux, enter

Ssh -l %user_name% -p2222 localhost

Enter your login (in Putty) and password.

To manage the file system, you can use the WinSCP program. You will need to enter localhost, set the Port value to 2222 , enter your login and password.

The server is ready in a minimal configuration. Now you can install Apache, nginx, MySQL, etc. Please note that the web server must be running on port 80. If you want to use any other port, change the virtual machine settings using VBoxManage.