JAVA 环境变量
export JAVA_HOME=/export/servers/jdk1.8.0_141
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$JAVA_HOME/bin:$PATH
TOMCAT
下载直接解压 无需配置
查端口
lsof -i:8080
杀端口
kill -9 pid
MySQL
下载器
wget http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
解压下载器
rpm -ivh mysql57-community-release-el7-10.noarch.rpm
开始下载
yum -y install mysql-community-server --nogpgcheck
启动服务
[root@ljw software]# systemctl enable mysqld
[root@ljw software]# lsof -i:3306
[root@ljw software]# systemctl start mysqld
[root@ljw software]# lsof -i:3306
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mysqld 1359 mysql 21u IPv6 706162 0t0 TCP *:mysql (LISTEN)
修改初始密码
[root@ljw software]# cat /var/log/mysqld.log |grep password
2022-03-25T20:28:07.874388Z 1 [Note] A temporary password is generated for root@localhost: dUf>Imipg9(y
[root@ljw software]# mysql -uroot -pdUf>Imipg9(y
mysql> set global validate_password_policy=LOW;
mysql> set password=password('adminroot');
开启远程链接
mysql> GRANT ALL PRIVILEGES ON *.* to 'root'@'%' IDENTIFIED BY 'adminroot' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
Nginx
yum install -y gcc gcc-c++
# 安装PCRE
wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
[root@ljw pcre-8.35]# tar -zxvf pcre-8.35.tar.gz -C /export/servers/
[root@ljw pcre-8.35]# ./configure
[root@ljw pcre-8.35]# make install
#安装SSL
wget http://www.openssl.org/source/openssl-1.0.1j.tar.gz
tar -zxvf openssl-1.0.1j.tar.gz -C /export/servers/
./config
make && make install
#安装ZLib
[root@ljw zlib-1.2.11]# wget http://zlib.net/zlib-1.2.11.tar.gz
[root@ljw zlib-1.2.11]# tar -zxvf zlib-1.2.11.tar.gz -C /export/servers/
[root@ljw zlib-1.2.11]# cd /export/servers/zlib-1.2.11/
[root@ljw zlib-1.2.11]# ./configure
[root@ljw zlib-1.2.11]# make && make install
#安装Nginx
[root@ljw nginx-1.16.1]# wget http://nginx.org/download/nginx-1.16.1.tar.gz
[root@ljw nginx-1.16.1]# tar -zxvf nginx-1.16.1.tar.gz -C /export/servers/
服务放在/usr/local/server/nginx目录下
[root@ljw nginx-1.16.1]# mkdir -p /usr/local/server/nginx
[root@ljw nginx-1.16.1]# yum install -y openssl openssl-devel
[root@ljw nginx-1.16.1]# ./configure --prefix=/usr/local/server/nginx --with-http_stub_status_module --with-http_ssl_module --with-pcre=/export/servers/pcre-8.35
[root@ljw nginx-1.16.1]# make && make install