Rootop 服务器运维与web架构

lamp常用编译参数


yum -y install gcc gcc-c++  make automake autoconf kernel-devel ncurses-devel libxml2-devel openssl-devel curl-devel libjpeg-devel libpng-devel  pcre-devel libtool-libs freetype-devel gd zlib-devel file bison patch mlocate flex diffutils   readline-devel glibc-devel glib2-devel bzip2-devel gettext-devel libcap-devel libmcrypt-devel
apache编译参数:
./configure --prefix=/usr/local/apache --with-included-apr --enable-mods-shared=all     全部模块
useradd mysql
mysql编译参数:
./configure --prefix=/usr/local/mysql/ --localstatedir=/usr/local/mysql/data --without-debug --with-unix-socket-path=/tmp/mysql.sock --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --with-extra-charsets=all --with-pthread --with-plugins=all     全部引擎

cp support-files/my-medium.cnf /etc/my.cnf

/usr/local/mysql/bin/mysql_install_db --user=mysql

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

/usr/local/mysql/bin/mysqladmin -u root password '新密码'
php编译参数:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-openssl --with-zlib --enable-bcmath --with-bz2 --with-curl --enable-ftp --with-gd --enable-gd-native-ttf --with-gettext --with-mhash --enable-mbstring --with-mcrypt --enable-soap --enable-zip --enable-json --with-iconv=/usr/local/libiconv --with-mysql=/usr/local/mysql --without-pear

仅供编译参考

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/1444.html

作者:Venus

专注于 服务器运维与性能优化 联系方式:https://www.rootop.org/about

评论已关闭。