更新环境依赖
- sudo apt-get update
- sudo apt-get upgrade
更换apt-get
源
-
vim /etc/apt/sources.list
将下面内容粘贴在文件前面
deb http://mirrors.163.com/ubuntu/ wily main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ wily-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ wily-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ wily-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ wily-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily-backports main restricted universe multiverse
安装ssh
sudo apt-get install openssh-client
sudo apt-get install openssh-server
- 通过
man sshd_config
查看配置手册 - 备份配置文件
ssh
:sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
- 配置
ssh
:port
,PermitRootLogin yes
- 重启
ssh
服务 :serivece sshd restart
安装jdk
- 解压安装文件
tar zxvf jdkfile.tar
tar xzf jdkfile
- vim /etc/profile
- 末尾添加
export JAVA_HOME=/your jdk path
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
- source /etc/profile
安装maven
- 解压安装文件
tar zxvf maven.tar
-
/etc/profile
增加
export MAVEN_HOME=/your maven path
export PATH=/your maven path/bin:$PATH
安装redis
- 下载
wget http://download.redis.io/releases/redis-3.2.5.tar.gz
- 解压安装文件
tar zxvf redis.tar
- 执行
make
cd redis/src
- 运行
redis-server
- 进入命令行
redis-cli
安装Jenkins
- 把
Jenkins
包放到tomcat的webapps下 - 启动tomcat
- 首次登陆需要复制
/root/.jenkins/secrets
下的initialAdminPassword
文件中密码
安装mysql
sudo apt-get install myql-server
- 授权远程访问
GRANT ALL PRIVILEGES ON *.* TO 'your username'@'your ip address' IDENTIFIED BY 'your pass word' with grant option;
FLUSH PRIVILEGES;
- 编辑文件
/etc/mysql/mysql.conf.d
下的mysqld.cnf
bind-address=127.0.0.1 改成 #bind-address=127.0.0.1
- 运行状态:
service mysql status
- 启动:
service mysql start
或者cd /etc/init.d
->./mysql start
- 重启:
service mysql restart
或者cd /etc/init.d
->./mysql restart
- 停止:
service mysql stop
或者cd /etc/init.d
->./mysql stop
网友评论