open-falcon(v0.2)基础环境部署

来源:互联网 发布:报刊制作软件coreldraw 编辑:程序博客网 时间:2024/06/05 23:59

今天安装falcon-plus,下面为用基础环境配置。

centos 6.8  alisql5.6.32   redis-3.2.8 cmake-3.9.1 bison-3.0 openssl-1.0.2h redis-3.2.8

yum环境安装

yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel zip unzip ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5-devel libidn libidn-devel openssl openssh openssl-devel libxslt-devel libevent-devel ntp  libtool-ltdl bison libtool vim-enhanced python wget lsof iptraf strace lrzsz kernel-devel kernel-headers pam-devel Tcl/Tk  cmake  ncurses-devel bison setuptool popt-devel net-snmp screen perl-devel pcre-devel net-snmp screen tcpdump rsync sysstat man iptables sudo idconfig git system-config-network-tui bind-utils update arpscan tmux elinks numactl iftop  bwm-ng redhat-lsb-core
yum -y install  readline* gcc* xmlto kernel-devel yum* screen vim* psmisc wget lrzsz pcre-devel libtidy libtidy-devel iptraf sysstat libevent libevent-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker tar rrdtool ntp* dos2unix setup* net-snmp-utils net-snmp-devel ruby ruby-devel php-snmp cmake net-snmp-perl net-snmp net-snmp-libs wget elinks make autoconf213 m4 gcc gcc-c++ automake autoconf fontconfig fontconfig-devel libjpeg libjpeg* libjpeg-devel libpng libpng-devel freetype freetype* freetype-devel libxml2 libxml2-devel libdhash libdhash-devel  libxslt* zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2* libc-client libc-client-devel libicu-devel ncurses ncurses-devel xmlrpc-c xmlrpc-c-devel curl curl-devel e2fsprogs e2fsprogs-devel  krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel openldap-clients openldap-servers net-tools deltarpm gd gd-devel pam* gettext gettext-devel  keyutils  compat* mpfr cpp libgomp libstdc++-devel ppl cloog-ppl keyutils-libs-devel libcom_err-devel libsepol-devel libXpm*  php-gd ncurses* libtool*  patch unzip bison-devel bison libcom_err-devel libsepol-devel gtk* libselinux-devel libtiff libtiff*  php-common policycoreutils telnet t1lib t1lib* nasm nasm*

cmake安装

yum remove cmake
wget https://cmake.org/files/v3.9/cmake-3.9.1.tar.gz .

tar zxvf
cmake-3.9.1.tar.gz
cd cmake-3.9.1

./configure

make && make install
cmake -version
----------------------
显示如下成功

cmake version 3.9.1

bison安装

yum remove bison*
wget http://ftp.gnu.org/gnu/bison/bison-3.0.tar.gz.
tar zxvf bison-3.0.tar.gz
cd bison-3.0
./configure
make && make install

bison --version
--------------------

显示如下成功

bison (GNU Bison) 3.0

openssl安装

wget https://www.openssl.org/source/openssl-1.0.2h.tar.gz .yum install -y zlibtar zxf openssl-1.0.2h.tar.gzcd openssl-1.0.2h./config shared zlibmakemake installmv /usr/bin/openssl /usr/bin/openssl.bakmv /usr/include/openssl /usr/include/openssl.bakln -s /usr/local/ssl/bin/openssl /usr/bin/opensslln -s /usr/local/ssl/include/openssl /usr/include/opensslecho “/usr/local/ssl/lib” >> /etc/ld.so.confldconfig -vopenssl version -a
-------------------
显示如下成功

OpenSSL 1.0.2h  3 May 2016

创建用户和所属组

groupadd mysqluseradd -M -s/sbin/nologin -g mysql -r mysql

改变并且使用devtoolset-4 里面的GCC 套装

yum install scl-utils
scl enable devtoolset-4 bash
gcc -v
-------------
显示如下成功

gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)

 

下载阿里开源数据库

wget https://github.com/alibaba/AliSQL/archive/master.zip .
unzip master.zip
cd AliSQL-master
cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DWITH_EMBEDDED_SERVER=0 -DWITH_EXTRA_CHARSETS=all -DWITH_MYISAM_STORAGE_ENGINE=1  -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_CSV_STORAGE_ENGINE=1  -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 
make && make install

安装环境变量

export PATH=/usr/local/mysql/bin:$PATH
开启TokuDB,不执行会提示:[ERROR] TokuDB: Huge pages are enabled, disable them before continuing
if
test -f /sys/kernel/mm/transparent_hugepage/enabled; then echo never > /sys/kernel/mm/transparent_hugepage/enabledfiif test -f /sys/kernel/mm/transparent_hugepage/defrag; then echo never > /sys/kernel/mm/transparent_hugepage/defragfi

配置并启动

cd /usr/local/mysql./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/datacp ./support-files/my-default.cnf /etc/my.cnfcp ./support-files/mysql.server /etc/init.d/mysqld chmod +x /etc/init.d/mysqld chowd -R mysql:mysql /usr/local/mysqlexport PATH=/usr/local/mysql/bin:$PATH   source /etc/profile修改启动文件里面的base和databasedir=/usr/local/mysqldatadir=/usr/local/mysql/data启动mysqlservice msyqld start

开机启动

chkconfig --level 35 mysqld on

设置mysql密码

mysqladmin -u root password

 安装redis

tar zxvf redis-3.2.8.tar.gzcd redis-3.2.8makemake PREFIX=/usr/local/redis installmkdir /usr/local/redis/etcmkdir /usr/local/redis/varcp redis.conf /usr/local/redis/etc/mkdir /usr/local/redis/var

修改配置文件

daemonize yesbind 192.168.20.88port 6379timeout 300loglevel noticelogfile "/usr/local/redis/var/redis.log"databases 16dbfilename dump.rdbdir "/usr/local/redis/var"#requirepass 123456maxclients 10000 maxmemory 1024MBappendonly yes  appendfilename "appendonly.aof" appendfsync everysec

启动redis

/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf

 

 

 

 

 

 

cd /usr/local/mysql

原创粉丝点击