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
server { | |
listen 80; | |
server_name supyer.com.42qu.com *.supyer.com.42qu.com; | |
client_max_body_size 512M; | |
location / { | |
expires -1; | |
set $realhost supyer.com; | |
if ($host ~ "(.*.supyer.com).42qu.com") { | |
set $realhost $1; | |
} |
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
# /etc/conf.d/hostname | |
echo "HOSTNAME=\"mars\"" > /etc/conf.d/hostname | |
/etc/init.d/hostname restart | |
# /etc/resolv.conf | |
domain members.linode.com | |
search members.linode.com | |
nameserver 106.187.34.20 | |
nameserver 106.187.35.20 | |
nameserver 106.187.36.20 |
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
# /etc/make.conf @linode-512M-x86_64-gentoo | |
CFLAGS="-march=core2 -mtune=generic -O2 -pipe" | |
# CFLAGS="-march=corei7 -O2 -pipe" | |
CXXFLAGS="${CFLAGS}" | |
CHOST="x86_64-pc-linux-gnu" | |
USE="-X -accessibility -gpm -cups -alsa -apache2 -branding -apm | |
-encode -cairo -fontconfig -truetype -dbus -doc -emacs -examples | |
-gnome -gtk -kde -opengl -oss -qt4 bash-completion berkdb cgi |
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
emerge --sync | |
emerge -av portage | |
emerge -av python | |
eselect python set python27 | |
/usr/sbin/python-updater | |
emerge -avuDN world | |
emerge -av --depclean | |
revdep-rebuild | |
dispatch-conf | |
etc-update |
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
emerge -av mysql | |
eix-installed all | grep mysql | |
> dev-db/mysql-5.1.62-r1 | |
emerge --config =dev-db/mysql-5.1.62-r1 | |
# 加入开机启动项 | |
rc-update add mysql default | |
/etc/init.d/mysql restart | |
rc-status |
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
sudo vi /etc/portage/packge.use | |
# dev-lang/php fpm xml curl mysql ctype gd hash mysqlnd sqlite3 truetype tidy xmlreader xmlrpc xmlwriter | |
emerge -av php | |
rc-update add php-fpm default | |
/etc/init.d/php-fpm restart | |
rc-status |
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
emerge -av nginx | |
rc-update add nginx default | |
/etc/init.d/nginx restart | |
rc-status |
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
server { | |
listen 80; | |
server_name www.laozhu.me laozhu.me; | |
client_max_body_size 512M; | |
if ($http_host !~ 'www.laozhu.me') { | |
rewrite ^/(.*)$ http://www.laozhu.me/$1 permanent; | |
} | |
location / { |
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
mkdir www/phpmyadmin | |
cd www/phpmyadmin | |
wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.5.2/phpMyAdmin-3.5.2-all-languages.tar.bz2 | |
tar jxvf phpMyAdmin-3.5.2-all-languages.tar.bz2 |
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
server { | |
listen 80; | |
server_name sql.laozhu.me; | |
location / { | |
root /home/laozhu/www/phpmyadmin; | |
index index.php; | |
try_files $uri $uri/ /index.php; | |
} |
OlderNewer