1.mini版安装成功后不能进入,一直卡在进度条
开机时更改为单人模式,更改/etc/initttab设置,默认为5,改为3
进入后首先yum update
2.yum安装gcc,perl,安装vmware tools
光驱加载VM目录下的windows.iso文件,然后
mount -t iso9660 /dev/cdrom /mnt cp /VMwareTools-9.6..1-1378637.tar.gz /tmp cd /tmp tar zxf /VMwareTools-9.6..1-1378637.tar.gz cd /tmp/cdrom/vmware-tools-distrib ./vmware-install.pl
选项全改为yes,一路ENTER,默认安装即可
3.更改时区,安装ntp
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime yum install ntp chkconfig ntp on service ntp start
4.源码包安装PHP5.6
先从php.net找到下载地址
wget -O php.tar.gz http://cn2.php.net/get/php-5.6.13.tar.gz/from/this/mirror
解压,安装依赖包
tar -xzvf php.tar.gz cd php-* //安装依赖包 yum groupinstall "Development Tools" //libxml2 PHP的xml函数 yum install libxml2-devel //openssl https使用 yum install openssl-devel //Curl函数 yum install libcurl-devel //GD库函数 图像处理 yum install gd-devel //mcrypt加密解密函数 //需要更新rpm源,64位更换uri中的i386为x86_64 wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm rpm -Uvh epel-release-6*.rpm yum install libmcrypt-devel
./config 进行配置
./configure --prefix=/usr/local/php5.6.3 --enable-opcache --enable-fpm --with-gd --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr --with-pdo-mysql=mysqlnd --enable-mbstring --enable-sockets --with-curl --with-mcrypt --with-openssl ;
./configure --prefix=/usr/local/php5.6 --with-apxs2=/usr/local/apache2/bin/apxs --enable-opcache --enable-fpm --with-gd --with-zlib --with-jpeg-dir=/usr --with-png-dir=/usr --with-pdo-mysql=mysqlnd --enable-mbstring --enable-sockets --with-curl --with-mcrypt --with-openssl --with-freetype-dir
一切顺利的话,执行make,休息一会
make && make install
php.ini配置,直接下载,开发环境的或者生产环境的php.ini-production
curl -o php.ini https://raw.githubusercontent.com/php/php-src/master/php.ini-development
添加PHP到环境变量
//格式为 PATH=$PATH:/usr/local/php5.6/bin/php vi /etc/profile
//在最后添加 PATH=$PATH /usr/local/php5.6/bin
//测试 php -v
5.先卸载默认安装的MYSQL
rpm -qa | grep mysql rpm -e mysql rpm -e --nodeps mysql
先更新源,yum安装
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm yum -y --enablerepo=epel,remi,remi-mysql install mysql-server
参考:http://my.oschina.net/hevakelcj/blog/316759#OSC_h2_5
6.虚拟机添加共享目录
一定要在虚拟机关机的情况下选择设置--选项--共享文件夹,然后开启虚拟机
7.虚拟机未加载共享文件夹的解决办法
//检查是否挂载共享目录 cd /mnt ll //检查服务,重启和重新配置 /etc/vmware-tools/services.sh restart /usr/bin/vmware-config-tools.pl /etc/vmware-tools/services.sh status