I will install Larave 4.0/4.1 with PHP5.5 & Latest nginx on Ubuntu 12.04.3 x64.
apt-get update && apt-get upgrade
adduser [username]
usermod -aG sudo [username]
apt-get -y install git
#!/bin/bash | |
aptitude update | |
aptitude install -f php5-cgi php5-cli php5-dev php-pear php5-gd php5-mysql php5-curl php5-memcache libpcre3-dev nginx git-core | |
pecl update-channels | |
pecl install apc | |
cat << 'EOF' > /etc/php5/conf.d/apc.ini | |
extension=apc.so | |
EOF |
#!/bin/bash | |
cat "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers | |
apt-get install -y python-software-properties | |
add-apt-repository ppa:nginx/stable -y | |
add-apt-repository ppa:ondrej/php5 -y | |
apt-get update |
#!/bin/bash | |
### | |
# | |
# Copyright (c) 2011 Cake Development Corporation (http://cakedc.com) | |
# | |
# Ubuntu 11.04 based web server installation script | |
# Run this by executing the following from a fresh install of Ubuntu 11.04 server: | |
# | |
# bash -c "$(curl -fsSL https://raw.github.com/gist/1264701)" <mysqlPassword> |
#!/bin/bash | |
### | |
# | |
# forked from https://gist.github.com/1264701/08f93534ba177f173b9382b53c419cd0de5b07ea | |
# Copyright (c) 2011 Cake Development Corporation (http//cakedc.com) | |
# | |
# Ubuntu 12.10 based web server installation script | |
# Run this by executing the following from a fresh install of Ubuntu 12.10 server: | |
# |
# inspiration | |
# http://github.com/jnstq/rails-nginx-passenger-ubuntu | |
# sudo this sudo that bollocks | |
sudo -i | |
# system-related stuff | |
apt-get install htop strace sysstat | |
dpkg-reconfigure sysstat | |
apt-get install ntp |
#! /bin/bash | |
# Upgrade and install required packages. | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install lamp-server^ | |
sudo apt-get install php5-cli php5-gd php5-curl phpmyadmin | |
# Configure Apache | |
sudo sed -ie 's/AllowOverride None/AllowOverride All/g' /etc/apache2/sites-available/default |
###################################################################################################### | |
# Import into /etc/skel/ the default files for every user. It can be usefull to add in .bash_aliases # | |
###################################################################################################### | |
list-rc(){ | |
ls -l /etc/rc?.d/*$1 | |
} | |
alias df='df -h' | |
alias du='du -h' | |
# Create a group named "admin" or change the name in the visudo to "adm". |
<?php | |
use Symfony\Component\DomCrawler\Crawler; | |
use RuntimeException; | |
// crate crawler instance from body HTML code | |
$crawler = new Crawler($response->getBody(true)); | |
// apply css selector filter | |
$filter = $crawler->filter('div.apismallbullet_box'); | |
$result = array(); |
#user nobody; | |
worker_processes 4; | |
worker_rlimit_nofile 8192; | |
worker_priority 0; | |
events { | |
multi_accept off; | |
worker_connections 1024; | |
use kqueue; | |
} |