Recently, Erlang + MongoDB has been used in the company's webGame project. there is no way to learn about the project. To learn this, you must have an environment at least. Today, we will record it by setting up the development environment, and we will still develop it under ubuntu. By the way, if you do development, you 'd better choose linux, because there are many...
Recently, Erlang + MongoDB has been used in the company's webGame project. there is no way to learn about the project.
To learn this, you must have an environment at least. Today, we will record it by setting up the development environment, and we will still develop it under ubuntu.
By the way, you 'd better choose linux for development, because many environments are easy to build in linux. In Windows
There are corresponding development methods, but there are often some inexplicable problems. Therefore, it is recommended that developers use Linux.
Now, let's continue to build our environment (in Ubuntu ):
Mongodb installation
Open the command and enter the following command:
1 |
sudo apt-get install mongodb |
Enter the administrator password and confirm the installation.
It takes 2-3 minutes to install the service. Then we can check whether the operation is successful:
1 |
pgrep mongo -l // Check whether mongo exists. Why not look at the port... I don't know the port number for the first installation |
You can see that the mongod process with Id 3913 already exists.
Then we enter mongo directly to check what the product looks like. input help to check the help information,
We can see that my version is 2.0.4 now.
Now, we will continue to install Erlang:
The advantage of ubuntu is that you only need to do everything you need in one sentence. enter the following code:
1 |
sudo apt-get install erlang // Is it still that simple? enter the administrator password and confirm the installation. the package about 45 MB needs to be downloaded. |
After three minutes, the installation is complete. To be honest, I haven't read the document for the first time. continue to erlang to see what's going on.
As a result, my guess is wrong. In fact, it should be erl .... Enter erl-h to view some help information.
The next step is to install the erlang plug-in for the artifact eclipse. In fact, I prefer to call vim an artifact. However, eclipse is a good choice in terms of project management.
Open eclipse-> help-> install new soft, and click Add next to work with to Add an Ide plug-in for erlang. The address is:
1 |
http: // Erlide.org/update // erlide an erlang ide plug-in |
Click OK. the agent information will be automatically updated several minutes later.
I chose the plug-in together. the following shows that the plug-in ide is installed with some plug-ins and codes.
The next step is all the way. you need to agree to their agreement in the middle, or you cannot continue.
After installation, file-> new Project can see that the erlang project already exists.
Now, the environment is set up.