凌动魅力

Month: 十二月 2009

Ubuntu Server (环境安装笔记)

花了差不多一天时间整理的.
不过 lighttpd 部份的 config 还是没有修改
看来下一篇写的是相关的 config 修改吧..

################
# 基本环境安装
################

# 更新并升级软体库
sudo apt-get update
sudo apt-get upgrade

# 安装 GCC , G++, make, ZIP
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install make
sudo apt-get install unzip

# 安装 termcap (MYSQL 编译所需)
sudo apt-get install ncurses-dev

# 切换为 ROOT 方便之后工作
sudo su –

################
# 安装 ProFTPD
################

wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.2.tar.gz
tar zxvf proftpd-1.3.2.tar.gz
cd proftpd-1.3.2
./configure –prefix=/usr/local/proftpd
make

(启动方法)
/usr/local/proftpd/sbin/proftpd

################
# 安装 MYSQL
################

wget wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.31.tar.gz/from/http://mysql.ntu.edu.tw/
tar zxvf mysql-5.1.31.tar.gz
cd mysql-5.1.31
./configure –prefix=/usr/local/mysql51
make
make install

(增加用户 mysql)
useradd mysql

(改变权限)
(chown -R root:root /usr/local/mysql51)

(安装 Database)
/usr/local/mysql51/bin/mysql_install_db –user=mysql

(複製启动档桉到初始化时执行目录)
cd support-files/
cp mysql.server /etc/init.d/mysql
chmod 755 /etc/init.d/mysql

(启动 MYSQL Server)
/etc/init.d/mysql start

(变更 root 密码)
/usr/local/mysql51/bin/mysqladmin -u root password ‘new-password’

################
# 安装 PHP
################

# 先安装 zlib
wget http://www.zlib.net/zlib-1.2.3.tar.gz
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make
make install

# 再安装 zziplib
wget http://jaist.dl.sourceforge.net/sourceforge/zziplib/zziplib-0.13.50.tar.bz2
tar jxvf zziplib-0.13.50.tar.bz2
cd zziplib-0.13.50
./configure
make
make install

# 再安装 LibPng
wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.34.tar.gz
tar zxvf libpng-1.2.34.tar.gz
cd libpng-1.2.34
cp scripts/makefile.std makefile
make test
make install

# 再安装 Freetype
wget http://ftp.twaren.net/Unix/NonGNU/freetype/freetype-2.3.8.tar.gz
tar zxvf freetype-2.3.8.tar.gz
cd freetype-2.3.8
./configure –prefix=/usr/local/modules/freetype
make
make install

# 再安装 LibConv
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.12.tar.gz
tar zxvf libiconv-1.12.tar.gz
cd libiconv-1.12
./configure
make
make install

# 再安装 JPEG Lib (JPEGSRC.V6B)
mkdir /usr/local/modules
mkdir /usr/local/modules/jpeg6
mkdir /usr/local/modules/jpeg6/bin
mkdir /usr/local/modules/jpeg6/lib
mkdir /usr/local/modules/jpeg6/include
mkdir /usr/local/modules/jpeg6/man
mkdir /usr/local/modules/jpeg6/man/man1

wget http://www.ijg.org/files/jpegsrc.v6b.tar.gz
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure –prefix=/usr/local/modules/jpeg6 –enable-shared –enable-static
make
make install

# 再安装 GD
wget http://www.libgd.org/releases/gd-2.0.35.tar.gz
tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure –prefix=/usr/local/modules/gd –with-jpeg=/usr/local/modules/jpeg6 –with-png –with-zlib –with-freetype=/usr/local/modules/freetype
make
make install

# 再安装 Lib XML2 (以防 PHP 出现错误)
wget ftp://xmlsoft.org/libxml2/libxml2-2.7.3.tar.gz
tar zxvf libxml2-2.7.3.tar.gz
cd libxml2-2.7.3
./configure
make
make install

# 再安装 Lib CURL (以防 PHP 出现错误)
apt-get install curl
apt-get install libcurl4-openssl-dev

# 再安装 Open SSL (这用旧版本,因为某原因)
wget http://www.openssl.org/source/openssl-0.9.7a.tar.gz
tar zxvf openssl-0.9.7a.tar.gz
cd openssl-0.9.7a
./config –openssldir=/usr/local/openssl
make
make install

# 最后安装 PHP
wget http://hk.php.net/get/php-5.2.8.tar.gz/from/this/mirror
tar zxvf php-5.2.8.tar.gz
cd php-5.2.8
./configure –prefix=/usr/local/php5-fastcgi –enable-mbstring –enable-pcntl –with-mysql=/usr/local/mysql51 –enable-fastcgi –enable-force-cgi-redirect –with-gd=/usr/local/modules/gd –with-zlib –with-png-dir=/usr/local/lib –with-jpeg-dir=/usr/local/modules/jpeg6 –with-freetype-dir=/usr/local/modules/freetype –with-iconv=/usr/local/lib –enable-gd-native-ttf –enable-dbase –enable-exif –enable-ftp –enable-sqlite-utf8 –enable-sockets –enable-sysvmsg –enable-sysvsem –enable-sysvshm –enable-shmop –with-curl –with-openssl=/usr/local/openssl
make
make install

sed -e ’s/.///’ php.ini-dist > /usr/local/php5-fastcgi/lib/php.ini
strip /usr/local/php5-fastcgi/bin/php

# 再来安装 eaccelerator
wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.zip
unzip eaccelerator-0.9.5.3.zip
cd eaccelerator-0.9.5.3
/usr/local/php5-fastcgi/bin/phpize
./configure –enable-eaccelerator=shared –with-php-config=/usr/local/php5-fastcgi/bin/php-config
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator

(使用 VI , 移到最下)
vim /usr/local/php5-fastcgi/lib/php.ini

(加入内容)
extension=”eaccelerator.so”
eaccelerator.shm_size=”16″
eaccelerator.cache_dir=”/tmp/eaccelerator”
eaccelerator.enable=”1″
eaccelerator.optimizer=”1″
eaccelerator.check_mtime=”1″
eaccelerator.debug=”0″
eaccelerator.filter=””
eaccelerator.shm_max=”0″
eaccelerator.shm_ttl=”0″
eaccelerator.shm_prune_period=”0″
eaccelerator.shm_only=”0″
eaccelerator.compress=”1″
eaccelerator.compress_level=”9″

################
# 安装 Lighttpd
################

# 先安装 pcre
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.8.zip
unzip pcre-7.8.zip
cd pcre-7.8
./configure –enable-utf8 –enable-unicode-properties
make
make install

# 再安装 bzip2
wget http://www.bzip.org/1.0.5/bzip2-1.0.5.tar.gz
tar zxvf bzip2-1.0.5.tar.gz
cd bzip2-1.0.5
make install

# 最后
wget http://www.lighttpd.net/download/lighttpd-1.4.20.tar.gz
tar zxvf lighttpd-1.4.20.tar.gz
cd lighttpd-1.4.20
./configure –prefix=/usr/local/lighttpd –with-openssl=/usr/local/openssl
make
make install

cd doc
mkdir /usr/local/lighttpd/conf
cp lighttpd.conf /usr/local/lighttpd/conf/
cp rc.lighttpd.redhat /etc/init.d/lighttpd

(修改开机启动档)
vim /etc/init.d/lighttpd

(修改两位置, 主要是引住的那个位置)
LIGHTTPD_CONF_PATH=”/usr/local/lighttpd/conf/lighttpd.conf”
lighttpd=”/usr/local/lighttpd/sbin/lighttpd”

(最后是修改 Config 档桉要用到的目录)
mkdir /usr/local/lighttpd/log/

(其他设定请参考说明)

来自:http://zeuik.com/studio/2009/02/11/ubuntu-server-phpmysqllighttpd-%E7%8D%A8%E7%AB%8B%E5%AE%89%E8%A3%9D%E7%AD%86%E8%A8%98/

冰毒配方

2C2H2+3H2O===CH3C=O-CH3+CO2+2H2 (催化剂ZnO,400OC)

或2O2+CH3CH=CH2===CH3C=OCH3 (PtCL2,CuCL2.90-120OC,9-12个大气压)

CH3C=O-CH3+CI2===CH3C=O-CH2CL+HCL (取代反应)

C6H6+CH3C=O-CH2CL+=== C6H5CH2C=OCH3 (催化剂ALCI3)

C6H5CH2C=OCH3 +CH3NH2===C6H5CH2C(CH3)(OH)-NH-CH3

Copyright © 2017 凌动魅力

蜀ICP备15003767号-1 Up ↑