单纯记录,若有不合理不规范的地方请忽略.
tar -xzvf jdk-8u291-linux-x64.tar.gz -C /usr/local/
vim /etc/profile
插入:
export JAVA_HOME=/usr/local/jdk1.8.0_291 export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib export PATH=/bin:/usr/bin:$PATH:$JAVA_HOME/bin:$PATH
刷新配置:
source /etc/profile
输入java -version查看是否配置成功.
tar -xzvf mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz -C /usr/local/
groupadd mysql useradd -r -g mysql mysql
chown -R mysql.mysql /usr/local/mysql-5.7.30-linux-glibc2.12-x86_64
mkdir data
安装依赖包
yum install libaio
初始化
/usr/local/mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqld --user=mysql --basedir=/usr/local/mysql-5.7.30-linux-glibc2.12-x86_64/ --datadir=/usr/local/mysql-5.7.30-linux-glibc2.12-x86_64/data --initialize
vim /etc/my.cnf
[mysqld] datadir=/usr/local/mysql-5.7.30-linux-glibc2.12-x86_64/data basedir=/usr/local/mysql-5.7.30-linux-glibc2.12-x86_64 socket=/tmp/mysql.sock user=mysql port=3306 character-set-server=utf8 # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd [mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid # # include all files from the config directory # !includedir /etc/my.cnf.d
cp /usr/local/mysql-5.7.30-linux-glibc2.12-x86_64/support-files/mysql.server /etc/init.d/mysql
chkconfig mysql on
service mysql start
注意:若启动时报错
可以试试
mkdir /var/log/mariadb
touch /var/log/mariadb/mariadb.log
chown -R mysql:mysql /var/log/mariadb/
mkdir /var/run/mariadb/
chown -R mysql:mysql /var/run/mariadb/
还是不行的话就把输出日志的配置注释吧(无奈之举...有大佬知道怎么解决可告知)
export MYSQL_HOME=/uer/local/mysql-5.7.30-linux-glibc2.12-x86_64 export PATH=/bin:/usr/bin:$PATH:$JAVA_HOME/bin:$MYSQL_HOME:bin/:$PATH
我这把密码修改成root了
alter user 'root'@'localhost' identified by 'root';
flush privileges;
在mysql中,进入mysql数据库
use mysql
修改
update user set host = '%' where user = 'root';
刷新权限
flush privileges;
Mysql就ok了。
注意:若用云服务,得开启端口的安全组规则。如阿里云
0、vue项目里的config/index.js修改成
不然index.html打开会找不到资源,白屏的。
1、接着控制台:npm run buid
然后在项目目录中会有dist文件夹,里面就是打包好的
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
官网:http://nginx.org/en/download.html
解压到usr/local/下
tar -xvf nginx-1.20.0.tar.gz
进入解压的nginx目录下
cd nginx-1.20.0
依次执行三条指令
./configure make make install
3、配置nginx.conf文件
注意:安装好的nginx会在同目录下新建个名为ngxin的目录(安装路径),配置文件啥的都在这里面
配置之前可以先浏览器输入loclhost测试一下,是否安装成功,成功会显示nginx的页面。
vi /usr/local/nginx/conf/nginx.conf
进入安装目录下的sbin目录:
cd /usr/local/nginx/sbin
重启ngxing:
./nginx -s reload
相关指令:
./nginx 启动 ./nginx -s stop 关闭 ./nginx -s reload 重启
pom.xml中打成jar包还是war包可在这更改。
打包后的名称在下面
把jar弄到服务器上后
nohup java -jar XXX.jar &
为后台启动,关闭远程连接也会运行着。
可用该命令找到java程序的PID
ps -ef | grep java
接着杀死该进程
kill -9