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
#!/bin/bash | |
# | |
# Provision for Vagrant box ArchLinux | |
# | |
# Insert to Vagrantfile: | |
# config.vm.provision "shell", path: "https://gist.github.com/smaknsk/8165875/raw" | |
# | |
# | |
# Run nginx, httpd, php-fpm as user: |
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
#!/bin/bash | |
# | |
# ArchLinux Apache Configure | |
# | |
# | |
# Development server packages | |
# | |
pacman -S --noconfirm --needed apache php-apache |
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
function aurinstall() { | |
local PKGNAME | |
echo "install = $@" | |
return | |
for PKGNAME in $@; do | |
echo "Installing ${PKGNAME}..." | |
local PKGDEST=/tmp/makepkg_${PKGNAME} | |
/usr/bin/mkdir ${PKGDEST} | |
cd ${PKGDEST} | |
/usr/bin/curl -s https://aur.archlinux.org/packages/${PKGNAME:0:2}/${PKGNAME}/${PKGNAME}.tar.gz | /usr/bin/tar -zx |
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
Cubox 1st gen | |
http://web.archive.org/web/20120405154814/http://www.solid-run.com/products/cubox | |
1. dhcpcd v7 broken, copy dhclient on microsd | |
https://archlinuxarm.org/packages/armv7h/dhclient | |
2. Install dhclient and configure | |
pacman -U dhclient-4.4.1-4-armv7h.pkg.tar.xz | |
cp /etc/netctl/examples/ethernet-dhcp /etc/netctl/eth0 | |
replace dhcpcd to dhclient in /etc/netctl/eth0 |
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
# Git branch in prompt. | |
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "("${ref#refs/heads/}")" | |
} | |
PS1="\[\033[00;32m\]\u@\h\[\033[00m\]:\[\033[00;33m\]\w\[\033[00;31m\]\$(parse_git_branch)\[\033[00m\]\$ " | |
EDITOR="mcedit" |
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
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql | |
systemctl start mysqld | |
mysqladmin password 'root' | |
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION" | |
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'root' WITH GRANT OPTION" | |
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY 'root' WITH GRANT OPTION" | |
mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'::1' IDENTIFIED BY 'root' WITH GRANT OPTION" |