官网安装说明:A Quick Guide to Using the MySQL Yum Repository
MySQL 5.6 (GA)
sudo rpm -Uvh mysql80-community-release-el7-1.noarch.rpm
sudo yum-config-manager --enable mysql56-community
遇到问题可以先卸载之前的相关软件
启动Mysql
sudo service mysqld start
# 重启
service mysqld restart
# 停止
service mysqld stop
查看Mysql状态
sudo service mysqld status
MySQL重置root密码
update user set authentication_string=password(‘密码’) where user=‘root’;
Host ‘115.236.61.42’ is not allowed to connect to this MySQL server
查看用户
use mysql;
select host,user from user;
# host有%才能远程访问
select host,user from user;
+-----------+------+
| host | user |
+-----------+------+
| % | root |
| 127.0.0.1 | root |
| ::1 | root |
| localhost | root |
+-----------+------+
刷新
FLUSH PRIVILEGES;
mysqladmin -uroot -p -h127.0.0.1 --protocol=tcp shutdown
wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
# 解压到opt目录
tar -xvzf /home/downloads/apache-maven-3.5.4-bin.tar.gz -C /opt
# 编辑系统配置文件 /etc/profile
#set Maven environment
export MAVEN_HOME=/opt/apache-maven-3.5.4
export PATH=$MAVEN_HOME/bin:$PATH
# 重新加载系统配置文件
source /etc/profile
/opt/apache-maven-3.5.4/conf/settings.xml
官网
tar -xvzf /home/downloads/nexus-3.14.0-04-unix.tar.gz -C /opt
/opt/nexus-3.14.0-04/bin
./nexus {start|stop|run|run-redirect|status|restart|force-reload}
By default, the repository manager listens on port 8081. You can change this port, by changing the value in the $NEXUS_HOME/conf/nexus.properties file shown in Contents of conf/nexus.properties . To change the port, stop the repository manager, change the value of application-port in this file, and then restart it. Once you do this, you should see a log statement in $NEXUS_HOME/logs/wrapper.log telling you that the repository manager is listening on the altered port.
$NEXUS_HOME/conf/nexus.properties
# Sonatype Nexus
# ==============
# This is the most basic configuration of Nexus.
# Jetty section
application-port=8081
application-host=0.0.0.0
nexus-webapp=${bundleBasedir}/nexus
nexus-webapp-context-path=/nexus
# Nexus section
nexus-work=${bundleBasedir}/../sonatype-work/nexus
runtime=${bundleBasedir}/nexus/WEB-INF
# 1.更改目录所有者命令:
# chown -R 用户名称 目录名称
# 2.更改目录权限命令:
# chmod -R 755 目录名称
chown -R www /opt/sonatype-work
chmod -R 755 /opt/sonatype-work
# 安装目录 /opt/nexus-3.14.0-04/bin/
# 进入bin目录,运行如下命令启动(&符号表示后台启动):
./nexus run &
firewall-cmd --zone=public --add-port=8081/tcp --permanent
firewall-cmd --reload
http://localhost:8081/
安装、启动说明
tar -xvzf /home/downloads/redis-5.0.0.tar.gz -C /usr/local/
解压后进入redis目录,运行 make install
进入 /usr/local/redis-5.0.0/src
#加上`&`号使redis以后台程序方式运行
./redis-server &
# 可以将此命令写入crontab,以实现定时备份
# 备份的数据会存储在/var/opt/gitlab/backups,用户通过自定义参数 gitlab_rails['backup_path'],改变默认值。
/usr/bin/gitlab-rake gitlab:backup:create
# 停止unicorn和sidekiq,保证数据库没有新的连接,不会有写数据情况
sudo gitlab-ctl stop unicorn
sudo gitlab-ctl stop sidekiq
# 进入备份目录进行恢复,1476900742为备份文件的时间戳
cd /var/opt/gitlab/backups gitlab-rake gitlab:backup:restore BACKUP=1476900742
cd -
# 启动unicorn和sidekiq
sudo gitlab-ctl start unicorn
sudo gitlab-ctl start sidekiq
gitlab-ctl start # 启动所有 gitlab 组件;
gitlab-ctl stop # 停止所有 gitlab 组件;
gitlab-ctl restart # 重启所有 gitlab 组件;
gitlab-ctl status # 查看服务状态;
vim /etc/gitlab/gitlab.rb # 修改gitlab配置文件;
gitlab-ctl reconfigure # 重新编译gitlab的配置;
gitlab-rake gitlab:check SANITIZE=true --trace # 检查gitlab;
gitlab-ctl tail # 查看日志;
gitlab-ctl tail nginx/gitlab_access.log
firewall-cmd --zone=public --add-port=8888/tcp --permanent
firewall-cmd --reload
rpm -ivh https://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.14.0-1.el7_4.ngx.x86_64.rpm
报错
错误:依赖检测失败:
libcrypto.so.10(OPENSSL_1.0.2)(64bit) 被 nginx-1:1.14.0-1.el7_4.ngx.x86_64 需要
[解决方法](yum -y install openssl openssl-devel)
yum -y install openssl openssl-devel
# 继续安装
# 查看
yum info nginx
# 安装
yum install nginx
# 启动
service nginx start
# (start, stop, restart, try-restart, reload, force-reload, status)
所有的nginx配置文件都在 /etc/nginx下
nginx请求转发至tomcat(端口转发)
# yum安装后有这个文件/usr/bin/certbot
# 测试是否有错误
$ ./certbot certonly -d *.aoeai.com --manual --preferred-challenges dns --manual-auth-hook /脚本目录/au.sh --dry-run
# 实际申请
$ ./certbot certonly -d *.aoeai.com --manual --preferred-challenges dns --manual-auth-hook /脚本目录/au.sh
# 加入 crontab
# 编辑文件 /etc/crontab
1 1 */1 * * root certbot-auto renew --manual --preferred-challenges dns --manual-auth-hook /脚本目录/au.sh
# 重启服务
service crond restart
开启443端口
firewall-cmd --zone=public --add-port=443/tcp --permanent
查看错误日志 /var/log/nginx/error.log; 以定位问题
java -jar jenkins.war --httpPort=8082
firewall-cmd --zone=public --add-port=8082/tcp --permanent
firewall-cmd --reload
# /etc/sudoers文件添加,www为启动Jenkins的用户
www ALL=(ALL) NOPASSWD: ALL