vi /etc/sysconfig/network-scripts/ifcfg-網卡名稱找到ONBOOT改為yes儲存重開即可
yum install epel-release -y
yum install nginx php-fpm php-curl php-cli php-mysql php-gd php-common php-xml php-json php-intl php-pear php-imagick php-dev php-common php-mbstring php-zip php-soap php-bz2 mysql-server mysql-client unzip zip snapd -y
修改php-fpm
vim /etc/php-fpm.d/www.conf
user = nginx
group = nginx
listen.owner = nginx
listen.group = nginx
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
修改db配置
yum install -y epel-release snapd
systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap
snap install core && snap refresh core
snap install --classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot
certbot --nginx
systemctl restart nginx
定時腳本
crontab -e
0 0 1 */1 * certbot renew
10 0 1 */1 * systemctl restart nginx
systemctl start crond.service
systemctl enable crond.service
yum install -y java-1.8.0-openjdk-devel wget
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum update -y
yum install -y jenkins
systemctl enable jenkins
systemctl start jenkins
firewall-cmd --add-port=8080/tcp --permanent
firewall-cmd --reload
http://IP:8080
# Install Artifactory
wget https://excellmedia.dl.sourceforge.net/project/artifactory/artifactory/3.9.2/artifactory-3.9.2.rpm
yum install -y artifactory-3.9.2.rpm
# Install network tools
yum install -y net-tools
# Start Artifactory
service artifactory start
Name | IP | Port | Cluster BUS Port |
Master 1 | 192.168.126.135 | 6379 | 16379 |
Master 2 | 192.168.126.136 | 6380 | 16380 |
Master 3 | 192.168.126.141 | 6381 | 16381 |
Slave 1 | 192.168.126.142 | 6382 | 6382 |
Slave 2 | 192.168.126.143 | 6383 | 6383 |
Slave 3 | 192.168.126.144 | 6384 | 6384 |
解決方式:
chown redis /etc/redis.conf
解決方是:
將supervised的值改成systemd
並在終端機輸入systemctl daemon-reload
reboot即可修正
解決方法:
vi /etc/sysctl.conf
net.core.somaxconn= n>128
reboot
# Download Redis-5.0.3-1
wget http://rpms.remirepo.net/enterprise/7/remi/x86_64//redis-5.0.3-1.el7.remi.x86_64.rpm
# Install rpm
rpm -Uvh redis-5.0.3-1.el7.remi.x86_64.rpm
# Install Redis 5.0.3-1
yum --enablerepo=remi install -y redis
# Install Development Tools
yum groupinstall -y "Development Tools"
# Install OpenSSL Devel
yum install -y openssl-devel
# Download Ruby 2.6.2
wget https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.2.tar.gz
# Unzip
tar -xvf ruby-2.6.2.tar.gz
# Copy to /usr/local/src
mv ruby-2.6.2 /usr/local/src/
cd /usr/local/src/ruby-2.6.2
# Compiler and Install
./configure
make
make install
# Update and Install Bundler
chmod 755 ruby
gem update --system
gem install bundler
# Fix OpenSSL issue
cd ext/openssl/
make top_srcdir="../../"
make install top_srcdir="../../"
# Install JAVA JRE and JDK
yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
# JRE path
/usr/bin/java
# JDK path
/usr/bin/javac
# Show ftp SELinux config
getsebool -a | grep ftp
# Enable ftpd_anon_write
setsebool -P allow_ftpd_anon_write on
# Enable ftpd_full_access
setsebool -P allow_ftpd_full_access on
# Or Disable SELinux
vi /etc/selinux/config
SELINUX=disabled
reboot
# Import RPM Source
rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
# Update Pacakge
yum update -y
# Install .Net Core SDK
yum install -y dotnet-sdk-2.2
# Install EPEL
yum install -y epel-release
# Update Package
yum update -y
# Install PHP PHP-FPM PHP-mbstring Nginx Redis
yum install -y git php php-fpm php-mbstring nginx redis
# Download PhpRedisAdmin
cd /var/www
git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git
cd phpRedisAdmin
git clone https://github.com/nrk/predis.git vendor
# 修改Nginx設定
vi /etc/nginx/nginx.conf
server_name localhost;
location / {
root /var/www;
index index.php;
}
location ~ \.php$ {
root /var/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# Install Epel
yum install -y epel-release
# Update
yum update -y
# Install Redis server
yum install -y redis
# Redis start at Redis
systemctl enable redis
# Start Redis server
systemctl start redis
# Install SSH server
yum install -y openssh-server
# Start service at Boot
systemctl enable sshd
# Start ssh server
systemctl start sshd