Closed ppyordanov closed 9 years ago
The configuration involved installing the main system environment requirements. Some of the steps required significant trial and error as there is poor documentation for some software facets and the existing tutorials on the website ( https://www.digitalocean.com/community/tutorials ) are deprecated:
//The main terminal window was used for the execution of most of the operations although it would have been much more flexible to enable users to open multiple bash consoles especially when deploying new features/components:
--dbpath
configuration parameter, used a different port (--port 8015
) and changed the directory/file permissions to public for testing purposes (sudo chmod 777 -R /var/www/data/
) the issue still persisted; the error message stated that no /data/db directory mapping could be resolved. After a lot of trial and error I managed to discover the issue and it was that the installation instructions had were installing only the client application. I tried to reinstall Mongo DB using an alternative method - via the yum package ( http://yum.baseurl.org/ ) instead of the conventional apt-get
:deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
sudo aptitude update
yum -y install mongo-10gen mongo-10gen-server
This did not solve the issue as yum found broken packages during installation ("faulty dependency resolution /requires bin/sh/"). Using --skip -broken did not help either as it entirely discarded the mongo-db server installation and only reinstalled the client, which was working without issues before.
I decided to resort back to the manual configuration approach. Once I manually modified the bash script I was running to also install the server as specified on Mongo DB's website with a little tweaking ( http://docs.mongodb.org/manual/reference/program/mongod/#bin.mongod ), the database started running like a charm. Here is the final mongo.bash script:
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | tee -a /etc/apt/sources.list.d/10gen.list
apt-get -y update
apt-get -y install mongodb-org
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install mongodb-org-server
I configured it to automatically start on server power-on. Even the instructions for this are deprecated on the tutorial page ( https://www.digitalocean.com/community/tutorials/how-to-set-up-a-scalable-mongodb-database ). The recommended tool for the purpose is chkconfig which is no longer supported on Ubuntu. An analogue (as recommended on StackOverflow) is sysv-rc-conf which was used to configure the system for automatic DB instance initialization at startup:
sysv-rc-conf mongod on && service mongod start
With all of the steps above completed, the initial server configuration was complete. Not great first impressions of DigitalOcean, but will be using the cloud hosting as it is flexible and the best hosting option at the moment.
Some of the guides on the official website that were used can be seen below:
Question posted on DC's community forum seeking advice on how to proceed with DB setup (I did not find any questions about Spring MVC and Java WAF questions seem to be a rarity; most of the support provided is for Python-based systems such as Django as it looks like):
The server has been experiencing some issues for the past few hours:
Server is now running on port 80 by default and can be accessed at: http://178.62.100.239/
mvn -Djetty.port=80 jetty:run
Update: the server is communicating through a domain name and can be accessed at: http://ugmap.me/
This task has been completed and can be closed now.
The server of the application needs to be configured in order to enable web application deployment. The chosen hosting provider is the cloud-based Digital Ocean:
https://www.digitalocean.com/