工作笔记:001

部分内容:lamp搭建

系统:centos6.4 64位

Cmake 安装

tar –zxvf cmake-2.8.4.tar.gz

cd cmake-2.8.4

./bootstrap --prefix=/usr/local/cmake

make

make install

 

MySQL 安装

groupadd mysql

useradd –g mysql –s /sbin/nologin mysql

cd mysql-5.5.25

/usr/local/cmake/bin/cmake \

-DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DEXTRA_CHARSETS=all -DENABLED_LOCAL_INFILE=1 \

-DWITH_READLINE=1 -DDEFAULT_CHARSET=utf8 \

-DDEFAULT_COLLATION=utf8_general_ci -DWITH_EMBEDDED_SERVER=1 \

-DWITH_SSL=system -DENABLE_DTRACE=0

make

make install

chown -R mysql.mysql /usr/local/mysql

cd /usr/local/mysql

scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data

cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf

cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld

chmod 755 /etc/init.d/mysqld

chkconfig –add mysqld

chkconfig mysqld on

/etc/init.d/mysqld start

 

Apache2 安装

 

tar –zxvf httpd-2.2.8.tar.gz

cd httpd-2.2.8

 ./configure --prefix=/usr/local/apache2 --enable-modules=most --enable-so

make

make install

 

Curl 安装

tar –zxvf curl-7.26.0.tar.gz

cd curl-7.26.0

./configure –prefix=/usr/local/curl

make

make install

 

 PhPp安装

 

tar –zxvf php-5.3.10.tar.gz

cd php-5.3.10

./configure --prefix=/usr/local/php --enable-mbstring --enable-sockets --enable-soap \

--enable-zip --enable-pdo  --with-apxs2=/usr/local/apache2/bin/apxs \

--with-zlib --with-config-file-path=/usr/local/php/lib --with-pdo-mysql=/usr/local/mysql \

--with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-curl=/usr/local/curl

make

make install