UBUNTU下的LAMP详细配置

UBUNTU下的LAMP配置
安装系统

##### 安装编译环境 #####

sudo apt-get install build-essential

##### m4 #####

sudo dpkg –i m4*.deb

##### flex #####

sudo dpkg –i flex*.deb

##### zlib-devel #####

sudo apt-get install zlib1g-dev

##### libxml2 #####

sudo apt-get install libxml2 libxml2-dev

##### zlib #####

tar -zxvf zlib*.tar.gz
cd zlib*
./configure –prefix=/usr/local/zlib
make && sudo make install

##### OpenSSL #####

tar -zxvf openssl*.tar.gz
cd openssl*
./config –prefix=/usr/local/ssl -openssldir=/usr/local/ssl –shared zlib
make && sudo make install 

##### FreeType #####

tar -zxvf freetype*.tar.gz
cd freetype*
./configure –prefix=/usr/local/freetype
make && sudo make install

##### Jpeg #####

tar -zxvf jpeg*.tar.gz
cd jpeg*
sudo mkdir /usr/local/jpeg
sudo mkdir /usr/local/jpeg/bin
sudo mkdir /usr/local/jpeg/lib
sudo mkdir /usr/local/jpeg/include
sudo mkdir /usr/local/jpeg/man
sudo mkdir /usr/local/jpeg/man/man1
./configure –prefix=/usr/local/jpeg –enable-shared –enable-static
make && sudo make install

##### LibPNG #####

tar -zxvf libpng*.tar.gz
cd libpng*
./configure –prefix=/usr/local/libpng
make && sudo make install

##### GD Library #####

tar -zxvf gd*.tar.gz
cd gd*
./configure –prefix=/usr/local/gd –with-jpeg=/usr/local/jpeg –with-freetype=/usr/local/freetype –with-png –with-zlib=/usr/local/zlib
make && sudo make install

##### curl #####

tar -zxvf curl*.tar.gz
cd curl*
sudo mkdir -p /usr/local/curl
./configure –prefix=/usr/local/curl –with-ssl
make && sudo make install

##### libmcrypt #####

tar -zxvf libmcrypt*.tar.gz
cd libmcrypt*
./configure –prefix=/usr/local/libmcrypt
make && sudo make install

##### mhash #####

tar -zxvf mhash*.tar.gz
cd mhash*
./configure –prefix=/usr/local/mhash
make && sudo make install

##### MySQL #####

tar -zxvf mysql*.tar.gz
sudo mv mysql*/ /usr/local/mysql
cd /usr/local/mysql
sudo groupadd mysql
sudo useradd -g mysql mysql
sudo scripts/mysql_install_db –user=mysql
sudo chown -R root .
sudo chown -R mysql data
sudo chgrp -R mysql .
sudo cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
sudo support-files/mysql.server start
sudo bin/mysqladmin -u root password ‘mypassword’
sudo support-files/mysql.server stop
sudo cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql.server
cd /etc/init.d
sudo update-rc.d mysql.server defaults

##### Apache #####

tar -zxvf httpd*.tar.gz
cd httpd*
./configure –prefix=/usr/local/apache –enable-so –with-mpm=worker –with-mysql=/usr/local/mysql –with-config-file-path=/usr/local/apache/conf –enable-module=rewrite –enable-vhost-alias –enable-http –enable-mime-magic –with-ssl=/usr/local/ssl –enable-ssl –enable-proxy–enable-track-vars –enable-deflate –enable-cache –enable-mem-cache –enable-disk-cache –enable-rewrite=shared –enable-status=shared –enable-file-cache –enable-cgi –enable-cgid –enable-track-vars –enable-expires=share
make && sudo make install
sudo cp /usr/local/apache2/bin/apachectl /etc/init.d/apache.server
cd /etc/init.d
sudo update-rc.d apache.server defaults

##### php #####

tar -zxvf php*.tar.gz
cd php*
./configure –prefix=/usr/local/php –with-apxs2=/usr/local/apache/bin/apxs –with-config-file-path=/usr/local/apache/conf –enable-magic-quotes –with-openssl=/usr/local/ssl –with-zlib=/usr/local/zlib –with-zlib-dir=/usr/local/zlib –with-curl=/usr/local/curl –enable-ftp –with-openssl-dir=/usr/local/ssl –with-gd=/usr/local/gd –with-jpeg-dir=/usr/local/jpeg –with-png-dir=/usr/local/libpng –with-freetype-dir=/usr/local/freetype –enable-gd-native-ttf –enable-mbstring –with-mcrypt=/usr/local/libmcrypt –with-mhash=/usr/local/mhash –with-mysql=/usr/local/mysql –with-pdo-mysql=/usr/local/mysql –enable-soap –enable-sockets –enable-zip
make && sudo make install
sudo cp php.ini-dist /usr/local/apache/conf/php.ini

##### config #####
修改 php.ini 文件, 达到你自己的服务器要求. 修改后, 保存 OK
sudo vi /usr/local/apache/conf/httpd.conf
修改 apache 的配置文件. 让它支持 php
在 103 行默认安装PHP 后已经加入这一行:
LoadModule php5_module        modules/libphp5.so
没有多话自己加一下. 注意查看 apache 的 modlues 目录下是否有libphp5.so这个文件
在这行下面加入下面两行:
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
然后在 216 行附近(因为前面加入了两行字. 大概就在这个位置.) 找到:
DirectoryIndex index.html 后面添加变成现在这样:
DirectoryIndex index.html index.htm index.php

Ubuntu 10.10 (Maverick Meerkat) 正式发布

Ubuntu Linux是一份基于 Debian 的完整的桌面Linux操作系统,它可免费使用,并带有社团及专业的支持应。使用者拥有定制及改变他们软件的自由,这包括以任何他们认为适宜的方式。Ubuntu 每六个月发布一个新版本。代号为Maverick Meerkat的ubuntu 10.10已经正式发布,各版本下载地址如下:

下载:Ubuntu 10.10 (Maverick Meerkat)

UBUNTU下的LAMP配置

UBUNTU下的LAMP配置
安装系统

##### 安装编译环境 #####

sudo apt-get install build-essential

##### m4 #####

sudo dpkg –i m4*.deb

##### flex #####

sudo dpkg –i flex*.deb

##### zlib-devel #####

sudo apt-get install zlib1g-dev

##### libxml2 #####

sudo apt-get install libxml2 libxml2-dev

##### MySQL #####

tar -zxvf mysql*.tar.gz
sudo mv mysql*/ /usr/local/mysql
cd /usr/local/mysql
sudo groupadd mysql
sudo useradd -g mysql mysql
sudo scripts/mysql_install_db –user=mysql
sudo chown -R root .
sudo chown -R mysql data
sudo chgrp -R mysql .
sudo cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
sudo support-files/mysql.server start
sudo bin/mysqladmin -u root password ‘mypassword’
sudo support-files/mysql.server stop
sudo cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql.server
cd /etc/init.d
sudo update-rc.d mysql.server defaults

##### Apache #####

tar -zxvf httpd*.tar.gz
cd httpd*
./configure –prefix=/usr/local/apache –enable-mods-shared=all –enable-rewrite=shared –enable-so
make && sudo make install

##### zlib #####

tar -zxvf zlib*.tar.gz
cd zlib*
./configure –prefix=/usr/local/zlib
make && sudo make install

##### OpenSSL #####

tar -zxvf openssl*.tar.gz
cd openssl*
./config –prefix=/usr/local/ssl -openssldir=/usr/local/ssl –shared zlib
make && sudo make install

##### FreeType #####

tar -zxvf freetype*.tar.gz
cd freetype*
./configure –prefix=/usr/local/freetype
make && sudo make install

##### Jpeg #####

tar -zxvf jpeg*.tar.gz
cd jpeg*
sudo mkdir /usr/local/jpeg
sudo mkdir /usr/local/jpeg/bin
sudo mkdir /usr/local/jpeg/lib
sudo mkdir /usr/local/jpeg/include
sudo mkdir /usr/local/jpeg/man
sudo mkdir /usr/local/jpeg/man/man1
./configure –prefix=/usr/local/jpeg –enable-shared –enable-static
make && sudo make install

##### LibPNG #####

tar -zxvf libpng*.tar.gz
cd libpng*
./configure –prefix=/usr/local/libpng
make && sudo make install

##### GD Library #####

tar -zxvf gd*.tar.gz
cd gd*
./configure –prefix=/usr/local/gd –with-jpeg=/usr/local/jpeg –with-freetype=/usr/local/freetype –with-png –with-zlib=/usr/local/zlib
make && sudo make install

##### curl #####

tar -zxvf curl*.tar.gz
cd curl*
sudo mkdir -p /usr/local/curl
./configure –prefix=/usr/local/curl –with-ssl
make && sudo make install

##### libmcrypt #####

tar -zxvf libmcrypt*.tar.gz
cd libmcrypt*
./configure –prefix=/usr/local/libmcrypt
make && sudo make install

##### mhash #####

tar -zxvf mhash*.tar.gz
cd mhash*
./configure –prefix=/usr/local/mhash
make && sudo make install

##### php #####

tar -zxvf php*.tar.gz
cd php*
./configure –prefix=/usr/local/php –with-apxs2=/usr/local/apache/bin/apxs –with-config-file-path=/usr/local/apache/conf –enable-magic-quotes –with-openssl=/usr/local/ssl –with-zlib=/usr/local/zlib –with-zlib-dir=/usr/local/zlib –with-curl=/usr/local/curl –enable-ftp –with-openssl-dir=/usr/local/ssl –with-gd=/usr/local/gd –with-jpeg-dir=/usr/local/jpeg –with-png-dir=/usr/local/libpng –with-freetype-dir=/usr/local/freetype –enable-gd-native-ttf –enable-mbstring –with-mcrypt=/usr/local/libmcrypt –with-mhash=/usr/local/mhash –with-mysql=/usr/local/mysql –with-pdo-mysql=/usr/local/mysql –enable-soap –enable-sockets –enable-zip
make && sudo make install

关注一本书《完美应用ubuntu》

书名: 《完美应用Ubuntu》
出版社:电子工业出版社
作者:UbuntuChina
定价:55.00元
内容简介:
本书将向您展示一个年轻的 Linux 发行版——Ubuntu,一
个产生于太空中的崇高梦想,从初识到安装,从使用到管理,
本书秉承开源社区所践行并传播的“乐于分享、善待他人”的
Ubuntu 理念,向您阐释如何完美应用Ubuntu。
本书适合所有 Ubuntu 初学者、爱好者入门和学习。

ubuntu之所以闲杂这么火,也是因为他的傻瓜化,现在真实越来越简单了。记得我在接触的时候应该是5.10现在一晃已经要出8.10了,三年了,时光如此匆匆。真的希望时光慢慢的走。但是他的每个版本都修复很多东西现在的版本已经没有用过了,想在电脑上直接安装不在使用虚拟机玩啦,还真怕使不习惯,找找书学习下吧。

假如我使用ubuntu

  windows一晃也用了10来年了,太多太多的东西已经让我非常的熟悉的。最近想换台电脑连带的就想整点有的没的,ubuntu是一个非常理想的选择,linux现在的程序也多了起来,我觉得应该可以满足需求。现在这台用着的电脑就不卖了,用着吧。这台还是用windows,呵呵 这样应该没什么问题了,只是一些游戏还是想玩的,linux或许虚拟可以但是会稳定嘛。呵呵 以后在说吧 等买了新电脑,就试试吧。