Use lamp to build, decompression installation is done in sequence, first to the apache,mysql,php to operate, need to download from the Internet, I'll use Httpd-2.2.24.tar.bz2,mysql-5.1.45.tar.gz,php-5.3.27.tar.gz,discuz_x3.2_sc_utf8.zip.
First, install Apache:
1, Decompression: TAR-JVXF httpd-2.2.24.tar.bz2/test/#指定解压去指定目录
---> cd/test/httpd-2.2.24.tar.bz2
2. Perform compilation and Installation
---->./configure--prefix=/usr/local/apache2--enable-mods-shared=most--enable-so--enable-rewrite--enabl E-ssl
-----> Make && make Install
Parameter Note:--prefix=/usr/local/apache2 #指定的安装目录
--enable-mods-shared=most # compiled into Apache Dynamic Web page
--enable-so #apapche支持动态网页
--enable-rewrite #apache网址重写
--enable-ssl #apache支持ssl连接
3. Make && make install
There are more parameters that are not written, depending on the actual production environment.
The above parameters must be done with the TAB key, not manually entered to ensure accuracy; the compile and install execution order must be configure first, then make, and then install.
Second, install MySQL:
1. As with Apache, ignore this step
2. Perform compilation and Installation
Export bpath= "/usr/local/mysql/" #定义变量
----->./configure a bunch of parameters
Parameter note:--prefix=${bpath} #指定的安装目录
--with-unix-socket-path=${bpath}/tmp/mysql.sock #用socket启动mysql, if the normal start up should have a socket key file (Mysql.sock), If you accidentally kill the socket key file or the socket key file is not generated, it will be easy to start failure, error)
--with-plugins=partiton,csv,archive,federated,innobase,innodb_plugin,myisam,heap #指定Mysql支持的引擎, the engine as a module for defining data, Such as: Table data, table structure, etc.
--with-charset=utf8 #指定使用的字符集
--without-docs--without-man #没有用的帮助文档, uninstall with--without
--with-client-ldflags=-static ' Cflags=-g-o3 ' Cxxflags=-g-o3 ' #把客户端以静态模式来编译, greatly improving speed and efficiency
--with-extra-charsets=gbk,utf8,ascii,big5,latin1,binary #扩展的字符集
--enable-assembler #可以使用汇编版本的函数, efficiency issues, enabling the assembly function greatly improves MySQL performance
--enable-local-infile #启用Load data local ability, table data too much can be placed in a text document, you can use the Localdata command to import the database, high efficiency, easy to manage
--enable-profiling #sql优化功能, optimizing SQL statements
--enable-thread-safe-client #让客户端支持线程
3. Make && make install
4. Mysql-uroot-p Password
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/77/B4/wKiom1ZsGYyz36rGAAAad-x3MvI699.png "title=" Discuz5.png "alt=" Wkiom1zsgyyz36rgaaaad-x3mvi699.png "/>
Third, install PHP
1, Decompression:
Unzip and operate the procedure above
2. Perform compilation and Installation:
./configure a bunch of parameters
Parameter Note:--prefix=/usr/local/php #指定php安装目录
--with-apxs2=/usr/local/apache2/bin/apxs #添加apxs模块 (originally provided by Apache)
--with-mysql=/usr/local/mysql #指定mysql安装目录
--with-config-file-path=/usr/local/php #php配置文件位置
3. Make && make install
4. Write PHP test page
vi/usr/local/apache2/htdocs/index.php
<?php
Phpinfo (); #统计当前php配置和服务器的服务配置
?>
5, modify the configuration of Apache
Vi/usr/local/apache2/conf/httpd.conf
Find DirectoryIndex, AddType the line needs to be added:
DirectoryIndex index.html index.php
AddType applicantion/x-httpd-php. php
Restart Apache service:/usr/local/apache2/bin/apachectl-k restart
Iv. Installation of Discuz Forum
1, decompression Discuz_
TAR-ZVXF discuz-x.xx. tar.gz
Cd/usr/local/discu-x.xx/upload
Cp-r./*/usr/local/apache2/htdocs/
Then enter your IP address in the browser
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/77/B2/wKioL1ZsFUuzplEKAAFnxY1kSNc453.png "title=" Discuz1.png "alt=" Wkiol1zsfuuzplekaafnxy1ksnc453.png "/>
X is not allowed in this installation wizard.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/77/B3/wKiom1ZsFdewQh9qAAF3rhjw0K4814.png "title=" Discuz2.png "alt=" Wkiom1zsfdewqh9qaaf3rhjw0k4814.png "/>
Why the current state of this here will hit X, because the permissions are not enough to cause, we only need all the folders in the/usr/local/apache2/htdocs/(including the file) to change to 777,chmod-r 777/usr/local/apache2/ htdocs/*
Refresh the browser is not hit X, the permissions are writable
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/77/B2/wKioL1ZsF4eAN41jAAGBwJRmS00529.png "title=" Discuz3.png "alt=" Wkiol1zsf4ean41jaagbwjrms00529.png "/>
Click Next to enter this database information page
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/77/B3/wKiom1ZsGByzNf9WAAFUI9l_BVc937.png "title=" Discuz4.png "alt=" Wkiom1zsgbyznf9waafui9l_bvc937.png "/>
Here the database name, is based on your new data name filled in, the user name and password are based on their own, admin admin password is your login forum password
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/77/B3/wKioL1ZsG5zQXN-9AADa9S2K2qo086.png "title=" Discuz6.png "alt=" Wkiol1zsg5zqxn-9aada9s2k2qo086.png "/>
(If you need to import the database, this step) also need to import the existing database in Discuz to the local database, mysql-uroot-p password-d database name </usr/local/apache2/htdocs/xx.sql
Administrator email to write their own mailbox, click the Installation Pop-up dialog Prompt "Database connection success!" Start Installation "
Soon the installation is complete----<4>
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/77/B4/wKiom1ZsHHPTNZC1AAC7rcsks60035.png "title=" Discuz7.png "alt=" Wkiom1zshhptnzc1aac7rcsks60035.png "/>
Some discuz versions will not pop up this page
<4> installation completed the page is not very familiar, haha, to this basically completed the SNS building
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/77/B4/wKiom1ZsHUrRl8MPAAFIxDIC3ts089.png "title=" Discuz8.png "alt=" Wkiom1zshurrl8mpaafixdic3ts089.png "/>
This article is from the "Steven Never give Up" blog, please be sure to keep this source http://wsw26.blog.51cto.com/1442148/1722353
About lamp Building Discuz Forum Building Experiment