LNMP

来源:互联网 发布:js除于10等于整数 编辑:程序博客网 时间:2024/05/21 10:17
--prefix=/usr/local/web/mysql/ 
--without-debug 
--with-unix-socket-path=/tmp/mysql.sock 
--with-client-ldflags=-all-static 
--with-mysqld-ldflags=-all-static 
--enable-assembler 
--with-extra-charsets=gbk,gb2312,utf8 
--with-pthread 
--enable-thread-safe-client








安装cmake


安装依赖包
yum install bison




cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/web/mysql -DWITH_DEBUG=0 -DMYSQL_UNIX_ADDR=/tmp/mysqld.sock -DEXTRA_CHARSETS=gbk,gb2312,utf8 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_TCP_PORT=3306 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci 


cp support-files/my-medium.cnf /usr/local/web/mysql/my.cnf
初始化mysql
sh ./scripts/mysql_install_db --user=mysql --basedir=/usr/local/web/mysql --datadir=/usr/local/web/mysql/data --port=3306 --socket=/tmp/mysql.sock --defaults-file=/usr/local/web/mysql/my.cnf




/usr/local/web/mysql/script/mysql_install_db --defaults-file=/usr/local/web/mysql/my.cnf --basedir=/usr/local/web/mysql --datadir=/usr/local/web/mysql/data --user=mysql --pid-file=/usr/local/web/mysql/mysql.pid --port=3306 --socket=/tmp/mysql.sock


启动mysql:./bin/mysqld_safe --user=mysql




安装php
tar -zxvf php-5.4.20.tar.gz 




生成环境
./configure --prefix=/usr/local/web/php --with-mysql=/usr/local/web/mysql --with-config-file-path=/usr/local/web/php/etc --enable-force-cgi-redirect--enable-fpm 
--enable-mbstring 
--with-gd 
--with-curlwrappers
--with-openssl 
--enable-sockets
--enable-gd-native-ttf 
--with-freetype-dir 
--with-jpeg-dir 
--with-png-dir 
--with-zlib-dir 
--with-libxml-dir 
--enable-xml 
--with-curl 
--enable-ftp
--enable-soap
--enable-mbregex
--with-mcrypt
--with-mhash  
--enable-sysvsem
--enable-inline-optimization
--disable-debug




安装nginx


./configure --user=www --group=www --prefix=/usr/local/web/nginx --with-http_stub_status_module --with-pcre= --with-http_realip_module --with-http_image_filter_module
0 0
原创粉丝点击