Skip to content

Commit 8631a1a

Browse files
Initial commit
0 parents  commit 8631a1a

File tree

12 files changed

+890
-0
lines changed

12 files changed

+890
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text eol=lf
2+
* text eol=lf

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
.vagrant/

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# sandbox-php7
2+
3+
## About
4+
5+
This repository holds the configuration and instructions for hosting a php7 development sandbox.
6+
7+
Currently running PHP 7.3 on CentOS 7.6
8+
9+
## Install
10+
11+
1. install [VirtualBox 5.2.30](https://www.virtualbox.org/)
12+
2. install [Vagrant 2.2.4](https://www.vagrantup.com/)
13+
3. on Windows 7 SP1 ONLY you will have to update [PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell?view=powershell-6) to version 3 or above for Vagrant
14+
4. run cmd as admin
15+
5. cd to directory with this repo
16+
6. `vagrant up`
17+
18+
## ssh
19+
20+
1. install [putty](https://www.putty.org/)
21+
2. connect to 192.168.56.3 port 22 as vagrant/vagrant
22+
23+
## Development/Debug
24+
25+
1. install [pgadmin](https://www.pgadmin.org/)
26+
2. connect with
27+
- *host:* 192.168.56.3
28+
- *port:* 5432
29+
- *username:* postgres
30+
- *password:* postgres

Vagrantfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
Vagrant.configure("2") do |config|
3+
config.vm.box = "bento/centos-7.6"
4+
config.vm.network "private_network", ip: "192.168.56.3"
5+
config.vm.network "forwarded_port", guest: 80, host: 8080
6+
7+
config.ssh.insert_key = false
8+
9+
config.vm.synced_folder ".", "/sandbox"
10+
11+
config.vm.provision "shell", path: "box-init/init.sh"
12+
config.vm.provision "shell", path: "box-init/welcome.sh"
13+
end
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# .bash_profile
2+
3+
# Get the aliases and functions
4+
if [ -f ~/.bashrc ]; then
5+
. ~/.bashrc
6+
fi
7+
8+
# User specific environment and startup programs
9+
10+
PATH=$PATH:$HOME/.local/bin:$HOME/bin
11+
12+
export PATH
13+
14+
cd /sandbox
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# PostgreSQL Client Authentication Configuration File
2+
# ===================================================
3+
#
4+
# Refer to the "Client Authentication" section in the PostgreSQL
5+
# documentation for a complete description of this file. A short
6+
# synopsis follows.
7+
#
8+
# This file controls: which hosts are allowed to connect, how clients
9+
# are authenticated, which PostgreSQL user names they can use, which
10+
# databases they can access. Records take one of these forms:
11+
#
12+
# local DATABASE USER METHOD [OPTIONS]
13+
# host DATABASE USER ADDRESS METHOD [OPTIONS]
14+
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
15+
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
16+
#
17+
# (The uppercase items must be replaced by actual values.)
18+
#
19+
# The first field is the connection type: "local" is a Unix-domain
20+
# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
21+
# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
22+
# plain TCP/IP socket.
23+
#
24+
# DATABASE can be "all", "sameuser", "samerole", "replication", a
25+
# database name, or a comma-separated list thereof. The "all"
26+
# keyword does not match "replication". Access to replication
27+
# must be enabled in a separate record (see example below).
28+
#
29+
# USER can be "all", a user name, a group name prefixed with "+", or a
30+
# comma-separated list thereof. In both the DATABASE and USER fields
31+
# you can also write a file name prefixed with "@" to include names
32+
# from a separate file.
33+
#
34+
# ADDRESS specifies the set of hosts the record matches. It can be a
35+
# host name, or it is made up of an IP address and a CIDR mask that is
36+
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
37+
# specifies the number of significant bits in the mask. A host name
38+
# that starts with a dot (.) matches a suffix of the actual host name.
39+
# Alternatively, you can write an IP address and netmask in separate
40+
# columns to specify the set of hosts. Instead of a CIDR-address, you
41+
# can write "samehost" to match any of the server's own IP addresses,
42+
# or "samenet" to match any address in any subnet that the server is
43+
# directly connected to.
44+
#
45+
# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
46+
# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
47+
# Note that "password" sends passwords in clear text; "md5" or
48+
# "scram-sha-256" are preferred since they send encrypted passwords.
49+
#
50+
# OPTIONS are a set of options for the authentication in the format
51+
# NAME=VALUE. The available options depend on the different
52+
# authentication methods -- refer to the "Client Authentication"
53+
# section in the documentation for a list of which options are
54+
# available for which authentication methods.
55+
#
56+
# Database and user names containing spaces, commas, quotes and other
57+
# special characters must be quoted. Quoting one of the keywords
58+
# "all", "sameuser", "samerole" or "replication" makes the name lose
59+
# its special character, and just match a database or username with
60+
# that name.
61+
#
62+
# This file is read on server startup and when the server receives a
63+
# SIGHUP signal. If you edit the file on a running system, you have to
64+
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
65+
# or execute "SELECT pg_reload_conf()".
66+
#
67+
# Put your actual configuration here
68+
# ----------------------------------
69+
#
70+
# If you want to allow non-local connections, you need to add more
71+
# "host" records. In that case you will also need to make PostgreSQL
72+
# listen on a non-local interface via the listen_addresses
73+
# configuration parameter, or via the -i or -h command line switches.
74+
75+
76+
77+
# TYPE DATABASE USER ADDRESS METHOD
78+
79+
# "local" is for Unix domain socket connections only
80+
local all all peer
81+
# IPv4 local connections:
82+
host all all 0.0.0.0/0 md5
83+
# IPv6 local connections:
84+
#host all all ::1/128 ident
85+
# Allow replication connections from localhost, by a user with the
86+
# replication privilege.
87+
local replication all peer
88+
host replication all 127.0.0.1/32 ident
89+
host replication all ::1/128 ident

0 commit comments

Comments
 (0)