1. 程式人生 > >LNMP源碼安裝禪道

LNMP源碼安裝禪道

nginx follow rec oca general www enabled scrip table

編譯安裝mysql
下載:wget ‘https://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.39.tar.gz‘
安裝依賴
yum install -y wget lrzsz unzip gcc gcc-c++ make tar openssl openssl-devel cmake ncurses ncurses-devel
編譯:
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS:STRING=all -DWITH_DEBUG=0 -DWITH_SSL=yes -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 &&make &&make install
初始化msyql
yum -y install perl-Module-Install
scripts/mysql_install_db --basedir=/usr/local/mysql --user=mysql --datadir=/data/mysql/
登陸:
msyql -uroot -h127.0.0.1
編譯安裝php:
下載: wget ‘http://php.net/get/php-5.6.38.tar.gz/from/a/mirror‘
安裝依賴我這裏安裝的比較多:
yum -y install tar gcc gcc-c++ make pcre pcre-devel zlib zlib-devel openssl openssl-devel libxml2 libxml2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel openldap openldap-devel libmcrypt libmcrypt-devel
編譯:
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-ctype --with-pdo-mysql=/usr/local/mysql --with-mysql=mysqlnd --with-mysqli=mysqlnd --enable-pdo --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap-sasl --with-xmlrpc &&make &&make instll
如果編譯報錯:
home/oldboy/tools/php-5.3.27/sapi/cli/php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
解決:
find / -name "libmysqlclient.so.18"
echo "/application/mysql-5.5.32/lib" >>/etc/ld.so.conf
ldconfig
安裝nginx
下載:wget ‘http://nginx.org/download/nginx-1.12.2.tar.gz‘
安裝依賴
yum install -y gcc gcc-c++ make pcre pcre-devel zlib zlib-devel openssl openssl-devel
編譯:
./configure --prefix=$DIR/nginx --with-http_ssl_module --with-stream --with-stream_ssl_module --with-http_stub_status_module && make && make install
nginx/.conf配置:
location / {
root html;
index index.html index.htm index.php;
}
location ~ .php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

         include    fastcgi.conf;
    }

禪道安裝:
下載:wget http://dl.cnezsoft.com/zentao/10.6/ZenTaoPMS.10.6.stable.zip
unzip解壓到nginx的html目錄
訪問ip/zentaopms/www/
在線安裝

LNMP源碼安裝禪道