日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux关于安装

發(fā)布時間:2023/12/18 linux 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux关于安装 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

一.安裝gcc

gcc

cloog-ppl

ppl(libppl.so.7/libppl_c.so.2)

cpp

mpfr(libmpfr.so.1)

gcc-c++

libstdc++-devel

mpfr-2.4.1-6.el6.i686.rpmppl-0.10.2-11.el6.i686.rpm

?

?

快捷鍵rz ?sz

rz、sz命令沒找到?

安裝lrzsz即可

shell># yum -y install lrzsz

?

二.安裝zlib壓縮庫

shell>##?cd /home/jinnan/tar

shell>#?tar –zxvf zlib-1.2.5.tar.gz

shell>#?cd zlib-1.2.5

shell>#?./configure? //這個配置編譯命令不要加目錄參數(shù)

shell>#?make && make install

?

三.安裝apache

shell>#?cd /home/jinnan/tar

shell>#?tar -jxvf httpd-2.2.19.tar.bz2

shell>#?cd httpd-2.2.19

?shell>#./configure --prefix=/usr/local/http2 ?\

--enable-modules=all \

--enable-mods-shared=all \

--enable-so

shell>#?make && make install

?

啟動Apache

shell>#?/usr/local/http2/bin/apachectl start/stop/restart

?

#測試apache

瀏覽器打開: http://虛擬機(jī)IP

看到 "it works!",即為成功

?

配置虛擬主機(jī)

1)配置host文件

打開C:/windows/system32/drivers/etc/hosts 文件

增加域名記錄

如:

192.168.9.38 www.ec1.com

192.168.9.38 www.ec2.com

2) 增加虛擬主機(jī)

vi /usr/local/http2/conf/httpd.conf

取消# ?Include conf/extra/httpd-vhosts.conf

這一行前面的#

保存退出

?

vi /usr/local/http2/conf/extra/httpd-vhosts.conf

增加虛擬主機(jī)記錄

?

<VirtualHost *:80>

???? ServerAdmin webmaster@dummy-host.example.com

???? DocumentRoot "/usr/local/http2/htdocs/ec1"

???? ServerName www.ec1.com

???? ServerAlias www.dummy-host.example.com

???? ErrorLog "logs/dummy-host.example.com-error_log"

???? CustomLog "logs/dummy-host.example.com-access_log" common

</VirtualHost>

<VirtualHost *:80>

???? ServerAdmin webmaster@dummy-host2.example.com

??? DocumentRoot "/usr/local/http2/htdocs/ec2"

???? ServerName www.ec2.com

???? ErrorLog "logs/dummy-host2.example.com-error_log"

???? CustomLog "logs/dummy-host2.example.com-access_log" common

</VirtualHost>

<VirtualHost *:80>

??? DocumentRoot "/var/www/shop"

???? ServerName www.ec1.com

</VirtualHost>

注意:/var/www/shop ?以上三個目錄var ?www ?shop 的其他用戶必須有x可執(zhí)行權(quán)限

?

?

?

?

?

3)

?? shell>#?cd /usr/local/http2/htdocs

? shell>#?mkdir ec1 ec2

?? shell>#?echo this is ec1.com > ec1/index.html

?? shell>#?echo this is ec2.com > ec2/index.html

?

4)重啟apache

/usr/local/http2/bin/apachectl restart

?

?

5)瀏覽器打開www.ec1.com,www.ec2.com

看到不同的網(wǎng)站內(nèi)容,虛擬主機(jī)創(chuàng)建完畢!

?

安裝圖形庫,為編譯PHP做準(zhǔn)備

libxml2-2.7.2.tar.gz

jpegsrc.v8b.tar.gz

libpng-1.4.3.tar.gz ?????

freetype-2.4.1.tar.gz

gd-2.0.35.tar.gz

?

四.安裝libxml2

shell>#?cd /home/jinnan/tar

shell>#?tar zxvf libxml2-2.7.2.tar.gz

shell>#?cd libxml2-2.7.2

shell>#./configure --prefix=/usr/local/libxml2 ?\

--without-zlib

shell>#?make && make install

?

五.安裝jpeg8

shell>#?cd /home/jinnan/tar

shell>#?tar -zxvf jpegsrc.v8b.tar.gz

shell>#?cd jpeg-8b

shell>#./configure --prefix=/usr/local/jpeg \

--enable-shared --enable-static

shell>#?make && make install

--enable-shared ?jpeg需要的函數(shù)庫程序都編譯到該軟件里邊

??????????????????優(yōu)點:函數(shù)調(diào)用速度快

??缺點:軟件本身比較大

--enable-static ??靜態(tài)方式函數(shù)處理,需要什么函數(shù),馬上include

??????????????優(yōu)點:軟件本身比較小

??????????????缺點:函數(shù)調(diào)用速度慢

六.安裝libpng

shell>#?cd /home/jinnan/tar

shell>#?tar zxvf libpng-1.4.3.tar.gz

shell>#?cd libpng-1.4.3

shell>#./configure ?#zlib一樣不要帶參數(shù)讓它默認(rèn)安裝到相應(yīng)目錄

shell>#?make && make install

?

七.安裝freetype(字體庫)

shell>#?cd /home/jinnan/tar

shell>#?tar zxvf freetype-2.4.1.tar.gz

shell>#?cd freetype-2.4.1

shell>#./configure --prefix=/usr/local/freetype

shell>#?make && make install

?

八.安裝GD

shell>#?cd /home/jinnan/tar

shell>#?tar -zvxf gd-2.0.35.tar.gz

shell>#?mkdir -p /usr/local/gd

shell>#?cd gd-2.0.35

shell>#./configure --prefix=/usr/local/gd ?\

--with-jpeg=/usr/local/jpeg/ \

--with-png --with-zlib \

--with-freetype=/usr/local/freetype

shell>#?make && make install

?

九.安裝 php5

shell>#?cd /home/jinnan/tar

shell>#?tar -jxvf php-5.3.6.tar.bz2

shell>#?cd php-5.3.6

shell>#./configure --prefix=/usr/local/php \

--with-apxs2=/usr/local/http2/bin/apxs \

--with-mysql=mysqlnd \

--with-pdo-mysql=mysqlnd \

--with-mysqli=mysqlnd \

--with-freetype-dir=/usr/local/freetype \

--with-gd=/usr/local/gd \

--with-zlib --with-libxml-dir=/usr/local/libxml2 \

--with-jpeg-dir=/usr/local/jpeg \

--with-png-dir \

--enable-mbstring=all \

--enable-mbregex \

--enable-shared

shell>#?make && make install

復(fù)制php.ini配置文件到指定目錄

shell>#?cp php.ini-development /usr/local/php/lib/php.ini

?

配置Apache使其支持php

vi /usr/local/http2/conf/httpd.conf

1)?httpd.conf(Apache主配置文件)中增加:

AddType application/x-httpd-php .php

?

2)?找到下面這段話:

<IfModule dir_module>

????DirectoryIndex index.html

</IfModule>

index.html 前面添加index.php

?

3)?建立php測試網(wǎng)頁

vi /usr/local/apache2/htdocs/index.php ?

輸入如下內(nèi)容:

<?php

phpinfo();

?>

?

4)?重啟apache

shell>#?/usr/local/http2/bin/apachectl restart

?

5)?再次瀏覽器查看http://虛擬機(jī)IP

如果看到php信息,工作就完成了!

轉(zhuǎn)載于:https://www.cnblogs.com/dongweichang/p/7929928.html

總結(jié)

以上是生活随笔為你收集整理的linux关于安装的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。