编译安装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/
在线安装
原文地址:http://blog.51cto.com/14036860/2329109