ssh root@114.55.88.135 -p 22
vi /etc/sysconfig/network
vi /etc/hostname(多用于Ubuntu)
vi /etc/hosts
hostnamectl set-hostname 主机名(CentOS)
$ useradd sjt2
$ passwd sjt2
$ usermod -a -G wheel sjt2
$ visudo
sjt2 ALL=(ALL:ALL) ALL
vi /etc/ssh/sshd_config
ssh sjt2@114.55.88.135 -p 16688
sudo vi /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
$ sudo yum install nginx
安装:http://keenwon.com/1335.html 配置:https://my.oschina.net/indestiny/blog/197272 https://redis.io/topics/quickstart
cd /usr/src
sudo wget http://download.redis.io/releases/redis-stable.tar.gz
sudo tar xzf redis-stable.tar.gz
cd xzf redis-stable.tar.gz
make
sudo make install
daemonize yes
logfile /var/log/redis.log
vi /etc/sysctl.conf
vm.overcommit_memory = 1
sudo cp utils/redis_init_script /etc/init.d/redis
# chkconfig: 2345 10 90
# description: Start and Stop redis
CONF="/usr/local/redis/redis.conf"
sudo touch /var/log/redis.log
chmod +x /etc/init.d/redis
chkconfig --add redis
chkconfig redis on
$ sudo vi /etc/yum.repos.d/mongodb.repo
[mongodb]
name=MongoDB Repository
baseurl=http://mirrors.aliyun.com/mongodb/yum/redhat/7/mongodb-org/stable/x86_64/
gpgcheck=0
enabled=1
yum install mongodb-org
sudo chmod +x /etc/rc.d/init.d/mongod
sudo chkconfig mongod on
sudo service mongod start
8. 安装nvm(node)http://blog.csdn.net/feifei159/article/details/57079672
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
exit退出重新登录ssh
command -v nv
nvm install stable
参考:https://www.digitalocean.com/community/tutorials/how-to-install-git-on-centos-7
sudo yum install autoconf
systemctl start firewalld
firewall-cmd --zone=public --add-port=80/tcp --permanent
重新加载配置
firewall-cmd --reload