Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Install & Run Wechaty in Linux Server #48

Closed
lijiarui opened this issue Oct 15, 2016 · 6 comments
Closed

How to Install & Run Wechaty in Linux Server #48

lijiarui opened this issue Oct 15, 2016 · 6 comments
Assignees
Labels
Projects

Comments

@lijiarui
Copy link
Member

lijiarui commented Oct 15, 2016

Steps:

1.install nvm:

curl https://raw.githubusercontent.com/creationix/nvm/v0.11.1/install.sh | bash

2.install node

nvm install 6
nvm alias default 6

3.install git and clone repo

sudo apt-get install git
git clone https://github.com/wechaty/wechaty.git

4.install google chrome for debian

sudo apt-get update
sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
sudo apt-get install -f

5.wechaty operation:

cd wechaty
npm install
cd script
bash xvfb.sh
export DISPLAY=':99.0'

6.run wechaty:

go back wechaty directory

cd example
npm run ts-node example/ding-dong-bot.ts

then run wechaty successfuly:

image

@huan
Copy link
Member

huan commented Oct 15, 2016

what's ur DISPLAY env variable?

@lijiarui
Copy link
Member Author

the variable as follows

Set DISPLAY to :99.0
Xvfb started
to set env, run $ export DISPLAY=':99.0'
Xvfb ready

then i run

export DISPLAY=':99.0'

thanks!

@huan huan changed the title 在digitalOcean 中 装wechaty 失败 How to Install & Run Wechaty in DigitalOcean VPS Oct 15, 2016
@huan
Copy link
Member

huan commented Oct 17, 2016

good job.

  1. I believe the step 7(Install ChromeDriver) is not necessary, because it will be installed by npm install.
  2. if u change step 5(git clone) from git@github.com:wechaty/wechaty.git to https://github.com/wechaty/wechaty.git, then the step 4(Generating a new SSH key and adding it to the ssh-agent) will be not necessary, too.

can u confirm?

@huan huan reopened this Oct 17, 2016
@huan huan removed the faq label Oct 17, 2016
@huan huan changed the title How to Install & Run Wechaty in DigitalOcean VPS How to Install & Run Wechaty in Linux Server Oct 17, 2016
@lijiarui
Copy link
Member Author

thanks !
I tried as you told, it does work!
and then I update the install intro !

@plantvsbirds
Copy link

is it possible to put all these into a npm run command? like npm run install-linux. that would be sweet.

@huan
Copy link
Member

huan commented Oct 22, 2016

@lijiarui great. you should link this issue in README in order to help others.
@plantvsbirds I agree. pull request is welcome. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

3 participants