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
# 请注意修改部分参数,如安装mysql-server时,设置 MySQL root 密码,以便自动安装 | |
# 更换为aliyun的源镜像 | |
#mkdir ~/installations | |
#mkdir backups | |
#cd ~/installations | |
#https://gist.githubusercontent.com/fasthold/6d0ac7528a7c528eb886/raw/4cbd8f4709c3c4ec1d2fbbb3e4f3dd65e9694aab/ubuntu-12.04-server-aliyun-mirror.sources.list | |
#sudo mv /etc/apt/sources.list ~/installations/backups/sources.list | |
#sudo cp ~/installations/ubuntu-12.04-server-aliyun-mirror.sources.list /etc/apt/sources.list |
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
<?php | |
if ( $res = popen("ls 2>&1","r")){ | |
while ( !feof($res) ) $result .= fgets( $res, 1024 ); | |
pclose($res); | |
echo $result; | |
} |
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
deb http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse |
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
[PHP] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |
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
ServerName localhost | |
<VirtualHost *:80> ServerAdmin webmaster@localhost | |
DocumentRoot /var/www | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
</Directory> | |
<Directory /var/www/> | |
Options FollowSymLinks MultiViews Includes -Indexes |
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
# System related | |
sudo apt-get update | |
sudo apt-get -y install build-essential ssh curl software-properties-common python-software-properties python g++ make | |
# VCS | |
sudo apt-get -y install subversion git | |
# Web Server | |
sudo apt-get -y install apache2 | |
# php |
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
<?php | |
// 现在输出是没问题了,但是实际保存为文件还有问题 | |
// from: http://stackoverflow.com/questions/13958303/curl-download-progress-in-php | |
// 原文中的代码有bug,作了修改 | |
$url = 'http://ipv4.speedtest-sgp1.digitalocean.com/10mb.test'; | |
echo "<pre>"; | |
echo "Loading ..."; | |
ob_flush(); | |
flush(); |
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
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse |
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
127.0.0.1 govchengdu.cn | |
127.0.0.1 vipwm.cc | |
127.0.0.1 govxian.cn |
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
FROM ubuntu:20.04 | |
WORKDIR /var/www/html | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN sed -i "s@http://.*archive.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list | |
RUN sed -i "s@http://.*security.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get install -y build-essential apt-utils curl software-properties-common g++ make git |