For Apache to use PHP in two ways: as a dynamic module, its running state to the loaded to the Web server, or as a static module, which can be compiled directly into the Web server code.
We focus on the first way. In order to be able to Apache modules for PHP dynamic load, Apache server must be based on dynamic shared object (DSO, DynamicSharedObject) compilation. You can pass--enable-so parameter enables this feature to take effect. # Cd/extract directory/httpd-2.2.2 #./configure--prefix =/usr/local/apache--enable-so # make install # makeinstall2. mysql5.0.18 (source package) source package can be obtained at this website: http://download.mysql.cn/src/2006/0208/62.html all these operations require root privileges to install start: # groupaddmysql # useradd-gmysqlmysql # gunzip
/Bin/mysql-uroot-p) #. (enter password, the default password is blank, you can directly enter) Can'tconnecttolocalMySQLserverthroughsocket '/tmp/mysql.sock ' (2) if the above tips, instructions for mysql service does not start properly, because the mysql service starts, it automatically generates the mysql.sock file # killallmysql kill all the mysql process, restart./bin/mysql_install_db--user = mysql restart. supplementary notes about coding/bin/mysql-uroot-p, install mysql, defaults to latin1 encoding, if you want to change the default encoding, use the option--with-carst for example: #./configure--with-charset = CHARSET3. install pp./configure--prefix =/usr/local/php5 (configure PHP parameters)--with-apxs2 =/usr/local/apache2/bin/apxs--with-libxml-dir =/usr/local/lib--with-zlib--with-zlib-dir =/usr/local/lib--with-mysql =/usr/local/mysql (mysql's install directory is the directory after extraction)--enable-soap--enable-sockets # make # makeinstall will install directory files into php.ini php.ini-dist deposited under the/usr/local/lib .4. Edit Apache configuration files, i.e./usr/local/apache/conf/httpd.conf and add the following line: AddTypeapplication/x-httpd-php.ppAddTypeapplication/x-httpd-php-source.ps and DirectoryIndex line plus index.p and then save the file and start the Server 5. test.php file on the test set up apache htdocs directory, reads as follows: phpinfo ();? > Via browser view http://localhost/test.php6. install Discuz! Forum program on the Internet find ① Discuz! Forum program and extract (process will not repeat them) ② step 2: upload using FTP software on your server, create a separate directory, or choose a suitable location, ensure that the storage of the files in this location can be accessed by a Web request, and that the directory has execute privileges of the PHP code. The Discuz! packages./upload directory all files and directory structure of the upload to the server (that is to upload the files in the upload directory and a directory, rather than upload contains the upload directory to the directory itself and the structure). (If you just do the experiment, there is no need to upload to the server as well, there is a direct copy to any permission in the directory, then in httpd.conf settings) ③ 3 setting directory attributes you formally installed previously, you need to set the related directory properties so that the data file can be Discuz! correct read and write. The directory property is set to 777./templates./templates/default./templates/default/*. *./attachM e n t s c u s-/t o m a r a v a t f o r-/u d a t a m-f o r u/m d a t a/c a c e f o r-/u d a t a m/t e m p l a t e s ④ step 4: Configure the database information using the editor to open your local machine in the default configuration file (config.inc.php), see the following content: $ dbhost = ' localhost ';//databaseserver//database server $ dbuser = ' dbuser ';//databaseusername//database username $ dbpw = ' dbpw//databasepassword//database password '; $ dbname = ' discuz//databasename//database name '; $ adminemail = admin@your.com '; //Adminemail//forum system Email $ dbreport = 0;//senddberrorreport? 1 = yes,//whether to send a database error report? 0 = no, 1 = Yes, based on the above comment configuration space services that are provided by the database server, user name, password and database name. If you use your own installation of server environment, we recommend, if possible, try not to use the root account, and the basis for Discuz! and other software on the server, separately for each program is assigned an account and a database to reduce security problems may occur. ⑤ step 5: perform the installation script your installation has been carried out to the last step, select it in the browser to run install.php, namely access http://your domain name/Forum Directory/install.php to complete the final installation. The installation script will check your server system environment, the remaining space, the database environment, and have some correction. If you are one of the steps until you have a question, typically the installation script will identify and make a prompt, you are prompted to check the installation process. If you do not have a hint, please follow the instructions to complete the final installation. After successful installation, delete the install script (install.php), to avoid installing again. If you do not delete, enter Forum background will find cannot be set. Note: the above experiment environment for RedHatAS4 + VMWare5.5 well, the entire process ends. I believe you should be aware of the joy of success. I personally think learning Linux, see the final effect is unique accomplishment! well, last hope that we can actively join the Linux wild tribe, exchange ideas!
No comments:
Post a Comment