Last active
April 4, 2017 18:37
-
-
Save jeanlescure/010660a00ea17907873cc4838f047efe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
freebsd-update fetch install | |
pkg install -y nginx | |
rm /usr/local/etc/nginx/nginx.conf | |
wget https://gist.githubusercontent.com/jeanlescure/010660a00ea17907873cc4838f047efe/raw/22abe2f2dc670d47f5ba66518f0069e0464702dd/vcloud-nginx.conf -O /usr/local/etc/nginx/nginx.conf --no-check-certificate | |
mkdir -p /var/log/nginx | |
touch /var/log/nginx/access.log | |
touch /var/log/nginx/error.log | |
mkdir -p /usr/local/etc/nginx/sites-enabled/ | |
mkdir -p /usr/local/etc/nginx/sites-available/ | |
nginx -t | |
sysrc nginx_enable=yes | |
service nginx start | |
pkg install -y mariadb100-server | |
cp /usr/local/share/mysql/my-medium.cnf /usr/local/etc/my.cnf | |
sysrc mysql_enable=yes | |
service mysql-server start | |
pkg install -y php56-mysql php56-mysqli | |
cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini | |
hash -r | |
rm /usr/local/etc/php-fpm.conf | |
wget https://gist.githubusercontent.com/jeanlescure/010660a00ea17907873cc4838f047efe/raw/6ad14c3359487ae38da7d5853d06f9c0789f6ab1/php-fpm.conf -O /usr/local/etc/php-fpm.conf --no-check-certificate | |
sysrc php_fpm_enable=yes | |
service php-fpm start | |
service nginx restart | |
swapoff -a | |
dd if=/dev/zero of=/swapfile bs=1024 count=1024k | |
echo "md99 none swap sw,file=/swapfile,late 0 0" >> /etc/fstab | |
swapon -aL | |
pkg install -y node6-6.10.1 npm3-3.10.10_1 | |
echo "alias npm='node --optimize_for_size --max_old_space_size=256 --gc_interval=100 /usr/local/bin/npm'" >> /etc/profile | |
echo "alias node='node --optimize_for_size --max_old_space_size=256 --gc_interval=100'" >> /etc/profile | |
npm install -g knex knexjs-dump-man forever mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[global] | |
pid = run/php-fpm.pid | |
[www] | |
user = www | |
group = www | |
listen = /var/run/php-fpm.sock | |
listen.owner = www | |
listen.group = www | |
listen.mode = 0660 | |
pm = dynamic | |
pm.max_children = 5 | |
pm.start_servers = 2 | |
pm.min_spare_servers = 1 | |
pm.max_spare_servers = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www; | |
worker_processes 2; | |
events { | |
worker_connections 768; | |
} | |
http { | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
types_hash_max_size 2048; | |
include /usr/local/etc/nginx/mime.types; | |
default_type application/octet-stream; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
gzip on; | |
gzip_disable "msie6"; | |
include /usr/local/etc/nginx/sites-enabled/*; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment