虚拟机内存1G,硬盘50G,台式机可设置更大
选择自己分配磁盘
全部放/下
如果忘了设置swap:
![](file:///C:Users10000817AppDataLocalTemp\%W@GJ$ACOF(TYDYECOKVDYB.png)
root密码不要忘了设置:123456
virtualbox下添加host-only网络
访问ip:
![](file:///C:Users10000817AppDataLocalTemp\%W@GJ$ACOF(TYDYECOKVDYB.png)
/etc/sysconfig/network-scripts/ 下修改onboot=yes (需要吗?)
yum install git
yum install httpd
service httpd start(怎么加开机启动?)
curl http://localhost
设置开机自动运行
chkconfig httpd on
参考:
![](file:///C:Users10000817AppDataLocalTemp\%W@GJ$ACOF(TYDYECOKVDYB.png)
安装php7
rpm -Uvh
![](file:///C:Users10000817AppDataLocalTemp\%W@GJ$ACOF(TYDYECOKVDYB.png)
rpm -Uvh
![](file:///C:Users10000817AppDataLocalTemp\%W@GJ$ACOF(TYDYECOKVDYB.png)
yum install php70w
yum install php
service httpd restart
安装mysql5.7
rpm -ivh
![](file:///C:Users10000817AppDataLocalTemp\%W@GJ$ACOF(TYDYECOKVDYB.png)
yum install mysql-community-server
找不到初始密码:
![](file:///C:Users10000817AppDataLocalTemp\%W@GJ$ACOF(TYDYECOKVDYB.png)
yum install php70w-mysql
chkconfig mysqld on
yum install samba samba-client samba-common (台式机不需要samba)
![](file:///C:Users10000817AppDataLocalTemp\%W@GJ$ACOF(TYDYECOKVDYB.png)
service smb start
chkconfig smb on
别忘了关防火墙:
setenforce 0
如果要永久关闭,可以修改配置文件/etc/selinux/config,将SELINU置为disabled。
安装mongodb 3.2:
![](file:///C:Users10000817AppDataLocalTemp\%W@GJ$ACOF(TYDYECOKVDYB.png)
chkconfig mongod on
add --nogpgcheck if hints not signed
yum install php-pear
yum install php-devel
yum -y install gcc
yum install openssl openssl-devel
pecl channel-update
![](file:///C:Users10000817AppDataLocalTemp[5UQ[BL(6~BS2JV6W}N6[%S.png)
pecl install mongo
pecl install mongodb
到底是哪个?
vi /etc/php.ini
add:
extension=
![](file:///C:Users10000817AppDataLocalTemp\%W@GJ$ACOF(TYDYECOKVDYB.png)
extension=
![](file:///C:Users10000817AppDataLocalTemp\%W@GJ$ACOF(TYDYECOKVDYB.png)
service httpd restart
php display_error = On
[swoole??]
pecl install swoole