您现在的位置是:首页 > 文章详情

Linux java mysql es redis 安装

日期:2015-11-26点击:444

 

0关闭防火墙

 

 chkconfig iptables off

 

1空白的center os6

  

 修改 host vi /etc/sysconfig/network HOSTNAME=mechine001 vi /etc/hosts 127.0.0.1 mechine001 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 mechine001 localhost localhost.localdomain localhost6 localhost6.localdomain6

 

2 切换到root用户

   

 su root chmod 777 /etc/sudoers root ALL=(ALL) ALL baoyou ALL=(ALL) ALL %wheel ALL=(ALL) ALL %wheel ALL=(ALL) nopasswd:ALL chmod 644 /etc/sudoers 可以获取root 用户了

 

 

3 在/home/baoyou 下创建 package、soft文件夹

   

 

4 安装java

    

 下载 jdk jre-7u5-linux-i586.tar.gz 解压 tar -zxvf jre-7u5-linux-i586.tar.gz 移动到 mv jre1.7.0_05 ../soft/jre1.7.0_05 修改配置文件 sudo -s vi /etc/profile export JAVA_HOME=/home/baoyou/soft/jre1.7.0_05/ export PATH=.:$JAVA_HOME/bin:$PATH source /etc/profile java -version

 

 

5 安装maven

     

 下载 apache-maven-3.2.3-bin.tar.gz 解压 tar -zxvf apache-maven-3.2.3-bin.tar.gz 移动 mv apache-maven-3.2.3 ../soft/maven 修改配置文件 sudo -s vi /etc/profile export MAVEN_HOME=/home/baoyou/soft/maven/ export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH source /etc/profile mvn -v

  

6 安装nexus

     

 下载 nexus-2.11.4-01-bundle.tar.gz 解压 tar -zxvf nexus-2.11.4-01-bundle.tar.gz 移动 mv nexus-2.11.4-01 ../soft/nexus 修改配置文件 进入 cd soft/nexus sudo chown -R baoyou:baoyou * cd bin ./nexus start 成功启动

 

 

7 安装mysql 卸载 mysql

      

 rpm -qa | grep -i mysql rpm -e --nodeps xxx rpm -ev xxxx rpm --import /etc/pki/rpm-gpg/RPM* yum remove xxx rm -rf /usr/lib/mysql rm -rf /usr/include/mysql rm -rf /etc/my.cnf rm -rf /etc/init.d/mysql rm -rf /var/lib/mysql rm -rf /etc/init.d/mysql rpm -ivh xxx rpm -ivh MySQL-server-5.6.15-1.el6.x86_64.rpm cp /usr/share/mysql/my-default.cnf /etc/my.cnf /usr/bin/mysql_install_db service mysql start cat /root/.mysql_secret #查看root账号密码 mysql -uroot –pxxxxx SET PASSWORD = PASSWORD('root'); 远程登录 use mysql; select host,user,password from user; update user set password=password('root') where user='root'; update user set host='%' where user='root' and host='localhost'; 或者 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; flush privileges; 开机自启动 chkconfig mysql on chkconfig --list | grep mysql /var/lib/mysql/ #数据库目录 /usr/share/mysql #配置文件目录 /usr/bin #相关命令目录 /etc/init.d/mysql #启动脚本

 

8 安装elactis search 集群

 

 下载 elasticsearch-2.1.0.tar.gz 解压 tar -zxvf elasticsearch-2.1.0.tar.gz 移动 mv elasticsearch-2.1.0 ../soft/elasticsearch-2.1.0 修改配置文件 进入 cd soft/elasticsearch-2.1.0 sudo chown -R baoyou:baoyou elasticsearch-2.1.0/ cd config vi elasticserach.xml cluster.name: elasticsearch node.name: "mechine002" node.master: true node.data: true node.rack: mechine002 index.translog.flush_threshold_period: 60s index.refresh_interval: 30s indices.memory.index_buffer_size: 50% indices.memory.min_index_buffer_size: 500m index.translog.flush_threshold: 30000 index.store.type: mmapfs index.merge.policy.use_compound_file: false index.cache.field.type: soft path.logs: /home/baoyou/soft/elasticsearch-2.1.0/logs bootstrap.mlockall: true #gateway.type: local discovery.zen.fd.ping_timeout: 120s discovery.zen.fd.ping_retries: 60 discovery.zen.fd.ping_interval: 30s client.transport.ping_timeout: 10s 启动 cd bin ./elasticsearch -d 查看启动成功 http://localhost:9200/_cluster/state?pretty 

 

9 安装 redis 集群

 

 下载 redis-2.6.17.tar.gz 解压 tar -zxvf redis-2.6.17.tar.gz 移动 mv redis-2.8.12../soft/redis-2.6.17 cd ../soft/redis-2.6.17 安装 make sudo make install 集群 主 不需要修改 从 修改redis.conf slaveof 192.168.50.143 6397 (主ip) appendonly yes 主 redis-server redis.conf 启动 从 redis-server redis.conf 启动 主 redis-cli set name baoyou 从 redis-cli info (查看节点信息) get name

 

 

 

 

 

 

 

 

 

 

 

 

 

 

捐助开发者

在兴趣的驱动下,写一个免费的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(右上角的爱心标志,支持支付宝和PayPal捐助),没钱捧个人场,谢谢各位。



 
 
 谢谢您的赞助,我会做的更好!

 

 

原文链接:https://yq.aliyun.com/articles/643204
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章