===============================网络配置===============================
1 eth0 接口配置:/etc/sysconfig/network-scipts/ifcfg-eth0DEVICE=eth0HWADDR=C8:60:00:69:CE:04TYPE=EthernetUUID=ff105f76-baaa-4a8d-95c2-efe85fd9ab23#接口随网络启动而自启动ONBOOT=yesNM_CONTROLLED=yes#静态ipBOOTPROTO=staticIPADDR=192.168.20.51NETMASK=255.255.255.0GATEWAY=192.168.20.254#若无法解析域名,请配置DNS值DNS1=202.96.128.86DNS2=202.96.128.166#PEERDNS=yes2 DNS服务器配置: /etc/resolv.confnameserver 202.96.128.86nameserver 202.96.128.166
================================vbox安装====================================
1 vim /etc/yum.repo.d/virtualbox.repo 添加如下行:[virtualbox]name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBoxbaseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearchenabled=1gpgcheck=1repo_gpgcheck=1gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc2 yum install VirtualBox-5.03 yum install -y gcc kernel kernel-devel kernel-headers // 查找kernel安装位置4 重启电脑 // 或:KERN_DIR=/usr/src/kernels/2.6.32-573.22.1.el6.x86_64 /etc/init.d/vbox // KERN_DIR填实际安装的位置
==================安装增强工具===================
1 sudo yum install kernel-devel gcc gcc-c++ make2 sudo yum groupinstall “Deveplement Tools”3 reboot4 cd /media/VBOXADDITIONS_4.3.6_914065 export MAKE='/usr/bin/gmake -i'6 ./VBoxLinuxAdditions.run====================更新yum包源======================1 wget http://mirrors.163.com/.help/CentOS6-Base-163.repo2 cd /etc/yum.repos.d/3 mv CentOS-Base.repo CentOS-Base.repo.bak4 mv CentOS6-Base-163.repo CentOS-Base.repo5 yum clean all6 yum makecache7 yum update// 方式2: rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
==============php源码安装============
#yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
yum install libxml2-devel.x86_64 yum install openssl.x86_64 openssl-devel.x86_64 -y yum install libcurl.x86_64 libcurl-devel.x86_64 -y yum install libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 -y yum install libjpeg.x86_64 libpng freetype libjpeg-devel libpng-devel freetype-devel -y yum install libmcrypt libmcrypt-devel -y./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir=/usr/local/freetype --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --disable-fileinfo --enable-opcache --with-iconv=/usr/local缺libconv库时,可源码安装该库到/usr/local(--with-iconv指定的位置,库地址:http://www.gnu.org/software/libiconv/) make && make install // make 遇到错误可将/usr/local/lib 加入动态加载的配置文件/etc/ld.so.conf.d/xxx.conf cp php.ini-production /app/soft/php/lib/php.ini 参考:http://www.cnblogs.com/z-ping/archive/2012/06/18/2553929.html php-fpm配置:http://www.cnblogs.com/argb/p/3604340.html ================composer安装====================curl -sS https://getcomposer.org/installer | phpmv composer.phar /usr/local/bin/composercomposer config -g secure-http false