Skip to content

Instantly share code, notes, and snippets.

@othree
Last active March 9, 2016 10:13
Show Gist options
  • Select an option

  • Save othree/d8662a9a2120d5c3c0ec to your computer and use it in GitHub Desktop.

Select an option

Save othree/d8662a9a2120d5c3c0ec to your computer and use it in GitHub Desktop.
sudo pacman -Syu
sudo pacman -S mercurial ncurses mariadb mariadb-clients fcgiwrap zsh git tig autoconf libtool pcre openssl neovim
# perl
sudo pacman -S clang base-devel
# clang
# https://wiki.archlinux.org/index.php/Clang
perlbrew install 5.14.4 --notest
sudo pacman -S php-fpm php-xsl
sudo ./configure \
--user=http \
--group=http \
--with-cc=/usr/bin/clang \
--with-cpp=/usr/bin/clang++ \
--with-ld-opt="-R/usr/local/lib" \
--with-http_gzip_static_module \
--with-http_ssl_module \
--with-http_v2_module \
--add-module=/home/othree/apps/njs/nginx \
--add-module=/home/othree/apps/ngx_brotli
sudo apt-get install curl
# vim dependency
sudo apt-get install mecurial ncurses-dev
# blog
sudo apt-get install mysql-server-5.5 libmysqlclient-dev fcgiwrap
# https://uehatsu.info/tech/archives/2015/11/run-movable-type-dataapi-on-debian-wheezy-with-nginx-and-fcgiwrap.html
export PERLBREW_ROOT=/opt/perl5
curl -L http://xrl.us/perlbrewinstall | bash
source /opt/perl5/etc/bashrc
perlbrew install 5.14.4
perlbrew use 5.14.4
perlbrew install-cpanm
cpanm Archive::Zip
# MySQL
mysql -u root -p blog < blog .sql
# utf-8 http://stackoverflow.com/a/3513812/443051
# https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql
# php
# sudo vim /etc/apt/sources.list
# https://www.dotdeb.org/mirrors/
wget https://www.dotdeb.org/dotdeb.gpg
sudo apt-key add dotdeb.gpg
sudo apt-get update
sudo apt-get install php7.0 php7.0-fpm php7.0-xsl
location / {
root /var/www/home;
index index.html;
location ~ ^/mt/mt.*\.cgi {
gzip off;
fastcgi_index index.cgi;
fastcgi_split_path_info ^(.+?\.cgi)(/.*)$;
if (!-e $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi.conf;
## MT-related
fastcgi_param PERL5LIB $document_root/mt/lib;
fastcgi_param MT_HOME $document_root/mt/;
fastcgi_param MT_CONFIG $document_root/mt/mt-config.cgi;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $fastcgi_path_info;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi.conf;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
}
# dependency
sudo apt-get install zsh git clang autoconf libtool libpcre3-dev libssl-dev
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100
# libbrotli
# nginx
./configure \
--user=www-data \
--group=www-data \
--with-http_ssl_module \
--with-pcre \
--with-ipv6 \
--with-http_v2_module \
--add-module=/home/othree/apps/ngx_brotli
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment