sudo apt-get install php-fpm # installs php7.2-fpm
sysctl status php7.2-fpm # checks status
# It's on ubuntu repos
# alternatives here: https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/#prebuilt_ubuntu
sudo apt-get install nginx
# backup init conf
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.backup-original
# restart nginx
nginx -s reload
wget https://dl.google.com/go/go1.12.9.linux-amd64.tar.gz
tar -xvf go1.12.9.linux-amd64.tar.gz
mv go /opt
export GOPATH=$HOME/go
export PATH=$PATH:/opt/go/bin:$GOPATH/bin
go get https://www.github.com/caddyserver/caddy/caddy
# install apt repo
wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
sudo apt-get update
sudo apt-get install mysql-server
sudo service mysql status
sudo service mysql stop
sudo service mysql start
Add the following to /etc/mysql/my.cnf
:
[mysqld]
plugin-load-add=auth_socket.so
And then restart mysql:
sudo service mysql stop && sudo service mysql start
This automatically loads the auth_socket
plugin on start.
Then, create an account for your unix user for msql:
# log into unix system as root
mysql
CREATE USER 'userland'@'localhost' IDENTIFIED WITH auth_socket;
Then, log into the 'userland' account on your unix system.
You should be able to log into mysql by just running mysql
.
NOTE: If things go wrong and you can't authenticate with 'userland':
# log into unix system as root
DROP USER 'userland';
FLUSH PRIVILEGES;
CREATE USER 'userland'@'localhost' IDENTIFIED WITH auth_socket;
Figure out where the unix socket is located:
netstat -ln | grep "unix.*mysql"
wget https://wordpress.org/latest.tar.gz
tar -xvf latest.tar.gz
If using passwordless/socket connection to MySQL,
edit the DB_HOST
directive in your wp_config.php
file
so that it looks like this:
define('DB_HOST', 'localhost:/var/run/mysqld/mysqld.sock');