LAMP部署(php模块化)
来源:互联网 发布:mac怎么播放rar 编辑:程序博客网 时间:2024/06/06 01:27
一、部署计划
httpd服务在服务器A php是httpd中的一个模块,不是一个独立服务mysql服务在服务器B
二、安装相应软件包并开启服务
1.安装
服务器A: yum -y install httpd php php-mysql systemctl start httpd服务器B: centos7:yum -y install mariadb-server centos6:yum -y install mysql-server
2.开启服务
服务器A: centos6:service httpd start centos7:systemctl start httpd服务器B: centos6:service mysqld start centos7: systemctl start mariadb
3.数据库安全脚本
服务器B: mysql_secure_installation
4.修改httpd配置文件
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bakvim /etc/httpd/conf/httpd.conf DirectoryIndex index.html index.php index.html.varservice httpd restart或systemctl restart httpd
三、安装PHP应用——phpMyadmin
1.源码
phpMyAdmin-4.0.10.20-all-languages.zip 链接:http://pan.baidu.com/s/1hrQa3PE 密码:xal6
2.解压安装到httpd站点目录下
cd /var/www/html/unzip phpMyAdmin-4.0.10.20-all-languages.zip
3.不用make,直接就是php程序
注意
#先安装组件 yum install php-mbstring
4.修改配置文件使其可以管理非本机的mysql数据库
服务器A cd /var/www/html/phpMyAdmin cp config.sample.inc.php config.inc.php vim config.inc.php $cfg['Servers'][$i]['host'] = '172.17.16.173'; 此处172.17.16.173代表mysql数据库服务器的IP地址 service restart httpd
但是还必须在要创建一个可以远程连接数据库的账户
服务器B: grant all privileges on *.* to root@'%' identified by "密码";
四、安装PHP应用——wordpress
1.创建属于wordpress的数据库和数据库管理用户
在phpMyadmin页面中创建或使用mysql命令创建 create database wordpress GRANT all privileges on wordpress.* TO 'wordpress_user'@'%'IDENTIFIED BY 'passwd‘;
2.源码
wordpress-4.8.1-zh_CN.tar.gz
密码:iwxl
3.解压到httpd站点目录下
tar xf wordpress-4.8.1-zh_CN.tar.gz
4.修改配置文件
cd wordpress/cp wp-config-sample.php wp-config.php vim wp-config.php
#修改下列几行/** WordPress数据库的名称 */define('DB_NAME', 'wordpress');/** MySQL数据库用户名 */define('DB_USER', 'wordpress_user');/** MySQL数据库密码 */define('DB_PASSWORD', 'password');/** MySQL主机 */define('DB_HOST', '172.17.16.173');
阅读全文
0 0
- LAMP部署(php模块化)
- PHP开发环境部署(LAMP WAMP)
- LAMP部署(php-fpm模式)
- 在Redhat安装部署Apache+MySQL+PHP(LAMP)
- Linux、Apache、Mysql、PHP(LAMP) -- 部署文档
- Linux下部署LAMP环境(Linux+Apache+MySQL+PHP)
- LAMP(Linux+Apache+Mysql+PHP)部署日志
- 部署 LAMP (CentOS 7.2)
- DedeCMS部署--怎样去部署Apache+Mysql+PHP(LAMP)?
- LAMP 部署
- LAMP 部署
- 部署 LAMP
- debian下LAMP部署
- [Linux] RHEL部署LAMP
- ubuntu lamp的部署
- lamp网站部署
- LAMP环境部署
- linux服务器部署lamp
- fragment
- 这些术语关乎你的程序执行效率
- RidaoGroup点击事件
- unity制作聊天室界面
- angularjs中对表格数据进行增删改查操作详细
- LAMP部署(php模块化)
- ios-自定义大头针的样式
- JVM规范(四)Frames
- java instanceof 运算符
- Springboot 笔记
- Windows系统下MySQL主从复制搭建
- 习题7-2 黄金图形(Golygons, ACM/ICPC World Finals 1993, UVa225)
- 1、Zookeeper原理、结构——Kuring 经典
- 51nod 1278 相离的圆 【贪心】