ArchLinux on Nginx + PHP + Mariadb + DiscuzX2.5 installation Notes

Source: Internet
Author: User
Tags chmod fpm file permissions

Because it is not good to find the download Integration Server tools, and they themselves packaged a copy of PHP and other programs, the system itself already has PHP and the database and so on again to make a stand, finally chose the manual configuration ...

This is the Archlinux entire process of manually starting the deployment of DiscuzX2.5 from the server program.

Some of the configuration file is long, when editing the use of search = =.

Environment preparation
    • System: Linux 3.16.4-1-arch
    • Server and related software:
      • Nginx 1.6.2-1
      • PHP 5.6.1-1
      • PHP-FPM 5.6.1-1
      • MARIADB 10.0.14-2
      • Discuz x2.5

Discuz is obtained here: http://www.discuz.net/thread-2744369-1-1.html, I chose X2.5 UTF8 简体中文版 .

All other software pacman -S nginx php php-fpm mariadb can be installed directly.

Configure Nginx

Configuration file:/etc/nginx/nginx.conf

http {    include       mime.types;    default_type  application/octet-stream;    #log_format  main  ‘$remote_addr - $remote_user [$time_local] "$request" ‘    #                  ‘$status $body_bytes_sent "$http_referer" ‘    #                  ‘"$http_user_agent" "$http_x_forwarded_for"‘;    #access_log  logs/access.log  main;    sendfile        on;    #tcp_nopush     on;    #keepalive_timeout  0;    keepalive_timeout  65;    #gzip  on;    server {        listen       80;        server_name  localhost;        #charset koi8-r;        #access_log  logs/host.access.log  main;        root /usr/share/nginx/html;        location / {            index  index.html index.htm index.php;            #add_header Cache-Control privete;        }        location ~ \.php$ {            fastcgi_pass unix:/run/php-fpm/php-fpm.sock;            fastcgi_index index.php;            include fastcgi.conf;        }
Configure PHP

Configuration file:/etc/php/php.ini

open_basedirAdd nginx The root directory of the server ( /usr/share/nginx/html/ ). That tells the PHP program to parse the PHP file under that directory.

open_basedir = /usr/share/nginx/html/:/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/

Enable the following extensions. Remove the semicolon at the beginning of the line.

extension=curl.soextension=gd.soextension=gettext.soextension=mysql.soextension=mysqli.soextension=pdo_mysql.so
Configure PHP-FPM

Configuration file:/etc/php/php-fpm.conf

listenthe values are consistent with the values in the previous Nginx configuration fastcgi_pass .

listen = /run/php-fpm/php-fpm.sock
Configuration database

Set the database root password

mysql_secure_installation
Start the server

Note that these commands require root privileges.

Let the server start running.

systemctl enable nginx.servicesystemctl enable mysqld.servicesystemctl enable php-fpm.service

Start the server

systemctl start nginx.servicesystemctl start mysqld.servicesystemctl start php-fpm.service
Installing Discuz

Unzip the downloaded Discuz package and upload Copy the folder to the nginx server directory ( /usr/share/nginx/html/ ).

Open the browser and open http://localhost/upload/install/.

If the world is peaceful, your configuration is all right, you should see the Dizcuz Use Agreement page, click Agree to go to the Installation Wizard, the wizard will automatically detect the environment, if you have 目录文件 no permissions or can not find the directory, use chmod set nginx the directory file permissions.

chmod -R a+rwx /usr/share/nginx/html/

The next step is to create a database. Most of the settings are as the name implies.

数据库用户名:root数据库密码:之前配置数据库的时候创建的root密码

The next step is to install the world peace.

Then will ask you whether to open the Discuz cloud platform, directly point to the right small print temporarily not open. Then automatically enter the forum.

Then you can play it by yourself.

ArchLinux on Nginx + PHP + Mariadb + DiscuzX2.5 installation notes

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.