So I am working on a M1 Mac and I want to use Minty, IPFS, & Pinata to mint some NFTs. I downloaded the IPFS binary, specifcially - https://dist.ipfs.io/go-ipfs/v0.13.1/go-ipfs_v0.13.1_darwin-arm64.tar.gz - and I was unable to have IPFS moved to the /usr/bin folder on my machine, I even tried enabling full disk access for the terminal in my settings and that did not work as I still receive a "cp: /usr/bin/ipfs: Operation not permitted" error. I was however able to move it into the /usr/local/bin directory and when I run "ipfs --version" it recognizes the command. So I cloned the Minty git repo - git clone https://github.com/yusefnapora/minty - ran the IPFS daemon, I think it starts running but I also see this in my output
IPFS is not installed.
Running IPFS and development blockchain
[ipfs] IPFS is not installed.
[ipfs] npx go-ipfs daemon exited with code 0
[eth] Started HTTP and WebSocket JSON-RPC server at http://127.0.0.1:8545/
As always any help is much appreciated.
Related
I successfully downloaded and started GitHub runner on my own Ubuntu machine. GitLab have a nice runner installer, but GitHub have only package with files and run.sh file.
When I will start the run.sh, it works and GitHub runner starts for listening of actions.
But I couldn't find it anywhere in the documentation, how to correctly integrate the package with sh file into Ubuntu to start sh automatically after Ubuntu starts.
Also I didn't find, if there is needed to do some steps to make runner secure from the internet.
...and also I don't know, where I can setup to be able to run parallel actions, and also where I can setup the limitations of resources, etc...
Thanks a lot for an each help.
I'm facing difficulties installing the MongoDB community server on Manjaro Linux.
There isn't official documentation on how to install it on Arch-based systems and Pacman can't find it in the AUR repos.
Has anyone ever tried to install it?
Here is what I did to install.
As the package is not available in the official Arch repositories and can't be installed using pacman, you need to follow a few steps to install it.
First, you need to get the URL for the repo of prebuilt binaries from AUR. It can be found here and by the time of writing this it was https://aur.archlinux.org/mongodb-bin.git
Simply clone the repo in your home directory or anywhere else. Do git clone https://aur.archlinux.org/mongodb-bin.git, then head to the cloned directory, cd mongodb-bin.
Now, all you need to do is to run makepkg -si command to make the package. the -s flag will handle the dependencies for you and the -i flag will install the package.
After makepkg finishes its execution, don't forget to start mongodb.service. Run systemctl start mongodb and if needed enable it with systemctl enable mongodb.
Type mongo in the terminal and if the Mongo Shell runs you are all set.
Later edit (8.2.2021): This package is now available in AUR.
It is available in AUR, so you can view it with pamac with -a flag,
eg.
pamac search -a mongodb-bin
pamac info -a mongodb-bin
And, then build and install with (this can be done after manually cloning too) -
pamac build mongodb-bin
Note that there's also a package named mongodb, but mongodb-bin is a newer release (you can check the version numbers by search or info arguments)
I've been using mongodb via docker for a couple of years.
In my experience, it's easier than installing the regular way. (assuming you already have docker installed)
1. Ensure you have docker installed
If you don't already have it, you can install via pacman/pamac, because it's in the official Arch/Manjaro package repositories. The easiest way is to run the following command:
sudo pacman -S docker
2. Run a single docker command
sudo docker run -d -p 27017:27017 -v ~/mongodb_data:/data/db mongo
This command will run mongodb on a port 27017, and place its data files into a folder ~/mongodb_data.
If you're running this command for the first time, it will also download all the required files.
Now you're successfully running a local instance of mongodb, and you can connect it with your favorite db management tool or from your code.
Being a total newbie, I want to install Odoo on my CentOs device via cloning github repository. However, I am not certain about the installation directory I should choose. As you can see, the ftp directory is empty, shall I install it there?
The installation folder is not too important as long as the permissions are opened for the user that will run the server.
Usually, it's installed under /opt/odoo
sudo mkdir /opt/odoo
cd /opt/odoo
sudo git clone https://github.com/odoo/odoo.git
I have an Ionic project and I want it to work as if it is a web server (say mamp + php).
Since ionic is able to display a project in browser localy (using ionic serve), I am pretty sure it is able to do that. I have a simple ovh server.
How could I do that ?
You gonna need send all your project files (www folder) and dependencies to an web server.
You can try.
Local
$ cd [ionic project]
$ ionic platform add browser
$ cd [ionic project]/platforms/browser/
and move your www folder to your server [webapp] folder.
Server
In your server:
1.Install Node.js
Install connect and serve-static
$ cd [webapp]
$ npm install connect serve-static
Create server.js file
var connect = require('connect');
var serveStatic = require('serve-static');
connect().use(serveStatic(__dirname)).listen(8080)
Run serve
$ node server.js &
Browser
Now you can go to http://yourdomain:8080/index.html
I hope this can help you :)
Great answer Carlos, it was very helpful. If you connect to your server by ssh, the node server will stop running when you quit the ssh session. To avoid this problem run "node forever start server.js" instead of "node server.js &".
This started as a question, but I think I've figured out most of the parts, so am posting it here for reference. It is relatively involved, but I think it may be useful to others contemplating this scenario.
I'm a newb with some of these areas, so if mistakes are made in regards to security issues in Apache or other bad practices, please correct.
Also note that, as it stands, the local development version that is produced from following the steps below no longer has git enabled on it due to changes between it and the production code. So I will keep the local git repo in another location.
Desired Behaviour
Option One:
Replicate my current Python 2.7, Bottle, MongoDB OpenShift application locally to speed up development time (during git push etc).
Option Two (if significantly easier):
Replicate my current Python 2.7, Bottle, MongoDB Openshift application locally *without the OpenShift platform* to speed up development time.
Current Behaviour
I have a Python 2.7, Bottle, MongoDB application on OpenShift.
My current workflow is:
Edit locally.
git add --all
git commit -m "here is a message"
git push origin master (this updates the live site on openshift)
git push github master (this updates github repo)
Obviously this is not ideal for developing due to the time each push takes before I can see the results.
Directory Structure
This is the structure of my app now that it is running locally:
Environment
Linux Mint 17 Cinnamon
Steps To Replicate Locally
01) MongoDB 2.4.9 - DONE
Install instructions for MongoDB 2.4.9 on Linux Mint 17:
http://docs.mongodb.org/v2.4/tutorial/install-mongodb-on-ubuntu
02) RockMongo 1.1 (which requires Apache, PHP and MongoDB Driver) - DONE
sudo apt-get install apache2 php5
sudo apt-get install php5-dev php5-cli
sudo apt-get install php-pear
pear version
pecl version
sudo pecl install mongo
At this point, I was prompted with something that included [no] and I just pressed Enter.
cd /etc/php5/apache2
sudo vi php.ini
Add this to the end of the file:
extension=mongo.so
Then restart:
/etc/init.d/apache2 restart
Then install RockMongo:
cd /var/www/html
wget https://github.com/iwind/rockmongo/archive/1.1.7.zip
unzip 1.1.7.zip
mv rockmongo-1.1.7 rockmongo
rm 1.1.7.zip
03) Create clean virtualenv environment and install packages to it - DONE
virtualenv is a Python package that lets you create independent, virtual environments containing their own Python installation and packages.
Install virtualenv through Synaptic Package Manager.
How To Create
https://code.google.com/p/modwsgi/wiki/VirtualEnvironments
By the author of mod_wsgi, Graham Dumpleton.
Why To Create
http://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/
This article is so brilliant it almost make me want to cry, kudos, kudos.
Commands
Before doing the following, install python2.7-dev, libxml2-dev, libxslt1-dev and apache2-dev via Synaptic Package Manager to resolve errors when doing pip installs later.
# change to your html folder
cd /var/www/html
# this will create a folder called ENV that contains its own instance
# of python without inheriting your system's installed python packages.
# it will also install independent instances of pip and setuptools.
# the --no-site-packages option is the default setting in recent versions
# however I added it just to be sure.
virtualenv --no-site-packages ENV
New python executable in ENV/bin/python
Installing setuptools, pip...done.
# you can 'activate' the virtual environment so that each time you use
# pip it automatically installs packages in the virtual environment.
# change to your virtual environment folder
cd /var/www/html/ENV
# activate the virtual environment
source bin/activate
# you can deactivate this by typing 'deactivate` and it is also
# automatically deactivated each time you close the terminal.
deactivate
# from time to time you can save the names of the packages you have
# installed to your virtual environment via pip to a text file with:
pip freeze > requirements.txt
# note, after installing virtualenv as shown above, you will have some
# packages installted by default.
pip freeze
argparse==1.2.1
wsgiref==0.1.2
# requirements.txt would allow installation of all required packages via:
pip install -r requirements.txt
# install packages, whilst virtualenv is activated
pip install bottle
pip install https://github.com/FedericoCeratto/bottle-cork/archive/master.zip
pip install requests
pip install pymongo==2.6.2
pip install beautifulsoup4
pip install lxml
pip install Beaker
pip install pycrypto
pip install pillow
pip install tldextract
04) Copy existing application files to new location - DONE
cp -r path/to/open_shift_apps/my-app/. /var/www/html
05) Remove files and folder unnecessary for *local* production from var/www/html - DONE
rm -r data
rm -r libs
rm -r .openshift
rm -r .git
rm setup.py
rm setup.pyc
rm setup.pyo
06) mod_wsgi - DONE
Through Synaptic Package Manager.
Apache wouldn't work for me unless mod_wsgi was installed at system level, ie it didn't work when mod_wsgi was installed within virtualenv.
07) Understand the relationship between the Apache server, mod_wsgi and your application - DONE
Apache
To run a dynamic website locally, you need a server, in this case we used Apache.
mod_wsgi
mod_wsgi is an Apache module which extends Apache so that rules can be added to its configuration which point to your Python code so that it can be run when a user visits a particular path.
08) Configure Apache rules
/etc/apache2/sites-available/000-default.conf
WSGIPythonHome /var/www/html/ENV
WSGIPythonPath /var/www/html:/var/www/html/ENV/lib/python2.7/site-packages:/var/www/html/wsgi
<VirtualHost *:80>
# for all content in static folder - css, js, img, fonts
Alias /static/ /var/www/html/wsgi/static/
# for rockmongo
Alias /rockmongo /var/www/html/rockmongo
<Directory /var/www/html/rockmongo>
Order deny,allow
Allow from all
</Directory>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html
WSGIScriptAlias / /var/www/html/wsgi/application
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
When a user visits a particular path, Apache looks for an application object which contains code which will run your Python program.
In this case, the object is located at wsgi/application and is triggered when the user goes to localhost.
/var/www/html/wsgi/application
from mybottleapp import application
09) Check file ownership and permissions
If things don't work at any stage of the process, be sure to look at the permissions of your local files. Not having the right permissions could mean that your application is not imported.
10) mongodump from OpenShift and mongorestore locally
How to mongodump from OpenShift and mongorestore locally on MongoDB 2.4.9?
Further Reading
How Python web frameworks, WSGI and CGI fit together
https://docs.python.org/2/howto/webservers.html
http://wsgi.readthedocs.org/en/latest/servers.html
https://code.google.com/p/modwsgi/
https://www.python.org/dev/peps/pep-0333
http://bottlepy.org/docs/dev/deployment.html#apache-mod-wsgi