.查找配置文件位置
find / -name *settings.xml
文件夹权限:chmod -Rf 777 boot
开启防火墙:systemctl start firewalld
关闭防火墙:systemctl stop firewalld
查看占用的端口:netstat -tunlp
查看防火墙是否开启端口:firewall-cmd --list-ports
开启指定端口:firewall-cmd --zone=public --add-port=48081/tcp --permanent
重启防火墙: firewall-cmd --reload
删除软件:yum remove gcc
echo命令查看环境变量值:echo $JAVA_HOME
service iptables stop
配置自动启动:
把svnserve -d -r /opt/svn 放在/etc/rc.d/rc.local最后一行
svn安装:
yum -y install subversion
创建他的配置:svnadmin create /svn/svnrepostor
编辑权限:vi /svn/svnrepostor/conf/authz [/] sysuser = rw
编辑账号密码:vi /svn/svnrepostor/conf/passwd sysuser = user
编辑配置:vi /svn/svnrepostor/conf/svnserve.conf anon-access = none auth-* password-* authz-* 将这些放开
启动:svnserve -d -r /svn
尝试连接:svn co svn://ip/svnrepostor
-----------------------
1.先完成配置https访问:https://blog.csdn.net/weixin_44462773/article/details/124588310
如果报错:Job for httpd.service failed because the control process exited with error code.see “systemctl status httpd.service” and “journalctl -xe” for details.
1.杀掉这个进程就可以:
先ps -aux | grep http
第二行数字就是进程pid号
Kill -9 pid号 即可杀掉进程
杀完之后 重启reboot 再ps –aux | grep http 确保httpd进程被杀掉 若发现无法杀掉进程 往下看
2. 如果杀掉进程的话,重启进程还存在,就代表成了僵尸进程,就重新安装哈httpd
步骤如下:
先用yum卸载httpd和mod_wsgi,
命令:yum remove httpd mod_wsgi
然后再安装yum -y install httpd mod_wsgi 就可以了
安装完成后 systemctl httpd restart 即可 问题基本排除
解决后再重新配置https访问:https://blog.csdn.net/weixin_44462773/article/details/124588310
报错:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.16.149.86. Set the 'ServerName' directive globally to suppress this message
解决:
vim /etc/httpd/conf/httpd.conf
ServerName localhost:80
重启httpd:systemctl restart httpd
2.配置https访问svn:https://cloud.tencent.com/developer/article/2131923?from=15425
http服务命令:
httpd -v #查看已经安装的httpd的版本
rpm -qa | grep httpd #查看是否已经安装了httpd
ps -ef | grep httpd #查看httpd的进程
service httpd status #查看httpd的运行状态
service httpd stop #停止httpd
service httpd start #启动httpd
service httpd start #重新启动httpd
通过nginx 访问httpd 配置nginx.conf
server {
listen 80;
server_name svn.xxxxx.com;
#防XSS攻击
add_header X-Xss-Protection 1;
#nginx强制使用https访问(http跳转到https)
#rewrite ^(.*) https://$server_name$1 permanent;
location /{
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:2365/; #httpd监听的地址
proxy_read_timeout 150; # 秒
}
access_log logs/potal_tomcat_8881_access.log;
}
----------------------------------------------------------------------------------------
nodejs 运行项目报错:
20 error code ELIFECYCLE
21 error errno 1
22 error yudao-ui-admin@1.6.1-snapshot dev: `vue-cli-service serve`
解决方案:
分别执行这两条命令:
1、npm install node-sass --save-dev
2、npm install sass-loader --save-dev
然后依次执行删除
node_modules package-lock.json文件夹
再依次执行以下代码
开启新的命令窗口
npm cache clear --force
npm install
最后运行:
npm run dev
----------------------------------------------------------------------------------------
maven
编辑环境变量文件:vi /etc/profile
export JAVA_HOME=/opt/java/jdk-17.0.4.1
export CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/
export PATH=$PATH:$JAVA_HOME/bin
export MAVEN_HOME=/opt/maven/apache-maven-3.8.6
export PATH=$MAVEN_HOME/bin:$PATH
export PATH JAVA_HOME CLASSPATH MAVEN_HOME
末尾追加:
MAVEN_HOME=/home/maven/apache-maven-3.3.9
PATH=$MAVEN_HOME/bin:$PATH
重新加载:source /etc/profile
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
jenkins安装:地址https://mirrors.jenkins-ci.org/redhat/
如果报错:
cannot verify pkg.jenkins.io's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’
Issued certificate has expired. To connect to pkg.jenkins.io insecurely, use `--no-check-certificate'.
修复方法:sudo yum install -y ca-certificates
To use this repository, run the following command: 要使用该存储库,运行以下命令
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key
yum install fontconfig java-11-openjdk
yum install jenkins
vim /etc/init.d/jenkins
下拉到candidates这个变量,然后将java的安装路径添加进去
/opt/java/jdk-17.0.4.1/bin/java
systemctl daemon-reload
启动jenkins
service jenkins start 【ok】 代表启动成功
配置httpd:https://blog.csdn.net/weixin_44462773/article/details/124397585
jenkins在进行Maven构建时跳过测试用例
build: pom.xml 下面配置:
clean package -Dmaven.test.skip=true
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
redis安装:https://www.bilibili.com/video/BV1mp4y1S7ok/?spm_id_from=333.337.search-card.all.click&vd_source=0ad7d6f30763b28cca691fb0b515df9d
https://blog.csdn.net/jiangcheng2016/article/details/121365732
https://www.cnblogs.com/root-123/p/16574671.html
wget https://download.redis.io/releases/redis-6.2.6.tar.gz
vi /usr/local/redis/etc/redis.conf
启动:redis-server /usr/local/redis/etc/redis.conf
----------------------------------------------------------------------------------------
nuxtjs 部署
以下文件发送到linux:
package.json
nuxt.config.js
static
.nuxt
在使用 npm i (root用户加 npm i --unsafe-perm) 或 npm yarn 安装项目依赖
访问测试:
cd /home/nuxtjs
npm run start 或 yarn start
后台启动:pm2 start npm --name tools -- start
注意把 nuxt.config.js >server>host 设置为 0.0.0.0
----------------------------------------------------------------------------------------
nginx 启动:
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
jenkins+maven+svn:https://www.bilibili.com/video/BV1Ah411k7fr?p=56&vd_source=0ad7d6f30763b28cca691fb0b515df9d
linux配置http访问:https://www.bilibili.com/video/BV1UT4y1E7Pd/?spm_id_from=333.337.search-card.all.click&vd_source=0ad7d6f30763b28cca691fb0b515df9d