ubuntu 16.4 系统配置java web环境

1711人浏览 / 0人评论

1.java 环境

tar -zxvf jdk-8u111-linux-x64.tar.gz
sudo mv jdk1.8.0_111 /opt/
sudo vi ~/.bashrc

export JAVA_HOME=/opt/jdk1.8.0_111
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

source ~/.bashrc
java -version

2.mysql 

sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient-dev

sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
注释掉bind-address = 127.0.0.1

mysql -uroot -p你的密码
grant all on *.* to root@'%' identified by '920616' with grant option;
flush privileges;
service mysql restart

3.nginx

apt-get install build-essential
apt-get install libtool
sudo apt-get install libpcre3 libpcre3-dev
apt-get install zlib1g-dev
apt-get install openssl
(error sudo apt-get update)
sudo apt-get install libssl-dev

wget http://nginx.org/download/nginx-1.11.3.tar.gz
tar -zxvf nginx-1.11.3.tar.gz
cd nginx-1.11.3

./configure \
--prefix=/usr/local/nginx \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-pcre

make
sudo make install

4.redis

sudo apt-get install redis-server

sudo vi /etc/redis/redis.conf

#注释bind
#bind 127.0.0.1

sudo /etc/init.d/redis-server restart
 


如果觉得有用,请微信扫码买个东西支持一下我们吧!
来源: https://www.cgcgx.com/article/3.htm

全部评论