配置centos环境
Posted sarah_zsw
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了配置centos环境相关的知识,希望对你有一定的参考价值。
1、下载mariadb(mysql)
yum install mariadb mariadb-server
2、启动mariadb
systemctl start mariadb
3、开机自启动(可忽略)
systemctl enable mariadb
4、设置 root密码等相关
mysql_secure_installation
5、测试登录
mysql -uroot -p123456
mysql -uroot -p
6、修改yum源 https://webtatic.com
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
7、安装nginx
yum install nginx
8、安装php
yum install php70w-devel php70w.x86_64 php70w-pecl-redis php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-pdo.x86_64 php70w-mysqlnd php70w-fpm php70w-opcache
9、配置Nginx文件
vim /etc/nginx/nginx.conf
vim /etc/nginx/conf.d/8080.conf
//查看防火墙状态
systemctl status firewalld.service
//关闭防火墙
systemctl stop firewalld.service
重启nginx
systemctl start nginx
关闭SELinux
//查看本机IP
ifconfig
http://www.centoscn.com/CentosServer/sql/Mariadb/2015/0520/5483.html
http://www.cnblogs.com/phpshen/p/6222935.html
以上是关于配置centos环境的主要内容,如果未能解决你的问题,请参考以下文章