Ubuntu系統筆記(轉)

BSDLite發表於2007-08-15
Ubuntu系統筆記(轉)[@more@]
CODE:
安裝ubuntu6 server版本,過程略……

shell> apt-get install ssh
shell> sudo passwd root
shell> apt-get install build-essential
shell> apt-get install gcc make autoconf automake libtool g++-2.95 flex

配置c++編譯器選項,針對不同的CPU進行編譯最佳化.[更多CPU的編譯引數]

# Intel PentiumIV,Celeon Family
export CFLAGS="-march=pentium4 -mfpmath=sse -msse2 -O2 -pipe -s -fomit-frame-pointer"

# AMD Alton,Duron Family
export CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer -msse -mmmx -m3dnow -mfpmath=sse"




apt-cache search curses | grep lib
安裝libncurses5-dev


===============================================
安裝mysql、apache、php環境

------------------
##### Mysql #####

./configure --prefix=/opt/mysql
--with-mysqld-user=kevin
--with-extra-charsets=all
--with-unix-socket-path=/opt/mysql/var/mysql.sock

cp /opt/mysql/share/mysql/my-medium.cnf /etc/my.cnf
/opt/mysql/bin/mysql_install_db
/opt/mysql/share/mysql/mysql.server start

ps -aux | grep mysqld
chmod 755 /opt/mysql/var
chown -R kevin:kevin /opt/mysql/var
su kevin
/opt/mysql/share/mysql/mysql.server start

chown -R kevin.kevin /opt/mysql/
/opt/mysql/bin/mysqladmin -u root password 123456


------------------
##### zlib #####
zlib-1.2.3.tar.bz2 (PNG Support)

tar jxf zlib-1.2.3.tar.bz2
cd zlib-2.2.3
./configure
make
make install

------------------
##### OpenSSL #####

cd openssl-0.9.7g
./config --prefix=/usr/local/ssl
--openssldir=/usr/local/ssl
shared
zlib

make
make install
cd ..


------------------
##### Apache #####

echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
/sbin/ldconfig

./configure --prefix=/opt/apache
--enable-track-vars
--enable-cgi
--with-config-file-path=/opt/apache/conf
--enable-modules=so
--enable-so
--enable-ssl
--with-ssl=/usr/local/ssl
--enable-rewrite=shared

--enable-mods-shared=all (可選)


------------------
##### jpegsrc.v6b.tar.gz #####

tar zxf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure
make
mkdir -p /usr/local/man/man1
make install
make install-lib

-------------------------
##### freetype-2.2.1.tar.bz2 (TIFF Support) #####

tar jxf freetype-2.2.1.tar.bz2
./configure
make
make install

----------------

##### libpng-1.2.7.tar.bz2 #####

tar jxf libpng-1.2.7.tar.bz2
cd libpng-2.2.7
cp scripts/makefile.gcmmx makefile
make
make install

------------------
##### gd-2.0.9.tar.gz #####

tar zxf gd-2.0.9.tar.gz
cd gd-2.0.9
./configure
make
make install
cp gd.h /usr/local/lib/

-----------------
##### libxml2 #####

./configure
make
make install

------------------
##### ClibPDF #####

cd ClibPDF/source
cp Makefile.Linux makefile
make
make install


##### PHP #####

./configure --prefix=/opt/php
--with-apxs2=/opt/apache/bin/apxs
--with-gd
--with-jpeg-dir
--with-ttf
--with-zlib-dir
--with-png-dir
--enable-magic-quotes
--with-mysql=/opt/mysql
--with-mysql-sock=/opt/mysql/var/mysql.sock
--with-iconv
--with-mbstring
--enable-mbstring
--enable-track-vars
--enable-force-cgi-redirect
--enable-ftp
--with-config-file-path=/opt/php/etc
--with-openssl=/usr/local/ssl
--with-openssl-dir=/usr/local/ssl
--with-cpdflib=/usr/local
--with-pear=/opt/php/pear
--with-pdo-mysql=/opt/mysql

cp php.ini-dist /opt/php/etc/php.ini

nano -w /opt/apache/conf/httpd.conf

ServerName 127.0.0.1:80
DirectoryIndex index.php
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

NameVirtualHost *:80

ServerName 192.168.1.65
ServerAdmin kevin@networks.com
ServerPath /
DocumentRoot /var/web



ln -s /opt/mysql/lib/mysql/libmysqlclient.so.15 /usr/lib/libmysqlclient.so.15


nano -w /etc/init.d/rcS
mkdir /var/run/named &
/opt/bind/sbin/named -c /opt/bind/etc/named.conf &


cd /etc/init.d

ln -s /opt/apache/bin/apachectl apache
ln -s /opt/mysql/share/mysql/mysql.server mysql
cd /etc/rc2.d
ln -s /etc/init.d/apache S17apache
ln -s /etc/init.d/mysql S18mysql

nano -w /etc/environment

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/opt/mysql/bin:/opt/apache/bin"
LANG="zh_CN.GB2312"
LANGUAGE="zh_CN:zh:en_US:en"


reboot.................
over..........

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10617542/viewspace-959954/,如需轉載,請註明出處,否則將追究法律責任。

下一篇: 中秋與Linux節(轉)
Ubuntu系統筆記(轉)
請登入後發表評論 登入
全部評論

相關文章