yum -y install ncurses* autoconf libxslt* libtool-libs libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel gd* zlib* curl* apr* libmcrypt* libxml2* libxslt* libtool*
tar zxvf mysql-5.5.3-m3.tar.gz
useradd -s /sbin/nologin mysql
cd mysql-5.5.3-m3
./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=gbk,gb2312,utf8 --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-ssl --with-embedded-server --enable-local-infile --with-plugins=all --with-mysqld-ldflags=-all-static --with-mysqld-user=mysql
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root.mysql . ; chown -R mysql var
ll
/usr/local/mysql/bin/mysqld_safe --user=mysql &
netstat -tnl|grep 3306
bin/mysqladmin version
bin/mysqladmin variables
bin/mysql -u root
mysql> delete from mysql.user where host='localhost' and user='';
mysql> flush privileges;
mysql> set password for 'root'@'localhost'=password('123456');
cd /usr/local/src/mysql-5.5.3-m3
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
chown root.root /etc/rc.d/init.d/mysqld
chmod 755 /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
chkconfig --level 345 mysqld on
chkconfig --list mysqld
/etc/init.d/mysqld start
/usr/local/mysql/bin/mysql -u root -p
/etc/init.d/mysqld stop
/etc/init.d/mysqld start
cd /usr/local/mysql/libexec
cp mysqld mysqld.old
strip mysqld
vi /etc/rc.d/init.d/mysqld 添加下面两句
#chkconfig --add mysqld
#chkconfig --level 345 mysqld on
service mysqld restart
ln -s /usr/local/mysql/bin/* /sbin/
----------------------------------------------------------------------------------------------------------------------------------------------------------
jpegsrc.v7.tar.gz
tar zxvf jpegsrc.v7.tar.gz
cd jpeg-7/
mkdir -pv /usr/local/jpeg7/{bin,lib,include,man,man/manl}
./configure --prefix=/usr/local/jpeg7/ --enable-shared --enable-static
make && make install
wget
tar zxvf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1
./configure --prefix=/usr/local/libiconv
make && make install
wget
tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure -prefix=/usr/local/gd2 -with-jpeg=/usr/local/jpeg7/ -with-png -with-zlib -with-freetype
make && make install
-------------------------------------------------------------------------------------------------------------------------------------------------------------
httpd-2.2.11.tar.gz
tar zxvf httpd-2.2.11.tar.gz
cd httpd-2.2.11
./configure --prefix=/usr/local/apache --with-z=/usr/local/zlib --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-curl=/usr/local/curl/ --with-included-apr --disable-userdir --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support
(yum)
./configure --prefix=/usr/local/apache --with-z --with-apr --with-apr-util --with-curl --with-included-apr --disable-userdir --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support
make && make install
/usr/local/apache/bin/apachectl start
netstat -tnl | grep 80
echo "/usr/local/apache/bin/apachectl start">> /etc/rc.d/rc.local
cat /etc/rc.d/rc.local
cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd
vim /etc/rc.d/init.d/httpd
# chkconfig: 2345 10 90
# description:Activates/Deactivates Apache Web Server (插入到第二行)
chkconfig --add httpd ; chkconfig --level 345 httpd on
wget
tar zxvf php-5.3.19.tar.gz
cd php-5.3.19
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir --with-png-dir --with-jpeg-dir=/usr/local/jpeg7/ --with-iconv=/usr/local/libiconv/ --with-freetype-dir --with-pdo-mysql=/usr/local/mysql --with-iconv=/usr/local/libiconv --with-gd=/usr/local/gd2/ --with-zlib-dir --with-mcrypt --with-mysqli=/usr/local/mysql/bin/mysql_config --with-curl=/usr/local/curl/ --enable-ftp --enable-soap --enable-mbstring=all --enable-xml --enable-gd-native-ttf --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-sockets --with-xmlrpc --enable-zip --with-bz2 --enable-dba --with-mhash --with-mysql=mysqlnd --with-mysqli=mysqlnd --enable-mysqlnd
(yum)
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-iconv=/usr/local/libiconv/ --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-ftp --enable-xml --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --no-create --no-recursion
(new)
./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir --with-png-dir --with-jpeg-dir --with-iconv=/usr/local/libiconv/ --with-freetype-dir --with-pdo-mysql=/usr/local/mysql --with-gd --with-zlib-dir --with-mcrypt --with-mysqli=/usr/local/mysql/bin/mysql_config --with-curl --enable-ftp --enable-soap --enable-mbstring=all --enable-xml --enable-gd-native-ttf --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-sockets --with-xmlrpc --enable-zip --with-bz2 --enable-dba --with-mhash --with-mysql=mysqlnd --with-mysqli=mysqlnd --enable-mysqlnd
make ZEND_EXTRA_LIBS='-liconv'
make install
cp php.ini-production /usr/local/php/etc/php.ini
vim /usr/local/apache/conf/httpd.conf
DocumentRoot "/web/apache/htdocs" web文件根目录
LoadModule php5_module modules/libphp5.so (这里是加载的php动态模块)
148 Options Indexes FollowSymLinks (显示网站的配置文件目录)
170 DirectoryIndex index.php index.html (默认主页)
155 AllowOverride all (开启rw功能)
312 AddType application/x-gzip .gz .tgz(下面加)
Addtype application/x-httpd-php .php .phtml
Addtype application/x-httpd-php-source .phps
/usr/local/apache/bin/apachectl start
vi /usr/local/apache/htdocs/test.php
phpinfo();
?>
/usr/local/apache/bin/apachectl stop
/usr/local/apache/bin/apachectl start
phpMyAdmin-3.2.2-rc1-all-languages.tar.gz
tar zxvf phpMyAdmin-3.2.2-rc1-all-languages.tar.gz
mv phpMyAdmin-3.2.2-rc1-all-languages /usr/local/apache/htdocs/phpmyadmin
cd /usr/local/apache/htdocs/
chmod 777 -R phpmyadmin/
添加PHP 插件 memcache、redis
tar zxvf memcache-2.2.5.tgz
cd memcache-2.2.5
/usr/local/php/bin/phpize
./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config
make && make install
ll /usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/
cp modules/memcache.so /usr/local/php/etc/
接下来在php.ini 中添加extension=memcache.so
vim /usr/local/php/etc/php.ini
extension=memcache.so
unzip phpredis-master.zip
cd phpredis-master
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
cp modules/redis.so /usr/local/php/etc/
接下来在php.ini 中添加extension=/redis.so
vim /usr/local/php/etc/php.ini
extension=redis.so
重新启动apache服务
/etc/init.d/httpd restart
查看phpinfo中是否有新添加的插件
wget
wget
clear
tar zxvf libssh2-1.4.2.tar.gz
cd libssh2-1.4.2
./configure
make
make install
cd ..
ls
tar zxvf ssh2-0.11.3.tgz
cd ssh2-0.11.3
/usr/local/php/bin/phpize
./configure --with-ssh2 --with-php-config=/usr/local/php5/bin/php-config
make
make install
vim /usr/local/php5/etc/php.ini
cp modules/ssh2.so /usr/local/php5/etc/
ifconfig
Php 模块
--with-ldap
cp -frp /usr/lib64/libldap* /usr/lib/
模块名称OpenLDAP
阅读(1289) | 评论(0) | 转发(0) |