Centos7下搭建服务器(apache+mysql+php)
安装apache、mysql、php和其他连接的插件
yum -y install httpd mysql php mysql-server php-mysql
由于centos7下没有mysql安装程序所以在官网中下载
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm rpm -ivh mysql-community-release-el7-5.noarch.rpm
初始化mysql
mysqld --initialize
启动mysql,设置mysql用户
service mysqld start mysqladmin -uroot password123456
清空防火墙策略
iptables -F
之后就可以访问搭建的网站了
相关推荐
CoderToy 2020-11-16
emmm00 2020-11-17
王艺强 2020-11-17
ribavnu 2020-11-16
bianruifeng 2020-11-16
wangshuangbao 2020-11-13
苏康申 2020-11-13
vivenwan 2020-11-13
moyekongling 2020-11-13
云中舞步 2020-11-12
要啥自行车一把梭 2020-11-12
aydh 2020-11-12
kuwoyinlehe 2020-11-12
minerk 2020-11-12
vitasfly 2020-11-12
jazywoo在路上 2020-11-11
敏敏张 2020-11-11
世樹 2020-11-11