自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

在openSUSE上安裝和配置LAMP

系統(tǒng) Linux
大家都在Linxu和Window上安裝LAMP,那現(xiàn)在我教大家在openSUSE上轉(zhuǎn),其實和他們差不多,就點細(xì)節(jié)差別。

openSUSE上安裝和配置LAMP步驟如下:

  LAMP是由Apache MySQL PHP組成的,是在Linux下***的軟件組合之一,目前互聯(lián)網(wǎng)上有很多網(wǎng)站運行在LAMP服務(wù)器上。

  Linux - 是富有情味的開源操作系統(tǒng);Apache - 這個星球上大師級的WEB服務(wù)器;MySQL - 是你喜愛的開源數(shù)據(jù)庫軟件;PHP - 受歡迎的WEB編程語言。

  安裝LAMP服務(wù)最簡單的方法是在YaST圖形界面,按以下步驟安裝:

  1、Computer – YaST – Install Software - 選擇過渡”Patterns”,然后選擇并接受”Web and LAMP”。但是這種方法我們安裝了不需要的服務(wù),如DNS,Perl模塊等。

  我喜歡手動安裝一個LAMP服務(wù)。

  所以不要浪費時間了,讓我們立即讓LAMP在你的openSUSE上運行起來吧。我用的是openSUSE11.0,這個安裝過程同樣適用早期的10.3、10.2版本,11.1版本也同樣適應(yīng)。

  安裝和配置Apache2服務(wù)

  安裝Apache服務(wù)器

  opensuse11:~#yast2 –install apache2

  這就安裝了Apache服務(wù),用下面的代碼檢驗:

  opensuse11:~ # rcapache2 status

  Checking for httpd2: unused

  這是告訴我們,Apache服務(wù)已經(jīng)安裝上,但是還沒有運行。為了測試Apache是否能夠運行正常,在/srv/www/htdocs/目錄建立一個index.html文件。這個目錄是Apache默認(rèn)的網(wǎng)站根目錄。

  opensuse11:~ # cd /srv/www/htdocs

  opensuse11:~ # vi index.html

  在上面鍵入鍵入文本“Welcome to openSUSE 11.1”。

  啟動Apache2服務(wù)

  現(xiàn)在啟動Apache2服務(wù),我們看看是否運行正常。

  opensuse11:~ # rcapache2 start

  Starting httpd2 (prefork) done

  現(xiàn)在開啟一個瀏覽器如Firefox,輸入http://localhost,那么現(xiàn)在就可以看到剛才你輸入的文本了,下面我們安裝PHP5。

  安裝PHP5

  opensuse11:~ # yast2 –install php5 php5-mysql apache2-mod_php5

  這將安裝PHP5, PHP5-MySQL 模塊和Apache2 PHP5 模塊。為了讓Apache2支持PHP5模塊,現(xiàn)在重啟Apache2讓改動生效。

  opensuse11:~ # rcapache2 restart

  Syntax OK

  Shutting down httpd2 (waiting for all children to terminate) done

  Starting httpd2 (prefork) done

  安裝和配置MySQL

  opensuse11:~ # yast2 –install mysql mysql-tools

  這樣就把MySQL數(shù)據(jù)庫和可選安裝的mysql-tools(設(shè)置工具)安裝到openSUSE上了。按以下命令驗證是否已經(jīng)安裝上:

  opensuse11:~ # rcmysql status

  Checking for service MySQL: unused

  上面的輸出顯示MySQL服務(wù)已經(jīng)安裝,但是還沒有運行。

#p#

  啟動MySQL服務(wù)

  opensuse11:~ # rcmysql start

  Starting service MySQL done

  默認(rèn)安裝是沒有root密碼的,但是root密碼是非常重要的。

  設(shè)置root密碼

  opensuse11:~ # mysqladmin -u root –p password rootpassword

  這是將root密碼設(shè)置為”rootpassword”。你可以設(shè)置一個安全適當(dāng)?shù)拿艽a。

  按以下操作檢查一下root密碼是否已經(jīng)設(shè)置和MySQL Client是否可以登陸到MySQL服務(wù)器。

  opensuse11:~ # mysql -u root -p

  Enter password:

  Welcome to the MySQL monitor. Commands end with ; or \g.

  Your MySQL connection id is 1

  Server version: 5.0.51a SUSE MySQL RPM

  Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

  mysql> show databases;

  +——————–+

  | Database |

  +——————–+

  | information_schema |

  | mysql |

  | test |

  +——————–+

  3 rows in set (0.04 sec)

  mysql>

  按以上操作,我用MySQL Client作為root登錄,輸入了剛才鍵入的密碼,列舉了數(shù)據(jù)庫。這樣就已經(jīng)完全在openSUSE上安裝了LAMP服務(wù)。

  管理MySQL數(shù)據(jù)庫最簡易和流行的工具是phpMyAdmin,phpMyAdmin的安裝需要我們上面已經(jīng)進行過的PHP5,Apache2環(huán)境,現(xiàn)在可以快速安裝和配置phpMyAdmin了。

  安裝phpMyAdmin

  opensuse11:~ # yast2 –install phpMyAdmin

  這就安裝了phpMyAdmin,并在/srv/www/htdocs/建立了phpMyAdmin目錄。進入該目錄,并利用config.sample.inc.php快速配置phpMyAdmin。

  opensuse11:~ # cd /srv/www/htdocs/phpMyAdmin

  opensuse11:~ # cp config.sample.inc.php config.inc.php

  查找下列語句修改為:

  $cfg['blowfish_secret'] = ‘mysqladmin’;

  在這里我設(shè)置了一個短語密碼 ‘mysqladmin’。

  按上面操作并設(shè)置了默認(rèn)配置。 登錄http://localhost/phpMyAdmin 到phpMyAdmin 用root帳戶和剛才建立的密碼。

  RPM安裝MySQL

  rpm -ivh MySQL-server-4.0.16-0.i386.rpm

  rpm -ivh MySQL-client-4.0.16-0.i386.rpm

  http://www.linux-cn.com/html/database/mysql/20070422/9875.html

#p#

  Mono

  在 Apache2.2 下設(shè)置 Mono 的 ASP。Net

  在 Yast2控制中心里選 系統(tǒng) -> 磁盤分區(qū)管理 , 點開左邊的樹,選擇分區(qū),編輯,掛載 /mnt/Music (Music 是自己起的名字)。然后在 FSTAB 選項中,把 fmask 和 dmask 的值改為 000 ,完成。 就可以自動掛載并可讀寫了。

  經(jīng)本人實驗, 在OpenSuse11.2 x64 系統(tǒng)下,Apache2.2 建虛擬目錄總出現(xiàn) 403 無權(quán)限錯誤,與此有關(guān)。

  另外,Ubuntu 下如果出現(xiàn) 403 , 用以下配置文件是正確的. 但是需要注意, NTFS 分區(qū)是不能 chmod 的 . 所以,要把 Web 站點放到 Linux分區(qū)上,再 sudo chmod -R 777 MyWeb

  在 /etc/apache2/config.d/ 下新建虛擬目錄的配置文件: MyTrade.conf (MyTrade 替換成你自己的虛擬目錄名,文件名需以 conf 結(jié)尾)

  Alias /MyTrade "/mnt/App/MonoApp/MyWebTradeSln/MyTrade"

  # MonoServerPath can be changed to specify which version of ASP.NET is hosted

  # mod-mono-server1 = ASP.NET 1.1 / mod-mono-server2 = ASP.NET 2.0

  # For SUSE Linux Enterprise Mono Extension, uncomment the line below:

  # MonoServerPath MyTrade "/opt/novell/mono/bin/mod-mono-server2"

  # For Mono on openSUSE, uncomment the line below instead:

  MonoServerPath MyTrade "/usr/bin/mod-mono-server2"

  # To obtain line numbers in stack traces you need to do two things:

  # 1) Enable Debug code generation in your page by using the Debug="true"

  # page directive, or by setting in the

  # application's Web.config

  # 2) Uncomment the MonoDebug true directive below to enable mod_mono debugging

  MonoDebug MyTrade true

  # The MONO_IOMAP environment variable can be configured to provide platform abstraction

  # for file access in Linux. Valid values for MONO_IOMAP are:

  # case

  # drive

  # all

  # Uncomment the line below to alter file access behavior for the configured application

  MonoSetEnv MyTrade MONO_IOMAP=all

  # Additional environtment variables can be set for this server instance using

  # the MonoSetEnv directive. MonoSetEnv takes a string of 'name=value' pairs

  # separated by semicolons. For instance, to enable platform abstraction *and*

  # use Mono's old regular expression interpreter (which is slower, but has a

  # shorter setup time), uncomment the line below instead:

  # MonoSetEnv MyTrade MONO_IOMAP=all;MONO_OLD_RX=1

  MonoApplications MyTrade "/MyTrade:/mnt/App/MonoApp/MyWebTradeSln/MyTrade"

  Options Indexes MultiViews

  Allow from all

  Order allow,deny

  MonoSetServerAlias MyTrade

  SetHandler mono

  SetOutputFilter DEFLATE

  SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary

  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript

  這樣就行了。

通過文章的介紹,想必大家都會在openSUSE上安裝和配置LAMP,希望本文對大家有幫助!

【編輯推薦】

  1. LAMP(Linux+Apache+Mysql+PHP)部署手冊
  2. LAMP安全加固之mysql篇
  3. LAMP安全加固之PHP篇
  4. LAMP安全加固之apache篇
  5. LAMP下虛擬主機用戶個人網(wǎng)頁的架設(shè)
  6. 從 WAMP 到 LAMP 看穿 LAMP
  7. 運用apt工具傻瓜式安裝、配置、拆卸、卸載LAMP
責(zé)任編輯:趙鵬 來源: 網(wǎng)絡(luò)轉(zhuǎn)載
相關(guān)推薦

2011-02-25 10:36:24

2011-03-23 09:31:42

LAMP安裝LAMP配置

2015-08-07 09:03:08

openSUSE軟件

2011-03-11 17:14:27

2011-03-09 09:30:45

Linux安裝LAMP

2011-05-24 09:33:40

UbuntuOpenStackNova

2011-08-17 10:19:30

CentOSOpenStack N

2014-02-19 14:54:58

CentOS 6.5Xen

2011-03-10 10:51:45

Ubuntu搭建LAMP

2011-03-10 09:53:35

LinuxLAMP安裝

2011-03-23 11:24:09

2011-03-09 10:52:36

CentOS安裝LAMP

2024-02-19 16:28:24

2011-03-10 11:06:02

Ubuntu搭建LAMP

2011-03-10 10:09:13

Ubuntu搭建LAMP

2022-09-14 11:31:37

MySQL數(shù)據(jù)庫管理系統(tǒng)

2011-03-11 16:42:38

Ubuntu安裝LAMP

2011-03-21 10:15:07

LAMPLAMP安裝LAMP配置

2010-06-08 17:26:36

OpenSUSE 安裝

2011-01-20 10:27:39

點贊
收藏

51CTO技術(shù)棧公眾號