I am trying out Prometheus on Mac OS X. I looked up the downloads and not having a direct indication of which version is for Mac. I tried docker to run the Prometheus on Mac. Just want to run it directly on Mac without docker. Does any one know which version to pick.
There were few BSDs there for pick. I know Mac is also BSD. Not sure which one matches or doesn't matter as long as it is bsd?.
Other than those binaries, I think brew install should do the work
The downloads page has a build for Darwin on amd64.
To quote the wikipedia page:
Darwin forms the core set of components upon which macOS (previously
OS X and Mac OS X), iOS, watchOS, and tvOS are based.
This is the official binary for OSX. Other methods (such as brew install prometheus are also available).
Install and download Docker from this link - https://docs.docker.com/v17.12/docker-for-mac/install/#download-docker-for-mac.
You can launch the your terminal.
You can launch a Prometheus container for trying it out with
$ docker run --name prometheus -d -p 127.0.0.1:9090:9090 prom/prometheus
Prometheus will now be reachable at http://localhost:9090/.
Related
I have downloaded prometheus-2.36.2.darwin-amd64.tar.gz file in my Mac system with a M1 processor. But I am unable to install and run prometheus. Please let me know the steps to install the same.
There are binaries for your platform available:
Go to https://prometheus.io/download/
Choose darwin as your Operating System and arm64 as your Architecture.
Download the files you need.
Or, use this direct download link: Prometheus 2.36.2 for macOS on M1.
You have an M1 Mac and you try to install an amd64 image. So the processors instruction does not map to the installing image.
You have to download an Image for the M1 architecture.
You can also try to install it with brew install prometheus.
Otherwise you may run it in an docker container which you find here:
https://hub.docker.com/u/prom
I would like to install wxPython on Mac OS 10.8 using MacPorts. So for I have run into errors. Using pip didn't work because of errors. There are a lot of packages in MacPorts that are related to wxPython. The trick is finding one that works on my version of Mac OS. Hopefully someone knows the right formula.
You've already found that there are several wxPython-related ports in MacPorts:
$ port echo name:wxp
py-wxpython-3.0
py-wxpython-4.0
py27-wxpython-3.0
py27-wxpython-4.0
py35-wxpython-4.0
py36-wxpython-4.0
py37-wxpython-4.0
py38-wxpython-4.0
py39-wxpython-4.0
wxPython-3.0
Looks like if you want wxPython 3, your only option is to sudo port install py27-wxpython-3.0 which is for Python 2.7. If you want wxPython 4, you can pick which version of Python 2.7 or 3.x you want.
OS X 10.8 is very old, so there is a possibility that these or any other ports in MacPorts will not work on it. You can look up ports in the ports web site and check to see if they built successfully on the automated build system.
For example, as of this writing, py39-wxpython-4.0 built successfully on OS X 10.11 and later but not on 10.10 or earlier. That information could be outdated. You can always try installing the port yourself to see what happens. If you encounter a build failure, please report it to MacPorts so that it can hopefully be fixed.
I use an older model MB Air and running vagrant is very resource intensive for me.
When using docker on OSX, does it just use vagrant behind the scenes to run my docker instance on ubuntu?
In contrast to the deprecated Docker Toolbox (which also runs on MacOS), recent versions of Docker for Mac do not use VirtualBox, but rather HyperKit, a native MacOS hypervisor, which is built on xhyve. In comparison to VirtualBox, HyperKit claims to be more lightweight.
Also consider the official documentation on the differences and interna of Docker Toolbox and Docker for Mac (emphasis mine):
Docker for Mac is a Mac native application, that you install in /Applications. [...]
Here are some key points to know about Docker for Mac before you get started:
Docker for Mac does not use VirtualBox, but rather HyperKit, a lightweight macOS virtualization solution built on top of Hypervisor.framework in macOS 10.10 Yosemite and higher. [...]
The Docker for Mac application does not use docker-machine to provision that VM; but rather creates and manages it directly.
At installation time, Docker for Mac provisions an HyperKit VM based on Alpine Linux, running Docker Engine. It exposes the docker API on a socket in /var/run/docker.sock. Since this is the default location where docker will look if no environment variables are set, you can start using docker and docker-compose without setting any environment variables.
[...]
With Docker for Mac, you get only one VM, and you don’t manage it. It is managed by the Docker for Mac application, which includes autoupdate to update the client and server versions of Docker.
It doesn't use Vagrant, but it there is underlying VirtualBox machine similar to what Vagrant uses. Things might be slightly better with Docker because the docker VM is very slimmed down version. And you can pack multiple images into that VM in more efficient manner, because they will be using the same kernel and IO layers.
Also, note that with both Vagrant and Docker you can use AWS or similar cloud things to actually run your images.
Can I compile on mac so it will produce a windows binary? bind with windows dlls? (I have a windows machine to copy them from) How can I do so? clang and gcc are the compilers I can use.
These instructions will work on both MacOS and Linux, but I will provide them from a Mac perspective.
Download Docker
Add a Windows dockcross
If you don't know how to use docker then just download Kitematic (Links to an external site.).
From Kitematic you can simply click the "+New" button and get the dockcross image from the docker hub.
After the image downloads in Kitematic, click the "Docker CLI" button in the bottom left. This will open a new terminal window setup for the docker environment.
From that terminal window:
cd to the directory with the project you want to build then save a shellscript that will run the docker container and build the project:
docker run --rm dockcross/windows-x86 > ./dockcross
chmod +x ./dockcross
./dockcross make (assuming your project uses a makefile)
See the dockcross documentation for more examples and further guidance.
dockcross uses MXE, so you can pretty easily build most projects, but you may need to install additional MXE packages
The MinGW's toolchain can be built on OSX or most other unix/unix-like operating systems.
Here's a link to the precompiled binaries: http://crossgcc.rts-software.org/doku.php?id=mingw-older-releases
It works fine on my PowerMac G5 and as keith.layne says there is also a solution for Intel Macs.
I'm running Mac OS X 10.5.8 and want to compile for target CentOS 5.3 with GCC 4.1.2. How could I:
Compile GCC 4.1.2 toolchain and related tools?
Use that tool to cross compile for target CentOS 5.3?
Any help is greatly appreciated!
Your simplest solution is to just run CentOS 5.3 in a VM (e.g. Sun VirtualBox). This requires minimal setup, has quite reasonable overhead (assuming an Intel Mac), and you'll be able to actually test and debug what you are building.
If you really insist on cross-compiling, you must build a cross-compiler. Instructions are here and here, but beware: it will likely take you several days to get it right, and then you'll still need a VM to test the result, so I don't see any point in doing it that way.
Nowadays you can probably do it with Docker for Mac, I didn't test it because I have no mac. Docker basically creates a Linux VM and provides some nice-to-have functions.
Install docker and prepare your build image.
install docker
start a new container with docker run -ti centos5.3 /bin/bash (search the official Docker Hub for your desired target)
install your desired gcc version (something like sudo yum group install "Development Tools")
exit your container
run docker ps -a to obtain your container id
backup your container as base build image docker commit [id] centos:build
Make a build
Now you can use your created build environment for CentOS builds.
to start your build environment while mounting the working directory inside it you can use something like docker run -it --mount type=bind,source=$(pwd),target=/mnt centos:build /bin/sh -c "cd /mnt && bash"
then run gcc ... or ./configure or make or ninja or whatever to do your build
you can also run automated tests here if you wrote some
Docker vs VM
With docker you can use your beloved terminal with your familiar theme and keymap. Furthermore it most probably will consume less resources for startup and while running.
If your app is graphical and you test it by using interaction with its GUI I guess a VM is still a better option (see #employed-russian's solution).
Use Cocotron to cross-compile directly from Xcode. There's a good getting-started guide here: http://blog.tlensing.org/tag/cocotron/
I struggled to get crosstool-ng to build on OSX 10.9 for x86_64 Linux. I used the very helpful post on how to build a gcc cross-compiler by Jeff Preshing and his script here as the basis for a script that worked for me. His script in the link doesn't work when compiling glibc on my version of OSX (which seems to be a very common complaint for those cross-compiling from OSX to Linux).
My script is here: https://github.com/johnlondon/Cross-compile-toolchain-for-linux-on-OSX
You can use crosstool-ng, or if you don't want to spend too much time to configure it, you can download a pre-configured cross-compiler, as Linaro.
Here's the guide for installing it in Mac OS X.