歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> 關於Unix >> 構建網絡安全長城之烽火台的建立(4)

構建網絡安全長城之烽火台的建立(4)

日期:2017/3/6 15:14:36   编辑:關於Unix
這樣的信息,就表示已經成功啟動了 d.之後,我們要讓 mysql 在以運行級3、5啟動的時候能夠自動運行起來 [root .net server mysql-4.0.15a]#cp support-files /mysql.server /etc/init.d/mysql [root@netserver mysql-4.0.15a]#ln -s /etc/init.d/mysql /etc/ 這樣的信息,就表示已經成功啟動了

  d.之後,我們要讓mysql在以運行級3、5啟動的時候能夠自動運行起來

  [root.netserver mysql-4.0.15a]#cp support-files /mysql.server /etc/init.d/mysql
  [root@netserver mysql-4.0.15a]#ln -s /etc/init.d/mysql /etc/rc3.d/S85mysql
  [root@netserver mysql-4.0.15a]#ln -s /etc/init.d/mysql /etc/rc3.d/K85mysql
  [root@netserver mysql-4.0.15a]#ln -s /etc/init.d/mysql /etc/rc5.d/S85mysql
  [root@netserver mysql-4.0.15a]#ln -s /etc/init.d/mysql /etc/rc5.d/K85mysql
  [root@netserver mysql-4.0.15a]#chmod 755 /etc/init.d/mysql
  [root@netserver mysql-4.0.15a]#cd ../

  6、編譯安裝支持PHP的Apache

  a.首先安裝apache,假設將它安裝到/www目錄中,並以模塊方式加載PHP

  [root@netserver ids]#tar -xvzf httpd-2.0.47.tar.gz
  [root@netserver ids]#cd httpd_2.0.47
  [root@netserver httpd_2.0.47]#./configure --prefix=/www --enable-so
  [root@netserver httpd_2.0.47]#make
  [root@netserver httpd_2.0.47]#make install

  用以下命令,看看apahce是否能啟動起來

  [root@netserver httpd_2.0.47]#/www/bin/apachectl start

  (因為我們還沒有配置httpd.conf,所以這裡會提示沒有設置Server Name,不用理會)

  [root@netserver httpd_2.0.47]#cd ..

  B.接下來安裝PHP

  [root@netserver ids]#tar -xvzf php-4.3.3.tar.gz
  [root@netserver ids]#cd php-4.3.3
  [root@netserver php-4.3.3]#./configure --prefix=/www/php --with-apxs2=/www/bin/apxs --with-config- filepath=/www/php --enable-sockets --with-mysql=/usr/local/mysql --with-zlibdir=/usr/local --with- gd (在實際書寫的時候,請寫成一行)
  [root@netserver php-4.3.3]#make
  [root@netserver php-4.3.3]#make install
  [root@netserver php-4.3.3]#cp php.ini-dist /www/php/php.ini

  C.配置apache的httpd.conf文件和PHP的php.ini文件

  [root@netserver php-4.3.3]# vi /www/conf/httpd.conf

  改變以下幾行為所寫的樣式(如果文中沒有,請添加該行)

  ServerRoot "/www"
  DocumentRoot "/www/htdocs"
  LoadModule php4_module modules/libphp4.so
  AddType application/x-httpd-php .php .php3 .php4
  DirectoryIndex index.php default.php index.htm default.htm index.html default.html
  AddDefaultCharset GB2312
  ServerName (你的ip地址):80

  [root@netserver php-4.3.3]# vi /www/php/php.ini
  將 register_globals = Off 這行改為register_globals = On


Copyright © Linux教程網 All Rights Reserved