Created
May 29, 2012 18:32
-
-
Save oliveiraev/2829923 to your computer and use it in GitHub Desktop.
Setup for fresh new Ubuntu-based installations
This file contains hidden or 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
ifdef SUDO_USER | |
USER=$(SUDO_USER) | |
endif | |
INSTALL=apt-get install -y | |
INSTALL_LIB=$(INSTALL) lib$(1)-dev | |
REMOVE = \ | |
apt-get purge -y $(1)*; \ | |
apt-get autoremove -y | |
ADD_HOST= \ | |
if [ "`grep '$(1).local' /etc/hosts`" = "" ]; then \ | |
echo "127.0.0.1 $(1).local" >> /etc/hosts; \ | |
fi | |
update: | |
apt-get update | |
upgrade: | |
make update | |
apt-get dist-upgrade -y | |
build: | |
$(INSTALL) autoconf binutils bison build-essential cmake re2c | |
vim: | |
$(INSTALL) vim | |
gvim: vim | |
$(INSTALL) vim-gnome | |
vimrc: vim | |
wget http://amix.dk/vim/vimrc.txt -O - | grep -v -e '^"' > ~/.vimrc | |
chown $(USER):$(USER) ~/.vimrc | |
sed -i '50iset number\n' ~/.vimrc | |
sed -i 's!Line:!Linha:!' ~/.vimrc | |
pidgin: | |
$(INSTALL) pidgin pidgin-plugin-pack pidgin-extprefs pidgin-awayonlock | |
$(call REMOVE, empathy) | |
xfburn: | |
$(INSTALL) xfburn | |
$(call REMOVE, brasero) | |
moc: | |
$(INSTALL) moc | |
$(call REMOVE, rhythmbox) | |
make zsh-moc | |
zsh-moc: | |
if [ -f ~/.zshrc -a "`grep 'mocp' .zshrc`" = "" ]; then \ | |
echo -n "alias 'play'='test \"\`ps x | grep moc | wc -l\`\" -eq 2 " >> ~/.zshrc; \ | |
echo -n "|| mocp -S && mocp -o shuffle && mocp -o autonext && " >> ~/.zshrc; \ | |
echo "mocp -f && mocp -p'" >> ~/.zshrc; \ | |
fi | |
mplayer: xfburn moc | |
$(INSTALL) mplayer gnome-mplayer | |
$(call REMOVE, totem) | |
zsh: | |
$(INSTALL) zsh | |
chsh -s /usr/bin/zsh $(USER) | |
git: | |
$(INSTALL) git | |
subversion: | |
$(INSTALL) subversion | |
cvss: git subversion | |
oh-my-zsh: zsh git | |
if [ ! -d .oh-my-zsh ]; then git clone git://github.com/robbyrussell/oh-my-zsh .oh-my-zsh; fi | |
sed 's:robbyrussell:steeef:g' .oh-my-zsh/templates/zshrc.zsh-template > ~/.zshrc | |
chown -R $(USER):$(USER) .zshrc .oh-my-zsh | |
@echo "alias 'apt-get'='sudo apt-get'" >> ~/.zshrc | |
@echo "alias 'update'='sudo apt-get udpate'" >> ~/.zshrc | |
@echo "alias 'upgrade'='sudo apt-get dist-upgrade -y'" >> ~/.zshrc | |
@echo "alias 'dpkg'='sudo dpkg'" >> ~/.zshrc | |
make zsh-rtorrent | |
make zsh-web2py | |
make zsh-ffmpeg | |
make zsh-moc | |
tmux: | |
$(INSTALL) tmux | |
dtach: | |
$(INSTALL) dtach | |
rtorrent: dtach | |
$(INSTALL) rtorrent | |
make zsh-rtorrent | |
$(call REMOVE,transmission) | |
zsh-rtorrent: | |
if [ -f ~/.zshrc -a "`grep 'rtorrent' .zshrc`" = "" ]; then \ | |
echo "alias 'rtorrent'='dtach -A /tmp/rtorrent rtorrent'" >> ~/.zshrc; \ | |
fi | |
htop: | |
$(INSTALL) htop | |
terminator: | |
$(INSTALL) terminator | |
pgsql: | |
$(INSTALL) postgresql | |
pgadmin: | |
$(INSTALL) pgadmin3 | |
sqlite: | |
$(INSTALL) sqlite3 | |
libncurses: | |
$(call INSTALL_LIB,ncurses5) | |
mysql-common: | |
$(INSTALL) mysql-common mysql-client | |
mysql-server: libncurses mysql-common | |
if [ ! -d /usr/local/src/mysql-5.5.28 ]; then \ | |
wget http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.28.tar.gz -O- | tar -zxC /usr/local/src; \ | |
fi | |
cd /usr/local/src/mysql-5.5.28; \ | |
cmake .; \ | |
make; \ | |
make install | |
adduser --system --no-create-home mysql | |
ln -sf /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld | |
update-rc.d mysqld start 85 2 3 4 5 . | |
/usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql --user=mysql | |
cd /usr/local/bin ;\ | |
for file in /usr/local/mysql/bin/*; do ln -sf $$file; done | |
cp /usr/local/bin/mysqld_safe /usr/local/bin/mysqld `grep basedir /etc/mysql/my.cnf | cut -f2 -d=`/bin | |
mkdir -p /var/log/mysql | |
chown mysql:nogroup /var/log/mysql | |
ln -sf /usr/local/mysql/share /usr/share/mysql | |
service mysqld start | |
workbench: | |
$(INSTALL) mysql-workbench | |
databases: mysql-server pgsql workbench sqlite pgadmin | |
cabextract: | |
$(INSTALL) cabextract | |
msfonts: | |
$(INSTALL) msttcorefonts | |
msfonts2007: cabextract msfonts | |
wget -c http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe | |
mkdir ppt | |
cd ppt; \ | |
cabextract ../PowerPointViewer.exe; \ | |
cabextract ppviewer.cab; \ | |
mv *.TTF /usr/share/fonts/truetype/msttcorefonts/ | |
fc-cache -f | |
rm -r ppt PowerPointViewer.exe | |
lib32: | |
$(INSTALL) ia32-libs-multiarch | |
wine: lib32 cabextract msfonts | |
$(INSTALL) wine | |
jre: | |
$(INSTALL) openjdk-7-jre-headless | |
java: jre | |
wget -c http://download.oracle.com/otn-pub/java/jdk/7u7-b10/jdk-7u7-linux-x64.tar.gz --header "Cookie: oraclelicensejdk-7u7-oth-JPR=accept-securebackup-cookie; s_cc=true; s_nr=`expr $(date +%s) + 3600`; gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk-7u7-downloads-1591156.html; s_sq=oracleotnlive%2Coracleglobal%3D%2526pid%253Dotn%25253Aen-us%25253A%25252Fjava%25252Fjavase%25252Fdownloads%25252Fjdk-7u7-downloads-1591156.html%2526pidt%253D1%2526oid%253Dfunctionanonymous(event)%25257BacceptAgreement(window.self%25252C'jdk-7u7-oth-JPR')%25253B%25257D%2526oidt%253D2%2526ot%253DRADIO" -O- | tar -zxC /usr/lib/jvm | |
rm /usr/lib/jvm/default-java 2>/dev/null | |
ln -s `ls /usr/lib/jvm | grep 'jdk1.7'` /usr/lib/jvm/default-java | |
update-alternatives --install /usr/bin/java java /usr/lib/jvm/default-java/jre/bin/java 2000 | |
update-alternatives --install /usr/bin/rmid rmid /usr/lib/jvm/default-java/jre/bin/rmid 2000 | |
update-alternatives --install /usr/bin/orbd orbd /usr/lib/jvm/default-java/jre/bin/orbd 2000 | |
update-alternatives --install /usr/bin/jexec jexec /usr/lib/jvm/default-java/jre/lib/jexec 2000 | |
update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/default-java/jre/bin/javaws 2000 | |
update-alternatives --install /usr/bin/keytool keytool /usr/lib/jvm/default-java/jre/bin/keytool 2000 | |
update-alternatives --install /usr/bin/pack200 pack200 /usr/lib/jvm/default-java/jre/bin/pack200 2000 | |
update-alternatives --install /usr/bin/tnameserv tnameserv /usr/lib/jvm/default-java/jre/bin/tnameserv 2000 | |
update-alternatives --install /usr/bin/unpack200 unpack200 /usr/lib/jvm/default-java/jre/bin/unpack200 2000 | |
update-alternatives --install /usr/bin/policytool policytool /usr/lib/jvm/default-java/jre/bin/policytool 2000 | |
update-alternatives --install /usr/bin/servertool servertool /usr/lib/jvm/default-java/jre/bin/servertool 2000 | |
update-alternatives --install /usr/bin/rmiregistry rmiregistry /usr/lib/jvm/default-java/jre/bin/rmiregistry 2000 | |
firefox: | |
$(INSTALL) firefox | |
if [ "`apt-cache search firefox-gnome-support`" != "" ]; then \ | |
$(INSTALL) firefox-gnome-support; \ | |
fi | |
chromium: | |
$(INSTALL) chromium-browser | |
libssl: | |
$(call INSTALL_LIB,ssl) | |
libjs: | |
$(call INSTALL_LIB,mozjs185) | |
liblzma: | |
$(call INSTALL_LIB,lzma) | |
elinks: libssl libjs liblzma | |
wget -c http://elinks.cz/download/elinks-current-0.13.tar.bz2 -O- | tar -jxC /usr/local/src | |
cd `find /usr/local/src -type d -iname elinks* | head -n1`; \ | |
./configure --enable-256-colors --enable-true-color --enable-exmode --enable-html-highlight --with-xterm --with-lzma --with-openssl --with-gnutls --with-x --with-libiconv=/usr; \ | |
make; \ | |
make install | |
hosts: | |
if [ "`grep 'static.local' /etc/hosts`" = "" ]; then \ | |
echo "" >> /etc/hosts; \ | |
echo "# Custom localhost mapping" >> /etc/hosts; \ | |
$(call ADD_HOST,static); \ | |
$(call ADD_HOST,oliveiraev); \ | |
$(call ADD_HOST,imasters); \ | |
fi | |
web2py-hosts: hosts | |
$(call ADD_HOST,web2py) | |
httpd-hosts: hosts | |
$(call ADD_HOST,apache) | |
libpcre: | |
$(call INSTALL_LIB,pcre3) | |
libxslt: | |
$(call INSTALL_LIB,xslt1) | |
libgd: | |
$(call INSTALL_LIB,gd2-xpm) | |
libgoogle-perftools: | |
$(call INSTALL_LIB,google-perftools) | |
libgeoip: | |
$(call INSTALL_LIB,geoip) | |
nginx: libssl libpcre libgoogle-perftools libgeoip libxslt libgd | |
wget -c http://nginx.org/download/nginx-1.2.4.tar.gz -O- | tar -zxC /usr/local/src | |
cd /usr/local/src/nginx-1.2.4; \ | |
./configure --user=www-data --group=www-data --with-rtsig_module --with-select_module --with-poll_module --with-file-aio --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-google_perftools_module --with-pcre; \ | |
make; \ | |
make install | |
mkdir -p /etc/nginx | |
ln -sf /usr/local/nginx/conf/fastcgi.conf /etc/nginx/fastcgi.conf | |
ln -sf /usr/local/nginx/conf/nginx.conf /etc/nginx/nginx.conf | |
mkdir -p /etc/nginx/conf.d | |
cp /usr/local/nginx/conf/nginx.conf.default /usr/local/nginx/conf/nginx.conf | |
sed -i "118i\ include /etc/nginx/conf.d/*.conf;\n autoindex on;" /usr/local/nginx/conf/nginx.conf | |
@echo '#!/bin/sh' > /etc/init.d/nginx | |
@echo 'args=""' >> /etc/init.d/nginx | |
@echo 'if [ "$$1" != "start" ]; then' >> /etc/init.d/nginx | |
@echo ' args="-s $$1"' >> /etc/init.d/nginx | |
@echo 'fi' >> /etc/init.d/nginx | |
@echo >> /etc/init.d/nginx | |
@echo '/usr/local/nginx/sbin/nginx $$args' >> /etc/init.d/nginx | |
@echo >> /etc/init.d/nginx | |
@echo 'exit 0' >> /etc/init.d/nginx | |
chmod +x /etc/init.d/nginx | |
update-rc.d nginx start 80 2 3 4 5 . | |
service nginx start | |
make nginx-web2py | |
make nginx-httpd | |
unzip: | |
$(INSTALL) unzip | |
web2py: dtach unzip | |
wget -c http://web2py.com/examples/static/web2py_src.zip | |
unzip web2py_src.zip | |
rm web2py_src.zip | |
cp web2py/routes.example.py web2py/routes.py | |
rm -r web2py/applications/examples web2py/applications/welcome | |
chown $(USER):$(USER) -R web2py | |
mv web2py /opt | |
@echo '#!/bin/sh' > /etc/init.d/web2py | |
@echo 'path="/opt/web2py/web2py.py"' >> /etc/init.d/web2py | |
@echo 'args="-a123 -p8001 --nogui"' >> /etc/init.d/web2py | |
@echo 'comm="while true; do python $$path $$args; done"' >> /etc/init.d/web2py | |
@echo 'case $$1 in' >> /etc/init.d/web2py | |
@echo ' "start" )' >> /etc/init.d/web2py | |
@echo ' if [ "`service web2py getPID`" != "" ]; then' >> /etc/init.d/web2py | |
@echo ' echo "Alerady running!" > /dev/stderr' >> /etc/init.d/web2py | |
@echo ' exit 1' >> /etc/init.d/web2py | |
@echo ' fi' >> /etc/init.d/web2py | |
@echo " su -c \"dtach -n /tmp/web2py bash -c '\$$comm'\" evandro" >> /etc/init.d/web2py | |
@echo ' chmod 777 /tmp/web2py' >> /etc/init.d/web2py | |
@echo ' ;;' >> /etc/init.d/web2py | |
@echo ' "stop" )' >> /etc/init.d/web2py | |
@echo ' pids=`service web2py getPID`' >> /etc/init.d/web2py | |
@echo ' if [ "$$pids" = "" ]; then' >> /etc/init.d/web2py | |
@echo ' echo "Not running!" > /dev/stderr' >> /etc/init.d/web2py | |
@echo ' exit 2' >> /etc/init.d/web2py | |
@echo ' fi' >> /etc/init.d/web2py | |
@echo ' for pid in $$pids; do kill -9 $$pid; done' >> /etc/init.d/web2py | |
@echo ' rm /tmp/web2py' >> /etc/init.d/web2py | |
@echo ' ;;' >> /etc/init.d/web2py | |
@echo ' "restart" )' >> /etc/init.d/web2py | |
@echo ' service web2py stop 2>/dev/null' >> /etc/init.d/web2py | |
@echo ' service web2py start' >> /etc/init.d/web2py | |
@echo ' ;;' >> /etc/init.d/web2py | |
@echo ' "getPID" )' >> /etc/init.d/web2py | |
@echo ' ps ax -opid,command | grep "$$path $$args" |\\' >> /etc/init.d/web2py | |
@echo ' grep -v "grep" | sed -r -e "s,^\s*,," |\\' >> /etc/init.d/web2py | |
@echo ' awk "{print \$$1}" > /dev/stdout' >> /etc/init.d/web2py | |
@echo ' ;;' >> /etc/init.d/web2py | |
@echo >> /etc/init.d/web2py | |
@echo 'esac' >> /etc/init.d/web2py | |
@echo >> /etc/init.d/web2py | |
@echo 'exit 0' >> /etc/init.d/web2py | |
chmod +x /etc/init.d/web2py | |
update-rc.d web2py start 90 2 3 4 5 . | |
service web2py start | |
make nginx-web2py | |
make zsh-web2py | |
zsh-web2py: | |
if [ -f ~/.zshrc -a "`grep w2p ~/.zshrc`" = "" ]; then \ | |
echo "alias 'web2py'='dtach -a /tmp/web2py'" >> ~/.zshrc; \ | |
echo "alias 'w2p'='/opt/web2py/web2py.py -M -S'" >> ~/.zshrc; \ | |
fi | |
nginx-web2py: web2py-hosts | |
if [ ! -d /etc/nginx -o ! -d /opt/web2py ]; then exit 0; fi | |
@echo 'server {' > /etc/nginx/conf.d/web2py.conf | |
@echo ' server_name web2py.local;' >> /etc/nginx/conf.d/web2py.conf | |
@echo ' location / {' >> /etc/nginx/conf.d/web2py.conf | |
@echo ' proxy_pass http://127.0.0.1:8001;' >> /etc/nginx/conf.d/web2py.conf | |
@echo ' proxy_set_header X-Real-IP $$remote_addr;' >> /etc/nginx/conf.d/web2py.conf | |
@echo ' }' >> /etc/nginx/conf.d/web2py.conf | |
@echo '}' >> /etc/nginx/conf.d/web2py.conf | |
service nginx reload | |
apr: build | |
wget ftp://ftp.unicamp.br/pub/apache/apr/apr-1.4.6.tar.bz2 -O- | tar -jxC /usr/local/src | |
cd /usr/local/src/apr-1.4.6; \ | |
./configure --enable-threads; \ | |
make; \ | |
make install | |
libssl: | |
$(call INSTALL_LIB,ssl) | |
apr-util: build libssl | |
if [ ! -f /usr/local/apr/bin/apr-1-config ]; then make apr; fi | |
wget ftp://ftp.unicamp.br/pub/apache/apr/apr-util-1.4.1.tar.bz2 -O- | tar -jxC /usr/local/src | |
cd /usr/local/src/apr-util-1.4.1; \ | |
./configure --with-apr=/usr/local/apr --with-crypto --with-openssl --with-pgsql --with-mysql --with-sqlite3 --with-expat='builtin' --with-iconv=/usr; \ | |
make; \ | |
make install | |
httpd: libpcre | |
if [ ! -f /usr/local/apr/lib/aprutil.exp ]; then make apr-util; fi | |
wget ftp://ftp.unicamp.br/pub/apache/httpd/httpd-2.4.3.tar.bz2 -O- | tar -jxC /usr/local/src | |
cd /usr/local/src/httpd-2.4.3; \ | |
./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --enable-load-all-modules --enable-authn-dbm --enable-authn-anon --enable-authn-dbd --enable-authn-socache --enable-authz-dbm --enable-authz-owner --enable-authz-dbd --enable-auth-form --enable-auth-digest --enable-allowmethods --enable-isapi --enable-file-cache --enable-cache --enable-cache-disk --enable-so --enable-buffer --enable-data --enable-ratelimit --disable-reqtimeout --enable-ext-filter --enable-request --enable-include --enable-substitute --enable-charset-lite --enable-deflate --enable-http --enable-mime-magic --enable-cern-meta --enable-expires --enable-ident --enable-usertrack --enable-unique-id --enable-proxy --enable-session --enable-session-cookie --enable-session-crypto --enable-ssl --enable-dav --disable-status --enable-asis --enable-info --enable-suexec --enable-dav-fs --enable-dav-lock --enable-vhost-alias --enable-negotiation --enable-speling --enable-userdir --enable-rewrite --with-pcre --with-port=8002 --with-sslport=993 --with-z --with-libxml2 --with-ssl --enable-mpms-shared='all' --with-mpm=prefork; \ | |
make; \ | |
make install | |
ln -sf /usr/local/apache2/bin/apachectl /etc/init.d/apachectl | |
update-rc.d apachectl start 91 2 3 4 5 . | |
mkdir -p /etc/apache | |
ln -sf /usr/local/apache2/conf/httpd.conf /etc/apache/httpd.conf | |
cd /etc/apache; \ | |
for file in /usr/local/apache/conf/extra/*.conf; do ln -sf $$file; done | |
sed -i -r -e 's!#(ServerName )www.example.com(:8002)!\1apache.local\2!;s!#(Include conf/extra/httpd-mpm.conf)!\1!;s!Daemon$$!www-data!' /usr/local/apache2/conf/httpd.conf | |
service apachectl start | |
make nginx-apache | |
nginx-httpd: httpd-hosts | |
if [ ! -d /etc/nginx -o ! -d /etc/apache ]; then exit 0; fi | |
@echo 'server {' > /etc/nginx/conf.d/apache.conf | |
@echo ' server_name apache.local;' >> /etc/nginx/conf.d/apache.conf | |
@echo ' location / {' >> /etc/nginx/conf.d/apache.conf | |
@echo ' proxy_pass http://127.0.0.1:8002;' >> /etc/nginx/conf.d/apache.conf | |
@echo ' }' >> /etc/nginx/conf.d/apache.conf | |
@echo '}' >> /etc/nginx/conf.d/apache.conf | |
service nginx reload | |
yasm: | |
$(INSTALL) yasm | |
texi2html: | |
$(INSTALL) texi2html | |
libfaac: | |
$(call INSTALL_LIB,faac) | |
libmp3lame: | |
$(call INSTALL_LIB,mp3lame) | |
libopencore: | |
$(call INSTALL_LIB,opencore-amrnb) | |
$(call INSTALL_LIB,opencore-amrwb) | |
libtheora: | |
$(call INSTALL_LIB,theora) | |
libvorbis: | |
$(call INSTALL_LIB,vorbis) | |
libvpx: | |
$(call INSTALL_LIB,vpx) | |
libx264: | |
$(call INSTALL_LIB,x264) | |
libxext: | |
$(call INSTALL_LIB,xext) | |
libxfixes: | |
$(call INSTALL_LIB,xfixes) | |
ffmpeg: yasm texi2html libfaac libmp3lame libopencore libtheora libvorbis libvpx libx264 libxext libxfixes | |
if [ ! -d /usr/local/src/ffmpeg ]; then \ | |
git clone --depth 1 git://source.ffmpeg.org/ffmpeg /usr/local/src/ffmpeg; \ | |
fi | |
cd /usr/local/src/ffmpeg; \ | |
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab; \ | |
make; \ | |
make install | |
cd /usr/local/src/ffmpeg; \ | |
make tools/qt-faststart; \ | |
make install tools/qt-faststart | |
zsh-ffmpeg: | |
if [ -f ~/.zshrc -a "`grep record ~/.zshrc`" = "" ]; then \ | |
echo "alias 'record'='ffmpeg -f x11grab -r 30 -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -i :0.0 -vcodec libx264 -preset ultrafast -crf 0 -threads 0 -y ~/screencast.mp4'" >> ~/.zshrc; \ | |
fi | |
v8: build | |
if [ ! -d /usr/local/src/v8 ]; then \ | |
git clone git://github.com/v8/v8.git /usr/local/src/v8; \ | |
fi | |
cd /usr/local/src/v8; \ | |
make dependencies; \ | |
make native; | |
ln -sf /usr/local/src/v8/out/native/shell /usr/local/bin/v8 | |
update-alternatives --install /usr/bin/js js /usr/local/bin/v8 1000 | |
rhino: | |
$(INSTALL) rhino | |
nodejs: | |
$(INSTALL) nodejs | |
phantomjs: | |
$(INSTALL) phantomjs | |
javascript: v8 rhino nodejs phantomjs | |
python-dev: | |
$(INSTALL) python-dev | |
easy_install: python-dev | |
$(INSTALL) python-setuptools | |
pip: easy_install | |
easy_install -U pip | |
virtualenv: easy_install | |
easy_install -U virtualenv | |
libcups: | |
$(call INSTALL_LIB,cups2) | |
pycups: libcups pip | |
pip install --upgrade pycups | |
pydistribute: | |
pip install --upgrade distribute | |
libmysql: | |
$(call INSTALL_LIB,mysqld) | |
pymysql: libmysql mysql-common pydistribute | |
easy_install -U mysql-python | |
ipython: | |
easy_install -U ipython | |
bpython: | |
easy_install -U bpython | |
libbz: | |
$(call INSTALL_LIB,bz2) | |
libcurl: | |
$(call INSTALL_LIB,curl4-openssl) | |
libmail: | |
$(call INSTALL_LIB,c-client2007e) | |
libedit: | |
$(call INSTALL_LIB,edit) | |
libenchant: | |
$(call INSTALL_LIB,enchant) | |
libevent: | |
$(call INSTALL_LIB,event) | |
libfreetype: | |
$(call INSTALL_LIB,freetype6) | |
libgmp: | |
$(call INSTALL_LIB,gmp) | |
libgpac: | |
$(call INSTALL_LIB,gpac) | |
libicu: | |
$(call INSTALL_LIB,icu) | |
libjack: | |
$(call INSTALL_LIB,jack-jackd2) | |
libjpeg: | |
$(call INSTALL_LIB,jpeg8) | |
libltdl: | |
$(call INSTALL_LIB,ltdl) | |
libmcrypt: | |
$(call INSTALL_LIB,mcrypt) | |
libmhash: | |
$(call INSTALL_LIB,mhash) | |
libpng: | |
$(call INSTALL_LIB,png12) | |
libspell: | |
$(call INSTALL_LIB,pspell) | |
libpq: | |
$(call INSTALL_LIB,pq) | |
libsdl: | |
$(call INSTALL_LIB,sdl1.2) | |
libsnmp: | |
$(call INSTALL_LIB,snmp) | |
libt1: | |
$(call INSTALL_LIB,t1) | |
libtidy: | |
$(call INSTALL_LIB,tidy) | |
libxpm: | |
$(call INSTALL_LIB,xpm) | |
libreadline: | |
$(call INSTALL_LIB,readline) | |
# apt-get install -y -m libmysqlclient-dev | |
php: libbz libxpm libxslt liblzma libcurl libreadline libspell libltdl libjack libmcrypt libmhash libpng libpq libsdl libsnmp libt1 libtidy libcurl libedit libenchant libmail libevent libfreetype libgmp libgpac libicu libjpeg libvpx git | |
ln -sf /usr/lib/x86_64-linux-gnu/libXpm.so /usr/lib/libXpm.so | |
ln -sf /usr/lib/x86_64-linux-gnu/libXpm.a /usr/lib/libXpm.a | |
if [ ! -d /usr/local/src/php ]; then git clone https://github.com/php/php-src.git /usr/local/src/php; fi | |
cd /usr/local/src/php;\ | |
git checkout -f PHP-5.4.6;\ | |
./buildconf --force | |
if [ -f /usr/local/apache2/bin/apxs ]; then make php-configure-httpd; else make php-configure; fi | |
make -C /usr/local/src/php | |
make -C /usr/local/src/php install | |
cp /usr/local/src/php/php.ini-development /usr/local/lib/php.ini | |
ln -sf /usr/local/lib/php.ini /etc/php.ini | |
pear config-set php_ini /etc/php.ini | |
pecl config-set php_ini /etc/php.ini | |
pear update-channels | |
pear upgrade | |
pecl update-channels | |
pecl upgrade | |
pear install --force --alldeps pear/Console_GetoptPlus | |
sed -i "s:;date.timezone =:date.timezone = `cat /etc/timezone`:" /usr/local/lib/php.ini | |
php-configure: | |
cd /usr/local/src/php;\ | |
./configure --enable-maintainer-zts --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-short-tags --with-libxml-dir --with-openssl --with-kerberos --with-pcre-regex --with-zlib --with-zlib-dir --enable-bcmath --with-bz2 --enable-calendar --with-curl --with-enchant --enable-exif --with-pcre-dir --enable-ftp --with-openssl-dir --with-gd --with-vpx-dir --with-jpeg-dir --with-png-dir --with-xpm-dir --with-freetype-dir --with-t1lib --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --with-imap --with-imap-ssl --enable-intl --with-icu-dir=/usr --enable-mbstring --with-mcrypt --with-mysql --with-mysql-sock --with-mysqli --enable-pcntl --with-pdo-mysql --with-pdo-pgsql --with-pgsql --with-pspell --with-libedit --with-readline --enable-shmop --with-snmp --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy --with-xmlrpc --with-iconv-dir=/usr --with-xsl --enable-zip --with-pear | |
php-configure-httpd: | |
cd /usr/local/src/php;\ | |
./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-maintainer-zts --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-short-tags --with-libxml-dir --with-openssl --with-kerberos --with-pcre-regex --with-zlib --with-zlib-dir --enable-bcmath --with-bz2 --enable-calendar --with-curl --with-enchant --enable-exif --with-pcre-dir --enable-ftp --with-openssl-dir --with-gd --with-vpx-dir --with-jpeg-dir --with-png-dir --with-xpm-dir --with-freetype-dir --with-t1lib --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --with-imap --with-imap-ssl --enable-intl --with-icu-dir=/usr --enable-mbstring --with-mcrypt --with-mysql --with-mysql-sock --with-mysqli --enable-pcntl --with-pdo-mysql --with-pdo-pgsql --with-pgsql --with-pspell --with-libedit --with-readline --enable-shmop --with-snmp --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy --with-xmlrpc --with-iconv-dir=/usr --with-xsl --enable-zip --with-pear | |
echo '<IfModule php5_module>' >> /usr/local/apache2/conf/httpd.conf | |
echo ' AddHandler php5-script .php' >> /usr/local/apache2/conf/httpd.conf | |
echo ' AddType application/x-httpd-php-source .phps' >> /usr/local/apache2/conf/httpd.conf | |
echo '</IfModule>' >> /usr/local/apache2/conf/httpd.conf | |
sed -i -e 's:Index index.htm:Index index.php index.htm:' /usr/local/apache2/conf/httpd.conf | |
service apachectl restart | |
phing: php | |
pear config-set auto_discover 1 | |
pear install --force --alldeps pear.phing.info/PHING | |
pear install --force --alldeps channel://pear.phpdoc.org/phpdocumentor | |
pear install --force --alldeps pear/PEAR_PackageFileManager2 | |
pear install --force --alldeps pear/XML_Parser2 | |
pear install --force --alldeps channel://bartlett.laurent-laville.org/PHP_CompatInfo | |
pear install --force --alldeps pear/Console_Color2 | |
pear install --force --alldeps pear/HTML_Common2 | |
sed -i '1d' /usr/local/lib/php.ini | |
xdebug: php | |
if [ ! -d /usr/local/src/xdebug ]; then \ | |
git clone git://github.com/derickr/xdebug /usr/local/src/xdebug;\ | |
fi | |
cd /usr/local/src/xdebug;\ | |
./rebuild.sh | |
@echo >> /usr/local/lib/php.ini | |
@echo [xdebug] >> /usr/local/lib/php.ini | |
@echo zend_extension=`php-config --extension-dir`/imagick.so >> /usr/local/lib/php.ini | |
libmagickcore: | |
$(call INSTALL_LIB,magickcore) | |
libmagickwand: libmagickcore | |
$(call INSTALL_LIB,magickwand) | |
php-imagick: libmagickwand | |
wget -c http://pecl.php.net/get/imagick-3.1.0RC2.tgz -O - | tar -zxC /usr/local/src/ | |
cd /usr/local/src/imagick-3.1.0RC2;\ | |
rm ../package.xml;\ | |
phpize;\ | |
./configure;\ | |
make;\ | |
make install | |
@echo >> /usr/local/lib/php.ini | |
@echo [imagick] >> /usr/local/lib/php.ini | |
@echo extension=`php-config --extension-dir`/imagick.so >> /usr/local/lib/php.ini | |
curl: | |
$(INSTALL) curl | |
openssh-server: | |
$(INSTALL) openssh-server | |
ftp-server: | |
$(INSTALL) proftpd | |
libgpg: | |
$(call INSTALL_LIB,gpgme11) | |
pygpgme: libgpg | |
pip install --upgrade pygpgme | |
dropbox: pygpgme | |
wget -c https://www.dropbox.com/download?dl=packages/ubuntu/dropbox_1.4.0_amd64.deb -Odropbox.deb | |
dpkg -i dropbox.deb | |
rm dropbox.deb | |
server: openssh-server ftp-server nodejs nginx web2py httpd | |
ci: | |
$(INSTALL) maven ant | |
make jenkins | |
make python-nose | |
make sloccount | |
make pylint | |
make pyflakes | |
make python-clonedigger | |
jenkins: | |
if [ "`grep jenkins /etc/apt/sources.list`" = "" ]; then \ | |
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -; \ | |
echo 'deb http://pkg.jenkins-ci.org/debian binary/' >> /etc/apt/sources.list; \ | |
fi | |
make update | |
$(INSTALL) jenkins | |
make jenkins-hosts | |
jenkins-hosts: hosts | |
$(call ADD_HOST,jenkins) | |
@echo 'server {' >> /etc/nginx/conf.d/jenkins.conf | |
@echo ' server_name jenkins.local;' >> /etc/nginx/conf.d/jenkins.conf | |
@echo ' location / {' >> /etc/nginx/conf.d/jenkins.conf | |
@echo ' proxy_pass http://127.0.0.1:8080;' >> /etc/nginx/conf.d/jenkins.conf | |
@echo ' }' >> /etc/nginx/conf.d/jenkins.conf | |
@echo '}' >> /etc/nginx/conf.d/jenkins.conf | |
@service nginx reload | |
sloccount: | |
$(INSTALL) sloccount | |
pylint: | |
pip install --upgrade pylint | |
pyflakes: | |
pip install --upgrade pyflakes | |
python-clonedigger: | |
pip install --upgrade clonedigger | |
python-nose: | |
pip install --upgrade nosexunit | |
dkms: | |
$(INSTALL) dkms | |
virtualbox: dkms | |
wget -c http://download.virtualbox.org/virtualbox/4.2.0/virtualbox-4.2_4.2.0-80737~Ubuntu~precise_amd64.deb -Ovirtualbox.deb | |
dpkg -i virtualbox.deb | |
apt-get install -f | |
rm virtualbox.deb | |
adduser $(USER) vboxusers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment