LAMP 环境搭建 C7

#LAMP环境搭建Centos 7
        
(1)安装开发包组 “Development Tools” “Server Platform Development”
    yum groupinstall
            注:关闭selinux iptables
(2)安装amp
    (a)yum install httpd php  php-mysql mariadb mod_ssl
    
    (b)https://xcache.lighttpd.net/ 下载 xcache    
        tar xvf xcache-3.2.0.tar.gz
        运行/usr/bin/phpize
        ./configure --enable-xcache --with-php-config=/usr/bin/php-config
    (c)解压 wordpress ,phpMyAdmin
(3)对文件进行配置
    (a)模块选择        
            配置文件位置:/etc/httpd/conf.modules.d/00-mpm
            LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
            LoadModule mpm_event_module modules/mod_mpm_event.so             
            LoadModule mpm_worker_module modules/mod_mpm_worker.so
                注:当选择event worker 模块时 要按照phplib5-zts.so
    (b)httpd配置 备份:httpd.conf 及虚拟主机conf
              对需要使用HTTPS的域名进行配置
                1)生成私钥,并申请证书
                2)配置vhost /etc/httpd/conf.d/ssl.cof
                        <VirtualHost 172.16.174.177:443>                                                
                        DocumentRoot "/data/vhost/amp2"
                        ServerName amp2.magedu.com

SSLCertificateFile /etc/pki/tls/certs/httpd.crt
                        SSLCertificateKeyFile /etc/pki/tls/private/httpd.key                
                注意:amp2.conf 不要单独新建文件 直接加在ssl.conf中
            Listion 172.16.174.177:80                                
            User apache
            Group apache
            <VirtualHost 172.16.174.177:80>
                    ServerName amp1.magedu.com
                    DocumentRoot /data/vhost/amp1
                    CustomLog logs/access_amp1_log combined
                    ErrorLog logs/error_amp1_log
                    DirectoryIndex  index.php index.html
                    ProxyRequests  Off
                    ProxyPassMatch  ^/(.*\.php)$ fcgi://127.0.0.1:9000/data/wordpress/$1
            
                    KeepAlive On
                    MaxKeepAliveRequests 100
                    KeepAliveTimeout 15
    
    
                    注意:prefork默认
                    StartServers       7
                    MinSpareServers    4
                    MaxSpareServers   21
                    ServerLimit      256
                    MaxClients       256
                    MaxRequestsPerChild  4000
                        worker默认
                    StartServers         5
                    MaxClients         300
                    MinSpareThreads     25
                    MaxSpareThreads     75
                    ThreadsPerChild     25
                    MaxRequestsPerChild  0
        
            <Directory "/data/vhost/amp1">
                    Options None
                    AllowOverride None
                    Require all granted
            </Directory>
            Alias /wordpress/ "/data/wordpress/"
            <Directory "/data/wordpress">
                    Options None
                    AllowOverride None
                    Require all granted
            </Directory>
            </VirtualHost>
    (c)mariadb的配置 php 
            myql:/etc/my.cnf 
            php :/etc/php.ini /etc/php.d/*.ini
    (d)配置wrodpress
            cd wordpress  cp wp-config-sample.php wp-config.php
                // ** MySQL 设置 - 具体信息来自您正在使用的主机 ** //
                    /** WordPress数据库的名称 */
                    define(‘DB_NAME‘, ‘testdb‘);
                    
                    /** MySQL数据库用户名 */
                    define(‘DB_USER‘, ‘testuser‘);
                    
                    /** MySQL数据库密码 */
                    define(‘DB_PASSWORD‘, ‘testpass‘);
                    
                    /** MySQL主机 */
                    define(‘DB_HOST‘, ‘172.16.174.170‘);
    (e)配置wordpress
            cp config.sample.inc.php config.inc.php
            /* User used to manipulate with storage */
            // $cfg[‘Servers‘][$i][‘controlhost‘] = ‘172.16.174.177‘;
            // $cfg[‘Servers‘][$i][‘controlport‘] = ‘3306‘;
            // $cfg[‘Servers‘][$i][‘controluser‘] = ‘testuser‘;
            // $cfg[‘Servers‘][$i][‘controlpass‘] = ‘testpass‘;

时间: 2024-10-05 21:56:03

LAMP 环境搭建 C7的相关文章

新版LAMP环境搭建

新版LAMP环境搭建 注意:先安装MySQL和Apache,后安装PHP,因为PHP配置编译的时候需要指定mysql路径和apache路径. 编译安装: httpd-2.4.12.tar.gz +  mysql-5.6.22-linux-glibc2.5-x86_64.tar.gz  +  php-5.4.39.tar.gz + xcache-2.0.0.tar.gz 实验环境:               CentOS 6.5 x86_64 编译安装Apache (1)构建MPM为静态模块 在

[LAMP环境搭建二]MySQL安装

安装前准备工作:[[email protected] src]# yum -y install bison bison-devel ncurses ncurses-devel openssl openssl-devel cmake下载安装http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz wgettar -zxvfcd./bootstrapgmakegmake install/********************************

LAMP环境搭建教程

学习PHP脚本编程语言之前,必须先搭建并熟悉开发环境,开发环境有很多种,例如LAMP.WAMP.MAMP等.这里我介绍一下LAMP环境的搭建,即Linux.Apache.MySQL.PHP环境. 一.首先安装操作系统 操作系统:centos6.3 IP地址:192.168.146.129 网关: DNS: 操作系统安装步骤,此处不在给出截图. 备注:服务器系统采用最小化安装,安装一下GCC编译工具和一个桌面即可.如下图所示: 二.LAMP安装前的准备 1.获取软件包 httpd-2.4.2.ta

LAMP环境搭建(源码包安装,仅测试)

linux系统+Apache服务+MySQL数据库+PHP 安装顺序:PHP要在最后安装 首先将安装包上传到/root目录下 链接:http://pan.baidu.com/s/1nvbWEk5 密码:9r9w ************************************************************************************************************************************************

lamp环境搭建(ubuntu)

系统:Ubuntu14.04 方法一.最简单的在线安装 (参考网址:http://os.51cto.com/art/201307/405333.htm) 具体过程: [1]打开终端,执行命令 # sudo apt-get install lamp-server^ 注意:不要丢掉末尾的^号,否则命令不执行. 然后根据提示选择同意(y),设置MySQL的密码.. .直至安装过程自动结束,就可以把所有依赖的包都下载安装上. [2]测试与进一步配置 (2-1)测试Apache服务器,打开浏览器,输入地址

Lamp环境搭建 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ---之Mysql与PHP环境的搭建

Lamp环境搭建 ---之Mysql与PHP环境的搭建 第一部分:足够的磁盘空间 在前期我们用快照建立的虚拟机磁盘空间只有8G,而Mysql至少需要20G的磁盘空间,所以我们首先就要进行磁盘扩容. ###磁盘扩容: 分区>>pvcreate>>vgextend>>lvextend 增加一块20G的虚拟磁盘/dev/vdb,并把全部空间用做扩展空间: #分区: #扩展逻辑卷 ##扩展完之后用lvs 和vgs查看.两者都扩展了,但是用df -h 查看,并没有,需要刷新一下,

Centos7下的LAMP环境搭建

参考网站:http://www.cnblogs.com/mchina/archive/2012/05/17/2507102.html http://www.osyunwei.com/archives/5910.html http://www.luoxiao123.cn/centos-yum-lnmp.html http://blog.sina.com.cn/s/blog_66ac09390101ivep.html Centos7.0   lamp环境搭建 CentOS 7.0默认使用的是fire

基于LAMP环境搭建Discuz

========================写在前面的话========================= 1.LAMP环境搭建请查看这篇日志:http://blog.163.com/wangke_email/blog/static/150335003201610315142268/ 2.这只是一篇简单的Discuz安装教程,深入内容以后会讲到. 3.Discu-3.2下载路径:http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_UT

[LAMP环境搭建三]PHP安装

****说明:先全部看一遍,再开始安装**** 获取PHP源码包 http://cn2.php.net/get/php-5.5.10.tar.gz/from/this/mirrorwget 安装libxml2:wget ftp://xmlsoft.org/libxml2/libxml2-2.9.1.tar.gz./configure --prefix=/usr/local/libxml2# yum -y install python-devel 安装zlib:wget http://zlib.n