中文字幕理论片,69视频免费在线观看,亚洲成人app,国产1级毛片,刘涛最大尺度戏视频,欧美亚洲美女视频,2021韩国美女仙女屋vip视频

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
Apache+MySQL+PHP for Linux搭建
Apache安裝
到Apache官網(wǎng)下載httpd軟件包。網(wǎng)址:http://httpd.apache.org/
 
先解壓下載到本地的httpd包
[root@info lamp]# tar -zxvf httpd-2.2.17.tar.gz
[root@info lamp]# cd httpd-2.2.17      
完成httpd包解壓后,我們繼續(xù)對(duì)httpd進(jìn)行編譯安裝,--enable-module=so:加載modules動(dòng)態(tài)模塊。
[root@info httpd-2.2.17]# ./configure --prefix=/usr/local/apache --enable-module=so
[root@info httpd-2.2.17]# make
[root@info httpd-2.2.17]# make install
編譯安裝完成后我們可以啟動(dòng)httpd服務(wù)了,現(xiàn)在來(lái)測(cè)試一下。
[root@info httpd-2.0.64]# /usr/local/aparche/bin/apachectl start
 在瀏覽器中加載http://192.168.1.90 看到下面這句話表明我們的httpd服務(wù)已安裝成功!
 It works!
PHP5安裝
到PHP官網(wǎng)下載PHP軟件包。網(wǎng)址:http://www.php.net/
 
解壓下載到本地的php包
[root@info lamp]# tar -zxvf php-5.2.14.tar.gz
[root@info lamp]# cd php-5.2.14
完成PHP包解壓后,我們繼續(xù)對(duì)PHP進(jìn)行編譯安裝。
[root@info php-5.2.14]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql/
[root@info php-5.2.14]#make
[root@info php-5.2.14]#make test
[root@info php-5.2.14]#make install

編譯安裝完后需對(duì)/usr/local/aparche/conf/httpd.conf進(jìn)行配置。
[root@info php-5.2.14]# cp php.ini-development /usr/local/php/lib/php.ini
[root@info php-5.2.14]# vi /usr/local/aparche/conf/httpd.conf
#加入以下參數(shù)信息:
AddType application/x-httpd-php .php
LoadModule php5_module modules/libphp5.so
找到DirectoryIndex index.html index.html.var,在后面加上index.php 讓它把index.php做為默認(rèn)頁(yè)。
DocumentRoot "/usr/local/aparche/htdocs"web站點(diǎn)文件存放路徑改成你所在的Web站點(diǎn)路徑。
完成后重啟Apache服務(wù)
[root@info php-5.2.14]# /usr/local/apache/bin/apachectl restart
[root@info php-5.2.14]# netstat -nat|grep 80
tcp        0      0 :::80                       :::*                        LISTEN
然后在你所在的站點(diǎn)下創(chuàng)建一個(gè)php文件,來(lái)測(cè)試PHP是否安裝成功。
我這邊創(chuàng)建了一個(gè)簡(jiǎn)單的php文件,用于顯示PHP配置信息,內(nèi)容
#cat /usr/loca/apach/htdocs/info.php
<?
phpinfo ();
?>
#

現(xiàn)在我們?cè)跒g覽器中重新加載http://192.168.1.90/info.php。如圖PHP文件以被解析成功,表明我們以成功的安裝了PHP。


 
MySQL安裝
到mysql官網(wǎng)下載mysql軟件包。網(wǎng)址:http://www.mysql.com/
解壓下載到本地的php包
[root@info lamp]# tar -zxvf mysql-5.1.52.tar.gz
[root@info lamp]# cd mysql-5.1.52
對(duì)mysql進(jìn)行編譯安裝
[root@info mysql-5.1.52]# mkdir /usr/local/mysql
[root@info mysql-5.1.52]# ./configure --prefix=/usr/local/mysql
[root@info mysql-5.1.52]# make
[root@info mysql-5.1.52]# make install
[root@info mysql-5.1.52]# cp support-files/my-medium.cnf /etc/my.cfg
編譯安裝完成后對(duì)mysql目錄進(jìn)行權(quán)限分配,讓其它用戶無(wú)法訪問(wèn)mysql目錄
[root@info mysql-5.1.52]# cd /usr/local/
[root@info local]# chgrp -R mysql mysql
[root@info local]# chown -R mysql mysql
[root@info local]# chown -R 711 mysql
[root@info local]# ls -l mysql
總用量 32
drwxr--x--x   2 mysql mysql 4096 11月 13 13:09 bin           
drwxr--x--x   2 mysql mysql 4096 11月 13 13:09 docs          
drwxr--x--x   3 mysql mysql 4096 11月 13 13:09 include       
drwxr--x--x   3 mysql mysql 4096 11月 13 13:09 lib           
drwxr--x--x   2 mysql mysql 4096 11月 13 13:10 libexec       
drwxr--x--x  10 mysql mysql 4096 11月 13 13:10 mysql-test    
drwxr--x--x   5 mysql mysql 4096 11月 13 13:10 share         
drwxr--x--x   5 mysql mysql 4096 11月 13 13:10 sql-bench     
 
初始化mysql授權(quán)表
[root@info local]# su - mysql
[mysql@info ~]$ /usr/local/mysql/bin/mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
OK
 
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
 
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
 
/usr/local/mysql/bin/mysqladmin -u root password new-password
/usr/local/mysql/bin/mysqladmin -u root -h info password new-password
 
Alternatively you can run:
/usr/local/mysql/bin/mysql_secure_installation
 
which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.
 
See the manual for more instructions.
 
You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
 
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql/mysql-test ; perl mysql-test-run.pl
 
Please report any problems with the /usr/local/mysql/bin/mysqlbug script!
 
后臺(tái)啟動(dòng)mysql服務(wù)
[mysql@info ~]$ /usr/local/mysql/bin/mysqld_safe &
[1] 29209
[mysql@info ~]$ 101113 13:22:05 mysqld_safe Logging to /usr/local/mysql/var/info.err.
101113 13:22:05 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
 
[mysql@info ~]$ ps -ef|grep mysql
root     29157 28951  0 13:21 pts/1    00:00:00 su - mysql
mysql    29158 29157  0 13:21 pts/1    00:00:00 -bash
mysql    29209 29158  0 13:22 pts/1    00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe
mysql    29255 29209  0 13:22 pts/1    00:00:00 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --log-error=/usr/local/mysql/var/info.err --pid-file=/usr/local/mysql/var/info.pid
mysql    29258 29158  0 13:22 pts/1    00:00:00 ps -ef
mysql    29259 29158  0 13:22 pts/1    00:00:00 grep mysql

[mysql@info ~]$ /usr/local/mysql/bin/mysql 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.52 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type help; or \h for help. Type \c to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| test               |
+--------------------+
2 rows in set (0.00 sec)

mysql> quit
Bye

現(xiàn)在我們?cè)跒g覽器中重新加載http://192.168.1.90/info.php頁(yè)面,查看模塊部分,發(fā)現(xiàn)MySQL模塊已經(jīng)被加載,這表明我們已成功安裝了MySQL。

到此php整個(gè)環(huán)境基本搭建好了,希望對(duì)正在了解和學(xué)習(xí)有關(guān)這方面技術(shù)的朋友有所幫助。

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
LAMP安裝全攻略 - web - 楊軍的Linux學(xué)習(xí)筆記
在Linux上架設(shè)支持JSP+PHP的Web服務(wù)器
LINUX下Web服務(wù)器配置
如何架設(shè) MySQL 資料庫(kù)系統(tǒng)?(配合Apache PHP)
WEB全能服務(wù)器總結(jié),及各種問(wèn)題處理方法.apache+tomcat+jsp+php+mysql+虛
Linux下配置安裝PHP環(huán)境
更多類似文章 >>
生活服務(wù)
熱點(diǎn)新聞
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服