设为首页 收藏本站
查看: 809|回复: 0

[经验分享] Debian System(1)Java and NodeJS Env

[复制链接]

尚未签到

发表于 2016-5-5 10:44:38 | 显示全部楼层 |阅读模式
Debian System(1)Java and NodeJS Env

First of all, how I know I am using debian, ubuntu or centOS. Try this command
> cat /etc/issue
Debian GNU/Linux 6.0 \n \l

Yeah, I am using Debian 6.0

Download the debian iOS from here https://www.debian.org/
https://www.debian.org/distrib/

I plan to use the latest version.

1. Set up System
add to the sudoers
http://sillycat.iyunv.com/blog/1154358

Check the IP
>/sbin/ifconfig -a

2. Install JAVA
It is really useful to follow this doc
http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

>su root
>echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
>echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
>sudo apt-get update
>su carl
>sudo apt-get install oracle-java6-installer
>sudo apt-get install oracle-java7-installer
>sudo apt-get install oracle-java8-installer

>java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

Switch the java version
>sudo update-alternatives --config java
>sudo update-alternatives --config javac

3. Install Mysql
> wget http://repo.mysql.com/mysql-apt-config_0.2.1-1debian7_all.deb
> sudo dpkg -i mysql-apt-config_0.2.1-1debian7_all.deb
> sudo apt-get update
> sudo apt-get install mysql-server-5.6

4. Install git
> wget https://www.kernel.org/pub/software/scm/git/git-2.3.4.tar.gz
> ./configure
>  make prefix=/home/carl/tool/git-2.3.4 all

Error Message:
In file included from credential-store.c:1:0:
cache.h:21:18: fatal error: zlib.h: No such file or directory
compilation terminated.

Solution:
> sudo apt-get install build-essential
> sudo apt-get install zlib1g-dev

Error Message:
    INDEX lib/
    * tclsh failed; using unoptimized loading
    MSGFMT    po/bg.msg make[1]: *** [po/bg.msg] Error 127
make: *** [all] Error 2

Solution:
> sudo apt-get install gettext

Error Message:
fatal: Unable to find remote helper for 'https'

Solution:
> sudo apt-get install libcurl4-openssl-dev

> make prefix=/home/carl/tool/git-2.3.4 all
> make prefix=/home/carl/tool/git-2.3.4 install

Add the git to the /opt directory and add it to the path

Set the password Cache time
> git config --global credential.helper "cache --timeout=360000"

5. Install NodeJS Env
> wget http://nodejs.org/dist/v0.12.1/node-v0.12.1.tar.gz
> ./configure --prefix=/home/carl/tool/node-v0.12.1
make and install on the right location

6. Install memcache server
> wget http://www.memcached.org/files/memcached-1.4.22.tar.gz
> wget https://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz

unzip and install libevent first.
> ./configure --prefix=/home/carl/tool/memcached-1.4.22

make and install, adding to the path, start the server
> memcached -d -m 50 -p 11211 -u carl -l 0.0.0.0

7. Install RabbitMQ
Install the erlang first
> wget http://www.erlang.org/download/otp_src_17.4.tar.gz
>export LANG=C
configure and make and make install

Error Message:
configure: error: No curses library functions found
configure: error: /bin/bash '/home/phunware/install/otp_src_17.4/erts/configure' failed for erts

Solution:
> sudo apt-get install ncurses-dev

Install RabbitMQ
>wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.5.0/rabbitmq-server-generic-unix-3.5.0.tar.gz

Unzip that file and change the sbin/rabbitmq-defaults, add the ERL_DIR path there.
Follow these command to start the rabbitMQ server
http://sillycat.iyunv.com/blog/2066116
Start the Server
>sudo sbin/rabbitmq-server
Check and Stop the Server
>sudo sbin/rabbitmqctl status
>sudo sbin/rabbitmqctl stop

Install chrome browser
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo chmod 644 /etc/apt/sources.list.d/google-chrome.list
sudo apt-get update
sudo apt-get install google-chrome-stable

8. Problem with the rootfs
http://forums.debian.net/viewtopic.php?f=30&t=85821

Need to use the entire disk. - Guided - use entire disk and set up LVM, All files in one partition



References:
http://linux.ittoolbox.com/groups/technical-functional/redhat-l/how-to-check-if-my-linux-box-is-redhat-or-other-flavour-1214138
http://serverfault.com/questions/516190/how-to-install-mysql-5-6-on-debian-7-wheezy

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-212887-1-1.html 上篇帖子: Ubuntu下搭建nodejs+express+mongodb环境简单教程 下篇帖子: centos nodejs
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表