前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Centos7安装LAMP+PHPmyadmin

Centos7安装LAMP+PHPmyadmin

作者头像
苦咖啡
发布2018-04-28 13:41:30
9110
发布2018-04-28 13:41:30
举报
文章被收录于专栏:我的博客我的博客

1、更新Centos7下载源 更新之前记得备份!!! wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 参考:http://mirrors.aliyun.com/help/centos 163的源参考:http://mirrors.163.com/.help/centos.html 2、更新本地缓存 yum clean all yum makecache 3、安装网络工具 yum install net-tools 如果你要用ifconfig等命令的话 4、关闭firewall systemctl stop firewalld.service systemctl disable firewalld.service 5、关闭selinux vi /etc/selinux/config 注释#SELINUX=enforcing 注释#SELINUXTYPE=targeted 添加SELINUX=disabled 保存退出:wq setenforce 0#关闭selinux 6、安装apache yum install httpd 7、安装Mariadb yum install mariadb mariadb-server 拷贝配置文件覆盖原配置文件 cp /usr/share/mysql/my-huge.cnf /etc/my.cnf 8、安装PHP yum install php php-mysql php-gd php-odbc php-pear php-mbstring php-mcrypt 9、下载PHPmyadmin wget https://files.phpmyadmin.net/phpMyAdmin/4.0.0/phpMyAdmin-4.0.0-all-languages.zip 解压到/var/www/html/phpmyadmin

10、配置站点 vi /etc/httpd/conf/httpd.conf 文件最后加入

代码语言:javascript
复制
Include vhost/*.conf
mkdir /etc/httpd/vhost
touch test.conf

DocumentRoot /var/www/html/test
ServerName test

Options FollowSymLinks
AllowOverride All


touch phpmyadmin.conf

DocumentRoot /var/www/html/phpmyadmin
ServerName phpmyadmin

Options FollowSymLinks
AllowOverride All

重启apache和mariadb 11、安装epel源 wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm 如果版本不一样就去这里找http://dl.fedoraproject.org/pub/epel/ rpm -ivh rpm epel-release-7-8.noarch.rpm yum clean all yum update 以下步骤都是在安装了epel源下进行的 12、安装mcrypt扩展 yum install php-mcrypt 13、安装redis、memcache以及扩展 yum install redis vi /etc/redis.conf daemonize yes#守护进程运行 redis-server /etc/redis.conf yum install php-redis yum install memcached yum install php-memcached

附录: 启动|停止|重启apache systemctl start|stop|restart httpd.service 开机启动apache systemctl enable httpd.service 启动|停止|重启mariadb systemctl start|stop|restart mariadb.service 开启启动mariadb systemctl enable mariadb.service

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2016年8月24日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档