mkdir /c9
cd /c9
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb
wget https://chromedriver.storage.googleapis.com/2.45/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
apt install ssh

sed -i "s/UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config && \
    sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config && \
    sed -i "s/#PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config && \
    echo "gatewayports yes" >> /etc/ssh/sshd_config && \
    sed -i 's/.*StrictHostKeyChecking.*/    StrictHostKeyChecking no/' /etc/ssh/ssh_config && \
    sed -i "s/AcceptEnv.*/#AcceptEnv\ LANG\ LC_\*/g" /etc/ssh/sshd_config

pip install selenium
pip install --upgrade --ignore-installed urllib3



运行时添加: -a user:pass

node /cloud9/server.js –listen –port 80 -w /workspace -a user:pass

To set a default username and password:

Open the file /opt/cloud9/build/standalonebuild/configs/standalone.js.

Locate the following code block. (Should be at the top of the file)

    if (!optimist.local) {
            .describe("t", "Start in test mode")
            .describe("k", "Kill tmux server in test mode")
            .default("b", false)
            .describe("b", "Start the bridge server - to receive commands from the cli")
            .default("w", config.workspaceDir)
            .describe("w", "Workspace directory")
            .alias("p", "port")
            .default("port", process.env.PORT || config.port)
            .describe("port", "Port")
            .alias("d", "debug")
            .default("debug", false)
            .describe("debug", "Turn debugging on")
            .alias("l", "listen")
            .default("listen", process.env.IP || config.host)
            .describe("listen", "IP address of the server")
            .alias("ws", "workspacetype")
            .describe("readonly", "Run in read only mode")
            .alias("ro", "readonly")
            .describe("packed", "Whether to use the packed version.")
            .default("packed", config.packed)
            .alias("a", "auth")
            .describe("auth", "Basic Auth username:password")
            .default("auth", ":")
            .describe("collab", "Whether to enable collab.")
            .default("collab", config.collab)
            // @lennartcl this should be moved
            .describe("lb.fileserver", "LogicBlox file server Url")
            .default("lb.fileserver", config.logicblox && config.logicblox.fileServerURL);

At the line .default(“auth”, “:”), type in the username and password you’d like to use in the format of username:password, e.g. .default(“auth”, “user:pass”)

You should be all set! Try accessing, and there should be a pop-up prompting for username and password.