Install Nginx + PHP + Mariadb + DiscuzX2.5 on Archlinux

Source: Internet
Author: User
Because it is difficult to find and download the integrated server tool, and they have packaged a php program and other programs themselves, their own systems already have php and databases, and I can't take it anymore, finally, you have selected manual configuration. This is the whole process of manually deploying DiscuzX2.5 from the server program on Archlinux. Some configuration files are relatively long and must be edited.

Because it is difficult to find and download the integrated server tool, and they have packaged a php program and other programs themselves, their own systems already have php and databases, and I can't take it anymore, finally, you have selected manual configuration. This is the whole process of manually deploying DiscuzX2.5 from the server program on Archlinux. Some configuration files are relatively long and must be edited.

Because it is difficult to find and download the integrated server tool, and they have packaged a php program and other programs themselves, their own systems already have php and databases, and I can't take it anymore, finally, select manual configuration ......

This isArchlinuxManually deploy DiscuzX2.5 from the server program.

Some configuration files are relatively long, so use search = when editing.

Environment preparation
  • System: Linux 3.16.4-1-ARCH
  • Servers 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-2744316-1-1.html.X2.5 UTF8 Simplified Chinese version.

All other softwarepacman -S nginx php php-fpm mariadbInstall it.

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_basedirAddingnginxThe root directory of the server (/usr/share/nginx/html/). That is, the php program is told 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 starting with that 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

LetlistenIn the nginx configurationfastcgi_passThe values are consistent.

listen = /run/php-fpm/php-fpm.sock
Configure Database

Set Database root Password

mysql_secure_installation
Start the server

Note that all these commands require the root permission.

Start the server.

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
Install Discuz

Decompress the downloaded Discuz package anduploadCopy foldernginxUnder the Server Directory (/usr/share/nginx/html/).

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

If the world is peaceful and your configuration is normal, you should see the Dizcuz usage agreement page, click agree to enter the Installation Wizard, The Wizard will automatically detect the environment, if you encounterDirectory filesIf you do not have permission or cannot find a directory, usechmodSetnginxDirectory.

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

Next, create a database. Most settings are as the name suggests.

Database username: root Database Password: the root password created when the database was previously configured

The next step is to install and ensure world peace.

Then, you will be asked if you have activated the Discuz cloud platform. Click the text on the right and you will not be able to activate it now. Then, the system automatically enters the forum.

Then you can play it as you like.

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.