lamp-build wordpress personal blog, discuz Forum

Source: Internet
Author: User
Tags fpm install php

The requirements have been set up phpMyAdmin.

        1 访问http://192.168.27.144/pma界面登入到phpMyAdmin界面;        2 点击上方创建名为wpdb的数据库;        3 点击上方创建名为wpuser管理用户;        4 使wpuser用户对wpdb数据库拥有所有权限;        5 进入wordpress官网https://cn.wordpress.org下载所需安装包,此处使用的是wordpress-4.9.1-zh_CN (1).tar.gz        6 tar zxvf wordpress-4.9.1-zh_CN (1).tar.gz        7 mv wordpress /app/website/wp        8 setfacl -R -m u:apache:rwx /app/website/wp/        9 通过页面配置wordpress,实际上会生成wp-config.php文件;            1 数据库名:wpdb           #刚刚创建的数据库            2 用户名: wpuser          #刚刚在phpmyadmin里创建的用户        10 按照步骤走完流程登录即可;        11 setfacl -b /app/website/wp  #为了保证安全性,当配置完成网页端时候记得清除acl权限

PHP configuration file Explanation

    1 /etc/php.ini和/etc/php.d/         #第一个是php的配置文件,第二个目录下存放的是可以生效的php配置文件        max_execution_time= 30          #最长的执行时间,默认为30秒        memory_limit 128M               #内存占用,默认128M,生产环境下略小了,根据物理内存大小调试        display_errors off              #调试使用,打开可能会暴露重要信息        display_startup_errors off      #显示启动的报错信息,测试环境一般打开查看,生产环境关闭        post_max_size 8M                #最大上传数据大小,生产环境要调大        upload_max_filesize 2M          #最大上传文件大小,生产环境要调大        max_file_uploads = 20           #同时上传文件的个数        date.timezone =Asia/Shanghai    #指定时区

PHP, which runs as a standalone program, is 9000 ports by default, and listens for 127.0.0.1 changes in www.conf
1 Install the package to be applied to

            yum install httpd php-fpm php-mysql mariadb-server   

2 Viewing the package with the program

        rpm -ql php-fpm        /etc/php-fpm.d/www.conf                                #该文件是主要配置文件;

3 vim/etc/php-fpm.d/www.conf

            pm.start_servers = 10                                  #应用启动后会开启10个进程,默认为5个

4 Starting the Service

systemctl start php-fpm.service                          #因为是独立程序,所以要单独启动,启动后查看就会有10个进程

5 Editing a configuration file

    vim /etc/httpd/conf.d/fcgi.conf                          #由于php-fpm是独立程序,http并不知道它的位置,所以要在一个空文件中编辑            DirectoryIndex index.php                               #默认主页文件为index.php            ProxyRequests Off            ProxyPassMatch   ^/(.*\.php)$ fcgi://127.0.0.1:9000/var/www/html/$1                                         #当访问以php结尾的文件的时候会跳转到本机的/var/www/html/下,由于默认站点没有更改,所以就为默认;

6 Create home page file access;

vim /var/www/html/index.php                             <?php            phpinfo();            ?>

Two Building Discuz Forum

        1 下载软件包Discuz_X3.4_GIT_SC_UTF8.zip        2 unzip Discuz_X3.4_GIT_SC_UTF8.zip        3 cd dir_SC_UTF8/upload        4 mkdir /var/www/html/bbs        5 mv dir_SC_UTF8/upload/* /var/www/html/bbs        6 http://192.168.27.105/bbs                        #这里是在105这台服务器搭建的,所以ip地址为105        7 setfacl -R -m u:apache:rwx /var/www/html/bbs                                                 #当登录网页端的时候会发现大部分功能都不可写,由于没有权限的原因导致,添加ACL权限即可        8 填写数据库的信息下一步安装完成;

Three implementations of PHP acceleration; xcache

        1 下载源码包进行编译安装,这里用的是xcache-3.2.0.tar.bz2版本        2 tar xvf xcache-3.2.0.tar.bz2        3 cd xcache-3.2.0        4 yum install php-devel                              #首先安装此包,否则无法进行下面的操作        5 phpize                                             #生成configure文件用来编译        6 yum groupinstall "development tools"               #安装开发包组        7 ./configure --enable-xcache        8 make && make install        9 cp xcache.ini /etc/php.d                           #为了让php知道xcache.so这个模块的位置方便调用        10 编译完成后xcache.so模块存放在默认的模块存放位置/usr/lib64/php/modules下

lamp-build wordpress personal blog, discuz Forum

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.