国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

linux構建動態WEB服務器安裝篇

2020-07-08 13:01:15
字體:
來源:轉載
供稿:網友
基本配置
安裝web服務器:httpd-2.X.X
先優化吧
根據CPU設置變量
#export CFLAGS=”-O2 -march=pentium4 -pipe” && CXXFLAGS=$CFLAGS
“-march”選項表示為特定的cpu類型編譯二進制代碼(不能在更低級別的cpu上運行),
Intel通常是:pentium2, pentium3, pentium3m, pentium4, pentium4m, pentium-m, prescott, nocona
說明:pentium3m/pentium4m是筆記本用的移動P3/P4;pentium-m是迅馳I/II代筆記本的cpu;
prescott是帶SSE3的P4(以滾燙到可以煎雞蛋而聞名);nocona則是最新的帶有EMT64(64位)的P4(同樣可以煎雞蛋)
AMD通常是:k6, k6-2, k6-3, athlon, athlon-tbird, athlon-xp, athlon-mp, opteron, athlon64, athlon-fx
用AMD的一般都是DIYer,就不必解釋了吧。

1.解壓縮
#./configure –sysconfdir=/etc/ –enable-ssl –enable-modules
#make;make install
2.啟動服務
#/usr/local/apache2/bin/apachectl start
3. 測試
#links http://localhost
#lynx http://localhost
默認網站目錄/usr/local/apache2/htdocs/index.html
netstat -tul |grep 80
安裝Mysql
1.解壓縮
# ./configure –sysconfdir=/etc –with-extra-charsets=latin1,utf8,gbk,big5,gb2312
–with-extra-charsets指定其它我們要用到的編碼,有時象動網之類要用到gbk。

#.make ;make install
#cp /usr/local/share/mysql/my-large.cnf /etc/my.cnf
2.初始化
#useradd -d /usr/local/var mysql
#su - mysql
$/usr/local/bin/mysql_install_db
3.啟動服務器
$/usr/local/bin/mysqld_safe
4.用/usr/local/bin/mysql登錄測試
安裝php
1.解壓縮后
#./configure –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql=/usr/local –enable-versioning
–enable-versioning支持老的 php3.php2

#make ; make install
#cp php.ini-dist /usr/local/lib/php.ini
2.編輯apache配置文件/etc/httpd.conf,增加
AddType application/x-httpd-php .php .phtml
3.編寫測試網頁/usr/local/apache2/htdocs/test.php
4.訪問測試網頁
# links http://localhost/test.php
收尾工作
1.讓apache自動啟動
加入到開機腳本/etc/rc.local
/usr/local/apache2/bin/apachectl start
2.讓mysql數據庫服務器自動啟動
#cp /usr/local/share/mysql/mysql.server /etc/init.d/mysqld
#chkconfig mysqld on
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 西吉县| 洪江市| 南丰县| 义马市| 苍山县| 阳泉市| 定襄县| 揭东县| 婺源县| 鄂尔多斯市| 双桥区| 顺平县| 墨江| 遵义市| 泸西县| 阿克| 永寿县| 砚山县| 博兴县| 阿拉善盟| 镇安县| 什邡市| 泰安市| 常山县| 礼泉县| 英超| 上虞市| 宣威市| 盐池县| 镇雄县| 合山市| 鱼台县| 武汉市| 辽阳县| 德兴市| 铁力市| 库伦旗| 彭州市| 横山县| 尼勒克县| 博罗县|