Debian System(1)Java and NodeJS Env

宁静致远 2015-03-29

DebianSystem(1)JavaandNodeJSEnv

Firstofall,howIknowIamusingdebian,ubuntuorcentOS.Trythiscommand

>cat/etc/issue

DebianGNU/Linux6.0\n\l

Yeah,IamusingDebian6.0

DownloadthedebianiOSfromherehttps://www.debian.org/

https://www.debian.org/distrib/

Iplantousethelatestversion.

1.SetupSystem

addtothesudoers

ChecktheIP

>/sbin/ifconfig-a

2.InstallJAVA

Itisreallyusefultofollowthisdoc

http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

>suroot

>echo"debhttp://ppa.launchpad.net/webupd8team/java/ubuntutrustymain"|tee/etc/apt/sources.list.d/webupd8team-java.list

>echo"deb-srchttp://ppa.launchpad.net/webupd8team/java/ubuntutrustymain"|tee-a/etc/apt/sources.list.d/webupd8team-java.list

>sudoapt-getupdate

>sucarl

>sudoapt-getinstalloracle-java6-installer

>sudoapt-getinstalloracle-java7-installer

>sudoapt-getinstalloracle-java8-installer

>java-version

javaversion"1.8.0_31"

Java(TM)SERuntimeEnvironment(build1.8.0_31-b13)

JavaHotSpot(TM)64-BitServerVM(build25.31-b07,mixedmode)

Switchthejavaversion

>sudoupdate-alternatives--configjava

>sudoupdate-alternatives--configjavac

3.InstallMysql

>wgethttp://repo.mysql.com/mysql-apt-config_0.2.1-1debian7_all.deb

>sudodpkg-imysql-apt-config_0.2.1-1debian7_all.deb

>sudoapt-getupdate

>sudoapt-getinstallmysql-server-5.6

4.Installgit

>wgethttps://www.kernel.org/pub/software/scm/git/git-2.3.4.tar.gz

>./configure

>makeprefix=/home/carl/tool/git-2.3.4all

ErrorMessage:

Infileincludedfromcredential-store.c:1:0:

cache.h:21:18:fatalerror:zlib.h:Nosuchfileordirectory

compilationterminated.

Solution:

>sudoapt-getinstallbuild-essential

>sudoapt-getinstallzlib1g-dev

ErrorMessage:

INDEXlib/

*tclshfailed;usingunoptimizedloading

MSGFMTpo/bg.msgmake[1]:***[po/bg.msg]Error127

make:***[all]Error2

Solution:

>sudoapt-getinstallgettext

ErrorMessage:

fatal:Unabletofindremotehelperfor'https'

Solution:

>sudoapt-getinstalllibcurl4-openssl-dev

>makeprefix=/home/carl/tool/git-2.3.4all

>makeprefix=/home/carl/tool/git-2.3.4install

Addthegittothe/optdirectoryandaddittothepath

SetthepasswordCachetime

>gitconfig--globalcredential.helper"cache--timeout=360000"

5.InstallNodeJSEnv

>wgethttp://nodejs.org/dist/v0.12.1/node-v0.12.1.tar.gz

>./configure--prefix=/home/carl/tool/node-v0.12.1

makeandinstallontherightlocation

6.Installmemcacheserver

>wgethttp://www.memcached.org/files/memcached-1.4.22.tar.gz

>wgethttps://sourceforge.net/projects/levent/files/libevent/libevent-2.0/libevent-2.0.22-stable.tar.gz

unzipandinstalllibeventfirst.

>./configure--prefix=/home/carl/tool/memcached-1.4.22

makeandinstall,addingtothepath,starttheserver

>memcached-d-m50-p11211-ucarl-l0.0.0.0

7.InstallRabbitMQ

Installtheerlangfirst

>wgethttp://www.erlang.org/download/otp_src_17.4.tar.gz

>exportLANG=C

configureandmakeandmakeinstall

ErrorMessage:

configure:error:Nocurseslibraryfunctionsfound

configure:error:/bin/bash'/home/phunware/install/otp_src_17.4/erts/configure'failedforerts

Solution:

>sudoapt-getinstallncurses-dev

InstallRabbitMQ

>wgethttps://www.rabbitmq.com/releases/rabbitmq-server/v3.5.0/rabbitmq-server-generic-unix-3.5.0.tar.gz

Unzipthatfileandchangethesbin/rabbitmq-defaults,addtheERL_DIRpaththere.

FollowthesecommandtostarttherabbitMQserver

StarttheServer

>sudosbin/rabbitmq-server

CheckandStoptheServer

>sudosbin/rabbitmqctlstatus

>sudosbin/rabbitmqctlstop

Installchromebrowser

wget-q-O-https://dl-ssl.google.com/linux/linux_signing_key.pub|sudoapt-keyadd-

sudosh-c'echo"debhttp://dl.google.com/linux/chrome/deb/stablemain">>/etc/apt/sources.list.d/google-chrome.list'

sudochmod644/etc/apt/sources.list.d/google-chrome.list

sudoapt-getupdate

sudoapt-getinstallgoogle-chrome-stable

8.Problemwiththerootfs

http://forums.debian.net/viewtopic.php?f=30&t=85821

Needtousetheentiredisk.-Guided-useentirediskandsetupLVM,Allfilesinonepartition

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

相关推荐

林悠居 / 0评论 2020-05-19
84931231 / 0评论 2020-05-14