Mac(Intel)在虚拟机VMware上安装Linux CentOS7
下载软件包并安装
1.vmware fusion for Mac下载并安装
2.Linux CentOS安装包下载,本文下载版本是CentOS-7-x86_64-DVD-2009.iso,安装过程截图:
然后默认安装就可以了。
Linux本地部署检查
登录安装好的Linux系统,确保以下:
1.确保当前VMware虚拟机联通外网;
ping www.baidu.com
查看Linux IP地址
ifconfig
本机电脑 与虚拟机是否连通
ping Linux IP地址
2.jianchaCentOS的版本是否符合要求
cat /etc/redhat-release
安装应用服务
通过LAMP,一键安装部署系统服务
命令生成地址:https://lnmp.org/auto.html
wget http://soft.vpser.net/lnmp/lnmp1.9.tar.gz -cO lnmp1.9.tar.gz && tar zxf lnmp1.9.tar.gz && cd lnmp1.9 && LNMP_Auto="y" DBSelect="4" Bin="n" DB_Root_Password="123456" InstallInnodb="y" PHPSelect="5" SelectMalloc="1" ApacheSelect="2" ServerAdmin="liuhongxinbjut@163.com" ./install.sh lamp
备注: 该命令必须是root用户,从普通用户切换到root: su root
安装结果验证
#查看PHP的版本
php -v
#查看Apache的服务是否正常
systemctl status httpd
# 查看mysql的服务是否正常
systemctl status mysql
# 补充命令 常见服务名【httpd mysql nginx tomcat】
# 启动服务
systemctl start 服务名
# 重启服务
systemctl restart 服务名
# 停用服务
systemctl stop 服务名
# 禁用服务(慎用)
systemctl disable 服务名