main

Fix it yourselfLinux

Issue with VMWare Workstation on Linux: “The virtual machine is unable to reserve memory”

2nd May 2018 — by That IT Guy0

vmware14-960x540.png

VMWare Workstation (or player) 12 and 14 have a common issue with newer kernels where they will refuse to run a vm indicating that “The virtual machine is unable to reserve memory” even when there’s plenty of ram available. This can be fixed by recompiling the host modules (note that this does not mean reinstalling will work, it won’t).

First, clone the git:

cd /tmp
git clone https://github.com/mkubecek/vmware-host-modules.git
cd vmware-host-modules
git checkout workstation-14.0.0

Now, recompile and install.

tar cf vmmon.tar vmmon-only
sudo cp vmmon.tar /usr/lib/vmware/modules/source
sudo vmware-modconfig --console --install-all

To finalize, open up workstation or player again and try running a VM, this should now work accordingly. This has been tested on all 3 flavours of Linux Mint, Ubuntu 16.04 LTS and 17.10 with VMWare Workstation 12 and 14.

Linux

How to: install MongoDB on Linux Mint

22nd February 2018 — by That IT Guy0

mongodb-960x480.jpeg

UPDATE – MINT 19: As of Mint 19, MongoDB is included in the official repositories and can be installed simply by running “sudo apt install mongodb“. Only follow this guide if you’re still using Mint 18.3 or under // Ubuntu 17.10 or under.

MongoDB is an open source database that uses a document-oriented data model. It’s one of several database types to arise in the mid-2000s under the NoSQL banner. Instead of using tables and rows as in relational databases, it’s built on an architecture of collections and documents. Documents comprise sets of key-value pairs and are the basic unit of data in it. Collections contain sets of documents and function as the equivalent of relational database tables.

MongoDB does not come with a native installer for Linux Mint and requires a command line installation. To install it, follow these steps:

Step 1: Open the Command-line terminal and import the public GPG key. Just run the following commands.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

Step 2: Next, we’ll create the “/etc/apt/sources.list.d/mongodb-org-3.4.list” list file.

echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

Step 3: Run the system update

sudo apt-get update

Step 4: Install the latest stable version. This command will install all the related packages.

sudo apt-get install -y mongodb-org

Step 5: After installation, create a directory with name “data” and sub-directory with name “db” inside you home directory (change “yourusername” for your actual username directory). Otherwise, you may have issues starting MongoDB.

cd /home/yourusername
sudo mkdir -p data/db

Step 6: Give the directory “/data” enough permission

sudo chmod -R 775 data

Step 7: Create a configuration file with name “mongodb.service” to setup unit file.

sudo touch /etc/systemd/system/mongodb.service

Step : Open the above created file, paste the following lines of codes inside the editor and save the file

sudo nano /etc/systemd/system/mongodb.service
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target

[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

[Install]
WantedBy=multi-user.target

Step 9: You can now start the server.

sudo service mongodb start

Step 10: You can check the running status of the server with the following command.

sudo service mongodb status

That’s it, you’re done!

mongodb

Linux

How to: install Composer on Linux Mint

21st February 2018 — by That IT Guy0

composer-960x527.png

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

1: Composer does not have a .deb so a manual install is required. The first step, if you haven’t already, is installing PHP. This setup will fail if PHP is not installed. You can install PHP by running the following command:

sudo apt install php

2: While on your home folder on the terminal create a file for the script.

touch composer.sh

3: Open this file with your favorite editor, for this example, I’ve used nano.

nano composer.sh

4: Paste the following script in, save and exit nano.

EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")</pre>
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
exit 1
fi

php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
exit $RESULT

5: Make the script executable:

 sudo chmod +x composer.sh

6: Run the file:

sudo ./composer.sh

No output means it all went ok and it has created a composer.phar file in the same directory.

7: Now, move composer.phar to mkae it available anywhere within the system:

sudo mv composer.phar /usr/local/bin/composer

8: You can now test the install by invoking it anywhere by simply running the command

composer

That’s it, you’re done! You can visit the official website by clicking here.

composer