mount ntfs-3g
fdisk -l
mkdir /home/sdb1 mount -t ntfs-3g /dev/sdb1 /home/sdb1
vi /etc/fstab /dev/sdb1 /home/sdb1 ntfs-3g defaults 0 0
fdisk -l
mkdir /home/sdb1 mount -t ntfs-3g /dev/sdb1 /home/sdb1
vi /etc/fstab /dev/sdb1 /home/sdb1 ntfs-3g defaults 0 0
http://php.net/manual/en/timezones.php
date.timezone = Pacific/Auckland
command
cd / du --max-depth=1 -h
/var/log
Configure eth0
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0" NM_CONTROLLED="yes" ONBOOT=yes HWADDR=A4:BA:DB:37:F1:04 TYPE=Ethernet BOOTPROTO=static NAME="System eth0" UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 IPADDR=192.168.1.44 NETMASK=255.255.255.0
## Configure Default Gateway
#
vi /etc/sysconfig/network
NETWORKING=yes HOSTNAME=centos6 GATEWAY=192.168.1.1
## Restart Network Interface
#
/etc/init.d/network restart
## Configure DNS Server
#
vi /etc/resolv.conf
nameserver 8.8.8.8 # Replace with your nameserver ip nameserver 192.168.1.1 # Replace with your nameserver ip
Linux VPS添加SWAP(交换分区)
1.进入目录
cd /var/
2.获取要增加的SWAP文件块(这里以1GB为例)
dd if=/dev/zero of=swapfile bs=1024 count=1038336
2G
dd if=/dev/zero of=swapfile bs=2048 count=2097152
3.创建SWAP文件
/sbin/mkswap swapfile
4.激活SWAP文件
/sbin/swapon swapfile
5.查看SWAP信息是否正确
/sbin/swapon –s
6.添加到fstab文件中让系统引导时自动启动
echo "/var/swapfile swap swap defaults 0 0" >>/etc/fstab
上面这步也可以修改/etc/fstab,末尾加入/var/swapfile swap swap defaults 0 0
7.查看是否挂载成功
free -m
一次性安装代码
cd /var/ dd if=/dev/zero of=swapfile bs=1024 count=1038336 /sbin/mkswap swapfile /sbin/swapon swapfile echo "/var/swapfile swap swap defaults 0 0" >>/etc/fstab
安装命令如下:
curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1
当brew安装成功后,就可以随意安装自己想要的软件了,例如wget,命令如下:
sudo brew install wget
卸载的话,命令如下:
sudo brew uninstall wget
查看安装软件的话,命令如下:
sudo brew search /apache*/
注意/apache*/是使用的正则表达式,用/分割。
Introduction
Rsync, which stands for “remote sync”, is a remote and local file synchronization tool. It uses an algorithm that minimizes the amount of data copied by only moving the portions of files that have changed.
In this guide, we will cover the basic usage of this powerful utility. We will be using an Ubuntu 12.04 VPS in the examples, but you can use any modern Linux distribution to follow along.
(more…)
1.FastCGI take long time, you need add this configs to nginx.conf
fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300;
2 FastCGI Buffer not enough, add to nginx.conf
fastcgi_buffer_size 32k; fastcgi_buffers 8 32k;
3. Proxy Buffer not enough, add to nginx.conf
proxy_buffer_size 16k; proxy_buffers 4 16k;
4. php-fpm log size more then 2G
You can quickly install vsftpd on your virtual private server in the command line: sudo yum install vsftpd We also need to install the FTP client, so that we can connect to an FTP server: sudo yum install ftp Once the files finish downloading, vsftpd will be on your VPS. Generally speaking, the virtual private …
/etc/php.d/apc.ini
For the people having this problem, please specify you .ini settings. Specifically your apc.mmap_file_mask setting.
For file-backed mmap, it should be set to something like:
apc.mmap_file_mask=/tmp/apc.XXXXXX
To mmap directly from /dev/zero, use:
apc.mmap_file_mask=/dev/zero
For POSIX-compliant shared-memory-backed mmap, use:
apc.mmap_file_mask=/apc.shm.XXXXXX