![]() ![]() Note: MacPorts MariaDB has skip-networking enabled by default in /opt/local/etc/mariadb/macports-default.cnf. You can also specify the socket path in your PHP config file: see below… If you work a lot with sockets for MySQL/MariaDB, you can create a symbolic link from the default socket path to MacPort’s path: $ sudo ln -s /opt/local/var/run/mariadb/mysqld.sock /tmp/mysql.sock Next we need to create a password for the root user, don’t forget to do this step! This procedure will interactively ask you some security details: $ /opt/local/lib/mariadb/bin/mysql_secure_installation Time to start MariaDB: $ sudo port load mariadb-server Once MariaDB is installed, we need to create the main databases: $ sudo -u _mysql /opt/local/lib/mariadb/bin/mysql_install_db Stopping services can be done using the unload statement.Īpache should be functioning right now, more configuration details can be found everywhere on the internet, I’m not gonna explain the whole config file here… MariaDB (MySQL)Īgain, we use MacPorts: $ sudo port install mariadb-server When everything is configured, you can start Apache using MacPorts services: $ sudo port load apache2 Replace it with the following directive: ĭon’t forget to verify your changes after every modification you do to nf! $ /opt/local/apache2/bin/apachectl -t By default you have a block like this in your Apache config: You must also allow traffic to go to your webserver otherwise you will get “Permission denied” errors. To do this change /opt/local/apache2/htdocs to your local sites folder e.g. Probably you want to set DocumentRoot to your local Sites folder. Whenever your installation is completed, you can edit Apache’s configuration file: /opt/local/apache2/conf/nf. Time to install Apache: $ sudo port install apache2 Web sharing can be found under ‘System preferences’, ‘Sharing’, … If you have web sharing enabled on your Mac, you should disable it before continuing. You could also install them using Homebrew, or use the packages that come with your Mac, but I prefer MacPorts… So if you don’t have MacPorts installed, follow the installation instruction on their website.īefore installing any ports, make sure you have the latest version of the ports tree: $ sudo port selfupdate Apache In this guide I will use it to install Apache, MariaDB and PHP. The tool is very handy when it comes to installing command line tools for Mac. The MacPorts Project is an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the OS X operating system. MacPorts is a BSD ports like package management system for OS X. If you want to update your current PHP 5 installation to a PHP 7 installation, see this blogpost: Migrating/updating from PHP 5 to PHP 7 on OS X (MacPorts). Location: /home/peter/.local/lib/python3.Update: I updated the blogpost for PHP 7 instead of PHP 5. Summary: pytest: simple powerful testing with PythonĪuthor: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others ![]() Run pip show to show Debian-style package information: $ pip show pytest _file_ lets you identify the location of a specific module: ( difference) $ python3 -c "import os as _ print(_._file_)" _path_ lets you identify the location(s) of a specific package: ( details) $ python -c "import setuptools as _ print(_._path_)" ![]() Hint: Running pip list -user or pip freeze -user gives you a list of all installed per user site-packages. If this points to a non-existing directory check the exit status of Python and see python -m site -help for explanations. The per user site-packages directory ( PEP 370) is where Python installs your local packages: python -m site -user-site In Python 3, you may use the sysconfig module instead: python3 -c 'import sysconfig print(sysconfig.get_paths())' Note: With virtualenvs getsitepackages is not available, sys.path from above will list the virtualenv's site-packages directory correctly, though. Global site-packages (" dist-packages") directories are listed in sys.path when you run: python -m siteįor a more concise list run getsitepackages from the site module in Python code: python -c 'import site print(site.getsitepackages())' There are two types of site-packages directories, global and per user. ![]()
0 Comments
Leave a Reply. |